Advice Needed: Switching Solenoid Valves

I am designing a switching circuit for solenoid valves.

I will have 16 of these circuits in parallel controlled by Arduino (through shift registers to give me enough outputs). The power is a 24V, 7.5 amp hour battery. The solenoids are 24VDC, 320mA, 7.6W.

I built a 16-unit switching board around a transitor-relay design, but had lots of problems with interference between switching units (turning on or off some solenoids would cause a change of state in neighbouring solenoids). It was also pointed out to me that the relays are superfluous and I can switch the solenoids directly.

I'm designing a revised switching circuit around a MOSFET. I am also including a capacitor in the switching circuit, as well as at the battery source. I'm hoping this will eliminate the interference between solenoids.

I would like advice on the circuit designs below. Option 1 uses a buffer between the arduino and the MOSFET (as recommended in "Practical Electronics for Inventors" 2nd Ed p.932). Option 2 is connected to the MOSFET through a resistor.

Should I go with option 1 or 2? (or something else?).

Also, three more specific questions annotated in the schematics below:

(Q1) How do I know what value capacitor to use here? Trial and error?

(Q2) What is the purpose of the 10k resistor? A pull-up?

(Q3) How do I calculate what value resistor to use here?


I don't believe option 2 will work unless you change the mosfet to a logic level mosfet. The Arduino output pin can only output +5vdc which is not enough to saturate a standard N-channel mosfet fully on.
Change the mosfet to a logic level device and it will work fine without requiring the 7407 driver chip that option 1 requires.

Lefty

Lefty & Richard's answers are both good. I have one thing to add about option 1 -- it will probably overvolt the MOSFET gate. Most of the power MOSFETs I have seen are only rated for 20V between the gate and the source (ground side on an N-channel), and that circuit will apply 24V to the gate when the MOSFET is turned on. This may not destroy it the first time you do it -- power parts have some margin. It will reduce the life of the MOSFET, however.

OTOH, I sell an Arduino shield that does pretty much exactly this, and it's 16 channels (http://www.logos-electro.com/ard-srg-ips4x4-1/). I used IRF's intelligent power switches, which encapsulate pretty much all of the protection you're worried about, plus a buck diode on each channel.

Well, I don't have an oscilloscope. Any way I can get by with just a multimeter? Or is that too slow to pick up the current spikes? While we're on the topic, any good advice on a cheap oscilloscope for a beginner or possibly a USB-based oscilloscope?

This is my first time using MOSFETs, so I'm not great at reading the datasheets. The gate threshold voltage (Vgs) in the specs (see images below) is 2-4V and if I'm reading the chart correctly, that should allow me to sink about 15A of current if I apply 5V to the gate, more than enough for my needs. Am I interpreting this correctly?


This is my first time using MOSFETs, so I'm not great at reading the datasheets. The gate threshold voltage (Vgs) in the specs (see images below) is 2-4V and if I'm reading the chart correctly, that should allow me to sink about 15A of current if I apply 5V to the gate, more than enough for my needs. Am I interpreting this correctly?

Wrong interpretation. Gate threshold voltage is not the gate/source voltage that allows fully rated drain/source current. Threshold voltage is that which allows the device to just start conducting, perhaps only a few milliamps. You have to dig deeper into the datasheet where if will have graphs showing drain current Vs gate voltage. Most standard mosfets reguire +10vdc gate voltage for fully rated current draw. The gate threshold voltage for LOGIC LEVEL mosfets will be in the 1-2vdc range.

Lefty

@retrolefty: Isn't the graph I attached in my previous post what you describe? It graphs Id (drain current) vs. Vgs (gate voltage). I believe it shows that if I apply +5V to the gate, then I can sink 15A of current, although it's true that 15A is less than what the MOSFET is rated for.

Isn't the graph I attached in my previous post what you describe?

No ..... look at the axis, there is no gate voltage on it.

I believe it shows that if I apply +5V to the gate, then ......

You might, just in the same way people believe in a flat earth but it doesn't make you right.

Oh, I didn't realize the "(V)" in "Vgs(V)" was significant. So yeah. Vgs(th) and Vgs(V) are different things. Thanks.

@Grumpy_Mike: I just looked out the window, and the earth still looks flat to me.

Well hold on to your hat if you think you are going to switch 15A with 5V gate voltage.

That data sheet says you will only get 11A down it with a 10V gate current. I know the graph leads you to think something else but it is not a sustainable current.

Guys the mosfet manufactures have solved this dilemma (using n-channel mosfets at TTL gate/source voltage) already. They now make LOGIC LEVEL mosfets and their datasheets will clearly state that they will work with ttl logic levels without having to understand the graphs, most even generally put a big 'L' as part of their part numbers these days. So just select the proper devices (you still need to determine your max current and drain voltages specs as well as heat sinking requirements) and all should be cool. Logic level N-channel mosfets are my favorite switching devices for interfacing with an Arduino.

Lefty

OK, second attempt at reading the datasheet.

Referring to the graph "Output Characteristics". The V between gate and source (Vgs) will be 5V when the arduino pin is high, so I'm following the 5V curve in the graph. The Vds (between drain and source) is 24V, because that's from the battery. So, then, I should be able to sink just over 15A of current (Id). I realize this isn't fully saturated, but it should be fine for my purposes with a 320mA solenoid.

I'm going to build the circuit I sketched below today. See if it works. It's like the previous ones I've proposed, but with the addition of a 10k pull-down attached to the gate, which I've read is a good idea to include.

If this fails, I'll take retrolefty's advice and get some logic-level MOSFETs. Right now I have a lot of IRF540s on hand, so I'm going to try using them first.

Grumpy_Mike: I've attached an elastic strap to my hat. :stuck_out_tongue:



It worked!

Now to build one for each solenoid and see if they play nice together without interference between channels.

Good for you. Keep in mind that a 328 output pin can be as low as +4.2vdc with a Vcc of +5.0 and still be within spec. Notice how sensitive the source current is to gate voltage at lower g/s voltages.

What you might want to do is to measure the drain voltage at the device while the solenoid to energized, then you can calculate the power dissapation of the device at those conditions. Or just touch the device for a few mins with the solenoid active to see if the device gets too hot.

One of the super specs of power N-channel mosfets is their low low source drain resistance when saturated. It allows them to pass very high currents Vs their package size, often without requiring heat sinking like bipolar transistors of the same current ratings require.

But that situation is only true if the device is in saturation, run the device at lower gate voltage or operate in a linear mode rather then in a switching mode and all bets are off as device heat dissapation can go through the roof very quickly. The device's safe operating area, SOA, is a key specification that trumps all the current and voltage specs for semiconductors.

Lefty

Ah, that is not something I knew about. Ok, will investigate.

Thanks retrolefty!