Hooking up to 12 solenoid valves using Transistor/MOFSET as switch

I am relatively new to Arduino, but I have a few projects under my belt. My current project will require control of 12, 12V 540mA solenoids. To achieve this, my current plan is to...

  1. Power Arduino via Barrel jack using 12V, 2A power supply that can plug directly into standard wall outlet
  2. Hook up a breadboard using the Vin port on the Arduino (should provide 11.3V due to internal regulations in Arduino?)
  3. Wire up 12 transistors/MOFSETS and to 12 different solenoids (yes I will use a diode to prevent current surge) directly to the 11.3V on the breadboard
  4. Use the Ardiono Digital PWM pins to switch each transistor
  5. Now I can control my different 12 solenoids

This sounds too good/too easy to be true to me... and I am worried that I will not have enough current from the Arduino to power all the solenoids. I believe that current is limited to 1A by the Arduino Vin pin? I currently own a IRF520 MOFSET that I have used in this way to switch LEDs, but nothing as large as a solenoid.

What I would like to know:

  1. Will this blow up/burn down the house/Arduino?
    1a) If yes, how would you suggest I power the solenoids? Relay Board?
  2. What transistor/MOFSET will be able to handle this load?
  3. What base resistor value is needed for the transistor/MOFSET?

Show us a good schematic of your proposed circuit.

Give links to components. Posting images:

https://forum.arduino.cc/index.php?topic=519037.0

micahrinke:
I am relatively new to Arduino, but I have a few projects under my belt. My current project will require control of 12, 12V 540mA solenoids. To achieve this, my current plan is to...

This calls for a 10 Amp power supply in my opinion.

  1. Power Arduino via Barrel jack using 12V, 2A power supply that can plug directly into standard wall outlet
    Might work if nothing is connected to Arduino 5 or 3.3 volt pins.

  2. Hook up a breadboard using the Vin port on the Arduino (should provide 11.3V due to internal regulations in Arduino?)

I've never heard of any successful project doing this.

  1. Wire up 12 transistors/MOFSETS and to 12 different solenoids (yes I will use a diode to prevent current surge) directly to the 11.3V on the breadboard

Current surge???? Diodes are needed, one for each inductive coil, named kick back diodes.

  1. Use the Ardiono Digital PWM pins to switch each transistor
    Select an Arduino that provides 12 PWM outputs.

  2. Now I can control my different 12 solenoids
    Read reply to 4

This sounds too good/too easy to be true to me... and I am worried that I will not have enough current from the Arduino to power all the solenoids.
Be more than worried. 12 * 540 mA can not be taken from any Arduino board.

I believe that current is limited to 1A by the Arduino Vin pin?
Totally wrong.

I currently own a IRF520 MOFSET that I have used in this way to switch LEDs, but nothing as large as a solenoid.
That MOSFET might work.

What I would like to know:

  1. Will this blow up/burn down the house/Arduino?
    Yes.

1a) If yes, how would you suggest I power the solenoids? Relay Board?
Power the solenoids directly from the power supply.

  1. What transistor/MOFSET will be able to handle this load?
    I use logic N channel MOSFET, not conventional MOSFETs.

  2. What base resistor value is needed for the transistor/MOFSET?
    180 Ohm.

larryd:
Show us a good schematic of your proposed circuit.

I would say: Don't.....

Give links to components.
Would be appreciated....

Posting images:

Simple guide for inserting images in a post - Website and Forum - Arduino Forum

I have attached an image of a purposed circuit using circuito.io

This is the basic idea, but it there would just be more solenoids hooked up.

12v 2A barrel jack power supply: Amazon.com

Snubber Diode: IN4007

MOFSET: wither INF520 or 30N0bL

Resistors: 10k Ohm

Arduino Uno

Solenoid valves: Amazon.com

I offer an 8-channel N-MOSFET board that easily sink 540mA per channel, and has 2A diode per channel so you may not need one at the solenoid coil.
The MOSFETs can be controlled via shift register, and the board is easy to daisychain to use 2 of them:

digitalWrite (ssPin, LOW);
SPI.transfer (1st8Solenoids); // or use shiftOut()
SPI.transfer (2nd8Solenoids);
digitalWrite (ssPin, HIGH); // outputs update on this rising edge

Here it is driving 8 LED strips from a 12V supply
http://www.crossroadsfencing.com/BobuinoRev17/

Let's see. At 0.6 amp per solenoid times 12 solenoids, that seems to be something over 7 amps. Don't tell me they won't all be on at the same time, because sooner or later you will make a mistake and they will all be on.
Paul

Yes, the plan is to only have 2 on at the same time at the MOST. I really only NEED one on at a time technically. Would my schematic scale up to 12 solenoids provided I only power one at a time?

Your solenoid feed current is passing through a diode rated at 1 Amp, more than 1 solenoid on at a time will overload the diode.

JCA34F:
Your solenoid feed current is passing through a diode rated at 1 Amp, more than 1 solenoid on at a time will overload the diode.

Is there a smarter/safer way to accomplish the task of controlling 12 solenoids with an Arduino? Are there any other ways to wire them up to give me more functionality with less risk?

Don't even think about pulling that current through a breadboard, not even for one solenoid.
An accident in the code where several solenoids get energised will make toast of the breadboard, send smoke signals.

Did you look at my board? Connect two of them, and be on the way. Hard to get much easier.
$38 each plus shipping & paypal fee.

PWM to solenoids? I don't think the mechanical part of the solenoid will keep up with that. (480 Hz or 960 Hz depending on IO pin used for analogWrite)

Why PWM a solenoid? You can't controll the force that way if that is what You intend.

Railroader:
Why PWM a solenoid? You can't control the force that way if that is what You intend.

Ummm, why not?

That is precisely what they use to levitate things!

That's what I would simply call "electromagnet".

To call it a solenoid it needs a moving pin in the core, which moves back and forth using the coil.

The ideal way to go on with this project would be to use an optoisolated relay board and drive the solenoids through it. The optoisolation will also provide the necessary protection. The pin number on the Arduino is not an issue. Connecting any pin to the relay board to the Digital I/O should be enough. PWM control is not required for this.

robu:
The optoisolation will also provide the necessary protection.

Protection of what from what?

@Paul__B

Yes, that looks like the opposite of what I wrote. As long as the levitating object does not get in contact with the electromagnet, it works.

Several persons tried to vary the force in a brake system. Strong springs applied the brake and current was used to release the brake. Originally it was an emergency brake but was used as the "travel brake", slowing down during driving. Modulating, PWM, that brake didn't give any useful result.
My work ended up with a method to cut down the time to apply the brake. It gave me and my colleague work day and night during a Christmas, in order to upgrade all machines being ready for delivery.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.