I want to light up an LED strip via an Arduino (ESP8266)

The Arduino’s GPIO has a maximum output of 12mA. It is not enough to power a 5m length LED strip.

An obvious solution is to use a transistor to increase the current. I’ve followed an internet tutorial that used a TIP31 transistores, but my lights were too dim. The solution provided on this answer (RGB LED strip is too dim) is to halve the resistance to 200ohms and even that may not be enough because the current needed is about 2A per channel (6A total). They pointed to me that I could use a Darlington pair to increase even more the current and I’ve decided to try it out but before I could try someone said that it could burn my LEDs.

I can’t replace this LED strip in less than 3 weeks (shipping to my city is hell) and I would like to do it safely.

So um trying to figure out which resistor and which transistor I should use.

Some formulas I already know:

  • amps needed per channel: (#LEDS / 3) * 20mA => 2A
  • watts needed: V * I => 12V * (#LEDS / 3) * 20mA => 24W * 3 => 72W => 90W to be safe

This is the suggested circuit that someone said it will work and someone else said it would burn my LEDs Suggested circuit

So I’ve decided to learn how to choose a transistor and a resistance, I’ve found this datasheet for the TIP31 but I can’t decode its math.

Can someone help me with that?

  • \$\begingroup\$ You could always put a current limiting device somewhere in there. A plain resistor will work, or a more advanced solution with a transistor and some feedback circuitry (essentially using a linear regulator as a current limiter) \$\endgroup\$
    – Hearth
    Commented May 11, 2018 at 14:28
  • \$\begingroup\$ In any case, you want to look at the DC current gain rating, as well as the base-emitter forward voltage rating. Those will tell you most of what you need to know. \$\endgroup\$
    – Hearth
    Commented May 11, 2018 at 14:35
  • \$\begingroup\$ I’m sorry, I’m new to electronics, can you elaborate? I’m having trouble exactly with that, calculating DC current gain based on datasheet information. I’m unable to grasp what should I be using to calculate the emitter‘s output current \$\endgroup\$ Commented May 11, 2018 at 14:46
  • \$\begingroup\$ The emitter current is simply the sum of the base and collector currents. You can usually treat it as just being equal to the collector current, as the base current is quite small. \$\endgroup\$
    – Hearth
    Commented May 11, 2018 at 14:49
  • \$\begingroup\$ You typically do not design based on just the DC gain of the transistor. This varies a lot and will be unstable. Depending on the Vf of your LEDs, you may also be dissipating too much power in Q2 and burn it up. If your goal is to keep the circuit simple, a power resistor in series with D1 may be a solution. \$\endgroup\$ Commented May 11, 2018 at 14:54

1 Answer 1


The LED strip is most likely to have current limiting built in to it, so the configuration shown above should work. If you can plug in your LED strip to a 12V supply and measure the current with a meter and it is within spec then switching the LED strip with a low side switch should be fine without additional current limiting.

If the strip does not have current limiting then you will need to add it.

Let's talk about your switch, it needs work. Q1 will source a lot of current in the the base of Q2. It would be like plugging the base of Q2 directly into the 12V line, if you try this you will probably see smoke.

Either put a resistor to limit the current in between Q1 and Q2 (but enough to turn Q2 on fully). Do not exceed the TIP31 base current which is 1A.


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.