Using N-Channel MOSFET With Solenoid

Thread Starter

paintlax

Joined Jan 10, 2013
13
I am using the solenoid valve found here: https://www.adafruit.com/products/997

I am powering it with a 12V power supply along with a N-Channel MOSFET to control it with a pin from my photon. I have a kickback diode between the power and ground of the solenoid as recommended. My problem is that when the photon pin is thrown HIGH the valve opens up but stays open even if the pin is thrown LOW or just disconnected completely. The valve will only close once I disconnect the power supply. What do I do to get the valve to close when the pin is thrown LOW.

Thanks in advance for any help.

Also the image shown below is pretty much how I have my system wired up.

 

#12

Joined Nov 30, 2010
18,076
It sounds like your transistor is shorting. What part number is it?
 

dl324

Joined Mar 30, 2015
8,890
You said you're using a MOSFET, but you post a schematic with an NPN transistor. Which is it?

Measure the voltage on the MOSFET gate and drain when it's supposed to be off.
 

#12

Joined Nov 30, 2010
18,076
You need a resistor to ground to shut the gate off. somewhere around 10K will do.
 

Thread Starter

paintlax

Joined Jan 10, 2013
13
I tried a 10k from the gate to the ground of the 12v power supply, did not work.
GATE is at 2.5v and DRAIN is at 3.6v
 

#12

Joined Nov 30, 2010
18,076
It's sounding like a bad transistor right now, unless you made a mistake wiring it up. If the GPIO is not connected, the 2.5V must be coming from the solenoid end of the circuit, and a good transistor will not allow that.
 

dl324

Joined Mar 30, 2015
8,890
GATE is at 2.5v and DRAIN is at 3.6v
Put a resistor between the gate and whatever is driving it. Turn MOSFET on, then off. Measure the voltage on the gate, then short the gate to ground.

The resistor is to protect whatever is driving the gate from the short to ground.
 

Thread Starter

paintlax

Joined Jan 10, 2013
13
When measuring the voltage on the gate where should I place the probes from my multimeter? If I do it from the gate to ground wouldn't that just short the gate?
 

#12

Joined Nov 30, 2010
18,076
Is your volt meter a dead short from one lead to the other, or is it a volt meter?
 

dl324

Joined Mar 30, 2015
8,890
When measuring the voltage on the gate where should I place the probes from my multimeter? If I do it from the gate to ground wouldn't that just short the gate?
Negative lead on circuit ground, positive on the gate. When measuring DC volts, it will be a high impedance.
 
Top