Need Help With Using Arduino Act As A Switch To Power LED(s) Using ...

Need help with using Arduino act as a switch to power LED(s) using Transistor Projects General Guidance March 16, 2018, 3:56am 1

I am using a BC547B NPN Transistor coupled with an Arduino UNO to act as a switch for an LED strip(consists of four small LEDs is series) powered through an external DC Battery.

I am a complete beginner to electronics,so i tried to implement the circuit at Transistors - SparkFun Learn .I connected pin 8 of Arduino UNO to the base of transistor.

The problem I am facing is that the LED(s) light very dimly when pin8 is set to high.When the LED(s) are connected directly to the battery,they light properly,so the battery being discharged is not an issue.There are a couple to things I noted however: 1)If I connect the base of transistor to 5V of Arduino, LED lights properly. 2)Using any other pin of arduino still results in the same problem. 3)Mysteriously, If I touch the base resistance(10k ohm) with bare hands,the LED(s) light up perfectly.This behaviour does not depend on the state of pin8.

What could be the issue ? Please see attached circuit diagram(sorry for poor quality), I have also attached datasheet of transistor if it helps.

Circuit Diagram.png Circuit Diagram.png704×367 6.74 KB

410427.pdf (181 KB)

Electrical wiring lights with arduino March 16, 2018, 4:56am 3

Thank You for the reply.You were right, I omitted the pinMode statement in setup loop.The LED are lighting perfectly now, and I will add a resistor as you suggested

Topic Replies Views Activity
Transistors aren't being biased, code compiles fine, hardware issue? General Guidance 49 273 August 13, 2025
LED turns on when resistor is touched General Electronics 16 1453 October 27, 2023
Issue with transistor General Electronics 6 626 April 28, 2023
Transistor won't switch on with 3.3v General Guidance 44 502 February 10, 2026
Why is my LED dimmer when using a Transistor? General Electronics 21 3299 January 7, 2022
Unfortunately, your browser is unsupported. Please switch to a supported browser to view rich content, log in and reply.

Tag » Arduino Led Resistance Transistor Mpsd