Author Topic: How to drive 12V solenoid lock without noise  (Read 3381 times)

0 Members and 1 Guest are viewing this topic.

Offline DarlingtonTopic starter

  • Contributor
  • Posts: 42
  • Country: it
How to drive 12V solenoid lock without noise
« on: October 09, 2024, 01:45:02 pm »
I'm designing a board to be able to drive 12V powered electronic locks. Now not having the ability to precisely define the type of electronic lock used and its specifications I have doubts about the design. I would like to eliminate the noise that are generated when soilenoids are handled, e.g., EMF backs, etc., which could reset a MCU.

So I had in mind to opto-isolate the outputs, but that would be quite unnecessary since my purpose is to use one power supply to derive the supply voltages for MCU and auxiliary voltages and the solenoid supply. I thought an isolated DC DC converter might be a solution, but it is too expensive. The solenoids are driven by a ZXMS6006DGQ-13, and the maximum current available will be 1.5A.

Does anyone have any ideas?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #1 on: October 09, 2024, 01:50:32 pm »
What noise? Just put a freewheeling down in reverse parallel with the solenoids. Job done.
 

Offline DarlingtonTopic starter

  • Contributor
  • Posts: 42
  • Country: it
Re: How to drive 12V solenoid lock without noise
« Reply #2 on: October 09, 2024, 01:56:01 pm »
What noise? Just put a freewheeling down in reverse parallel with the solenoids. Job done.

I have read on internet and in many forums that even adding a flayback diode can result in spikes that reset the MCU? Is it true?
 

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 823
  • Country: de
Re: How to drive 12V solenoid lock without noise
« Reply #3 on: October 09, 2024, 02:10:47 pm »
A very efficient way to prevent electrical noise is to slow down the switching.

Sometimes it already helps to increase the gate resistor of the FET to artificially make it slower. Of course this increases its dissipation and so you should only do it if the FET is sufficiently oversized.

If that´s not enough you can drive a PWM ramp from 0 to 100% and vice versa instead of hard switching. This of course generates lots of noise on the PWM frequency and on its harmonics, but you can filter these frequencies and it prevents sudden spikes or pulse noise.

Some magnetic actuators need higher current if they are switched slowly.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #4 on: October 09, 2024, 02:13:29 pm »
What noise? Just put a freewheeling down in reverse parallel with the solenoids. Job done.

I have read on internet and in many forums that even adding a flayback diode can result in spikes that reset the MCU? Is it true?
Why would that be unique to an inductor?

Switching any large load can potentially do that.

Adequate decoupling on the MCU's supply rail will help avoid noise. The fact that the MCU is powered off a regulated supply and the solenoid on the unregulated supply will help a lot.
 

Offline DarlingtonTopic starter

  • Contributor
  • Posts: 42
  • Country: it
Re: How to drive 12V solenoid lock without noise
« Reply #5 on: October 09, 2024, 02:20:26 pm »
Unfortunately, I cannot add a second power supply and thus decouple the power supplies. I thought a different way could be implemented to limit noise
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #6 on: October 09, 2024, 02:30:19 pm »
Unfortunately, I cannot add a second power supply and thus decouple the power supplies. I thought a different way could be implemented to limit noise
No one said anything about adding a second power supply.

EDIT:
Going by what you've written, you must already have two power supply voltages, because you have a microcontroller, which presumably runs of ≤ 5V and the solenoid runs off 12V. If the regulator powering the microcontroller is working properly, then hardly any of the noise on the 12V rail will pass through to the microcontroller's power supply rail. For example the LM7805 has a power supply rejection ratio of 80dB, which is a factor of 103, so 5V spike on the input will only be 5/103 = 500µV on its output.
https://www.ti.com/lit/ds/symlink/lm340.pdf
« Last Edit: October 09, 2024, 03:09:24 pm by Zero999 »
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 2136
  • Country: us
Re: How to drive 12V solenoid lock without noise
« Reply #7 on: October 09, 2024, 02:38:03 pm »
I would just slow down the FET with a cap and resistor. Put a diode in series for faster turn on in parallel with another resistor to make the turn off slower.
 

Offline PGPG

  • Super Contributor
  • ***
  • Posts: 1296
  • Country: pl
Re: How to drive 12V solenoid lock without noise
« Reply #8 on: October 09, 2024, 03:04:44 pm »
I cannot add a second power supply and thus decouple the power supplies.

I use relays for such output (even the same power source is used) and instruct installer to make lock circuit having no common part with controller supply circuit (going through separate wires just from supply).
If you drive output(s) with no isolation in your device (for example with OC outputs) than at least (-) connection from supply to your device has the common wire with lock circuit and whole lock(s) current(s) (10 or more times higher than your circuit supply current) travels (with its on/off changes) through your GND just under your microcontroller.
 

Offline DarlingtonTopic starter

  • Contributor
  • Posts: 42
  • Country: it
