Macbook Display Light

When I started at my current job I was a little disappointed to have one of the new USB type C MacBooks. These are the first of the model line to not use the screens backlight to illuminate an apple logo on the backside of the screen. I had the idea to see if I could make my own light and slap it on the back of the MacBook mimicking the older MacBooks.

There were a few first research steps I could easily do. From my 2019 Christmas gifts I already knew I would use the Adafruit Neopixels, I'd just need to make sure I could have to turn on & off with the MacBook. First trials were an instant failure to see if the MacBook’s USB Type-C ports would cut power as soon as it goes to sleep. Good for charging my phone in my bag, bad for this project. Not wanting to have a manual switch to turn everything on/off each time I spent a while searching around for solutions and found SleepWatcher. This software allows me to set up daemons which can run python/bash/etc files on sleep and wake up of the Mac. With that the final new challenge around this project was communicating between a Mac and Arduino. In all previous projects I'd only uploaded the code and unplug the Arduino from my machine. Now I'll be using them together permanently.

Sifting through the Arduino boards I had from past projects I settled on the tiny Adafruit ItsyBitsy with the Atmega32u4 chip. First tests were with a simple program to listen on the serial line and, based on the input the MacBook would send, light up the onboard status LED. With just a couple of lines of code(and a check of USB port addresses) I had a python script on the MacBook telling the Ardunio chip to turn on and off.

With the core idea down and a dirty breadboard laid out to make sure I didn't have any of my wires crossed I started on designing the circuit board..my first design (in an effort to save time in designing all the parts needed to get an enhanced IC chip working. was to solder the LEDs to the custom board and then have through holes to attach the entire development Adafruit board on instead of using my own individual system chip. A big concern I had from the start with this project has been keeping the design slim so I bit the bullet and decided to make the entire circuit on my custom board, Arduino chip and LEDs.

Adafruit has numerous helpful guides including board schematics for all of their products. With that I was able to isolate what I would need to get the Atmega32u4 chip plugged up to a micro USB port and a data line out to the Neopixels lights. After laying out all the wires I had a complete schematics and ordered the board and components.

There were a couple mistakes made during design that I didn't discover until assembly. I should have connected the USBs power line into both the in & output 5v lines of the atmega chip. I also did not provide any connection points to a few extra pins needed to flash the bootloader to the fresh chip before it can accept any programming. A reset button would have been nice as well for setting the chip into a state that can accept new programs. While soldering all the components to the board I cut up some stranded wire I had and was able to use the individual copper strands in it as micro connectors. One permanently on joining the 5v power lines together and another 3 to pins on the chip which I linked to jumper pins, these would assist by connecting to a parent Arduino for flashing the bootloader. To test each step I took I first only put a single Neopixels on the board and worked on the bootloader/programming for that one light before I committed 3 more lights soldered to a possible dead board. Using my Arduino UNO for the flash I followed similar steps as flashing my attiny25 and got the light on! Three more Neopixels later and I had a fully assembled light board. The final step was getting it into an enclosure.

Over the course of this project I was planning to try and keep the light as stock looking as possible so a passer-by wouldn't even do a double take at it with the standard apple shape. Thinking on the idea more I decided to take a different approach and embrace the new job, which I have the laptop for, with a silhouette of Mickey Mouse. I found a solid color jpg of the iconic 3 circles online and began working off of that. With Inkscape and a quick YouTube crash course I had an svg file that could be imported into blender. I turned the svg lines into a solid cylindrical shape and hollowed out the middle to put in the circuit board. To help disperse the light I planned to use a semi opaque resin. And for accessing any issues on the circuit board I decided to make the 3d print 2 objects. A base that would be attached to the laptop holding the circuit boards and a top cover which has the resin light diffusion in it. All attached together with some magnets (which tests and multiple Google searches have showed they should not disrupt any of the MacBook’s functionality).

With the 3d printed ears all done it was time for the resin. When first doing a few tests the resin was sticking to all surfaces I was using for the flat front. One comment I read a lot with my 2 part mold making is that the only thing silicone only ever sticks to silicone. So I checked my past silicone molds and found one with a large and smooth enough surface to use as the base of pouring the resin. After a quick 2 part mix and some degassing I had the resin poured and curing. Happy with the consistency of the mold in the ears all thats left was assembling it together. Epoxying the circuits board to the 3d printed base and using 3m adhesive to get that base attached to the MacBook I fired up the software and watched as the light turned on and off!

I'm the future I think I would like to try diffusing the lights differently so it's not as obviously where they are under the ears. Either by bouncing the lights off a different surface before it shines out or using a different resin which wouldn't be as transparent. Either way I'm really happy with how this project turned out, and even if it doubles the width of the MacBook it definitely gives it some character around the office!