-2

I'm connecting an LED strip that takes 12V input to an Arduino Uno R3's 5V VCC using a B547 transistor.
Here's my circuit:

Base -> 1K ohm resistor -> DO13
Collector -> -ve of LED strip
Emitter -> GND
VCC 5V -> +ve of LED strip

Nothing happens when I try to turn on the LED strip. However if I remove the 1K resistor and turn on the LED, Arduino's built in LED gets dimmer but the LED strip does not turn on.
What am I doing wrong?
TIA!

10
  • 2
    What kind of LED strip? You can't run a typical 12V LED strip from 5V. Not even slightly.
    – Majenko
    Sep 19, 2020 at 20:20
  • @Majenko, thanks for the reply. I'm giving 12V current to the Arduino using an adapter. I just got the LED strip to shine dimly. Would it work if I lower the base resistance of the transistor or if I change the VCC to VIN instead of 5V?
    – Qumber
    Sep 19, 2020 at 20:37
  • 2
    BC547 is good for 100 mA only Sep 20, 2020 at 8:52
  • 1
    You have a 12 Volt LED strip and power it with 5V. That could be the reason why the lights shine dimmy. The transistor is not made for driving big loads. It's collector power dissipation is specified with 500 mW. I would recommend to use a MOSFET and use the 12 Volt Powersupply at the Strips V+ directly. Sep 20, 2020 at 10:20
  • 1
    Connecting the + of the leds strip to VIN will give the strip 12V. Definitely don't connect the 12V adapter to Vcc, or you'll blow up the Arduino. Also, don't remove the 1k resistor, or you'll damage the Arduino's output pin. You can try lowering the value, but don't go below 220 Ohm. Though, unless your led strip is very short, the BC547 isn't going to cut it.
    – Gerben
    Sep 20, 2020 at 14:41

1 Answer 1

2

Ok. First off, if you have a 12V LED strip then you have to power it from 12V. Powering the Arduino from 12V and then powering the LED strip from the 5V pin of the Arduino is not powering the LED strip from 12V, it's powering the Arduino from 12V and the LED strip from 5V.

The LED strip's anode (+) must be connected to the + of the 12V supply or, if it's only a very short LED strip then you can use VIN on the Arduino.

LED strips typically have a number of LEDs (eg 3) in series with a resistor to make one "segment", and many "segments" in parallel. This gives a total forward voltage of typically 9V or more - so you must provide at least that to get the LEDs to light.

Secondly the BC547 is not a good transistor to use for switching an LED strip. It has a maximum continuous collector current of 100mA. That means that you can only have a maximum of 100mA going through your LED strip before the transistor blows.

For reference, 100mA is the equivalent of 5 "normal" (5mm, of the kind you'd use in a breadboard) LEDs at full current and brightness. A typical LED strip (depending on length) can use many hundreds or thousands of mA.

Really you should be using an N-channel MOSFET that is rated for at least as much current as your LED strip requires to run. For safety, and to reduce heat dissipation, you ideally want it to be many times more powerful than the LED strip needs.

A common choice is the IRF530, which is rated at 10A with a switching voltage (the "threshold" voltage) that is low enough for a 5V Arduino to control (there are more suitable ones, but these seem to be the "go-to" component for many Arduino users - they're adequate for most uses).

schematic

simulate this circuit – Schematic created using CircuitLab

2
  • Thank you so much for the thorough answer. I do understand (a bit) the schematics now. I'll get my hands on the MOSFET, and will try it out as soon as I get home. :)
    – Qumber
    Sep 21, 2020 at 5:48
  • I gave the strip 12V directly and switched BC547 with a TIP120 and it did work. I'll try a small 12V LED powering up from VIN as well. Thanks for the help. This was my first ever project. :)
    – Qumber
    Sep 21, 2020 at 21:24

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.