SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Igarashi
#76381
Hi, I'm working on LED arrays, and while there are quite a few posted on this board, there are a couple things I'm wondering about. Basically, why are there so many current *sink* ICs, but so few that are able to *source* current? There seem to be all kinds of serial to parrallel drivers with current regulaton, but I've found very few that can source it. (eg the MIC5891 from Micrel)

Why is this? If you're using a current sink IC, wouldn't you also need a current source IC?

I have an array I've built that uses a STP16CPS05 (http://www.st.com/stonline/products/fam ... /stp16.htm) to sink the current, and for sourcing it I have some 74HV595 chips, with NPN transistors off of each output so that they can source more than 20mA. This allows me to crank up the brightness pretty high. Basically I want my driving circuitry to be able to go brighter than the LEDs are rated for. Most of mine max out at 100mA at 1/16th duty cycle. So this works, for now, but it's quite a small array, and having lots of little SOT-23 transistors seems rather inefficient.

It also doesn't seem to scale well. This is certainly a problem that has been solved many times, and so I wonder what's inside big LED scrolling signs that you see at stores? How do they drive / sink all the current? Eventually you can't keep expanding the grid in both directions because your duty cycle would be too low, right? I mean once you get to 1/100th duty cycle, even driving an LED at 100mA for that time will still result in only 1mA current averaged out over the whole refresh cycle.

Could you put a little SMT capacitor for each LED, to sort of smooth out the current pulses to them, letting you use a smaller duty cycle with more current? Maybe that wouldn't work, I'm not sure.

Basically I'm looking for advice from people who have done a larger array and how to best scale things up while keeping the complexity resonable and cost down. I've seen the sparkfun pong-led-table page, which is great, but each of those 8x8 squares is like $60 right? So that's like over 3 grand right there. I'm not really in to that. I like it when, say, I order a reel of SMT resistors from digikey and it's like, hey, I got 1000 of something for $3! What else can you do that with! .. well maybe rice.

Anyway. Love to hear other peoples ideas / techniques / ICs they've found useful.
By nhunsperger
#76390
High-side constant current drivers have at least two problems. First, all loads are driven from the same voltage. Second, unless separate output voltage and logic voltage pins are available, your entire circuit would need to work at your maximum output voltage. Low-side drivers don't have these problems.

Now, why do these two points matter? For a simple, single-color matrix with 1 LED per channel, they don't. But as soon as you get into multi-color, multi-LED outputs, they start to matter a lot.

Assume you use 5 white LEDs for each pixel. This requires a drive voltage around 18V. If you wanted to use a high-side driver, you would either need to find an 18V-rated microprocessor, or add interface circuitry to translate logic levels. The low-side constant current driver would work without any additional circuitry.

Now, lets assume that you are going to drive an RGB matrix. Red, green, and blue LEDs have very different forward voltages. If you are limited to a single drive voltage (as with high-side drivers), then your driver must dissipate a lot of power when driving the red LEDs (as they have the lowest forward voltage). Multiply this waste by several thousand pixels, and your customer won't be too happy when they get the power bill.

I'm not totally sure I understand your proposed topology, but let me just cut to the chase and describe how I have seen this done on the "big boys" you refer to. I am going to assume a simple single-color 8x80 matrix.

The typical topology would be to connect all the cathodes in a column together, and all the anodes in a row together. Chain 5 of the 16-bit constant current low-side drivers together to get 80 channels, 1 per column. Each row gets a high-current high-side mosfet. To operate, load the drivers with the data for row 1, turn on the mosfet for row 1 for a while, then turn off. Now repeat for rows 2 to 8.

To add more rows, your desired duty cycle starts to come into play. Above, the duty cycle is 1/8. If you were to double the rows, the duty cycle would drop to 1/16, which starts to become a problem. Instead, double the drive circuitry and treat it as two 8x80 matrices. You could also treat it as a single 8x160 matrix, but at some point, you will run up against the maximum serial frequency of your drivers.

