# Choosing a MOSFET for solenoid control via Arduino

I'm trying to drive a solenoid I took off an old pinball machine with an Arduino. The pinball machine ran on 25 V AC and I've found that the solenoid was 2 Ω online (so 12.5 A). The Arduino puts out 5 V @ 40 mA. After some googling, it seems I want to use a MOSFET with a logic level gate to do this. However my electronics knowledge isn't nearly enough to understand most of what's going on. I'm looking at different MOSFETs on Digikey and it gives me choices for a lot of stuff. Some of them I think I've figured out and others I still have no idea about:

• FET Type: I'm not sure what the difference is between N and P channel
• Drain to Source Voltage (Vdss): I'm assuming this is the max voltage it can handle going through it, so I should be finding a MOSFET that will support 25 V+?
• Current - Continuous Drain (Id): Assuming this is the max amperage going through it, so looking for one with 12.5 A+
• Vgs(th) (Max): I think this has something to do with the activation voltage applied to the gate that will make it activate, so I need one with less than 5 V?
• Power - Max: Assuming this is the max power it can handle. I've calculated the power the solenoid would need as P = V*I = 25 V * 12.5 A = 312.5 W, so I need a MOSFET that can handle more than 312.5 W?
• I don't know what Rds On (Max), Gate Charge (Qg), or Input Capacitance (Ciss) mean. Are they important for my uses?

Based on searching with these numbers, the cheapest MOSFET returned was this one. Would this work?

On AC coils: I tested the coil with a 25V DC current, and it still operated fine. Unless there is some detrimental aspect to this that I'm not thinking of, I don't think there should be anything wrong with just using a 5V DC source for the Arduino and a 25V DC source for the coil?

• Is the solenoid AC? It seems so, since you say the machine ran on 25 V AC. I don't think you can trivially drive an AC load with a MOSFET. Probably the easiest way is to use a transistor to drive a relay, that in turn drives the solenoid. – Alejandro Mar 4 '13 at 1:32

FET Type: I'm not sure what the difference is between N and P channel

The internal construction of a mosfet is different and you need different voltage levels to switch it on. Higher than source for N channel and lower than source for P channel. As you will be switching 25V load from a 5V microcontroller, choose an N channel logic level mosfet.

Drain to Source Voltate (Vdss): I'm assuming this is the max voltage it can handle going through it, so I should be finding a MOSFET that will support 25 V+?

It's the maximum voltage whitch the mosfet can withstand without letting the current to run through it.

By the rule of thumb you should double the rating to get a reliably working system. So, look for a mosfet with Vds in the range of 50V-60V. It would be OK to use a 25V mosfet but you usually don't want to operate near maximum limited values.

Current - Continuous Drain (Id): Assuming this is the max amperage going through it, so looking for one with 12.5 A+

Again - double it.

Vgs(th) (Max): I think this has something to do with the activation voltage applied to the gate that will make it activate, so I need one with less than 5 V?

Yes, mosfet dissipates least power when it's either fully on or off. Look at the graphs in the datasheet that specify Rdson depending on Vg - you want Rdson as small as possible, so you want to drive the gate above the Vgth. But note, that there is a maximum value that can be safely applied to a gate - Vgsmax. You should be safe driving it with a microcontroller, just a point to note.

Power - Max: Assuming this is the max power it can handle. I've calculated the power the solenoid would need as P = V*I = 25 V * 12.5 A = 312.5 W, so I need a MOSFET that can handle more than 312.5 W?

No, power dissipated by a mosfet would be I*I*Rdson - that's why you want as little Rdson as possible.

I don't know what Rds On (Max), Gate Charge (Qg), or Input Capacitance (Ciss) mean. Are they important for my uses?

When a mosfet is on, it's not an ideal conductor with no resistance. Rdson is the resistance of the mosfet and is dependent on different factors, datasheets usually give graphs how Rdson changes with different parameters.

You don't have to deal with gate charge and input capacitance in you application as fast (submilisecond) switching is not required. A mosfet gate presents itself as a capacitor to a driving circuitry and as it takes time for a capacitor to charge, it takes time for a mosfet to turn on that's why in high speed applications special mosfet driver ics are used that force high currents into gate to charge this capacitance as quickly as possible.

You can find cheaper mosfets with lower Rdson, just use the parametric search on digikey. Pay attention to the graph that displays Rdson against Vgth - sometimes manufacturers claim 4V Vgth and 4mOhm Rdsn, but when you look at the graph you see, that at 4V it's 20mOhm and you need to get to 9V to get the advertised 4mOhm Rdson.

• The OP's power supply is AC, switching with a MOSFET won't work. – Anindo Ghosh Mar 4 '13 at 2:34
• sad :) didn't notice that – miceuz Mar 4 '13 at 9:10
• The coil came from something that ran on AC, however shouldn't the coil work with DC? (see addition to OP) – zacaj Mar 4 '13 at 22:48
• So for Max Power, I need to do 12.5A * 12.5A * Rdson(at whatever voltage/amperage I'm using) and make sure that it's below what the MOSFET is rated for? – zacaj Mar 5 '13 at 0:13

You have an AC coil so a MOSFET will not work. A relay is a better choice. You also need a diode placed to allow current to continue and dissipate when the relay shuts off. Otherwise, an SSR could be used. I have recently used a model from Sharp via Digikey that might work. It is about \$7

To switch AC you can use a TRIAC, check Arduino AC Phase Control and that would solve your needs.