Hit and hold circuit for solenoid valve

Thread Starter

Juancho_mkrk

Joined Feb 27, 2023
4
Hi, I'm new here and this is my first post.
I would be grateful if you can help me with this circuit.

I attached a circuit I designed for hitting a small electrovalve at 24V and then hold voltage at 5V. The manufacturer give these voltages to work and I have a switching source from which get both. The idea is to use a small microcontroller or a delay circuit to switch between 24V and 5V.

The trouble starts when I tried to get the circuit to switch between these two voltages.

As you can see, I used a IRF540 NMOS to control ground connection. But I cannot find a way to design the positive switching circuit. I tried to use a P-MOS or the same IRF540 without any results.

More details:
The load is a 30 Ohms solenoid, and the control circuit has to be 5 volts from the microcontroller.
Diodes and protections will be added
Circuito.png
 
Last edited:

LowQCab

Joined Nov 6, 2012
4,023
The best arrangement would be a "Current-Regulator" Circuit.
It will supply the full 24-Volts until the Current starts to rise,
then it will limit the Current to whatever You set it to.

Is Your Solenoid really a full 10K-Ohms ????
.
.
.
Current-Sink Speed-Controller 1 .png
.
 

Thread Starter

Juancho_mkrk

Joined Feb 27, 2023
4
Sorry for the 10k solenoid, it was an error for simulation. The coil is 30 Ohm. And I forgot to mention the minimum time to switch, @Sensacell. It has to be at least 13ms.

Thanks to the reply and your help! You all are genius!
 

crutschow

Joined Mar 14, 2008
34,281
If power efficiency is of concern, the most efficient method with a single supply is to provide a PWM signal to the lower MOSFET to control the solenoid current after it is energized.

LTspice simulation of example circuit below:
It uses one IC and one MOSFET, along with a three diodes, one resistor, one pot and one capacitor.
It applies the full voltage for a duration determined by R3C2, where the solenoid current goes to 800mA, and then generates a PWM signal with duty-cycle determined by pot U5 (here set to give an average of about 5V (167mA) through the 30Ω solenoid).

If you want to control the initial duration from a micro, then remove R3C2 and apply a high signal to the input of U1a for the desired duration time.

1677622048509.png
 
Last edited:

LowQCab

Joined Nov 6, 2012
4,023
I totally agree.
After finding out that the Solenoid is ~30-Ohms. and not 10K like the Schematic shown.
PWM is the way to go.
.
.
.
 

Sensacell

Joined Jun 19, 2012
3,432
If you don't need really "accurate" control over the current, you could implement the scheme entirely in software.
Use a single low-side N-FET to drive the the coil, with a Schottky diode across the coil.

When your coil goes ON - hit it with a constant pulse of 24 V, after a delay, switch to a software generated PWM for a lower holding current.
The PWM should be high enough frequency so the coil current ripple is not more than 20~30 %
It will make an audible squeal sound if you use a frequency in the audible range- this is where it's tricky, it's hard to do PWM in software at high frequencies.
Experiment with the duty cycle to find a "happy compromise" current level.

I have done this may times to keep 24V solenoid valves running cool, using a master interrupt to generate the timing for the PWM.
 

MisterBill2

Joined Jan 23, 2018
18,167
So far all of the assumptions have been that this is a DC solenoid valve. And while that might be the case, several other things have not been mentioned, including the actual pull-in current, the frequency of operation, the anticipated ON times, and the anticipated holding current. Also no mention of the required efficiency.
The very simple way is to use a resistor to drop the 24 volts to 5 volts for holding after engaging, and shunting the resistor with a large capacitor to provide the pull-in surge current. When the valve is released the shunt resistor will discharge the capacitor rather quickly.. But the decision will be affected by the on time because this circuit is not efficient.
 

djsfantasi

Joined Apr 11, 2010
9,156
So far all of the assumptions have been that this is a DC solenoid valve. And while that might be the case, several other things have not been mentioned, including the actual pull-in current, the frequency of operation, the anticipated ON times, and the anticipated holding current.
Assuming it IS a DC solenoid valve, given the data in post #7 one can estimate the pull-in and holding currents. The TS stated that it was a 30Ω coil. So…
Ip = 24V/30Ω = 800mA​
Ih = 5V/30Ω = 167mA​
 

MisterBill2

Joined Jan 23, 2018
18,167
OK, for the R=V/I =19v/0.167A=114 ohms, probably 115 ohms is close enough. Power would be 19x 0.167W, so use a 2 watt resistor.
Given that we do not know know the pull-in time, I suggest a 470Mfd/ 35 volt capacitor.
 

MisterBill2

Joined Jan 23, 2018
18,167
Yes, it is a large proportion of wasted power. But now consider the offerings using an opamp, which require a whole power supply.
And also note that I did caution that it wastes power while active, and wastes no power while inactive. And we were not told the duty cycle or the on time.
 

Thread Starter

Juancho_mkrk

Joined Feb 27, 2023
4
Hi and thanks to all for your responses. I succeeded with the develop of the MOSFET circuit for the solenoid valve. But I have a new problem. For the 5V, I'm using a 7805 regulator but something weird is happening there. After a 10 ~ 20 seconds of working, when the solenoid valve is active only with 5V, voltage over the 7805 drops from 5V to 4.5V which causes the voltage over the solenoid, drop down to even less than 3V. I am guessing that it would probably be something about the pulse-like-load current, caused by the solenoid itself. But like I said, I'm just guessing. Is there something I can do about it? Any ideas? I attach the circuit I'm using and would be grateful if you can help me with this.

P.D. It's not a problem of current, because it is less than 500mA over the 7805 regulator.

circuit.png
 

MisterBill2

Joined Jan 23, 2018
18,167
If the circuit in post #17 is accurate, the 7805 regulator does not have the 0.1mfd bypass capacitor it needs. Also, is the regulator attached to an adequate heat sink? And there may be a temperature rise in D2, or Q3
 

crutschow

Joined Mar 14, 2008
34,281
It's not a problem of current, because it is less than 500mA over the 7805 regulator.
But it likely is.
Have you calculated the power dissipated by the 7805, which is the voltage drop across it times the current (hint: it's about 3W).
Is the 7805 on a decent heat-sink?
 
Last edited:
Top