PDA

View Full Version : Question on LED matrix current usage (calculation)



T&E Engineer
04-13-2007, 08:25 AM
I have a standard 7.5 vdc 1 AMP parallax power supply (wall transformer) for my PDB.· However, if I have a 16x16 LED matrix with 256 LEDs total that are let's say 10 mA each. That means that the total current required for just turning on·ALL the LEDs are 2.56 Amps - not to mention the micro-controller, any external IC's, etc. Does this sound right? I have a scrolling LED message hardware/software that works fine on my 1 Amp Power Supply. Certainly I never have all 100 LEDs on at the same time but I have in a test program before and it looked ok to me but not super bright. Most of the time I need to turn the Lights out to make it look it's best. Should I be using a 3 Amp power supply? Could this be the reason why it is not brighter. It is not bad now but certainly not like any of the new super bright LEDs that have higher MCD ratings.

Since I made my original LED matrix from hand soldering 256 Jameco (3- 100 pks) 5mm LEDs, I have recently purchased some bi-color LED matrix "modules" (no solding the matrix together). Since they are bi-colored that means that each 8x8 module really has 128 LEDs (64 red and 64 green with a common cathode). This means that my 16x16 matrix (4 8x8 modules) will really use 32x16 or 512 LEDs being 5.12 Amps. I supose that means that the RED and GREEN LEDs would both have to be on - which I believe that's possible although I don't know what RED and GREEN LEDs both being on at the same time would look like anyway. So to be clear, I believe in this case I would only want 1 LED from each segment on (either red or green) at any time meaning only 2.56 Amps (or ~3 Amp power supply) if that makes sense.

Do I need a 5.5· or 3 Amp power supply? Where can I get this (if I really need one). Am I missing something here? I have never seen any wall tranformer more than 1 or 2 amps.

Does any of this make sense?

I would love to hear your ideas, comments about this.

Thanks for listening!



Post Edited (T&E Engineer) : 4/13/2007 12:32:29 AM GMT

RDL2004
04-13-2007, 08:55 AM
You need to stick a meter between your power supply and your project to get a clearer picture on how many amps it's using. I suspect your calculations are higher than the average draw, but not too far off.

There are AC adapters available that can put out the power you need. They will be switch mode types. Jameco has some.

Can you run the LEDs from a separate supply of their own? You could use a lower voltage and cut down on the power required that way.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick

Chris Savage
04-13-2007, 11:24 AM
Tim,

·· I·don’t know how your circuit works (not fully clear by the description), but in theory you shouldn’t be lighting up all LEDs at the same time. If you’re scanning the display at high speed then only on row or column (depending on how you do it) will be lit up at a time. Does your circuit not scan the display but directly drive the LEDs? If so bear in mind that the drivers you’re using may be able to drive x amount of current per leg but may have a maximum power dissipation that is less then all legs at maximum current draw. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

T&E Engineer
04-13-2007, 06:19 PM
Yes that's true. The LEDs are being scanned one column at a time (16 LEDs) every msec I beleive. But I heard that when you design this stuff you have to consider worst case of all the LEDs being on (256). But I supose since the column scanning interrupt is run every ms then only 16 LEDs should be enough to consider. So if they are 10 ma LEDs per say and there is also 16 100 ohm current limiting resistors (as part of the transistor / resistor circuits on the 16 rows) then each LED should only draw 1 ma (16 ma total) at any one time. Does this sound right? If this is the case then why even use current limiting resistors at·all? It would sure make the LEDs brighter but I am afraid of destroying the LEDs too.

Comments....

RDL2004
04-13-2007, 06:57 PM
Remember that the current limiting resistors are using power also.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick

