1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

led MATRIX CURRENT DRAW

Discussion in 'Microcontrollers' started by MrDEB, Oct 4, 2012.

  1. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Been working on a 5 x 7 RG matrix using 220 ohm resistors on the anodes and uln 2803 on the cathodes. Everything works fine so I got curious as to current draw. Placed DMM after one of the resistors and one anode. After turning on all five LEDs in this row the current draw is only 3ma.
    Must have something wrong with circuit or application of DMM.
    NOTE I had the LEDs on constantly, no blinking.
    Wonder why the LEDs are not to bright. Brighter than me I guess?
    This dosn't compute = 5v VCC - 1v for the ULN2803 should be 18ma w 220 ohm resistor.
     
  2. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    oh crap! I forgot the voltage drop of the LEDs
    back to the drawing board
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,796
    Likes:
    134
    Location:
    morristown,tn
    ONLINE
    Don't worry most never figure that out and been in collage
    Four years and say there a EE lol
    The thing to worry about is when you hook up one led and for get
    The resistor
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22

    I got LOST, mad at myself for forgetting that the actual current draw one has to consider the voltage drop of the LED.
    Need to reconfigure my resistor pak after I insert a leaded resistor and read ACTUAL current draw. Some quick math going backwards if I have .003 ma with a 220 resistor have about .4 volts.
    figuring 5v Vcc, 1v for ULN2803, then figure out the voltage drop (the data sheet I need to re check) but using the measurements I have I calculate a voltage of .45v
    So .45 / 220 = .002 ma. just about the current draw I have now. So using .45 ? .020ma = 22.5 ohm resistor? Sounds too small. Need to verify but I am expecting some different LED Matrix next week that are brighter and more efficient. The present one is 8000 - 33000 L where the replacement has 44000 - 205000L as per data sheet.
     
  6. Pigskin Tony

    Pigskin Tony New Member

    Joined:
    Aug 20, 2012
    Messages:
    18
    Likes:
    0
    Wow. You've kind of messed up your units!

    Ohm's Law:

    V = I * R where

    V = volts

    I = amps

    R = resistance in Ohms.

    0.003 mA may or may not faintly light an LED.

    But you really have 0.002 A * 1000 = 2 mA (assuming your math was right). This level will light an LED dimly.

    You might understand what you mean but nobody can be sure you do.
     
  7. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,645
    Likes:
    246
    Location:
    North west UK
    Its far to much for me and my manky screwdriver.
     
    Last edited: Oct 5, 2012
  8. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Video and basic schematic

    I included wires so people can follow where connections are.
    Dim LEDs to say the least. Need to order a different resistor pak after inserting say 100 ohm or ?
    Yes its says 1.72ma when all 5 leds are ON[video]http://s992.photobucket.com/albums/af44/MrDEB/?action=view&current=Video3.mp4[/video]
     
  9. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Since nobody is jumping in here, I'll make a comment.

    The way you have it drawn won't work for a couple reasons. The biggest is the a PIC port pin can supply at most 25 mA. If you have all 7 LEDs illuminated, that's less than 4 mA each.

    What you need to do is connect a port pin to each anode in the column via a resistor (I.e., seven port pins and 7 resistors) and the COMMON cathodes are connected to ground via the ULN2003/ULN2803. Only one column is ever on at the same time (by turning one EXACTLY ONE ULN2803 gate at a time) so each LED can draw up to 25mA. If all 7 in a column are on, a maximum current of 175 mA will flow through the ULN2803 gate.

    The anodes of All 5 columns, or really 10 columns for the R/G matrix, are connected in parallel to the same port pin. Since EXACTLY ONE column will ever be active, the full 25 mA of the port pin* is available to an illuminated LED.

    * actually, there is some total current draw per port or for the entire PIC, so the limit may be less than 25 mA.

    This is all I'll say on the subject. Heed or ignore it as you wish.
     
  10. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    The schematic is only a portion of the circuit. I have 7 resistors each one connected to a ROW(anodes) while the ULN2803 is connected to the COLUMS CAthodes)
    One uln2803 for the RED cathodes and one for the green cathodes. Only one ROW(anodes) is ON while the COLUMS(cathodes) are on as desired. So basically only one ROW is HIGH while up to 5 colums (cathodes) are LOW via the ULN2803.
    What I am doing right now is determine how large of resistance on the ROW"s to obtain 20ma per LED.
    One has to consider the voltage drop of the LEDs plus the voltage drop of the ULN2803.
    Using a DMM for actual in circuit results. Yes ohms law can get a ball park figure but working backwards using the measured current draw to determine what the actual REAL TIME current draw is what I am assessing. Sound simple and it is BUT! I want to avoid surprises.
     
  11. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Removed resistor and put DMM in place of

    All 5 LEDs are in series through the DMM
    1 LED segment ON = 8.4ma
    2 LED segment ON = 9.4ma
    3 LED segment ON = 10.7ma
    4 LED segment ON = 11.1ma
    5 LED segment ON = 11.4ma
    To get a 20ma draw I may need to add additional ULN2803 to drive the Anodes or ??
    I wouldn't think the ULN2803 has such an effect unless I am missing something?
     
  12. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Oops. I mis-understood your drawing - sorry.

    But if you are measuring current as you say, you're not activating the LEDs correctly. Only one column should ever be on at the same time. You cannot have more than one LED on in a row. The port pin supplying the anode can and must only drive one LED.

    You may have a larger problem. The data sheet you linked shows Vf for the red at 4.0 volts @ 20 mA and 3.95 @ 20 mA and the green is 4.4v @ 20 mA and 4.35 @ 10 mA. With the voltage drop of the ULN2803, you're out of gas starting at 5v.
     
  13. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    If the LEDs are wired in series you should have the same current flowing through each LED.
     
  14. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    I think he means they are in parallel if his drawing reflects reality, but driving 5 LEDs off one resistor doesn't work so well.

    If the LEDs were in series, five of them would require over 20 volts to drive the string.
     
  15. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    have seen this same circuit on 3v where the anodes are connected as per my schematic. but the leds are smaller or?
    these are high brightness etc. Back to the data sheets
    Getting some different LED matrix that are 44000-205000L vers 8000-33000 the ones I am presently using.
    The circuit needs to be reworked perhaps by adding one more ULN2803 and supplying 5v or more to the LEDs.
     
  16. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    JonSea what data sheet did I link to?
    I don't think or can't find where I even posted a link to the data sheet unless your referring to one I posted elsewhere?
    the present matrix is TBC-40-11EGWA
    The new replacement LED matrix TBC40-12SURKCGKWA. Not even sure Kingbright has on their website?
     
  17. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    Good point on the forward voltage.
    Need to go back to the drawing board.
    Easiest solution is add another ULN2803, increase the voltage to the LEDs.
     
  18. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    You posted a link to Kingbright TBC-11EGWA on Brad's Project Page. I based the comments about the forward voltages on this data sheet, which you said was the display you said you have.

    Later on Brad's page you said you have a Kingbright TC40-11SRWA display.

    My comments re the Vf may not apply...look at the data sheet.
     
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,796
    Likes:
    134
    Location:
    morristown,tn
    ONLINE
    Mrdeb You can't do what your trying to do the pic is good for 25 mA a pin and if you place 5 leds they would use all the voltage basicly and even with no resistor you'll never see 25 mA on each.

    Power is like water one small hole and great force 5 holes and you get a dribble
    Now if you feed five lines being use five pins to source power and skink with the ULN2 you get almost the full output.
     
  20. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    I failed to see the forest because of all the trees in the way.
    Thinking a third uln2803 but have 9v powering the Anodes.
    the uln2803 will isolate the pic from the LEDs.
    9v > LED row0>390 ohm resistor > pin 18 of ULN2803.
    will draw a simple schematic after dinner.
    I failed to realize that the matrix has two leds per segment which is why it has a Vf of 4v.
     
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,796
    Likes:
    134
    Location:
    morristown,tn
    ONLINE
    The
    you need 30 mA to get full brightness from this.
    You need to use a driver to source power to really do what you want. And scan the chip one led at a time.

    The way the chip is made if you light more leds then one at a time you'll be lighting a row of them or a column.

    These will light fine a 10 to 20 mA one dot at a time but if you light rows at a time there no way to keep them even brightness.......
     

Share This Page