Mosfet ball valve control

Thread Starter

A.R.Martin

Joined Feb 25, 2018
6
Hello

I've searched around a bunch but cant find an example of this circuit...

Goal:
Switch a 3 wire ball valve (see circuit below) open and closed with an arduino utilizing two n type mosfets (AOD514/AOI514/AOY514 30V N-Channel AlphaMOS)

Problem:
Circuit requires common neg based on ball valve design, which "turns both lights on" in simulation below. I need to some how separate the common neg??
Note if I wire up the circuit below and don't join neg of bulbs I can turn the bulbs on individually ... which in theory would allow me to have isolated 12v to my ball valve open or close. I have the real life circuit in front of me and going hi with pin 8 or pin 7 puts 12v to both open and closed inputs of valve.

Any feedback would be appreciated - Thanks!

Circuit simulation is here:
https://www.tinkercad.com/things/im...=dAdYueOr-MirBfLbPEbIbh0CmiU5m4ERdL1KKTyyvxU=




mosfet question.jpg
 

ebp

Joined Feb 8, 2018
2,332
If the valve common must be negative, then there is no reasonable alternative but to use P-channel FETs. In order to use N-channel FETs conveniently, it is necessary to make the common positive and use the FETs to "sink" current (conventional current, flowing from positive to negative) to "ground." I suspect this will work, simply reversing the direction (i.e. the "open" lead becomes the "close" lead).
 

Thread Starter

A.R.Martin

Joined Feb 25, 2018
6
Thanks for the reply ebp

I checked common of the valve as positive with a power supply, directly connecting common to positive terminal and "open" or "closed" to neg ... no dice, valve doesn't open in this condition. Valve must have common neg : (
 

ebp

Joined Feb 8, 2018
2,332
The circuit for P-channel MOSFETs is a little more complex because the valve runs on 12 volts, so you need a level-shifting driver. However, if you prefer active-high turn-on of the FETs you would need an inverter for each in any case. It adds another resistor and a small-signal NPN transistor to each driver. Just about any small-signal BJT will do - 2N2222, 2N3904, 2N4401, etc.

I don't have anything I can draw a schematic with on the computer I'm using at the moment, so:
FET source to +12V, drain to valve lead
FET gate to +12V through resistor of perhaps 5k to 25k, not critical
BJT collector to FET gate, emitter to ground
BJT base to processor output through resistor, 10k to 50k should be fine
As an extra measure to be sure BJT stays off if disconnected, add a resistor between its base and emitter. You could use the same value you used in series with the base. The reality is that this is almost never necessary with modern transistors at moderate temperature, but it is good practice.
Be sure to select a FET that has an absolute maximum gate-source voltage rating greater than 12 volts. Many are rated for 20 volts but some are rated for less. Since I don't know what the motor current is I can't make a good recommendation for FET ON resistance, but something less than 0.1 ohms is likely to be quite satisfactory. (if motor current is say 2 A, then 0.1 ohms would dissipate 0.4 W, which is low enough that no heatsink would be required for any through-hole power package; you can certainly get much lower ON resistance but it will cost a bit more)

Can you post a link to info for the valve?
 

Thread Starter

A.R.Martin

Joined Feb 25, 2018
6
I simulated your suggested circuit - looks like it works with the bulbs as proxy's, they turn on/off with a common neg!

Thanks for the feedback ebp

pmos circuit.JPG
 

Thread Starter

A.R.Martin

Joined Feb 25, 2018
6
I mocked this thing up finally in the real world and worked great without a micro. i.e. hitting the data lines with a 3.2v power supply to test switching.

I then fabricated a board and soldered down an Adafruit feather board - connected the circuit to pins 14 and 12.
(Note when I probed the board all the GPIO pins were high which I thought was odd.)

My question is any way a circuit of this type with mosfets could fry the board? After connecting feather board to circuit I get a error on uploading code (after being able to upload code previously)... from my research this could indicate a fried board. And if yes how do I prevent this in the future. I'm trying to track down how I screwed up...

Any feedback is appreciated!

Pinout of feather here:
 
Top