LSB
04-13-2007, 08:36 PM
T&E,
If colums of 16 LEDs are being scanned, then 16 is the worst case scenario and all the further you need to consider--for the LEDs.
Where the question lies is in your phrases "if they are" and "say there is". To design for worst case, you must "know they are" and "know there is". Here [http://www.bcae1.com/led.htm] is a page with a calculator on it that will tell you how many milliamps draw for a given voltage/ resistor combination; multiply the figure you get by 16 for a total draw per column and add 250 mA (high, but safe) for the stamp module, plus figures from datasheets of your other devices attached.
It's also possible to over drive LEDs for short periods--as when scanning. If you can track down a part number on the LEDs your using and do some experimenting with spares... use a 500 ohm or 1k pot and keep lowering the resistor value as you pulse them (remember you want to mimic the scan time as well) until you get the brightness you require, then measure the pot value.

T&E Engineer
04-13-2007, 08:39 PM
Thanks to everyone. I really appreciate the good input.

T&E Engineer
04-15-2007, 08:47 PM
I have posted some of my questions on another electronics forum. One guy is sure that I need a 5 or 10 A power supply and some 5 - 10 A· - P channel FETs to replace the ULN2803 column drivers. I am thinking it is a matter of the MCD brightness level of the LEDs themselves but not really sure. I am currently using 10 mA (1.5 MCD) T 1 3/4 JimPak red LEDs.

http://www.electro-tech-online.com/micro-controllers/29002-ds1302-parallax-sx52-16x16-led-matrix-scrolling-clock-additional-circuitry.html

I have tested the current draw to only be 35 mA to 90 mA not anything that oversaturates the 2 A power supply I have (to Vin on the SX52 protoboard).

Read the other link and tell me if this makes sense. I'm just not getting the reasoning from that I am seeing on my end.

Thanks!

PJ Allen
04-15-2007, 09:30 PM
· The mcd has nothing to do with it, it's all about the current and nothing but the current.· 10mA each (your figure.)

· If they could all be on at the same time, that'd be 2.56A.· However, since you're scanning/strobing, if they're all on at the same time then it'll be because of a major breakdown in the event of which it might be a good idea if the supply started to sag (limit.)

· If all the LEDs in a column were on, 16, that'd be 160mA.· In your current budget, you need to add what the ICs are using, etc., too·(and no big deal there.)· If the operational draw is > 1/3A then I'll buy you a Happy Meal.

· Anyway, lives are not at stake, so -- relax, old son.

T&E Engineer
04-16-2007, 07:57 AM
I just ordered a 5vdc 20 Amp power supply for this project to HOPE to get some better brightness in the LED matrix project. I'm not saying what I have now is bad because it isn't. However, I don't think I am driving it to it's full capacity in current.

http://www.trcelectronics.com/Cosel/p100e-5.shtml

(Bought it on Ebay new for $10 + $12 shipping - not the $155)

Now that I don't have a power problem, what other high current parts should I buy to complete this project to perfection?

Thanks for·the great support!


Post Edited (T&E Engineer) : 4/16/2007 12:03:59 AM GMT

T&E Engineer
04-16-2007, 10:08 AM
On Digikey I found some good high current PNP transistors to drive the ROWs (Anodes) of my 16x16 LED matrix:

TIP32C· TO-220· 3A· 100V· $0.50 each or 25 for $9.45

http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=110739&Row=1083633&Site=US


PN2907ARLRAG· TO-92··· 600mA·· 60V·· $1.70 for 10·· (probably need 20)

http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=110739&Row=899449&Site=US



MPS751RLRA·· TO-92·· 2A·· 60V·· $2.56 for 10··· (probably need 20)

http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?Ref=110739&Row=816604&Site=US




Is it best to get the highest current rating that I can afford (e.g. 3A to cover the 2.56A worst case for all LEDs on?)



NEWS FLASH: I JUST FOUND THE PN2907ABU for $0.05 each when I buy 25 ON MOUSER.COM.

http://www.mouser.com/search/refine.aspx?Ntt=PN2907ABU

IS THIS THE BEST TRANSISTOR (SET ASIDE PRICE) FOR THIS CIRCUIT ???

Please let me know what the best way is to go with this.

Thanks again!


Post Edited (T&E Engineer) : 4/16/2007 3:02:52 AM GMT

T&E Engineer
04-17-2007, 05:25 AM
I bought some PN2907A FETs (800mA) and 2.4 amp Fairchild FDN304PZ P channel FETs on Mouser.com today.

As a side note, I received some UDN2982A-T samples from Allegro Microsystems. These appear to be 500mA output drivers similar to the ULN2803 (but not inverted).

Can these or should these be used in the design instead of the P channel FETs.

T&E Engineer
04-22-2007, 09:20 PM
This time I took the original design using the 2N3906 transistors/1K resistor/100 ohm resistor BUT replaced the 2N3906 PNP transistors (xx mA?) with the newer PNP 2907A (800 mA) that I got in from Mouser yesterday. I also bought some more breadboards so that I could bread board the (4) 8x8 modules. After I had to rewire it a couple of times to get it right, I also used the new SX48 OEM module (so no soldering was required). I did not connect the DS1302 real time clock for simplicity (it was using default information).

What I noticed was with using the PNP2907 (800 mA) and ULN2803 (500 mA) and measuring total current, it went from about ~60mA or so when onlu displaying 8 rows worth of data to about 180mA when scrolling up the smilley face (using the 16x16 entire display - not just 8 rows to display either time or default date information). I did notice as before that when the smilley face was scrolling - it was somewhat dimmer but not bad (AS IT HAD BEEN BEFORE ON MY OTHER HANDWIRED 16X16 LED MATRIX).

What I am saying is that I have seen relatively no improvements in brightness or significant draw in current. The entire display is also using the internally regulated new 5v 20A power supply. With less than 200mA I was not too concerned.

If I did change the PNP transistor circuits resistor to 1K-> 100 ohm and original 100 ohm to 10 ohm, yes it was brighter but I am still not drawing 2-5 Amps of current like I expected I would see after using these new parts (2907A PNP transistors and (4) new 8x8 LED modules and 5v 20A power supply).

I only used my original but modified design to demonstrate as a test to see if there were any significant improvements in the display and more excessive current draw.

Im not saying the display is bad (certainly with 10 ohm resistor - it is better in a well lit room) - AND they always look much better in a darker room (e.g. ambient light coming in but overhead lights are shut off) too - I just expected to see more current draw thereby max brightness in the LEDs.

The attached photo's are taken with the lights off as my digital camera didn't differentiate too well between the pictures with the lights on and the pictures with the lights off. Also disregaurd the double images as it was scrolling and it appears bad but it wasn't. Also you will notice the top row of the bottom 8x8 LED modules are brighter (this is because "for that single row only" I changed the 1K to a 100 ohm and the original 100 ohm to a 10 ohm with of course all of the PNP transistors being 2907A).

Also I notice on digtal clocks they always have a red filter lense - maybe this is all that the issue is (to block out light around the display)?

Ideas...comments?

PJ Allen
04-22-2007, 10:19 PM
T&E Engineer said...
I am still not drawing 2-5 Amps of current like I expected I would see after using these new parts
Why do you "expect" that you should draw 2-5A?· Do you reckon that desirable?
Update -- Run a program which results an "all-on" condition and measure the draw given that.

Post Edited (PJ Allen) : 4/22/2007 2:26:02 PM GMT

T&E Engineer
04-22-2007, 10:54 PM
When all the LEDs are on....the LEDs are very dim. I still am being limited to about same amount of current < 200 mA total. This does not change even with the new 5v 20A power supply, ULN2803 (500 mA allowance per leg), PN2907A (800 mA allowance) and (4) new 8x8 LED matrix modules. Wouldn't you think this should be at least 10mA * 256 = 2.56 A ?

I bought all of these high current allowance parts and it still doesn't look like it is drawing more current ???

PJ Allen
04-22-2007, 11:19 PM
T&E Engineer said...
Wouldn't you think this should be at least 10mA * 256 = 2.56 A ? (replace this text with what was said)
No.
As I previously Replied, you are scanning your Columns and presenting data (on/off) at your Rows [parallel.]· There is only one Column enabled at any time.··So you could/should not have anymore than 16 LEDs on at any particular time. ·[10mA X 16 = 160mA, 20mA X 16 = 320mA.]
Update -- The apparent brightness is dependent on your scan rate, at a certain point there'll be no noticeable further increase no matter how much current you drive through.· Scanning columns and presenting parallel data (which I think you are trying to do) will look a lot brighter than if you were also scanning your Rows, "serially", then there would only be one LED on at any point in time (this would result a much dimmer display.)

Post Edited (PJ Allen) : 4/22/2007 3:30:48 PM GMT

T&E Engineer
04-22-2007, 11:41 PM
PJ Allen,

I changed my code (as a test) to only scan (1) 4x4 LED Module (8x8 display). It was somewhat brighter. When I did a test to turn on all the LEDs (8x8) I did get more current draw of ~250 mA.

I am scanning the columns but I was told that if I scan the rows and move the current limiting resistors to the cathode columns that this would fix this issue. If I scan the anode rows, then I would think the letters would scroll·up or down vs scrolling from right to left.

I was also told that I might want to use a higher anode supply (12 vdc or more) and some P-FET / N-FET combo circuits on the anode rows due to the increased voltage.

OR ... the other option was to scan only 8x8 (with current 5v supply) and somehow adjust the code for the other 3 additional 8x8 LED modules.

Your thoughts?

PJ Allen
04-23-2007, 12:07 AM
I need you to confirm your present situation.· Is it scanned columns with the rows getting parallel data (or scanned rows with columns getting parallel data -- same difference)?··[ Y/N ]

What is your present column rate (what is the time-on, ton, for a column)?· I think that you want that to be as slow as possible, sparing flicker·(as close to persistence of vision as possible, 33msec/field; 2msec/column, because more time-on means more time for the eye/retina to see, and so more apparent brightness.)

12V, 24V, 220V; PMOS, NMOS; combo-shmombo -- won't make a difference.

Up, down, sideways... How does that make a difference?··Where I'm standing, it doesn't.

RobotWorkshop
04-23-2007, 12:55 AM
One thing I haven't seen mentioned yet in these threads about driving an LED matrix is overdriving the LED's. You have to be careful when doing so but I have seen this done on refreshing displays. Since the LED's are only on for a fraction of the time some circuits can supply a higher current with the assumption that the LED's will always be refreshed and not allowed to stay on so that the average current will be within the LED specs. If carefully designed and tested this can give you the brighter display you are looking for.

In some cases i've seen this done on I/R LED's as well to get nice bright pulses or I/R for better range. Those were being driven exceptionally hard and had Heat sinks on them to keep them cool. That was an extreme case though.

Robert

Post Edited (RobotWorkshop) : 4/22/2007 9:31:42 PM GMT

T&E Engineer
04-23-2007, 03:00 AM
I need you to confirm your present situation.· Is it scanned columns with the rows getting parallel data (or scanned rows with columns getting parallel data -- same difference)?··[ Y/N ]
What is your present column rate (what is the time-on, ton, for a column)?· I think that you want that to be as slow as possible, sparing flicker·(as close to persistence of vision as possible, 33msec/field; 2msec/column, because more time-on means more time for the eye/retina to see, and so more apparent brightness.)
12V, 24V, 220V; PMOS, NMOS; combo-shmombo -- won't make a difference.
Up, down, sideways... How does that make a difference?··Where I'm standing, it doesn't.

PJ Allen
04-23-2007, 04:30 AM
T&E Engineer said...
I am scanning columns (cathodes using ULN2803s) and the rows are getting parallel data. I am displaying all of the LEDs every 1 mSec via an interrupt which also scans the columns.
So, you're going through all 16 columns·in one·millisecond ( 1ms / 16 cols = 62usec/Column )?· If so, can you slow that down?

T&E Engineer
04-23-2007, 05:45 AM
On the 16x16·LED matrix, I·tried lowering the Interrupt calling (e.g. INTERRUPT 62). At 61 or lower, I get an error when trying to program the SX48. SO the INTERRUPT can be between 62 and 7999999. At 61 or 8000000 I get an error (INVALID PARAMETER).

At very low mSec rates (e.g. Interrupt 70) - I get flickering somewhat heavy with what looks like slow refreshing. The flickering is almost gone at about 620 mSec Interrupt rate.



I also had a change to my circuit for the better...

I had made some changes to my design as I remembered I had Allegro Microsystems send me some UDN2892s. These are basically the un-inverted version of ULN2803s. I have them on my rows in replacement of my (inverter transistor/resistor circuits). Since the UDN2892s dont invert (500mA driver) they work great. However, I did remember to add in the 100 ohm current limiting resistors on their outputs going into the LED row Anodes. I did have to fix my Interrupt routine to accomodate the un-inverted new anode row drivers. Currently as a·test,·I have a smiley face scrolling up on the 16x16 LED matrix. It has the same "dimmer" brightness as I had before when I used the inverter transistor/resistor circuits.

I think as a must I am going to use 10 ohm resistors (or see what ever I can find 16 of that are less than 100 ohms) and not the 100 ohm current limiting resistors on the outputs of the rows. I suppose I could instead place them on the outputs of the column cathode drivers (ULN2803s) if you think this would make any difference.

When the smiley face scrolls up and stays on the 16x16 LED matrix for 2 seconds, the most I get is < 100 mA total current.

RobotWorkshop
04-23-2007, 06:13 AM
If you have some extra 100ohm resistors you could temporarily double them up (two in parallel) and knock the resistance in half to 50ohm. If you try that on just one you should be able to see the difference it makes on one row before changing anything else.

Robert

PJ Allen
04-23-2007, 06:19 AM
OK -- I give up.

T&E Engineer
04-23-2007, 06:58 AM
Currently I am now using 10 ohm current limiting resistors instead of the 100 ohm that I was using before. This has significantly brought up the brightness less but I still am not drawing any more current·than maybe 1/4 or 1/3 of an Amp on a 16x16 display.

I am also using the UDN2982 driver IC's (with the 10 ohm resistors on their·row anode outputs)·instead of the 100 ohm used previously.

I am satisfied with the display especially if it is a little darker in the room - much brighter with 10 ohm. I also have a few 2 ohm resistors but I am afraid of going any less than 10 ohm for fear of detroying the (4) 8x8 LED matrixes.

I think I have beat this dead horse into the ground long enough and take it for what it is.



Thanks to all - especially PJ Allen.

Now I want to take this mess of wires and come up with a good PCB design.

T&E Engineer
05-04-2007, 08:44 AM
I decided to come back to this and found a strange occurance.

As a test I wanted to see what would happen if I lowered (1 of the 16) - ·22 ohm resistors my matrix is using·to a 2 ohm. Surprisingly I saw no difference in brightness. The brightness is lowered when 5 or more LEDs are on a column.

As another test, I removed the resistor and still saw no difference. I started removing all of the 16 current limiting resistors and so there were no resistors (just 16 anodes, 16 cathodes, 2 UDN2982s and 2 ULN2803s going to 32 I/O lines of the SX52.

What I did notice is that the current·was measured previously at·~300 - 640 mA. Now it appears to·be about 20-30 mA.

Does this sound right?

On a side note....I etched a custom soldering board with 16 of the surface mounted P-Channel 2.4A FETs as described earlier. I will take out the UDN2982 and try using this double sided PCB (8 P-FETs on each side) and see if this helps. This means there will be (as a test)...16 Anodes, 16 Cathodes {LED matrix 256 LEDs total}, ULN2803 (2) - {probably should add back the 16 - 22 ohm resistors - but this time put them on the outputs of the ULN2803s not the UDN2982s - that are replaced with the P-FETs}.···· Do I need to pull up 1 K resistors on the Gates of the P-FETs?

Thought...Comments.

Post Edited (T&E Engineer) : 5/4/2007 11:48:54 AM GMT

T&E Engineer
05-05-2007, 08:44 AM
I have solved the brightness issue in the 16x16 LED matrix by going back and reading closely some earlier posts.

1. I am using ULN2803s with current limiting resistors (I have used 22 ohm and 100 ohm and their is no over or under brightning differences like I saw before) on the cathodes.

2. I have replaced the UDN2982s / (or previously used transistor/resistor circuits) on the 16 Anodes and removed the current limiting resistors (now on the ULN2803 outputs going to the 16 cathodes).

3. I am now using 2.4 Amp ·P channel FETs. They are surface mount (extremely tiny) components on the Anodes. The Source lines are tied to +5vdc. The gates are connected to the SX52 outputs and the Drains are connected to the 16 Anodes. I had to make a PCB (etched from Radio Shack kit) to hold the 16 P-FETs and run wires to the solderless breadboarded test setup with the components and 16x16 LED matrix.



At first I noticed that when scanning the columns (as I did before) that when more than 5 LEDs were on in any row they were dimmer than the rest. However, when I had the rows scanned (Anodes) WOW... ALL THE LEDs were on with the same brightness!!! This is because the P-FETS were drawing more current. It did not seem to matter (as it did before when scanning the collumns) of the current limiting resistor values (e.g. 100 ohm, 10 ohm). I had now set the first 8 columns with 22 ohm and the 2nd 8·columns with 100 ohm resistors but all the LEDs had the same great level of brightness. Not super blinding but a nice consistency accross the board of the 16x16 LED matrix.

It was amazing to me that I needed to replace the row drivers with the P-FETS AND I needed to scroll the rows (Anodes) and not the columns as done· before. What a difference!

i still drawing less then an Amp so I can use the Parallax normal 7.5 vdc 1 A supply going into the SX52 Protoboard.

I hope to have some continuing great progress on my design this weekend - now that the brightness issue is solved completely. The only downside is that I if I want to maintain the constant brightness across all the LEDs then I can not scan the cathode columns (only the rows - Anodes).