0
\$\begingroup\$

I'm trying to power a project where I have 14 red LEDs lighting fiber cables controlled by an Arduino Nano. I want to make them pulse at maximum brightness to resemble veins.

I have the LEDs set up in parallel, each with a resistor. Due to time constraints, I used 470 ohm resistors that came with some other LEDs I bought (to avoid ordering more.) I realize now this was dumb, and I can no longer use the Arduino PWM to fade up to maximum brightness.

I understand that I will probably have to use a transistor to make it fade.

I could really use help with the following:

  • Math help calculating the voltage and current parameters that would make the LEDs shine bright while also being convenient to power with common battery types.
  • What kind of battery to use.
  • What transistor to buy, and the best technique to use to fade the LEDs.

Here is the datasheet for the LEDs.

  • Current - 20 mA max
  • Forward voltage = 2.0 to 2.4 Volt
\$\endgroup\$
4

1 Answer 1

2
\$\begingroup\$

From the datasheet

LED Imax = 20 mA.
LED Vf (forward voltage) = 2.0 to 2.5 Volt

Assume the Arduino and LEDs operate on 5V.
This assumption can be altered.

For a series LED resistor Vr = 5V - Vf = 2.5 to 3V.
The resistor will drop this voltage when LED current flows through it.
R = V/I = (2.5 to 3V)/I
Assume 20 mA and 3V to start.
R = V/I = 3/0.020 = 150 Ohms.

Here is a basic circuit.
You can use 1 LED or many per circuit - each with its own resistor.
You can have a number of these circuits - each with its own PWM pin.

Q1 can be almost any cheap bipolar transistor.
I've shown a BC337-40 which is superb and usually low cost = but many others work OK.
R1 at 10k will work for multo LEDs per transistor at 20 mA.
With large numbers it could be smaller - eg 3k3.

When PWM input is high Q1 is turned on and the LEDs light.
PWM low - LEDs off.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ However, if the LEDs all have 470 ohm resistors on them, then the power supply for the LEDs needs to be 12V to get 20mA per LED. \$\endgroup\$
    – Simon B
    Commented Jun 27, 2020 at 13:12
  • \$\begingroup\$ @SimonB B Yes, it's proportional to volatge. But it's always better to put several LEDs in series to come close, but not above the supply voltage and then add a requiered resistor with less impedence. \$\endgroup\$
    – Fredled
    Commented Jun 27, 2020 at 13:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.