To go RGB, you would add more parallel circuits, essentially treating red, green, and blue as separate matrices. The drive voltage for each matrix would be set a little above the forward voltage for that color. Because green and blue have similar forward voltages, they normally share a power supply to reduce total cost. Because each color has dedicated constant current drivers, you can set the maximum current for each color separately to achieve uniform lumen output.

Do NOT put a capacitor across each LED. Doing so will cause huge current surges in your system, and probably enough EMI to cause you trouble. The problem with using capacitors in this manner is that each time you turn on an LED, you first have to charge its capacitor, which will act like a short circuit initially. If you were to use a constant current driver, your capacitors probably won't charge up to the LED's forward voltage fast enough.

Hope that helps a bit.
- Nathan
By Igarashi
#76391
Thanks for the info! I think I understand it quite a bit better now. So the basic design I've started out with is fairly close to what larger arrays use I guess -- I have a single 74HV595 on the side with BJTs sourcing current for the LEDs. Mosfets would be able to supply more current I'm sure. By "high side" mosfet, do you mean p-channel?

Actually I've always been a little unclear on FETs because with N channel FETs, pretty much every diagram I've seen has the gate being operated by a microcontroller pin either directly or buffered, and then the source tied to ground, with the load up above the drain pin. Raise the gate voltage, current flows down to ground through the load. Bring the gate voltage back down, the FET closes up.

But I don't think I've seen any instances of the load being put between the source and ground, with drain tied to a +5V or something. I've tried doing that on a breadboard though and it did seem to work. I guess I just don't fully understand the details of how FETs are supposed to be used, which is another topic entirely.

But anyway, thanks for clarifying that there is not really a way to scale up the array in both dimensions, and instead generally more sink drivers are added as separate rows. With 1/8th duty cycle for each row, I guess the sink drivers don't have to be especially powerful, but the FETs would have to source quite a bit of current. I like the STP16CPS05's I've tried, because they have 16 outputs (though I keep wanting to call them inputs since the current is going in to the pins!) and are constant current so the whole LED array has no resistors involved. The capcitor idea didn't seem like a good one even when I wrote it.

Are the high side FETs usually in discrete packages because they have a lot of power going through them? I guess 8 FETs integrated into a SOIC or something might overheat very easily, because I haven't seen those around either.
User avatar
By leon_heller
#76392
High-side switches have the load between the switch and ground.

Leon
By lyndon
#76415
Instead of using the '595 with outboard transistors, why not just use an 8-channel source driver? I have a couple tubes of UDN2987 that are rated at 300mA per output. PM me if you want to buy some.
By Mike, K8LH
#76455
The problem with 300ma or 500ma source driver ICs is that they don't provide the 'peak' current required to drive a row of 64 or more LEDs which are each looking for about 100ma 'peak' current (at 1/8th or 12.5% duty cycle). Use discrete 5-10 amp logic level low Rds(on) P-FET row source drivers.

One way to overcome serial-to-parallel bandwidth problems is to load the driver shift registers in parallel by throwing sixteen bytes (128 bits) and clock pulses onto the eight driver IC <data> and <clock> lines (pseudo 8 channel SPI). If you drive the Output Enable lines on the driver ICs from the micro's PWM pin you can force a 5% minimum duty cycle for a short blanking interval and re-task the high power row driver bus temporarily for use as <data> lines to load the driver shift registers. The PWM signal also provides complete fade-to-black brightness control when you vary the duty cycle from 5% (full brightness) to 100% (black).

Food for thought. Mike, K8LH

Here are a couple modular designs which can use eight 8-bit (64 columns) or eight 16-bit (128 columns) column driver ICs. Constant current type drivers would not require current limiting resistors on each column output line. You should probably use 8-10 amp rated P-FET row drivers for 128 column displays.

Image
Image
By Igarashi
#76522
Thanks for all the help -- this makes a lot more sense. And looking at those diagrams and searching a bit more about N-channel and P-channel FETs I finally understand where each can be used. In case anyone else is as confused as I was, I found a very easy to understand and thorough explanation at this site: http://www.industrialcontroldesignline. ... /199204060