Switching Solenoid with P-Channel MOSFET

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

 

I'm having a bit of an issue with switching a +12Vdc solenoid off using a p-channel MOSFET (IRFR9220).  I've attached the circuit as it sits currently on the breadboard.

 

The problem I'm facing is that when I apply +12vdc to the solenoid (power source PSU-1 in diagram), the solenoid is on, even though the MOSFET isn't being driven (PSU-2 is at 0V).  I've experimented with different gate-source resistor values (current value is 100kohm) with no change in behavior.

 

I've replaced the solenoid with a 6vdc buzzer and have been able to switch the buzzer ON and OFF with the circuit shown in the attached schematic. 

 

I'm using a p-channel FET because the final drive circuit that will replace PSU-2 is an n-channel MOSFET on an external driver board.

 

Any suggestions would be appreciated. 

Attachment(s): 

This topic has a solution.
Last Edited: Thu. Nov 20, 2014 - 09:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The gate needs to be at 12V to turn off. The mosfet will begin to turn on when the gate to source voltage is >3V (approx). Relative to 0V, this is 12-3=9V

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The gate needs to be at 12V to turn off. The mosfet will begin to turn on when the gate to source voltage is >3V (approx). Relative to 0V, this is 12-3=9V
But the gate-source resistor pulls the gate to the positive rail from PSU-1 when PSU-2 is off.

 

Rather it is the fact that negative from PSU-2 is tied to positive from PSU-1.  Would not the result be that the gate is driven at -12V or -24V (w.r.t. source)?  Both of which will turn on the MOSFET, no?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Thu. Nov 20, 2014 - 09:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I played around with the circuit a little more, noticing that  with the 6v buzzer connected, If PSU-2 was at 0V and PSU-1 was set beyond six volts, the buzzer would sound.  Does this have something to do with Vgs(th)?

 

EDIT:  If I flip the leads on PSU-2 to the circuit, the circuit now functions, only now when the MOSFET is OFF, the solenoid is ON, and when the MOSFET is ON, the solenoid is off.  When the voltage to the solenoid is 12v, a voltage from PSU-2 of 9v or greater will turn ON the MOSFET.  The operation is inverted.

 

EDIT EDIT:  I've attached an updated schematic showing the flipped leads from PSU-2.

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zipfactor wrote:
If I flip the leads on PSU-2 to the circuit, the circuit now functions, only now when the MOSFET is OFF, the solenoid is ON, and when the MOSFET is ON, the solenoid is off.  When the voltage to the solenoid is 12v, a voltage from PSU-2 of 9v or greater will turn ON the MOSFET.  The operation is inverted.
You are misunderstanding how a P-channel MOSFET operates.  In order to switch the MOSFET on, the voltage across gate to source must by be negative i.e. gate at a lower potential than source.  You are applying a net zero voltage, which drives the MOSFET off.   In fact, any voltage across gate to source more positive than Vgs(th) (which is a negative quantity) will drive the MOSFET off.  A gate-source voltage more negative than Vgs(th) will drive it on.

 

Here's what your circuit looks like in schematic form:

 

When PSU-2 is an open circuit, the resistor pulls the gate up to the source, turning off the MOSFET.

 

When PSU-2 is delivering 12V, there is no change because the gate is still at the same potential as the source, even though they are 'fed' from different power supplies.  This is because the negative of each PSU is tied together (common ground).

 

If PSU-2 is a dead short, PSU-1 will source current through the pull-up resistor to GND (because of the common ground and the dead short across PSU-2), but more importantly the gate is pulled negative w.r.t the source, turning the MOSFET on.  In fact, any voltage delivered by PSU-2 which is lower than [Vpsu1 + Vgs(th)] (remember for a P-channel the threshold voltage is expressed as a negative) will turn on the MOSFET.  This is what you are seeing, so I would speculate that when your PSU-2 is 'off' that it actually acts as either a dead short or at least a resistance less than about 2 times the value of your pull-up resistor.

 

Maybe if you stated clearly what it is you are trying to accomplish someone could make a suggestion.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Fri. Nov 21, 2014 - 04:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've attached a schematic of what I'm trying to accomplish.

 

I have an external control board with an output that is switched via an n-channel MOSFET.  I would like to use this output of this external board to switch an external solenoid.  Because of the external control board having an n-channel MOSFET, I chose a p-channel MOSFET to switch the solenoid.

 

I'm attempting to use the n-channel MOSFET to drive the gate of the p-channel MOSFET in order to switch the solenoid. 

 

I apologize for being so obtuse before, I was trying to breadboard a mocked up circuit to prove out my solution as shown in the schematic, instead of presenting what I was ultimately trying to accomplish.  Any input is very much appreciated.

 

