Question on LED matrix current usage (calculation)
T&E Engineer
Posts: 1,396
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
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
Comments
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
·· 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
Comments....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
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 [noparse][[/noparse]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.
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!
· 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.
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
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
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.
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?
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
I bought all of these high current allowance parts and it still doesn't look like it is drawing more current ???
As I previously Replied, you are scanning your Columns and presenting data (on/off) at your Rows [noparse][[/noparse]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. ·[noparse][[/noparse]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
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?
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.
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
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.
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.
Robert
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.
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
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).