low side logic controlled switch

Basic MOSFET Switches

Views: 80
0 0
Read Time:10 Minute, 13 Second


As I build on the concepts outlined in the future blogs I will build off article like this to add to more and more complex articles with the end goal to have implemented my Megasquirt in my 99 ford F-150. So, this article is the first of many to start and outline the overall build process. To be clear, I have already started this process. However, I realized it is critical to start to document these type of things. Why, well because I keep having to look them up over and over again. So, why not document the successful ones in my own posts. Especially, something as common as Basic MOSFET Switches.

Welcome, to the first of many articles outlining the overall F 150 build that I have started. Overall, I think this is going to be a crazy ride! So, without further hesitation here is my first post on the truck build. Well, sort of. Consider, switches like these are all through MegaSquirt! So enjoy the basic MOSFET Switches article. By the way, full KiCad schematics will be downloadable at the end of this article.

Basic MOSFET Concepts

Attached is a MOSFET article to better understand them. https://alan.ece.gatech.edu/ECE3040/Lectures/Lecture24-MOS%20Transistors.pdf

Just in case that source goes away:


What is a basic MOSFET Switch?

Well, I am glad you asked! These switches are designed to be logic level driven switches by such things as Arduino or other microcontrollers. So, critical is the turn on voltage and current flow these switches require to “fully” turn on. That is why MOSFET’s were chosen in these circuits. They are voltage driven, so critically they have a low current load on the control circuits. Also, they also have a very low on resistance so will not get to hot if driven properly into saturation. As always, they have some drawbacks. So now for the pitfalls! They have a small capacitance that can cause a higher inrush current if there is not a series resistor on the gate! Oh, and if they are overdriven. They tend to fail with a short to on state so they can cause runaway situations!

High Side MOSFET Switch

First, design wise the high side Basic MOSFET Switches work in a reverse logic state then a Low Side version. What is a high side switch? Well, it is a switch that turn on and of the source voltage aka (high side). Traditionally, High side switches were most common in almost every circuit. Also, they have there advantages.

  1. Turn off source voltage so there is no potential after the switch to ground or cause a shock. Furthermore, this is how all home switches should be in your home. At least, if they are wired correctly. They stop the 120v at the switch so you should not get shocked changing the bulb.
  2. More traditional design concept used in many relay circuits.

So, what are the disadvantages?

  1. P type MOSFET (P-Channel) tend to be higher in on resistance than N type MOSFET (N-Channel).
  2. Logic level reversal. Designs require an N MOSFET to pull down the gate of the P MOSFET from the same potential used on the Source pin of the high current MOSFET. Typically, I use a 2N7000 type of N-Channel MOSFET to the gate of the P-Channel this will invert the logic back to normal high is on and low is off.

So, here is the circuit:

High Side MOSFET Switch

Basic MOSFET Switches Circuit Breakdown

Above, is a High Side switched circuit capable of being controlled by a microprocessor. Below, I am going to explain the circuit in greater detail and explain all the major design considerations. Note, not all circuits need all the components. So, this is a very complete; and therefore, more complex circuit.

Drive voltage polarity

So, the 2.5-10v section represents the control input into the switch. As stated, it can handle 2.5- 10 volts of input to fully turn on the Q2 power mosfet. Note, this voltage goes through R1. Functionally, R1 is a current limiting resistor and serves two main purposes. It is designed to protect the microprocessor and also the optional zener diode D1.

How does it protect the microprocessor?

Well, it prevents the inrush of current when turning on Q1 that is why if the zener D1 is not in the circuit it is recommended to set to between 100 and 200 ohms. Also, R1 dampens the built in capacitance from the Gate of Q1. With this, it limits the current spike that the microprocessor output and impacts its performance. For that matter, it impacts the overall performance of the switch circuit. Oh, forgot to mention. The polarity, anything 2.5v or over will turn the switch on.

Zener Input Voltage Limiter (D1)

So, it is there to prevent the voltage exceeding Q1 Gate to source voltage of 20 volts. Above, it indicates D1 is 6.8 volts so it will limit the input to ~6.8 volts which is well above Vgs on voltage of 2.5 volts to fully turn on Q1. So, using a 1/4 watt zener and resistor indicates this design can clamp up to 250 mW.

Since power = volts * amps we can see how much volts this circuit can clamp before we have a failure. Since clamping starts ~6.8 volts the maximum voltage can be calculated. Max Volts – 6.8 * amps = 250 mW. R2 is negligible in this equation as it will not drop much after the 6.8 volts because the rest is passed through the zener to ground.

So, how to figure this out starts with R1 since it is actually dropping the volts after 6.8 volts. V = I * R so for a 1K resistor what is the max voltage drop. From the above info it is 10 volts – 6.8 volts or 3.2 volts. Since I = V/R -> 3.2/1K = 3.2 mA. Furthermore, P = Rx!^2 -> 1K*3.2mA or 10 mW of power so you can see the circuit above can actually handle much more than 10 volts.

