I am using an Arduino and an N-channel MOSFET to activate it. However, when I test for continuity between the 5V wire and GND wire of the lock, I observe continuity. How can I protect this from affecting the MOSFET or Arduino? Do I need to add any diodes or take any specific measures?
You should have a diode across the solenoid.
You should have a 220 ohm resistor between the arduino pin and the MOSFET gate and a 10K resistor from the arduino pin to ground.
You can eliminate the diode with the appropriate avalanche rated MOSFET. Putting the diode in the circuit will not hurt but it will not conduct as its Vf is higher then the MOSFETs avalanche voltage. Nice part it is easier to wire.
You could, but that increases solenoid kickback voltage from 5.7volt to maybe 70volt, which could increase chances of the MCU locking up. I would only rely on that when solenoid release speed matters.
Leo..
An inductor opposes the change in current flowing through it.
When current flows through an inductor, a magnetic field forms around
the coil of wire.
The strength of the magnetic field varies depending on the value of
the current flowing.
If the D. C. current flowing through an inductor is abruptly switched
off, the magnetic field collapses.
The falling field lines of force cut through the coil attempting to
keep the same value of current flowing in the same direction.
The inductor now becomes a current source.
The inductor terminal voltage reverses when this happens.
The inductor terminal voltage now depends on the load resistance seen
by the current source, by Ohm's Law.
So, if the driving current supply, coil and switch have a resistance
of 5 Ohms, and the load resistance increases to 5000 Ohms (the open
circuit and coil) then the inductor terminal voltage must increase
1000 times in order to keep the same current flowing.
Our task is to keep this high voltage from causing damage to the circuit.
When the magnetic field collapses the the polarity is reversed and the voltage will rise until something adsorbed it. The fly back diode has about a 0.7V forward voltage drop. This will clamp the voltage to approximately that voltage. The substrate diode in the MOSFET will drop about 0.1V depending on the energy available, it acts as a resistor. This is documented in the avalanche rated MOSFET data sheet. Simplify the circuit and the 0.1 volt will conduct before the 0.7 volt and dissipate the energy.
Not sure what you're saying.
With a diode, solenoid voltages are 5volt and 5.7volt.
Without that diode, the voltage on the drain of the fet rises to it's VDD breakdown voltage.
The fet now acts as a (~70volt) zener diode.
I don't see what the body diode has to do with it.
Leo..
Is there a short circuit, or just a very low resistance? It's not unexpected for a solenoid coil to have < 5 ohms resistance, which can trigger a continuity reading. Use your meter on the resistance setting instead of the continuity setting to verify.
That's your solenoid coil for sure.
It does pretty much match the 5V/2A specification (1.9Ω at 5V comes to just over 2.5A - which is pretty much the same by Chinese standards). Make sure your power supply and transistor can handle this current.
i have a ebike battery 30-40v and i have 5v and 12v selenoid locks. what is the best way open the 12v or 5v selenoid lock that u can suggest to me?
since selenoid will be active about 1-3 seconds . is there any cheap dc dc convertor or is there anything else to use so maybe i can use a relay from arduino or
if i put directly 40v to 12vselenoid will it burn?
Re think your logic, when the coil is switched off the polarity of the coil wire reverses which causes the substrate "diode "to conduct because the drain is now negative.
@gilshultz
I think you have a fundamental misunderstanding of the subject.
Don't worry, most do.
When the coil is switched off the polarity of the coil wire reverses.
True.
which causes the substrate "diode "to conduct because the drain is now negative.
Not correct.
Coil negative is now connected to the supply, so coil positive must be higher than the supply.
Coil positive (drain) rises to the point that the fet starts to break down.
Leo..
Yes, without diode both active and kickback current returns to the power source.
But current flows in the same direction through the fet when active and during kickback.
Never through the body diode.
Active mode draws current from the power source, and so does kickback.
We should stop hijacking OP's thread. If you want to know more, then start a new thread.
Leo..