Controlling many solenoids at once

I am about to build a bubble display thing that needs to control many solenoids (right now just 8, but possibly more later). I think I understand it, but I want to make sure the circuit I am about to put together isnt flawed and won't destroy any of the parts. The solenoids are of the 350mA 12 volt variety. I have attached an image of the circuit I have in mind. Basically I have an output pin from an Arduino Uno running to the gate pin of a MOSFET and from there through a 100 ohm resister to ground. I have a separate 12 volt 5 amp power supply that I salvaged from an old projector. I have its ground line tied to the Arduino. The power line runs out of the 12 volt supply and into one side of the solenoid. The other side of the solenoid is connected to the Drain pin of the mosfet. The source pin of the mosfet is then ran to ground.

Is this the right way to control a solenoid? Will this work once I have 8 solenoids hooked up in the same way to the Arduino? Most of the time only a few of the solenoids will be on a time, but sometimes they will all need to be open.

Two cautions:

First the 100 ohm resistor needs to be in series with the output pin to the gate of the mosfet, not wired to ground as you show. Second the mosfet should be one rated for 'logic level' service. Many mosfets only fully turn on with a +10vdc applied to the gate, which the arduino cannot directly supply. So be sure you obtain a 'logic level' n-channel mosfet.

Lefty

Thanks for the reply Lefty. The mosfets I am using are indeed 5 volt logic level (This one: Intelligent Power and Sensing Technologies | onsemi)

As far as the resistor goes, you are saying to put it inline between the output pin and gate, right? Should the gate pin still be wired to ground?

As in:
Arduino output pin: --------> 100 ohm resistor -------> Mosfet's Gate -----> Ground

greengiant83:
Thanks for the reply Lefty. The mosfets I am using are indeed 5 volt logic level (This one: Intelligent Power and Sensing Technologies | onsemi)

As far as the resistor goes, you are saying to put it inline between the output pin and gate, right? Should the gate pin still be wired to ground?

As in:
Arduino output pin: --------> 100 ohm resistor -------> Mosfet's Gate -----> Ground

That is correct, it's purpose if to limit maximum output pin current being drawn to charge up the gate for turning it one and discharging the gate capacitiance to turn off the gate. Once the mosfet is fully on or off no current is drawn from the output pin.

You might also consider adding a 10,000 ohm resistor wired from gate to source. Is to ensure that the mosfet will be forced off in cases where the solenoid voltage is on, but the arduino might be powered off.

Lefty

Awesome. Thank you for the explanation. What would be the consequence of omitting the 10k resistor between the gate and source? If the solenoid power is on but the arduino off, would this just result in the gate pin "floating" and causing the solenoid to turn on and off randomly?

greengiant83:
Awesome. Thank you for the explanation. What would be the consequence of omitting the 10k resistor between the gate and source? If the solenoid power is on but the arduino off, would this just result in the gate pin "floating" and causing the solenoid to turn on and off randomly?

Yes, that is the risk.

Lefty