Thanks again.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm a bit confused by your schematic.  Your 'external board' is depicted with an internal ground, but you have the '+12V' terminal tied to ground for the solenoid drive.

 

Perhaps you're confusing the role of ground in this type of MOSFET circuit with the role of source.  For a P-channel device, source must be positive w.r.t. gate in order to turn on the MOSFET.  The +12V terminal on the 'external board' should be tied to the +12V rail of the solenoid drive.  That way when the N-channel device within the 'external board' is switched on, the external '0V' terminal will be driven negative w.r.t the +12V terminal, pulling the gate of the P-channel negative w.r.t. the source, which will turn it on.  When the N-channel device is off, the pullup resistor will keep the gate of the P-channel at source potential, turning it off.

 

Are you certain your 'external board' looks as you have depicted it?  Did you design and/or build it?

 

It sounds like you've been experimenting with a 'stand-in' for the external board.  If as I suspect you've been using a PSU which when off presents a low-ish impedance across it's output, that would make it very unlike your external board and might explain some of the strange behaviour you've been seeing.  If you don't have the external board ready, it should be easy to mock up with an N-channel device for the duration of your testing.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Fri. Nov 21, 2014 - 04:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MOSFET gates have a capacitance that must be charged and discharged to switch it On/Off, otherwise they will remain in their last state even if the gate is disconnected. The resistors below keep both FETs shut off by default.

The clamp diode can be replaced by a Schottky type and a snubber capacitor, to flat out the 'kick' pulse from the coil when the FET shuts off.

 

 

Untitled-1.gif

 

 

while(!solution) {patience--;}

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:

Are you certain your 'external board' looks as you have depicted it?  Did you design and/or build it?

 

It sounds like you've been experimenting with a 'stand-in' for the external board.  If as I suspect you've been using a PSU which when off presents a low-ish impedance across it's output, that would make it very unlike your external board and might explain some of the strange behaviour you've been seeing.  If you don't have the external board ready, it should be easy to mock up with an N-channel device for the duration of your testing.

 

I did design / build the board myself, however, I depicted the ground incorrectly.  The ground from the external control board is common with the ground from the solenoid.  I also initially had shown the simplified circuit for clarity, but I've updated the schematic showing the exact circuit within the external board.

 

And you are correct in that I have been experimenting with a "stand-in" PSU in place of the n-channel MOSFET.  I managed to dig up another n-channel MOSFET to test with.

 

The circuit is (what seems to be) functioning properly.  I've attached an updated schematic.  I did not connect the "+12v" terminal connection on the external board, only using the "0v" terminal on the external board.  I tried this same configuration before, but as you pointed out, the use of the stand-in PSU was giving strange behavior.

 

While we are on the subject, I have a remaining question:

 

  • The current p-channel FET that I am using is rated with a Vgs of +/- 20V.  If I were to change the +12v rail voltage to +24v rail voltage, I would then need to use a larger FET, such as a Fairchild FQU11P06TU, which has a Vgs of +/- 30, correct?

 

Thanks again for the help, It's really appreciated! 

Attachment(s): 

Last Edited: Fri. Nov 21, 2014 - 03:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A zener between the FETs will keep the gate within +/-20V

while(!solution) {patience--;}

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The clamp diode can be replaced by a Schottky type and a snubber capacitor, to flat out the 'kick' pulse from the coil when the FET shuts off.

 

No advantage to using an expensive Schottky diode here,  a 'normal' diode is fine.

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Because I only have a 5.1V zener, which would bring the Vgs = 19v (approx), which is fairly close to the max of Vgs = 20v. 

 

Could a voltage divider be used by adding resistor R4 (see attached sketch), connected in series with the drain of the n-channel FET, to supply a higher voltage to the gate side of the p-channel FET?  Obviously there would be a  delay in ON / OFF.

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you wish to use a higher voltage to supply the solenoid, simply add an additional resistor between the 'drain' of the external control board's fet and the 'gate' of the p-channel fet.  This creates a voltage divider to reduce the p-channel's Vgs to a reasonable value.  The n-channel on the control board will see the full solenoid power supply voltage when it is off, so it should have an appropriate voltage rating.

Tom Pappano
Tulsa, Oklahoma

Last Edited: Fri. Nov 21, 2014 - 06:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpappano wrote:

If you wish to use a higher voltage to supply the solenoid, simply add an additional resistor between the 'drain' of the external control board's fet and the 'gate' of the p-channel fet.  This creates a voltage divider to reduce the p-channel's Vgs to a reasonable value.  The n-channel on the control board will see the full solenoid power supply voltage when it is off, so it should have an appropriate voltage rating.

 

I was just working on asking that revising my question above yours, asking the same question, when you apparently beat me to the punch!

Last Edited: Fri. Nov 21, 2014 - 06:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks again everyone for the help!