For some reason, I’m intrigued by LEDs. Indeed, they can be found in pretty much all of my projects. I was recently inspired by one of Greg Davill’s projects, a miniature LED cube boasting a total of 3456 LEDs. After pondering about it for a while, I decided I’d attempt building one myself. This post describes the realization of this beautiful cube.
I initially guessed that assembly of the LED panels would be the most challenging part of this project, and it turned out to be true. I had succesfully attempted reflow soldering before, but that project didn’t require cramming 576 RGB LEDs onto a tiny square surface. The excellent people over at PCBWay.com were friendly enough to sponsor the PCB panels for this project. The boards are 1.6 mm thick and feature a black soldermask, ENIG finish and white silkscreen. I love this combination of colours. The boards are of excellent quality and so was the stencil that came along with it. If you’re looking for a reputable PCB manufacturer I’d happily recommend PCBWay. Nowadays, they also offer all other kinds of manufacturing services such as 3D printing and CNC machining but I’ve yet to try those services.
If you’re looking for details on the design of the electronics I would recommend reading Greg’s build post. In short, these panels are driven using a technique called multiplexing. Matrix rows are controlled by SN74HC595 shift registers that in turn control 24 MOSFETs. Six TLC59025 constant-current LED sink drivers control the rows. I started by assembling the bottom side of the panels. This is pretty straightforward since the components are all fairly large. Some panels required some rework after coming out of the oven, mainly due to solder bridges between leads on the TLC59025 QSOP-24 packages.
Next up: front side assembly. This was, quite obviously, more difficult. I knew that manually placing 576 2×2 mm2 LEDs would be cumbersome without proper equipment, so I purchased a Quick 381A vacuum pick/place tool. I’m really glad that I did, because it flawlessly does the job. Once I got the hang of it, I was able to fully populate one panel in about an hour.
I made some very instructive mistakes during the assembly of seven of these panels. Lessons learned include:
- Closely monitor and control reflow temperature, because if you don’t, LEDs will magically fail. On my first panel, a large band of LEDs in the middle of the PCB failed, but only the red ones. I couldn’t figure out why until I realized these LEDs had been directly above the ceramic heating element in the oven… Aha!
- It appeared that alignment of the stencil on the PCB had to be fairly accurate and smearing had to prevented at all costs. I reflowed a PCB that had a tiny amount of smearing in one corner and it resulted in a bunch of bridged leads. I ended up having to rework about 10 LEDs on a single PCB because of this.
- Fix the temperature probe in place so that it cannot knock a bunch of LEDs off the PCB when you open the door at the end of the cycle…
I designed the frame for the cube myself and decided to keep it as simple as possible. Its size is 67 mm3. It’s a single part, can be 3D-printed and secures the PCBs in place using drafted edges. I chose to have this printed using Shapeways’ MJF printing process. It came out nicely, though the dimensional accuracy was not as good as I had hoped it to be. Initially, the fit of the panels in the frame was too loose, but this was solved by simply applying tiny amounts of superglue to the PCB edges and letting that dry out overnight.
I couldn’t find any programs or libraries that were directly compatible with the hardware on these panels so I wrote my own. Using Greg’s controller and gateware/firmware currently is not an option because the ongoing chip shortage has made sourcing the necessary parts all but impossible. Anyway, I only have a limited number of microcontrollers lying around and pulled out an Arduino Uno to begin with. I programmed most of the multiplexing code using low-level port manipulation instructions, which makes the program a whole lot faster compared to one that is heavy on functions like digitalWrite. Conceptually, the program is quite straightforward: configure a timer to trigger an interrupt every 1/2400 seconds. Each time, read and shift out a bunch of data, latch the registers and wait for the interrupt signal to do it all over again.
It’s a pain to debug code like this , but once it works, it works and it’s pretty quick too. The Uno is not capable of generating many fancy animation patterns at all, but I was able to get a really nice random sparkle animation going using only 3-bit color! I was a bit surprised about this.
Testing, assembly, results
Each of these steps was pretty uneventful. The panels are daisy-chained and hooked up to the Uno. Everything works!
Final assembly is a bit of a puzzle, mainly because you can (try to be) smart about the orientation of the panels inside the cube to ease routing of the flexible flat cables. I couldn’t be bothered too much, partially because I’m not yet trying to fit batteries and a controller inside the cube. This is something I’ll get to later.
Done! I love the end result. I was so excited about the end result that I didn’t want to delay publishing this post until I sourced batteries and a controller. Again, huge thanks to Greg Davill and PCBWay for enabling me to execute this project. It has taught me a lot about the software side of controlling LED arrays. Moreover, I’ve greatly refined my PCB assembly and rework skills.