Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Will my circuit work for the following goal?: When INPUT_N is HIGH (i.e. micro is not driving it and it is pulled up to 3.3V), VCC pin on device will have 24V. When Microcontroller drives INPUT_N to be LOW, VCC pin is at 0V (so device is off).

Should circuit below work as intended?

schematic diagram

share|improve this question
    
Are you using a P-channel mosfet here? –  Hair_of_the_Dog Dec 17 '12 at 19:27
    
Yes P-Channel. Want to keep device VCC pin at 24V powered when Gate is at 3.3V (using the PU). –  user1406716 Dec 17 '12 at 19:31
1  
Are you sure you want to power your 24V device through a resistor? See @helloworld922's answer below about using the PMOS transistor as a high-side switch. –  Dave Tweed Dec 17 '12 at 19:42
1  
+1 for the effort of doing the schematic in MS Visio; Next time you might want to use a proper schematic tool (free, online) e.g. circuitlab.com || partsim.com –  m.Alin Dec 17 '12 at 19:51
1  
In this application it would be much simpler to use an NFET and switch on the low side. You have two problems here (1) control and (2) level-translation. So to switch on the high side you will need two active elements (more or less). As @helloworld992 covered in his answer, switching on the low side eliminates (2) so you can use only one NFET and you're all done. Do you have a specific reason to be on the high side? There are, of course, many good ones, just curious if you had a specific rationale in mind. –  DrFriedParts Dec 19 '12 at 9:00

3 Answers 3

No, that won't work. P-channel mosfets require the Gate voltage to be lower than the source voltage by some threshold in order to "turn on".

The Mosfet will still conduct through the body diode so the device will receive a small voltage, not the 0V/24V of an on/off switch.

However, even if you did get the mosfet to act like a "short circuit", you're shorting the device VCC to ground which is wasting a good amount of power to turn off the device.

A better way would be to put the P-channel mosfet in directly inline with the device closer to the 24V source.

This would require the pullup voltage to go up to ~24V (minus the turn on threshold) to turn the mosfet off, so you'll most likely have to add some other circuitry to the MCU pin so it doesn't fry. A potential solution might be to use a second N-Channel mosfet to drive the P-channel mosfet gate pin to ground, then use a pullup resistor to the 24V rail.

Something like this:

enter image description here

VG1 is directly driven by the microcontroller (high voltage is on, low voltage is off). R2 is the load circuitry. T1 is a P-channel mosfet and T2 is an N-channel mosfet. R1 is a pull-up resistor to the 24V rail.

There might be a simpler way to do it, this was just the first thing I thought of.

edit:

If you can have a low-side switch, the switching circuitry will be much simpler: just a single N-channel mosfet with the drain tied to the load, the source tied to ground, and the gate tied to the microcontroller with high voltage being on and low voltage being off.

share|improve this answer
    
Technically, a P-channel MOSFET needs the gate to be lower than the source terminal to turn on. But in the OP's circuit, the body diode will be conducting anyway (it points from drain to source), so the load will only see a fraction of a volt, regardless of the state of the gate. –  Dave Tweed Dec 17 '12 at 19:39
    
updated the answer, does that look better? –  helloworld922 Dec 17 '12 at 19:48
    
Shorting out the load to keep it from seeing power is not the correct way to solve this problem. The MOSFET should be N-channel and in series with the load on the low-side (the source of the MOSFET goes to ground). –  Madmanguruman Dec 17 '12 at 19:57
    
@Madmanguruman I take it you're commenting on the OP's circuit, not mine? –  helloworld922 Dec 17 '12 at 20:00
    
@Madmanguruman - Is this what you are recommending? Circuit: postimage.org/image/s4fp7rlyp –  user1406716 Dec 17 '12 at 20:53

Usually a P-Channel mosfet is used as what is refered to as a " highside " switch. That is the Source is tied to VCC, and the drain is connected to a resistor to gnd. Your load is connected between the drain and the resistor to gnd.

This allows you to pull up VGS to vcc when the unit is off.

This allows you to drive VGS negative by appling 0V on the gate to turn the FET on

The more negative VGS becomes, the lower the internal resistance of the FET and the more current passes through the FET and into your device!

share|improve this answer

You are using the transistor in a wrong polarity. You could better use ULN2003 series IC to drive this kind of load. You might need a level translator to drive from 3.3v.

http://www.ti.com/product/uln2003a

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.