Mosfet not switching off with solenoid valve.

Thread Starter

KoaG

Joined Dec 8, 2015
10
I want to switch on a 12V 1A(peak 1.4A) solenoid valve for 0.1-3 seconds(set using a trimpot) and then switch it off. I'm using 555(operating at 5V, triggered by a IR sensor which operates on 5V only) in monostable mode to generate a 0.1-3s pulse, which is fed directly to gate of mosfet(IRF540- Mosfet Datasheet). It works fine without solenoid valve connected, but on connecting the valve, the mosfet sometimes switch off at right interval and sometimes it will continuously drive the load.
I have attached the schematics and source and gate voltage graph of the Mosfet. The whole circuit is powered by a 12V 3A SMPS, I have a heat sink attached to the 7805 and measured it's temperature which is near ambient.Input_Supply.JPG


555 is working in monostable mode
555_Monostable.JPG


Mosfet is directly driven by the 555 output pin, with a flyback/freewheeling diode (1n4007) attached across the valve.MOSFET_OUT.JPG


Voltage at drainMOSFET_drain.jpeg

gate(ch 2) and drain(ch 1) voltage, the gate is going to zero but it oscillating with the drain voltage.MOSFET_Gate_DRAIN.jpeg

How to make mosfet switch off at right time?
 

Thread Starter

KoaG

Joined Dec 8, 2015
10
The R7 pull down resistor is what turns it off. 33K is a lot of resistance. Try 10K.
I have tried 10K and 47K as pull down resistor also, but with no luck. Right now I have 33K on board, but if you want I can put 10K and post the waveforms again.
 

DickCappels

Joined Aug 21, 2008
6,593
From what you have shown so far, everything looks fine except the waveforms. Am I reading that right - the risetime of the drain voltage is about 60 milliseconds? That's forever!

And you have spikes in your gate voltage that should not be there. Are all the circuit on the same assembly, and the ground between the NE555 and the IRF540 "tight". Also, is the gate signal short and then there is the drain signal.

If your motor has brushes the it can be generating a lot of noise. A typical solution is to use two RF bypass capacitors( 0.01 uf should be a good start) from each motor lead directly to ground. Some people even use a third capacitor across the motor terminals. A large electrolytic capacitor from the (+24V?) motor power supply and grounded at the source of the MOSFET may also be needed.
 

shortbus

Joined Sep 30, 2009
7,945
I'm using 555(operating at 5V,
From what you have shown so far, everything looks fine except the waveforms. Am I reading that right - the risetime of the drain voltage is about 60 milliseconds? That's forever!
Could the fact he is using 5V on the gate have anything to do with the slow switching? The mosfet is not a logic level one.
 

crutschow

Joined Mar 14, 2008
25,435
The mosfet is not a logic level one.
True.
But he has the problem at turn-off where Vgs=0V, not turn-on, which wouldn't be affected by the Vgs(th).

That turn-off time of the MOSFET is too slow by at least an order of magnitude.
Are you sure there's no resistor between the 555 out and the MOSFET gate?

The 555 should have a 0.1μF ceramic cap between its V+ and ground.
 

sagor

Joined Mar 10, 2019
252
Try a separate Vin for the 5V regulator to isolate the Vin that the motor uses. See if spikes still appear. A "noisy" motor could be inducing spikes back into the Vin power supply, which show up at the regulator input. Try a simple 9V battery for the regulator and 555...
 

Thread Starter

KoaG

Joined Dec 8, 2015
10
From what you have shown so far, everything looks fine except the waveforms. Am I reading that right - the risetime of the drain voltage is about 60 milliseconds? That's forever!
Yes, maybe because of 33K pull down resistor at gate of mosfet? I don't have access to the board right now, but will post waveforms with different pull down resistors.

And you have spikes in your gate voltage that should not be there. Are all the circuit on the same assembly, and the ground between the NE555 and the IRF540 "tight". Also, is the gate signal short and then there is the drain signal.
I am attaching the render PCB, as I don't have an actual photo of the pcb right now. I hope it is tight according to your definition. S is where I connect the SMPS, M motor which is close to the mosfet.
InkedInkedPCB_Back_Side_LI.jpg