Re: How to drive 12V solenoid lock without noise
« Reply #9 on: October 10, 2024, 11:05:51 am »
Unfortunately, I cannot add a second power supply and thus decouple the power supplies. I thought a different way could be implemented to limit noise
No one said anything about adding a second power supply.

EDIT:
Going by what you've written, you must already have two power supply voltages, because you have a microcontroller, which presumably runs of ≤ 5V and the solenoid runs off 12V. If the regulator powering the microcontroller is working properly, then hardly any of the noise on the 12V rail will pass through to the microcontroller's power supply rail. For example the LM7805 has a power supply rejection ratio of 80dB, which is a factor of 103, so 5V spike on the input will only be 5/103 = 500µV on its output.
https://www.ti.com/lit/ds/symlink/lm340.pdf

Exactly. I have the 12V voltage coming from an AC-DC power supply. This voltage is lowered to 5V (auxiliary voltage), and to 3.3V for MCU. Even through the effect of the LDO I would still have the possibility of some noise coming back from the GPIO pin not through the power rails. Maybe I am misunderstanding when you talk about “decoupling.” To me decoupling means that there is no some relationship between the two supplies neither between the grounds.

 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: How to drive 12V solenoid lock without noise
« Reply #10 on: October 10, 2024, 11:24:32 am »
If you're only switching 12 volts, as well as the diode across the solenoid, put several K of resistance in line with the mosfet gate, and in particular, a 1uF film cap from source to drain. The cap especially will calm things down a whole lot.

Putting a diode across the solenoid will clamp the voltage spike, but you are still interrupting a flow of current in a matter of nanoseconds, so there will be some degree of high frequency ringing from the stray inductance and capacitance that might find its way into bad places. A big fat cap across the mosfet makes for a much more gradual decrease of current.
« Last Edit: October 10, 2024, 11:29:43 am by Circlotron »
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3139
  • Country: gb
  • Recovering Electrical Engineer
Re: How to drive 12V solenoid lock without noise
« Reply #11 on: October 10, 2024, 02:59:49 pm »
A clansman huh?
 

Offline BrokenYugo

  • Super Contributor
  • ***
  • Posts: 1214
  • Country: us
Re: How to drive 12V solenoid lock without noise
« Reply #12 on: October 10, 2024, 03:42:23 pm »
Consider a username not affiliated with terrorism.

https://en.m.wikipedia.org/wiki/Ku_Klux_Klan
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: nl
Re: How to drive 12V solenoid lock without noise
« Reply #13 on: October 10, 2024, 03:46:16 pm »
Decoupling is more about placing capacitors in the vicinity of sensitive electronic components.

In this case some filter between the 12V and the 3.3V LDO for the MCU will help and bigger capacitance after the LDO will also help in reducing problems. The extra capacitance helps when the solenoid is turned on and a voltage drop may occur. The filter will reduce rippling through of spikes when the solenoid is turned off.

As suggested by others the freewheeling diode should be incorporated.

Feedback through an IO pin might happen in extreme cases where there is enough signal coupling on the connection with the pin. With the ZXMS6006DGQ-13 in between the IO pin and the solenoid, I doubt this will be a problem.

The ZXMS6006DGQ-13 already provides switching, rise and fall time delays, to not worry about any fast transients. According to the datasheet 18us rise time and 15us fall time. It is an interesting chip for sure.

P.S. Why the negative attitude about his username. Has been addressed before and does not add anything to the thread.

A clansman huh?

Consider a username not affiliated with terrorism.

https://en.m.wikipedia.org/wiki/Ku_Klux_Klan

Offline DarlingtonTopic starter

  • Contributor
  • Posts: 42
  • Country: it
Re: How to drive 12V solenoid lock without noise
« Reply #14 on: October 10, 2024, 03:48:44 pm »
Consider a username not affiliated with terrorism.

https://en.m.wikipedia.org/wiki/Ku_Klux_Klan

I had never thought of this!!! Sorry, I will contact the moderators to change my username!
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: ie
    • LinkedIn
Re: How to drive 12V solenoid lock without noise
« Reply #15 on: October 10, 2024, 03:55:53 pm »
I've done project that control 8 12V solenoids from MCU. No any problem with solenoids (except that they were a little bit weak, so I have to add voltage booster circuit). Solenoid consumes about 0.8A and was connected via wires of length 10-50 cm.

https://github.com/xvrxvr/EventCalendar
 
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #16 on: October 10, 2024, 08:04:19 pm »
If you're only switching 12 volts, as well as the diode across the solenoid, put several K of resistance in line with the mosfet gate, and in particular, a 1uF film cap from source to drain. The cap especially will calm things down a whole lot.
Unfortunately that would result in a large spike when the MOSFET turns on and short circuits the capacitor. The normal way to do that, is to add a resistor in series with the capacitor to limit the current. RC snubbers are also used in place of a diode, not as well as. In this case 33R in series with the capacitor will be enough to limit the voltage to below the MOSFET's 60V rating, as long as the capacitor is big enough to not charge up too much, from the stored energy in the inductor and 1µF seems reasonable enough.
Consider a username not affiliated with terrorism.

