6
\$\begingroup\$

I was wondering what the best way to run a solenoid would be from an Arduino board. I was thinking about using a MOSFET that runs into a relay to turn on the solenoid but am not sure how to go about it.

\$\endgroup\$
7
\$\begingroup\$

You can drive the solenoid using only the MOSFET (or a bipolar transistor)
It would help to know what type of solenoid you wish to drive so we can select suitable components. Here are a couple of circuits to give you the general idea for MOSFET/Bipolar:

MOSFET solenoid

The resistor can be ~10k - 100k (the range can be wider as Steven notes, e.g. 1k\$ \Omega \$ - 10M\$ \Omega \$ - too high a resistance and you risk susceptibility to noise though), it's to make sure the gate is pulled to ground if the input is floating. The diode can be almost any general purpose diode capable of handling a reasonable amount of current.

Darlington Version:

Darlington solenoid

\$\endgroup\$
  • \$\begingroup\$ Oli, I don't think noise will be an issue. Even when driven from an open drain output the pull-up will provide a low impedance. The resistor is just there in case the gate would float for some reason, but if the driver is disconnected/defective the device won't work properly anyway, and by the way, a 10 M\$\Omega\$ resistor generates only 400 \$\mu\$V Johnson noise at room temperature over a 1 MHz bandwidth. \$\endgroup\$ – stevenvh Jul 11 '12 at 9:57
  • \$\begingroup\$ @Steven - I wasn't thinking of Johnson noise, rather just in the (unlikely) event the input is left floating in a noisy environment (as mentioned). You could say the resistor is not needed at all if you're sure it's always driven properly (e.g. uC pin active before solenoid supply active) \$\endgroup\$ – Oli Glaser Jul 11 '12 at 10:04
  • \$\begingroup\$ Agreed, and IMO initializing I/Os should be (one of) the first thing to do after the uC is reset. Leaving the gate floating for a ms won't hurt it (even when the solenoid's power is already active). \$\endgroup\$ – stevenvh Jul 11 '12 at 10:09
2
\$\begingroup\$

If the solenoid needs an AC drive you'll indeed need the relay, otherwise you can directly drive the solenoid with the MOSFET. They're the same kind of load.

enter image description here

Oli suggests 10 kΩ to 100 kΩ for R2, but you can even use a 1 MΩ for this. Make sure that you have a logic FET. Other FETs may need a too high gate voltage to turn on. A relay may need around 50 mA or less, a solenoid probably a couple of hundreds of mA. Select a FET with a low \$R_{DS(ON)}\$, so that even at higher currents dissipation will be low. FETs with an \$R_{DS(ON)}\$ of less than 200 mΩ are perfect and well available.

If the relay/solenoid needs 24 V or less the Si2304DS is a possibility: \$R_{DS(ON)}\$ is less than 200 mΩ, so even at 1 A it will dissipate only 200 mW. Can drive more than 1 A at 3 V gate voltage.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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