1
\$\begingroup\$

I'm developing a driver with a NMOS to control the solenoide valve. The power supply V_uC is the signal from the board STM32. As yoz can see from the schematic, I placed R2 to protect the STM32 pin. The R1 to keep the gate closed when STM32 board is off/low. Then the diode to suppress surge from the solenoid and also allows to protect the mosfet from inductive volatage kickback. In the datasheet of valve it states that the power is 5W and requires power supply of 12V. The selected NMOS(IRL3915) has a Vds of 55V, Rds_on of 14mΩ and has Vgs threshold of max 3V (https://www.infineon.com/dgdl/Infineon-IRLR3915-DataSheet-v01_01-EN.pdf?fileId=5546d462533600a40153566d83e126ba).

At the drain of NMOS I expect to have a smooth square wave of both the drain voltage and current, but in the simulation there is always a ripple at the drain and it does exceed 12V. I'm worried that it can damage the solenoid valve. Is there any solution to avoid this? Or since it's a simulation with LTSpice I don't need to worry?

enter image description here

Simulation voltages at the drain of the mosfet and current


Edit 1

I might have another question related to the circuit. I plan to use an optocoupler to isolate isolate the ground of 12V power supply of the solenoid from the microcontroller signal. It does have sense to use also a buffer to ease the microcontroller digital output?

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ 13 V out of 55 V rated? I would not worry. Try increasing your Vgs drive. \$\endgroup\$
    – winny
    Mar 20 at 17:55
  • \$\begingroup\$ Consider a transistor rated for lower Vgs(on). This part is only rated for 5V, and with Vgs(th) max 3V, it won't be very "on" at 3.3V (assuming that's what your STM32 runs at). D1 should be larger, though not much larger is necessary; 1N4001 or whatever is fine. Question: why were you expecting square voltage and current? That would imply a resistive load, which is not as shown. The waveforms shown are fine, however. \$\endgroup\$ Mar 20 at 18:00
  • \$\begingroup\$ #winny From STM32 I/O the maximum voltage is 3.3V, so I can't increase Vgs so much.... \$\endgroup\$
    – stefyanna
    Mar 20 at 19:51
  • \$\begingroup\$ Ah, that would explain it. You need a MOSFET with much lower Vgsth to be sure this works. Check datasheet for peak current capability at 3.3 V and that you're not having excessive Vds. Vgsth is normally rated at very low current, say 1 uA. You need 100+ mA. \$\endgroup\$
    – winny
    Mar 20 at 21:19

1 Answer 1

1
\$\begingroup\$

in the simulation there is always a ripple at the drain and it does exceed 12V. I'm worried that it can damage the solenoid valve. Is there any solution to avoid this? Or since it's a simulation with LTSpice I don't need to worry?

enter image description here

When the MOSFET deactivates, stored magnetic energy in the solenoid will continue to flow through the flyback protection diode D1. When this happens, the voltage across the solenoid reverses but has a peak of only 1 volt.

This is absolutely normal real-world and simulation operation.

\$\endgroup\$
4
  • \$\begingroup\$ Is it possible to lower the peak? I might have another question related to the circuit. I plan to use an optocoupler to isolate isolate the ground of 12V power supply from the microcontroller signal. It does have sense to use also a buffer to ease the microcontroller digital output? Many thanks \$\endgroup\$
    – stefyanna
    Mar 20 at 19:47
  • \$\begingroup\$ There is no compelling reason to lower the peak as far as I can tell. It's a standard circuit and the solenoid will not be harmed. @stefyanna take note that this site is not a forum and having another question could be regarded as out-of-bounds. It's a Q and A site and comments are not for raising questions; it's for clarification. Adjusting your main question after an answer has already been given is likely to attract some quibbles too. \$\endgroup\$
    – Andy aka
    Mar 20 at 20:31
  • \$\begingroup\$ I'm so sorry. Thank for letting me know \$\endgroup\$
    – stefyanna
    Mar 20 at 21:03
  • \$\begingroup\$ @stefyanna please read this --> What should I do when someone answers my question?. If you have any worries about whether my answer fully answers your question, please leave a comment. \$\endgroup\$
    – Andy aka
    Mar 20 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.