https://en.m.wikipedia.org/wiki/Ku_Klux_Klan
A clansman huh?
Please bear in mind the original poster's first language is not English and they had no idea what it means. No doubt something we say in English will translate to something bad in another language.

I had never thought of this!!! Sorry, I will contact the moderators to change my username!
By all means change it, if you like, but your username didn't offend me. I knew it was nothing to do with an American terrorist organisation.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: How to drive 12V solenoid lock without noise
« Reply #17 on: October 11, 2024, 02:26:50 am »
If you're only switching 12 volts, as well as the diode across the solenoid, put several K of resistance in line with the mosfet gate, and in particular, a 1uF film cap from source to drain. The cap especially will calm things down a whole lot.
Unfortunately that would result in a large spike when the MOSFET turns on and short circuits the capacitor. The normal way to do that, is to add a resistor in series with the capacitor to limit the current. RC snubbers are also used in place of a diode, not as well as. In this case 33R in series with the capacitor will be enough to limit the voltage to below the MOSFET's 60V rating, as long as the capacitor is big enough to not charge up too much, from the stored energy in the inductor and 1µF seems reasonable enough.
A current spike won't be a problem with a reasonable amount of resistance in series with the gate. The slower turn on will take care of that. And 12 volts in 1uF is only 0.144 mJ anyway.
« Last Edit: October 11, 2024, 02:30:00 am by Circlotron »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #18 on: October 11, 2024, 04:32:06 pm »
If you're only switching 12 volts, as well as the diode across the solenoid, put several K of resistance in line with the mosfet gate, and in particular, a 1uF film cap from source to drain. The cap especially will calm things down a whole lot.
Unfortunately that would result in a large spike when the MOSFET turns on and short circuits the capacitor. The normal way to do that, is to add a resistor in series with the capacitor to limit the current. RC snubbers are also used in place of a diode, not as well as. In this case 33R in series with the capacitor will be enough to limit the voltage to below the MOSFET's 60V rating, as long as the capacitor is big enough to not charge up too much, from the stored energy in the inductor and 1µF seems reasonable enough.
A current spike won't be a problem with a reasonable amount of resistance in series with the gate. The slower turn on will take care of that. And 12 volts in 1uF is only 0.144 mJ anyway.
Note that the original poster is not using an ordinary MOSFET, but a device with lots of protection built-in. The input current can be up to 400µA, which means the resistor can't be too higher value.

Heck, it's rated to clamp up to 490mJ, so will be fine with no suppression, as long as the inductance of the solenoid is below 200mH.
https://www.diodes.com/assets/Datasheets/ZXMS6006DGQ.pdf
 

Offline inse

  • Super Contributor
  • ***
  • Posts: 1286
  • Country: de
Re: How to drive 12V solenoid lock without noise
« Reply #19 on: October 11, 2024, 08:17:29 pm »
No native speaker, too but the nickname got me irritated as well
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22380
  • Country: gb
  • 0999
Re: How to drive 12V solenoid lock without noise
« Reply #20 on: October 11, 2024, 09:16:39 pm »
It's not so much language but culture. I'm not surprised there are places where few have heard of the KKK.

I do find it odd that it's taken over six months, 22 posts and nine threads from the OP before anyone being offended by their username, especially given at least one of those who've complained here have responded to their other threads.
« Last Edit: October 12, 2024, 12:47:18 pm by Zero999 »
 
The following users thanked this post: Xena E

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 823
  • Country: de
Re: How to drive 12V solenoid lock without noise
« Reply #21 on: October 13, 2024, 07:12:31 am »
As a non-native speaker I just don't search for problematic abbreviations, because Germany has its own set of forbidden letters.

"SS" seems to be no problem for the USB-committee but would be unthinkable for any locals name - at least inside the civilized circles. (It stands for "StaatsSchutz", the former ministry of violence of the Nazi-party)
 

Offline Roehrenonkel

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: de
Re: How to drive 12V solenoid lock without noise
« Reply #22 on: October 13, 2024, 08:13:02 am »
Hi Phil1977,

you seem mixed-up:
https://de.wikipedia.org/wiki/Schutzstaffel
Anyone still using VXI-Bus?
 

Offline Xena E

  • Super Contributor
  • ***
  • Posts: 1308
  • Country: gb
Re: How to drive 12V solenoid lock without noise
« Reply #23 on: October 13, 2024, 08:41:00 am »
Consider a username not affiliated with terrorism.

https://en.m.wikipedia.org/wiki/Ku_Klux_Klan

I had never thought of this!!! Sorry, I will contact the moderators to change my username!

We shouldn't let the adoption of acronyms and pre existing words be owned by hate organisations, as before long everything  we say will be taboo somewhere in the world.

Please let's not subscribe to the "you can't say that" snowflake subculture making others responsible for our own expectations, thats just being ignorant: I'm sure that the member KKK chose the username innocently.

X
 
The following users thanked this post: Ian.M, Antonio90, pcprogrammer, Roehrenonkel, Phil1977


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf