In Part 1 I discussed the “requirements” for the project and determined none of the solutions I found on the Internet met my needs.  So to the drawing board I go…

The Design

I combined a couple different ideas into a single solution.  I decided to use a PWM-enabled constant current LED driver for the rows, shift registers to control the columns, and a set of “high side drivers” to provide the voltage and current for the columns.

Now, you might think that using a constant current driver would have “solved” the current problem wouldn’t you?  Well, that’s what I hoped but here’s a quick diversion into EE 101 for the implications for my design.

To save on the total number of output pins, I grouped 3 LEDs together.  To turn the LEDs on I need exceed their combined forward voltage.  For normal red LEDs, that’s about 2.1v; for blue and green LEDs, that’s about 3.2.  I wanted a mix of all colors, so I knew the source voltage had to be between 6.3v (2.1 x 3) and 9.6 volts (3.2 x 3).  The “closest” normal voltage is 12v, which is what I settled on.  That means the anthode would be connected to 12 volts while the cathode would be connected to ground.

LED Schematic

LED Schematic

As mentioned above, I decided to use to a constant current driver to control the rows, which puts the constant current driver at the cathode (i.e., ground).  As such, I need to drive the LEDs at 12 volts, but also use a constant current driver at the cathode.  Additionally, I need more current at the anthode than a single microcontroller ping can provide (~500mA vs 30ma).  Therefore, I need some sort of transistor at the anthode and there is where things get complicated.  Nearly every simple switching circuit I found would only work properly if the source voltage does not exceed the voltage controlling the transistor.  In my case, the control voltage is a normal logic level of 5 volts, but the source voltage is 12 volts.

I researched a lot of different configurations before I finally found a solution that meets the needs.  In short, I needed a “high side driver” – a driver that lets a small range of “drive” voltages control a larger range of “source” voltages.  Fortunately, there are a couple ICs on the market that (mostly) met my needs.  I really wanted to switch an entire column with a single control circuit, but an entire column would be approximately 840mA and all the solutions I found maxed out at 500mA.  So, I needed two ICs per column, leading to 16 “columns”.

After it was all said and done, I needed up with up to 48 rows, and up to 16 columns in the final design.  I combined two TLC5947 (code complements of Adafruit) constant current drivers with 2 74595 shift registers for the columns. The shift registers feed a pair of A2982 high side drivers that provide the current to the LEDs. In this configuration, each column can provide up to 500mA allowing me to switch approximately 25 rows at a time.  That almost perfectly separates the design in half; the 5947 provides 24 rows and the 74595/A2982 pair provide 8 columns at 500mA.  Double everything and I have 48 rows x 16 columns, or 768 control lines.  Theoretically, I can control 768 triads of LEDs, which is a whopping 2304 LEDs!

LED Driver v1.0

LED Driver v1.0

Fortunately, I did not need so many LEDs for my purposes.  Part 3 will document the manufacture, assembly, and testing of the final solution.  Stay tuned.