Watering System -- Leaking and Overheating Trasistor

Hey all,

I’m working on a project to automatically water my plants. Pretty standard.

But, I’m having some serious trouble getting the circuit to work. I think it’s a problem with my transistor (or my understanding of it). I attached a image of the circuit and the transistor. The solenoid valve is powered by a 12V, 800mA, unregulated wall wart. The 0/5V signal for the base of the transistor comes from the Arduino Uno.

My problem is that I can’t seem to “close” (open circuit). Even when the transistor should leave the gate closed (open circuit), it is allowing 600mA to get through from the emitter to the collector. Additionally, the transistor is getting ridiculously hot and melting my wires.

I know I have the control of the transistor right, because I can run the program no problem when I only use an LED off of 5V instead of the valve and the power supply. I think it may be some form of incompatibility between the Arduino Uno, the transistor, and the power supply.

Any advise?

3264 x 1836 … dramatically reduces the number of people who will try to help. Keep the maximum dimension <= 1000 pixels.

You got it!

What is the purpose of the 48 ohm resistor?

This seems highly relevant... http://forum.allaboutcircuits.com/threads/help-with-pnp-low-side-alternative.48778/#post-323590

I found it with this... https://www.google.com/search?q=pnp+low+side+switch

[quote author=Coding Badly link=topic=268677.msg1894045#msg1894045 date=1411539085]

What is the purpose of the 48 ohm resistor?

[/quote]

I was trying to control the current through the circuit. I shouldn't need to if the transistor was blocking it, but it wasn't. Without the resistors, the arduino board was overheating and smoking.

I'll dive deeper into the double npn possibility now. Thank you.

HI, have you got the gnd of the arduino connected to the gnd of the 12V supply and the emitter of the transistor?

Tom...... :) PS a full diagram of everything will help us suggest solutions, thanks. Your problem is you are using a PNP transistor and trying to switch it like a NPN, replace the transistor with an NPN.

Hi, find attached suggested circuit.

Tom… :slight_smile:

TomGeorge: HI, have you got the gnd of the arduino connected to the gnd of the 12V supply and the emitter of the transistor?

Tom...... :) PS a full diagram of everything will help us suggest solutions, thanks. Your problem is you are using a PNP transistor and trying to switch it like a NPN, replace the transistor with an NPN.

Thanks for the advice.

I have everything grounded to the GND pins on the power strip. I assume that means the sensors and valves all share the same GND. I'll go the the electronics shop and buy some NPN's and try out your guy's suggestions. TIN120 was suggested I believe, as well as an NTE261, which is the NPN version of my current device.

A couple questions: -- Can someone clarify the difference between an NPN and a PNP. From my understanding, the only difference is that electricity goes in a different direction, but I'm clearly missing something. (I'm MechE, btw). -- Also, whats the easiest places to get any and all electronic parts (like the McMaster of electronics). Digikey? Newark?

Thanks again.

The reason your circuit didn’t work in the first place is that the PNP transistor is always on, and the 48 ohm resistor made the problem worse by increasing the current through it.

In order to turn a junction transistor off, you have to make sure that no base current can flow. In your case, this means that the voltage applied to the base has to be roughly equal to or slightly higher than the emitter voltage (nominally 12 V), which is not possible with that circuit. Google will supply much more detail.

I agree that an NPN transistor is the way to go. I buy parts from Digikey if my junkbox doesn’t have what I need (discarded toys and consumer electronics can be a good source of useful parts).

jremington: The reason your circuit didn't work in the first place is that the PNP transistor is always on, and the 48 ohm resistor made the problem worse by increasing the current through it.

In order to turn a junction transistor off, you have to make sure that no base current can flow. In your case, this means that the voltage applied to the base has to be roughly equal to or slightly higher than the emitter voltage (nominally 12 V), which is not possible with that circuit. Google will supply much more detail.

I agree that an NPN transistor is the way to go. I buy parts from Digikey if my junkbox doesn't have what I need (discarded toys and consumer electronics can be a good source of useful parts).

Thank you. Great explanation.

I'll make the change and I'll update you guys.

Cocytus: -- Can someone clarify the difference between an NPN and a PNP. From my understanding, the only difference is that electricity

http://www.youtube.com/watch?v=F-Cv7CMHoGM

You should be able to use the parts you have by just re-wiring it and then inverting you output signal. i.e. a low output will turn on the transistor to turn on the solenoid.

--- bill

i.e. a low output will turn on the transistor to turn on the solenoid.

The PNP transistor was wired the right way around (according to the posted schematic), but a high output on the Arduino will not turn it off because the base voltage is much less positive than the emitter voltage.

bperrybap: You should be able to use the parts you have by just re-wiring it and then inverting you output signal.

Err, no, he couldn't.

What he could do, is to add a common NPN transistor such as a BC547 or 2N2222 with its emitter to ground, base to the Arduino via a 10k and the collector to the base of the PNP Darlington via the present resistor with another 10k to the emitter of the Darlington to ensure it switches off given the ridiculously high gain of the resultant combination.

bperrybap:
You should be able to use the parts you have by just re-wiring it
and then inverting you output signal.
i.e. a low output will turn on the transistor to turn on the solenoid.

— bill

Awesome video, that actually cleared a lot up for me. Now I understand why I shouldn’t be using a PNP.

Unfortunately, like what was said just before, my signal voltage to stop the circuit is only a 5V signal from the arduino. Since it’s still less than 12V (my power), the base still acts as a sink and the circuit continues to flow current. I’m getting a NPN transistor (or 10) and hopefully this will quickly fix everything.

Thank again. Great video find.