0

I'm building a pump for which I need 4 medium strength solenoids (20-50N). 24V is probably the minimum I will need to put through them, but this is something I need to test, once I've got them working. At 24V they draw 400mA.

I've found various posts with very useful info, especially https://playground.arduino.cc/Learning/SolenoidTutorial and https://forum.arduino.cc/index.php?topic=417030.0

Will the attached sketch below work for one? If so what resistance should R1 be? And if so can you see any problems with hooking up 4 working at different intervals?

The power supply is an LRS-350-24RS, and the Mosfet has a max gate source voltage of 35V. The 5v-24v optocoupler is off ebay - https://www.ebay.co.uk/itm/152904980799

Many thanks for your help!!

enter image description here

dda
  • 1,595
  • 1
  • 12
  • 17
Oliver Walters
  • 153
  • 1
  • 9

2 Answers2

2

No, it won't:

  • The diode D1 is backwards.
  • The opto-coupler is wired completely wrong.

You don't actually need the opto-coupler as long as the threshold voltage of the MOSFET is low enough for the Arduino to switch. However if you do want (or need) to use it you should wire it like this:

schematic

simulate this circuit – Schematic created using CircuitLab

R1 is a pull-down that keeps the MOSFET off when not being turned on (just like with a button). The value doesn't matter much. R2 is a resistor just like you use for any LED with an Arduino. D1 must be connected reverse biased or it will just short out your solenoid. The opto-coupler must be connected with the transistor the right way around or it will not work (or melt, or create a black hole...)

To ditch the opto-coupler you can just treat it like any other load on the Arduino (as long as the MOSFET's threshold voltage VGS is below 4V):

schematic

simulate this circuit

Majenko
  • 105,851
  • 5
  • 82
  • 139
-1

The MOSFET, to be driven from Arduino directly, needs to have a Logic Level gate. I've been using AOD514. Logic level gate, Low Rds, rated for 30V. https://www.digikey.com/product-detail/en/alpha-omega-semiconductor-inc/AOD514/785-1357-1-ND/3060919 SMD only, they seem to have cancelled their thru-hole line of parts that I used to use. I have up to 32 of them on a board with the gates driven by 74HC595 shift registers for driving 1A loads (only limited by trace widths, not the transistors), with diodes added at the coil if needed. http://www.crossroadsfencing.com/BobuinoRev17/

CrossRoads
  • 2,449
  • 7
  • 9