Two different solenoids and protection

Hi all,

Just wanting to double check something, and hopefully learn something new as well.

I’m working on a circuit to control my paintball marker, and I’m almost at the point of testing. What I wanted to know is do I need to have any extra protection from the 9V solenoid on my circuit, or is that the whole point of the diode?

The circuit itself consists of 2 solenoids - one for the sear (9V and around 4 amps) and the other is for redirecting the flow of air to the cocking pneumatics (rated 6V but will drive at 5V and 0.5W - I have found the data sheetSolenoid_Valve/1.1)4_5_Port_Solenoid_V/c)SYJ3000_5000_7000/SYJ_000_EU.pdf) for this part) and a phototransistor eye (datasheet)

The sear solenoid would be on for a max. 4 ms, while the cocking solenoid could be on for as long as the trigger is held down (this is to replicate the current functionality). Is there anything I should be worried about? Should I drive all the solenoids at the same voltage? Am I just over thinking all this?

Any helpful pages or topics that I can look into and expand my knowledge would be awesome, and thanks in advance for the help


Add 150 ohm resistors in series with the MOSFET gates to limit pin current to 30mA?

Check the MOSFETs are logic level (can't read the part number in that image)?

Thanks for the quick reply Mark

The Mosfet I am currently using is an IRF540N (datasheet).

What is the resisitor for? Is it there to help limit anything flowing back into the pin?

It seems to drive the solenoid OK as shown (I've tested each section, just not together yet), but I'm not 100% sure that I've got it set up right.

When you turn on a FET it is like charging a capacitor. There is a momentary in-rush of current that is nearly like a short circuit. A resistor limits the current flow to an acceptable level. Once the FET is fully on, the current flow is very small.

The IRF540N is not a good choice because it isn't designed for logic level gate drive. However, it should be good enough if the characteristics of your particular example are not much worse than the typical characteristics shown in the data sheet. Connect the 10K resistor on the output pin side of the 150 ohm resistor, not the gate side.

I would drive the 6V solenoid from the 9V supply using a 33 ohm series resistor, to reduce power dissipation in the regulator and allow you to use a smaller one.

The diodes connected across the solenoids provide the protection you need.

Consider connecting a resistor between the +9V supply and the +ve side of the 2200uF capacitor/solenoid junction, especially if the power source is a battery, so that when the solenoid is on it doesn't cut power to the whole circuit by overloading the power source. A resistance of 100 ohms will do, if you don't fire the solenoid more often then once a second or so.

Thanks for all the help guys,


In regards to the resistor before the capacitor, I do require the solenoids to be able to fire rather rapidly (My old thread is here with some break down numbers), but I found I’d only really need to be able to fire it every 20ms at most - unless I can prove I can fire the marker faster than that :stuck_out_tongue:

I am a bit confused with the 6V solenoid though - do you mean to drive it from the 9V line with a 33Ohm resistor instead of using the 5V line? I’m confused how this would step down the voltage for the solenoid to use


SilkyPantsDan: I am a bit confused with the 6V solenoid though - do you mean to drive it from the 9V line with a 33Ohm resistor instead of using the 5V line?

Yes. 33 ohms is approximately half the resistance of your solenoid, so in the steady state the resistor and solenoid form a voltage divider, with 1/3 of the voltage drop across the resistor and 2/3 across the solenoid.