Driver circuit for solenoid valves

Thread Starter

daljeet795

Joined Jul 2, 2018
295
I would like to drive some solenoid valves (about 450mA at24VDC) with a PIC 16f877A. The idea is that the solenoid valves must open and close very fast . I just spent time on the internet and found I could use Relay SSR, opt coupler, MOSFET etc to drive solenoid valves. I could not decide the best driver circuit for my requirement

What do you think from your experience What would you recommend to drive solenoid valves for fast switching?

looked on the internet search many say optocoupler is a good choice, Is it a good choice?

Edit : I assumed response time of solenoid valves is less then 10ms
 
Last edited:

pmd34

Joined Feb 22, 2014
527
Hi daljeet, the very simplest option is a N-Channel mosfet, these can be switched directly by your microcontroller, and would switch the 0V supply to the solenoids. As a precaution however you should always put a "protection diode" across the solenoid valve terminals to prevent "back EMF" that results when the coil is switched.

Regards to speed 10ms is actually quite slow, so that should not be a problem - assuming your solenoid can operate that fast.
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
Hi daljeet, the very simplest option is a N-Channel mosfet, .
let's say we have the following options
  1. SPDT relay
  2. Solid State Relay
  3. MOSFET
  4. Optocoupler
Can you clarify why N-Channel mosfet is best then other options ( SPDT relay, SSR, and Optocoupler ) ?
 
Last edited:

MaxHeadRoom

Joined Jul 18, 2013
28,513
If isolation is not required the the Picmicro can drive the device direct, only use an opto if you require isolation.
For fast switching, the solid state device is better than a mechanical relay.
Max.
 

pmd34

Joined Feb 22, 2014
527
I think Max has pretty much covered all the points, but Mosfets also win on size & cost too, for the power you are switching they can be pretty small, and easily accommodated on your circuit board with your controller.

For completeness I suppose I should add that strictly speaking its a little naughty to switch the 0V line, this is because most instrument casings etc are usually grounded, so there is the potential that you can activate the solenoid by shorting the switched wire to the casing in such a case you would opt for a "high side" switch.. using a P-Mosfet, to switch the positive supply.. and then another small N-Mosfet to switch the P from your Microcontroller.
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
If isolation is not required the the Picmicro can drive the device direct, only use an opto if you require isolation.
For fast switching, the solid state device is better than a mechanical relay.
Max.
Hi Max.
How to decide whether or not to use isolation?
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
If there is other noisy components fed from the 24v, but even with operating solenoids and fitting the BEMF diodes, without an opto, the fact the Pic and relay share a common ground plane requires keeping each of the circuitry separate as much as possible when laying out a PCB etc.
If this is observed, this greatly reduces the risk of noise problems.
Max.
 
the value of isolation depends on the cost of the equipment that can get ruined. So, you have a DC solenoid, so make sure freewheeling diodes are used.

You also have to look into the value of fuses, indicators and snubbers. Digital I/O modules have a single footprint that fits on a backplane. there are AC and DC modules for various voltages. e.g. http://www.crydom.com/en/products/digital-i-o-modules/

There are various "logic" voltages from 5, 15 and 24 V.
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
BTW the Opto22 mentioned on post #9 can be had on ebay and will switch 3a 24v DC
They are actually intended for 4,8,16,24 plug in boards but can be also soldered in, if neccessary, they also come with a fuse in them.
Max.
 

crutschow

Joined Mar 14, 2008
34,041
If you need fast switching of the solenoid, then you might consider initially applying an overvoltage to the solenoid coil, for example 48V for a few ms until the normal coil current is reached.
This overvoltage can be supplied from a higher supply voltage, or a capacitor bootstrap type circuit.
This will significantly reduce the operate time.

The release time can be reduced by adding a Zener diode back-to-back in series with the transient suppression diode across the coil.
 
Last edited:

LowQCab

Joined Nov 6, 2012
3,936
The FIRST THING that needs to be answered in this thread is.......
What is the intended application of the Solenoid.

This is very important, especially if you are doing something like a
Water Injection System on a car engine.
There are very few solenoids that are actually "fast".
And, in almost any high speed application, Flyback spikes are a big problem.
Simply throwing a Schottkey Diode across the coil will
seriously slow down the closing rate.
Controlling the open and closing rates by using an RC filter on
the Gate of a MOSFET will give you the best control.
You're not going to get the precise control of a Fuel Injector.
You "may" find a reasonably fast solenoid,
but none of them are actually designed for accurate, high speed, PWM Control.
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
Drive a logic mosfet directly from Picmicro or use a opto if you require isolation, use a regular gate Mosfet.
The IRL540 will drive the solenoid direct.
Place a BEMF diode across the coil.
Max.




upload_2019-3-2_12-44-41.png
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
Drive a logic mosfet directly from Picmicro or use a opto if you require isolation, use a regular gate Mosfet.
The IRL540 will drive the solenoid direct.
Place a BEMF diode across the coil.
Max

View attachment 171369
This circuit will work for 12 V load

I have found one of circuit https://www.allaboutcircuits.com/wo...-transistor-overview-and-special-transistors/



Will you tell me the part number for transistor and diode?



Will you tell me the part number for mosfet used in the circuit?

Load type PNP
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,151
The IRL540 would work in the MOSFET circuit.

@crutschow: is there another value of resistor which would minimize shut-off time while still ensuring shut-off? And what is a”slow turn-off” time?
 
Top