| Thread Closed |
Switch MOSFET from MCU |
Share Thread | Thread Tools |
| May12-10, 04:47 PM | #1 |
|
|
Switch MOSFET from MCU
Hi all,
I have been trying to get a MCU to send a +5v signal and in turn switch a N channel MOSFET with a VDS of +12v. I used a P channel BJT, tied the gate to +12v through a resistor, the top to +12v straight, and the output to the gate of the MOSFET. Then by grounding the gate, the pchannel sourced the +12v needed and the MOSFET turned on. However this only worked for some of the p channel transistors I had (even if they were both the same), so something must not be right. What is the best way to accomplish this? It has to be a common problem, and I have tried about 5 solutions with varying degrees of success from sparatically to some of the time working, but never consistant. |
| May13-10, 04:03 AM | #2 |
|
|
I'd welcome you to PhysicsForums, but it looks as if you may already have left!
Regardless, for this sort of application, I typically use an NPN BJT (say, a 2N4401) and an N-Channel MOSFET (say, a 2n7000 for low-power applications, or a IRFZ34N for higher-power). The objective here is to have your BJT operate in saturation, and drive your NMOS in linear mode. ![]() Analyzing the above / attached circuit, you can see that when you have 0V at the input, the BJT is off, and both the BJT collector and the NMOS are at 12V. When this happens, the NMOS turns on, and goes into linear mode: what you see at the drain of the MOSFET is approximately ground, and thus, 12V appears across your load, and it turns on. When you have 5V, the BJT saturates, the collector goes to the saturation voltage (roughly 0.2V) and the NMOS turns off, thus disrupting the ground path for the load and turning it off. Since this is somewhat inverted, you can add in a second BJT stage to get non-inverted output. Or just accept it. Assuming you can maintain linearity of the MOSFET [itex]V_{DS} < (V_{GS} - V_{th})[/itex]), you can sometimes omit the BJT stage and drive it directly from the 5V. [itex]V_{DS}[/itex] can be roughly approximated by multiplying the nominal on-resistance (see the datasheet) with the operating current of the device. That's what this circuit does (found from a search of MOSFET as switch, to try to avoid having to draw out the circuit I actually did): http://www.electronics-tutorials.ws/...or/tran_7.html |
| May13-10, 07:02 AM | #3 |
|
|
Thanks for sharing that. I always appreciate posts like these, because it means I can add another schematic to my spice library to play with or for future reference!
Regarding this: |
| May13-10, 10:12 AM | #4 |
|
|
Switch MOSFET from MCU
If your switching frequency is at or above the audio range, use a mosfet driver. These parts are cheap and are optimized for exactly what you are after. Every electronic components distributor carries them in all kinds of packages.
|
| May13-10, 12:48 PM | #5 |
|
|
My understanding of this circuit is that it achieves the lowest Vds, and hence, the lowest power dissipation (Power dissipated = Id * Vds)--I think you can show that the same MOSFET in linear/triode mode has a lower Vds than when it's in saturation mode, as a consequence of the definitions (Vds related to Vgs and Vthreshold). I remarked that everything seemed backwards for MOSFETs compared to BJTs: majority carriers do the current transport, you use linear mode for switching, and saturation mode for amplifiers! EDIT: The OP was attempting to switch a 12V load on and off using a 5V signal, and asking how to do this. I think the problem was that he was attempting to have the MOSFET output the 12V instead of allowing for a path to ground. Which is fine when you have a PMOS, but doesn't work so well (at least, not with simple configurations) when using an NMOS. However, you can use an NPN power BJT in this fashion (common collector) as long as you can supply something like 5% of the current: http://en.wikipedia.org/wiki/Common_collector |
| May13-10, 06:43 PM | #6 |
|
|
Yes, you're right. The power dissipated in a mosfet is Vds * Id, so increasing Vds in the saturation region where the current is constant, increases dissipation without the benefit of increased current to the load. Thus it is in the linear region that dissipation is minimized for a given drain current.
The OP's original problem statement I hope I got it right this time :) |
| May13-10, 07:29 PM | #7 |
|
|
|
| Thread Closed |
| Thread Tools | |
Similar Threads for: Switch MOSFET from MCU
|
||||
| Thread | Forum | Replies | ||
| Switch 4 wires with a Momentary switch | Electrical Engineering | 3 | ||
| Difference between mechanical switch and a transistor switch? | Electrical Engineering | 5 | ||
| Using a MOSFET and comparator together as a switch | Electrical Engineering | 3 | ||
| MOSFET Switch | Electrical Engineering | 5 | ||
| Solid state switch vs. MOSFET | Electrical Engineering | 6 | ||