Solenoid Valve Circuit Not Turning Off

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
Hi Everyone,

I am designing an automated hydroponics setup, and have designed a simple circuit to control a solenoid based water valve. In order to reduce current consumption, The circuit uses 12V to retract the solenoid, then lowers the voltage to ~2.5V once retracted. This is used to vastly reduce the power consumption, and reduce heat.

I have completed my board layout, and am finding that I am unable to turn off the circuit.

The circuit in question:
upload_2019-3-23_16-29-10.png

The Enable NMOS is used to turn the circuit on and off. The DRIVE NMOS is used to enable the 12V to flow though the solenoid valve when the ENABLE is high. When DRIVE is low, ~2.5V is present on the solenoid valve.

In measuring the circuit, I am able to change the voltage from 12V to 2.5V successfully, but am never able to turn the circuit off, current is always flowing. Toggling the ENABLE NMOS high or low does have an effect on the current consumption, but never stops current flowing entirely. I am completely baffled at this performance.

Stranger still, If I measure the impedance from Ground to the Drain of the Enable NMOS, I measure Mohms of resistance when ENABLE is low (expected), and measure a couple of ohms when ENABLE is high (also expected). Current is always flowing through the Valve however, despite all debugging means showing as normal...

Any help the community can offer would be greatly appreciated!
 

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
Connect 10kΩ resistor from ENABLE N-MOSFET gate to GND.
What are you part numbers of all the MOSFETs?
Hi, thank you for the quick response.
NMOS P/N: TSM240N03CX RFG
PMOS P/N: AO3407A

Good idea with the Gate pull-down, I will try that (though I have confirmed the uC is driving 0V on the gate).
 

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
How much current?
SG
Hi sghitot,

With 12V applied, the valve draws ~2A. Unfortunately I have since blown up the uC (unrelated to this), and am waiting for a replacement, so I cannot gather the exact numbers, but I recall seeing the current drop ~300mA with the driving the enable NMOS low.

I have 3 identical circuits on my board, all of which seem to be behaving in this way. I have also confirm the solenoid valve is operating as expected with a PSU.
 

sghioto

Joined Dec 31, 2017
5,384
but I recall seeing the current drop ~300mA with the driving the enable NMOS low.
Strange!
So when first powered up and Drive an Enable are low there is no current being drawn, correct?
Without the micro connected have you tried connecting the Enable to GND to see if that works.
SG
 

crutschow

Joined Mar 14, 2008
34,285
The only path for the solenoid current is through the Enable MOSFET, so if the solenoid stays on, there's either something wrong with the MOSFET, the drive to the MOSFET, or a wiring error.
Toggling the ENABLE NMOS high or low does have an effect on the current consumption, but never stops current flowing entirely.
That sounds like the Enable MOSFET is wired upside down (source and drain interchanged).
In that configuration the substrate diode conducts when the MOSFET is OFF (with a drain-source voltage of about 1V) and the MOSFET conducts fully when ON (with a few mV on voltage).
That would explain the difference in current from Enable OFF to ON.
 
Last edited:

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
That sounds like the Enable MOSFET is wired upside down (source and drain interchanged).
Hi crutschow,

Im kicking myself. That has tripped me up in the past, and was sure to double check this time (even adding the body diodes to my schematic symbols). Turns out thats exactly what this is again. Copy and Paste error in my schematic library with swapped drain and source.

Thank you for the suggestion, it pushed me to triple check my work, and thats exactly the issue.
 

crutschow

Joined Mar 14, 2008
34,285
Have you though about using a varying PWM with one MOSFET to give you the high start voltage with a lower run voltage for the solenoid?
 

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
How did doing a Copy and Paste give an error?
Copy and Paste error was a simplification. I use Altium Designer for my PCBs, and after running a command to update my schematic symbols from my libraries, I found that the FETs on the enable line needed to be updated. I suspect I laid down those schematic symbols on the schematic temporarily, then updated the symbol with the correct pin numbering. I guess I didnt update those symbols on the schematic.

While I double checked the library package to ensure the pin numbering, I didnt realize there was an older version of the symbol on the schematic, and thus running a DRC didnt catch it.
 

Thread Starter

kuikmaa

Joined Mar 23, 2019
10
Have you though about using a varying PWM with one MOSFET to give you the high start voltage with a lower run voltage for the solenoid?
I had considered using PWM for this, but I was concerned that given the really large inductive load of the solenoid valve, switching the current on and off through PWM might add a lot of unwanted noise into the system. I had a few small adjustable buck converter boards, so it seemed safer to tie that output into the board so I could optimize the voltage for the low-power mode.
 

crutschow

Joined Mar 14, 2008
34,285
I was concerned that given the really large inductive load of the solenoid valve, switching the current on and off through PWM might add a lot of unwanted noise into the system.
The inductance actually smooths the current as the inductive current flows through the flyback diode across the solenoid when the MOSFET is OFF.
The only switched current is through the MOSFET.
With good ground design, the noise from that should be low.
 
Top