Max Allowable Voltage

First, let’s figure out how much the 1K resistor can drop and still be in 1/4 watt or 250 mW on 1k ohm resistor (.250*1000)^1/2 = 15.8 + 6.8 = 22.6 volts so that would cause max allowed rating in the resistor. So, what about the zener diode?

Well, that has to dissipate the current so the max volts across the resistor is 15.8 volts and producing 15.8/1000 = 1.58 mA of current. Also the diode is dropping 6.8 volts so its power is 6.8 * .0158 = 107 mWatts. So in this circuit with a 1K resistor it is going to be the weak link as it is dropping the most power.

For fun, what is the maximum current the zener will be able to handle? I = P/V == .250/6.8 = 36.8 mA. Ok, now we have the max current across both the resistor and diode. So, what watt rating of a resistor is required to get the diode to 250 mW. Well, apply the P = I^2*R formula. Finally, P = .0368^2 * 1000 == 1.35 watts. Ultimately, it is clear to see the resistor will get the abuse in this circuit and will probably fail well before the diode does in a over voltage situation. Anyway, all is well for the expected voltages and I am fine with the resistor being the weak link.

Other things could be done to protect the inputs but it is not needed for a simple design. For example, a polyfuse rated to 1.5 mA and a crowbar circuit to latch the input down are options. Or, use opto isolators, but for a car this circuit should work just fine.

Ohm’s Law

Critical to design, below is commonly called the Ohm’s Law wheel. As shown, it includes all the core critical formulas used in circuit design. I found it here but also included in my page as an image.

The complete Ohm’s Law wheel!

Power MOSFET Switches Current Considerations

Remember, most of the important stuff happens with Q2 this device does the work of delivering the power to the load. So, it is critical to keep track of what the load is going to be and to provide a failsafe ahead of Q2 in the event there is a short circuit. With that fuse chosen then decide the total amperage that Q2 must handle. Remember, fuses do not blow instantly! I would oversize Q2 by at least 20 percent to allow for add cushion for overload protection. After all, it is never fun to let the smoke out of such a device. Finally, when picking a device remember to pick one with the lowest On resistance as possible. That way, it is dissipating the least heat just from its internal resistance profile. For this circuit it is also critical to keep mindful of the Vgs and confirm two things.

Key Considerations

  1. Vgs max is not exceeded as this can fry a device just as well as overcurrent. So, it may be needed to put a diode (D2) voltage clamp in place to prevent over-voltage of Vgs. So, again if a voltage clamp is needed remember to size the resistor so that it can properly dissipate the current across D2 according to the max voltage and current capabilities of D2
  2. Vgs is reasonable for this circuit as it is critical to place the device in saturation or else it too will dissipate too much heat and fry from too much resistance and having to dissipate the power as heat.

Flyback Diode

Finally, the flyback diode protects the circuit from inductive loads such as motors. So, if the load is non-inductive then D3 is not required. However, if not sure what it will be used for then add it. Below, is an example waveform generated by an inductor in a circuit. On the left, it represents no flyback and it is possible to see a very large spike of inductive current. On the right, is the same circuit but with a flyback added to snub the reverse current induced by the inductor magnetic field collapse .

Without Flyback as inductor field collapses
With Flyback the inverse current is absorbed by D3 diode

Low Side Basic MOSFET Switches

Now, it is time to cover the design of low side MOSFET Switches. What is that? Well, it is a switch circuit that is controlling the ground side of the circuit. Why would that be a way to go? Simply put, the circuit is simpler; especially, with MOSFETS! Simply put, a microcontroller can directly drive a N-Channel MOSFET with a low enough Vgs. Simply, make a pin high and it will be able to drive most mosfets without much trouble. Note, I should have covered the low side first as the circuit is even simpler. Anyway, here is the circuit.

Low Side MOSFET Switch circuit

Circuit Design Considerations

Wow, much simpler. See, this is why it is most often used especially in cars. KISS, (Keep It Simple Stupid) applies here. Remember, in critical designs favor simplicity to help prevent failures! So, this is why many injector and ignition systems run low side drivers. That is, with proper design they are faster and run cooler. Also N-Channel MOSFETs tend to have lower Rds resistances. So, in most critical areas they just work better! Not sure what else to say about this circuit. Only, that the switch act as the ground so when working correctly the input with be very close to ground. So, when looking at a circuit running low side with a voltmeter it will be high when off and low when on. With regards to the input pin anyway. Finally, same rules apply to this circuit as above.

Basic MOSFET Switches Schematic

Below, are all the schematics for Basic MOSFET Switches.


Image Version of Schematic for Basic MOSFET Switches
0 %
0 %
0 %
0 %
0 %
0 %

Average Rating

5 Star
4 Star
3 Star
2 Star
1 Star

Leave a Reply

Your email address will not be published.

Horrible Microwave Level Burns From Canberra Previous post New Nuremberg Anyone
Next post Voltage Regulators