If your motor has brushes the it can be generating a lot of noise. A typical solution is to use two RF bypass capacitors( 0.01 uf should be a good start) from each motor lead directly to ground. Some people even use a third capacitor across the motor terminals. A large electrolytic capacitor from the (+24V?) motor power supply and grounded at the source of the MOSFET may also be needed.
Thanks for your inputs, I'll add RF capacitors and let you know the results. I have 12V SMPS, and the biggest capacitor I have with me is 470uF/25V (hope it will be sufficient), I'll put it in parallel with load and the mosfet.
 

Thread Starter

KoaG

Joined Dec 8, 2015
10
Try a separate Vin for the 5V regulator to isolate the Vin that the motor uses. See if spikes still appear. A "noisy" motor could be inducing spikes back into the Vin power supply, which show up at the regulator input. Try a simple 9V battery for the regulator and 555...
Thanks for your reply, will test it.
 

Thread Starter

KoaG

Joined Dec 8, 2015
10
I replace 33K pull down resistor at gate with 10K.
1. With 470uF/25V between +12V and Source, the results were same.
gate_drain_with_supplycap.jpeg


2. When I add 2 1nF cap between each terminal of valve and ground, the frequency of mosfet skipping turn off time reduced to 1 in 15-20 triggers, but it is still there. I will try adding 2 more in parallel.gate_drain_with_rfsupplycap.jpeg


3. I used separate SMPS, 5V1A and 12V3A, still same results, sometimes mosfet will turn off sometimes it won't but frequency of skipping turn off reduced.
 
Last edited:

Thread Starter

KoaG

Joined Dec 8, 2015
10
Thank you everyone for valuable inputs.
It is working now. I have replaced the MOSFET and added a 10uF polar cap between Vcc & Gnd of sensor. I have tested it for more than an hour and it's working fine.
 

DickCappels

Joined Aug 21, 2008
6,593
1596187139291.png
The red marks on the chart are not related to this discussion.

60 ms is a very long time to discharge a gate with this kind of current available. I wonder, what is the bandwidth of your scope and probe? There may be oscillation going on during turn-off that you cannot see directly because the frequency is too high.

An applications engineer, Ed Oxner at Siliconix once said that strange things can happen as these (Referring to the VN88) are GHz devices. One countermeasure for oscillation is to just put a small resistor or ferrite bead in series with the gate.
 

Thread Starter

KoaG

Joined Dec 8, 2015
10
60 ms is a very long time to discharge a gate with this kind of current available. I wonder, what is the bandwidth of your scope and probe? There may be oscillation going on during turn-off that you cannot see directly because the frequency is too high.
Hi, sorry for late reply. The scope that I'm using is Owon SDS7202 (200Mhz, 1GS/s), link - https://www.amazon.com/SDS7202-Digital-Storage-Oscilloscope-Interface/dp/B01K8SJITM and the probes are Owon T5200 200MHz, 1x/10x, 600Vpk.
 

DickCappels

Joined Aug 21, 2008
6,593
The scope and probe are probably not the problem, but things don't add up. The MOSFET can be oscillating way beyond 200 MHz. That is possible but unlikely.

I noticed that I posted the wrong output characteristic curve back in post #17, which is the Vdd = 15V curve but your NE555 is operating from 5 volts so the current is much lower than predicted by the (wrong) chart.

Can you perform an experiment?

Experiment #1 is to put a 10 to 15 ohm resistor in series with the gate, that is a very easy experiment to and may solve the problem.
1596465028303.png

Experiment #2 if the simple gate resistor did not correct the problem is to add an NPN-PNP complimentary pair as a buffer. That should boost the turn-off gate voltage if it is needed. You are already at risk of have enough gate voltage to saturate the MOSFET-you'll know as soon as you try it. By the way since
1596464821309.png

Inserting the buffer made of Q1 and Q2 might fix your turn-off problem

If Inserting the buffer makes turn-off better but turn-on worse or the MOSFET won't go into saturation and stay there until the output of the NE555 goes low that will also tell us a lot,
 
Last edited:
Top