# Designing a switching system for solenoids on Raspberry Pi

As part of a project I'm working on, I'm having a Raspberry Pi GPIO pin activate three solenoids, but the pin itself does not supply nearly enough current (each solenoid requires at least 1A, close to 1.5A optimally). I'm trying to set up some sort of switching system with a secondary power source. My first idea used a CMOS switcher, but I ended up using spare parts I had lying around and it didn't work perfectly.

Is a CMOS setup good for what I'm trying to do? If so, what specific MOSFETs should I look into; if not, what would be a more efficient way to tackle this problem?

• What is the rail voltage for the solenoid? – jonk Jan 21 '17 at 7:12
• $3.3\:\textrm{V}$ I/O voltage and a current gain of at least $\frac{1.5\:\textrm{A}}{16\:\textrm{mA}}\approx 94\times$. I think Passerby nailed the precise boundaries of any reasonable approach. You'll need a small signal NPN BJT (TO-92 or TO-18 package) and either a high current PNP or else an PMOS (either in TO-220 or similar package) for the high side switch. A complication might be if you were to say that your solenoid requires exactly $10-12\:\textrm{V}$ for operation and that you only have access to $24\:\textrm{V}$ as a power source and that you want only a simple linear design. – jonk Jan 21 '17 at 7:30
• People are assuming a high side drive. Any reason - I MAY have missed something. IF switches on the "low" or negative side are OK then the easy way is to drive an N Channel MOSFET that is fully on at rated current with Vgs = 3V. Place a reverse polarity diode across the solenoid for spike protection. (1N400x usually OK) – Russell McMahon Jan 21 '17 at 7:57
• @jonk The rail voltage for the solenoid is 9V, and we are trying to use some sort of relay/switch to turn it on and off because it consumes a LOT of current. – Jashaszun Jan 24 '17 at 21:02
• @Jashaszun A little late on the details. But it looks like you have an answer. – jonk Jan 24 '17 at 22:07