Author Options:

Why is transistor constantly open with 12V power adapter? Answered

Having nearly everything done on my latest project I've run into an issue which leaves me clueless. When using a transistor as a switch it's all good when ran in a test mode of single LED powered from arduino, however, when I try using the 12V power supply I have (220->12V converter of 24W) the transistor is always open. No matter if I try to control the strip I will need or a single LED, no matter that I even tried an arduino code which sets the pin connected to transistor base to low, it's still on. Slight blinking can be seen on the LED strip. I've tried both TIP120 and 3904 transistors (didn't exceed the amperage on that), result's the same. I've already tried 2 different power supplies as well. When the arduino is off power - transistor is closed and LEDs are off.
I'm simply not able to connect the dots in this case as of now, maybe someone has dealt with a similar issue?

TL;DR Same setup with transistor works perfect on arduino power, but always on when fed 12V && arduino is on.

Thanks in advance! Going to sleep on it now, maybe will have ideas myself in the morning as well.



3 years ago

Alright guys, problem solved, as I said it was electronics 101. I haven't connected the arduino ground to 12V power source ground. What I don't understand, however, is why does this change anything, when arduino is connected via USB and therefore grounded that way.

Thank you all for helping!

grats on making it work. Why? Unless you electrically isolate the two subcircuits, you cannot authoritatively know what the status of their electrical relationship is. Either connect the grounds to ensure the two subcirucits are in balance, or ensure that they have zero need for connection using opto or transformer isolation. In any case, remember what I said about the base and gate. The advise still applies, even if it wasn't the reason for your failure in this case.

Bottom line: if a voltage disparity exists between two sources, then unless the impedance between the two sources is infinite, current will flow.

Thank you for in depth explanation! I will sure use a pulldown, that doesn't hurt after all.

Hmm.. At a guess, I'll say this.

You can't leave the base or gate in a high impedance situation, or it will tend to collect electrons until it drifts into conduction.

Generally, we use a pull down or pullup resistor to ground or Vcc respectively to ensure that a transistor stays off until we want it on.

I tried using pulldown resistors of different values and while I wish that was the issue, it definitely wasn't. See results in other posts.

(the use of pull up or pull down is dependent on the type of transistor)


3 years ago

Sounds like the circuit is a dream of windmills spinning through the turntables of the mind :-)

Anyway are you powering the LED-strip the same way you run the single test LED ??

I don't think you can run the heavier current load of a strip off the arduino.

BTW liked the turntable stirrer in your ible.

I didn't try running the LED strip from Arduino power itself just a single LED, I'm aware of the current limitations.

And thanks, turntable has proven useful in even more situations since. (:


3 years ago

Here's how the LED strip acts with a 1K8 pulldown with a code which should blink the LED with 1s intervals, it has a little different blinking pattern with a code to fade the LED up and down during 2s intervals, but is still blinking and doesn't even look close to what it should be. I also added a picture of the circuit if the initial one ends up at the bottom of the answers.

What's interesting is that it doesn't really matter which arduino pin I use, the result I get is still the same. I've already tried 2 different boards with different USB cables so it doesn't seem like board fault either.

I believe that it could be some kind of electronics 101 thing, since I'm not really experienced. But well, it's not exactly the first time either.


Electronics is a visual thing, show your circuit.

I really hoped that what seandogue mentioned was the issue, however after trying some resistors from 1K8 to 10K I see that it was not.