5
\$\begingroup\$

My arduino UNO can provide max 40mA and 5V and what i need to control is 2.2V 60mA. I will use 4 shift registers (74hc595) connected to arduino and each shift register output will have a transistor attached, which will control 3 LEDs (2.2v, 20mA each) in parallel. The power source will be of 3V (two AA batteries in series) Will this (http://www.taydaelectronics.com/2n3904-npn-general-propose-transistor.html) work? If yes, what resistor should I use with the transistor? Moreover, will this configuration work?

\$\endgroup\$
1
  • \$\begingroup\$ It sounds like you are using shift registers to actually drive the LEDs, in that case it's not the current driving capabilities of the arduino that matters but the current driving capabilities of the shift registers connected to the LEDs (in this case the shift register is still going to need something to allow it to drive 60ma) \$\endgroup\$
    – Gorloth
    Commented Apr 25, 2013 at 0:13

2 Answers 2

1
\$\begingroup\$

The transistor should work OK - at 50mA current the spec says it's current-gain will be about 30 so plan on maybe 15. This determines the resistor you must have in series with the base. The UNO's o/p is 5V (see final paragraph in case it is 3V) and the transistor needs 0.7V (approx) at 4mA drive. This means that the 5V o/p gets reduced to 0.7V through the resistor which takes 4mA - the resistor value is therefore 4.3V/4mA = 1kohm to consistently drive the base and get 60mA through the LEDs.

Next you need to limit the current taken by the LEDs to 60mA BUT, be aware that connecting LEDs in parallel with a common current limiting resistor may not be the best bet. Reason: One LED will hog the current so it is best to have a resistor in series with each LED controlling the current to 20mA each. The LEDs need 2.2V and the battery produces 3V so the volts dropped across each resistor is 0.8V. The current is 20mA so the resistance is 40ohms - use a 39 ohms resistor in series with each LED.

Going back to your original question, you specify the UNO can deliver 5V - if the UNO is run from 3V then the base resistor for each transistor needs to be reduced to 2.4V/4mA which sounds to me like a 560R or 680R - my calculator is at work so I'm sure you can do the math.

\$\endgroup\$
2
\$\begingroup\$

One suggested option that involves no code or design changes, no transistors, and just one resistance calculation:

Replace the 74HC595 in your design with Texas Instruments TPIC6C595 shift registers instead. These are higher current versions of the 74HC595, supporting up to 100 mA per output pin. They use power DMOS transistors for the output stage, instead of low current elements.

The same family also offers TPIC6A595 for 350 mA per channel, and there may be similar power logic shift registers from other manufacturers as well.

All you need to do then is add a resistor in series with each LED, computed in value to limit the current to what your LED requires.


\$\endgroup\$
3
  • \$\begingroup\$ Cool chip - this is way to go if MCU is on 5V rail \$\endgroup\$
    – Andy aka
    Commented Apr 25, 2013 at 10:20
  • \$\begingroup\$ @Andyaka Yes, the OP's Uno runs on 5 Volts ("My arduino UNO can provide max 40mA and 5V"), they're only wanting to run the LEDs on a separate supply. That works with this part. \$\endgroup\$ Commented Apr 25, 2013 at 10:27
  • \$\begingroup\$ Unfortunately I can't buy this chip, because neither adafruit, tayda electronics nor sparkfun offer it. \$\endgroup\$
    – user23036
    Commented Apr 25, 2013 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.