100 LEDs, 16 Square Inches
I wrote about a project back in August that I called the Twinkle Tag, as an experiment in PCB design and construction- seeing if I could fit 100 RGB LEDs, plus all the circuitry required to drive them in a scanning array based off the Peggy 2 from EMSL on a four inch square two-layer board. When I wrote the last post in August I had finished that design and had sent it out to Sure Electronics’s PCB fabrication service.
Forward to September. After around six weeks of waiting the PCBs finally show up from China. Where I purchased five boards, they sent eight. The quality of the fabrication looks alright. Clean routed edges are nice. A couple of boards look somewhat more suspect than others, with visible score marks. I assembled all the support components on one board and pulled a few PLCC-6 RGB LEDs off a short piece of flexible LED tape I bought a long time ago from DealExtreme. Quickly I noticed a few problems with the board layout- the most glaring of which is in the front side LED array- there are traces connecting sets of three horizontal rows vertically at the pads of the LED- it appears that the vertical traces that make up the column connections in the grid (on the positive side of the LEDs) were copied onto the pads on the row (negative) side of the LEDs. As well, one of the rows was missing a trace connecting it to the LED driver chip, rendering it dark. After a fair bit of meticulous rework with a dremel cutting blade and soldering small wire bridges the basic functionality was confirmed with the Peggy 2 demo programs. I had put off ordering enough LEDs- more were ordered shortly after receiving the boards.
Skip another month waiting for bits from China- my 500 PLCC-6 LEDS arrive on a spool. I finished up assembling the first board and replaced the older LEDs with the new ones that I just ordered- the pinout is different, with different leads corresponding to different color dies. Also the balance of color appears very different on the new ones- the red element is less prominent. I also dremel-ed and reworked three other PCBs, to prepare to assemble four full boards. Hours of soldering and troubleshooting later I now have three fully functional TTags, and one that still needs some tricky debugging. Above and beyond my board design problems I experienced a couple problems due to manufacturing defects in the boards- the trace width and clearance were right on the minimum specs from Sure.
I made some modifications to the row and column drive and the buffer size in the Peggy 2 library and was able to play with writing a demo program- just simply scrolling through color combinations. I’m pretty impressed that it works as well as it does, it’s quite mesmerizing.
The Good: It works, for the most part components, footprints and trace routing appear to be OK.
The Bad: Too many traces in a bunch of places, missing a trace somewhere else. Column traces are undersized for the current flow- causing brightness to fluctuate depending on number of elements on in a column.
The Future: Although I did some hacking on the software using EMSL’s Peggy 2 library and the Arduino environment, I don’t really have the passion or inclination to take the software very far- and most of the value of a device like this lies in the software- it could be very boring or become extremely exciting by virtue of the software running on it. It’s a blank canvas. The good news is that I offered the hardware to my friend Ben who is an extremely talented and adept software engineer and he has been enjoying hacking on it in his spare time, already making progress with neat stuff like software PWM dimming and maximizing the processing efficiency of refreshing the display to preserve resources for use by application code.
I’ve been planning a second hardware revision to fix the problems with the first design and add more useful features. Here’s what the list looks like:
- Move the design over to Eagle instead of KiCad. I’m borrowing a standard licence of Eagle from a friend- I’d like to give it a chance- I think I will be able to get the design in just under the 100mm (3.93in) limit.
- Design the board using a schematic netlist- last time I constructed the board by the seat of my pants, without a schematic and the intrinsic error avoidance help it provides.
As for changes to the board design:
- Redo all traces- make sure that there are no extra or missing ones (duh)
- Widen column bus traces to reduce resistance and ill effects of voltage drop
- The multiplexed column-select signals share pins with the USART, which is used for programming- this is the same as the Peggy 2 design. It means that the USART can’t be used while the display is refreshing, and that during programming the display flashes erratically. Because the Peggy 2 design uses 8 pins for column select, for two demux chips, and my design uses only one demux, and four pins I plan to move the demux off of those USART pins.
- Add an ICSP port, probably using a surface-mount 2×3 .100 header
- Add an analog-in/GPIO port for connection to peripheral sensors/switches, with +5V and Gnd. The pin order will be compatible with Sparkfun accelerometer breakout boards so that one may be directly attached with .100 pin-header.
- If I can find space for additional GPIO/I2Cbreakout ports they might be useful.
- Switch to a less-bulky surface mount microcontroller, pending addition of an ICSP port.
- Spec smaller less-bulky power supply capacitors. I doubt this board really requires as much capacitance as the Peggy 2, given that it has less than half as many LEDs, with LED driver current set very low.
- Fine-tune footprints for ICs, transistors and LEDs based on my experiences with the first design.
I have thought about the potential of making more of these, maybe even a bunch of them, depending on what applications might arise- I’d like to try stencil and reflow soldering of the LEDs to cut down on assembly time- as well I’ve thought that it would be really neat to put together a very specific purpose pick and place style device to populate the LEDs. Once consideration in thinking about that is the spotty quality of these super cheap chinese LEDs- I have found several duds in the four hundred I have installed. I imagine a setup where the LED is taken from the reel packaging, transfered to a test fixture that applies power and uses a light sensor to verify proper operation of the LED before placing it on the board. The fixture could serve double-duty as a way to precisely locate the position and rotation of the LED, given that there is a significant amount of movement possible inside the reel packaging. Just for kicks I drew up a PLCC-6 LED with six pogo-pins stuck to the bottom. Hey, might work…