High side switching with a Logic Level n-channel Mosfet

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
My original problem was discussed in https://forum.allaboutcircuits.com/threads/calculating-base-resistor-for-darlington.152509/

I’ve since gone to using Logic Level n-channel Mosfets. I’m using 2N7000 to switch the low side and that is working.

It is the high side switching that I am having trouble with. I purchased some 5 amp Logic Level n-channel Mosfets, to switch 12V at 1.05A. Gate goes to the (Arduino) digital pin. This pin switches between 0V and 5.05V. Source goes to load. Drain goes to +12V.

When the digital pin changes states, source alternates between 0V and 3.43V. NOT 12V.

I added is a 100k resister between the gate and ground, but there is no change in the results.

Why only 3.43V? Am I doing something wrong?
 

OBW0549

Joined Mar 2, 2015
3,013
The source voltage you're reading is about what I'd expect, since your MOSFET is being operated in a "source-follower" configuration (similar to an emitter follower with BJTs).

Driving the MOSFET's gate to +5V is not going to make the source go up to +12 volts; for that to happen, the gate must be driven above +12 volts, by an amount in excess of the MOSFET's Vgs(th) sufficient to support conduction of the desired drain current.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
The source voltage you're reading is about what I'd expect, since your MOSFET is being operated in a "source-follower" configuration (similar to an emitter follower with BJTs).

Driving the MOSFET's gate to +5V is not going to make the source go up to +12 volts; for that to happen, the gate must be driven above +12 volts, by an amount in excess of the MOSFET's Vgs(th) sufficient to support conduction of the desired drain current.

I though that Logic Level Mosfets were constructed to compensate for that constraint? I’ve seen several schematics that appear to accomplish what I am attempting.
 

crutschow

Joined Mar 14, 2008
23,502
Logic-level has nothing to do with the circuit configuration, it only affects how much gate-source voltage is needed to turn on the MOSFET.
So a source-follower configuration as you have. will always have an output that is at least a Vgs threshold voltage below the gate voltage.

If you can put the load between 12V and the MOSFET drain with the source grounded, then you can switch the load with your 5V signal to the gate.
 

OBW0549

Joined Mar 2, 2015
3,013
I though that Logic Level Mosfets were constructed to compensate for that constraint? I’ve seen several schematics that appear to accomplish what I am attempting.
"Logic level" only means that the MOSFET has been designed with a low Vgs threshold, making it possible to drive with 5V (and in some cases 3.3V) logic. That's all it means.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
If you can put the load between 12V and the MOSFET drain with the source grounded, then you can switch the load with your 5V signal to the gate.
I’m not sure what you mean? In my circuit, Source is connected to +12V and drain is connected to the load. The other side of the load is grounded. The gate is connected to a +5V digital pin on the Arduino.

I’m switching the high side purposely. The load is a 7 segment display constructed with LED strips. Each segment draws 150mA. A whole digit draws 1.05A. There are four digits. I am multiplexing then by switching the high side of the LED strips. The low side is switch by 2N7000.

But I am testing with one segment which is grounded. And I am having trouble switching the high side (low side switching is functional)
 

OBW0549

Joined Mar 2, 2015
3,013
In my circuit, Source is connected to +12V and drain is connected to the load. The other side of the load is grounded. The gate is connected to a +5V digital pin on the Arduino.
There's an important, universal principle at work here, which applies absolutely to ALL electronic components with no exceptions: they only care about the voltages on their own terminals and the currents into or out of their own terminals. Voltages and currents elsewhere in the circuit are completely irrelevant.

What this means in your circuit is this: if the source of the MOSFET (I'm assuming this is a P-channel) is at +12V and its gate, driven by the Arduino, is at +5V, the net Vgs is 5V - 12V = -7V. This is more than enough to turn the MOSFET on. When the Arduino's output is at 0V, Vgs is -12V; again, more than enough to turn the MOSFET on. So the bottom line is that the MOSFET will always be on, regardless of the state of the Arduino output.
 

noweare

Joined Jun 30, 2017
107
You will have to use a p channel mosfet or use your n-channel mosfet with a bootstrap capacitor. So you expect 12 volts on the source, but that violates the fact the the gate to source voltage needs to be some positive voltage above the Vgs threshold voltage. But the gate to source voltage would be 5-12 = -7 a negative voltage, which will not work.
 
Last edited:

ebp

Joined Feb 8, 2018
2,332
An "enhancement mode" MOSFET, which is what almost all power MOSFETs are, requires a certain voltage between its gate and and source to turn it on. With a logic level FET, the turn on will begin at a lower voltage, the "threshold" voltage, than with a "regular" FET. You must raise the gate-source voltage higher than the threshold according to the amount of current that is to be conducted. This current to voltage (I/V) gain is called "transconductance" and the unit is siemens (abbreviated S). In days gone by, the unit was "mho", which is ohm spelled backwards - because transconductance is the reciprocal of ohms. Typically when used for switching purposes the gate to source voltage will be driven to a few volts above the threshold voltage.

When a N-channel FET is used as a high-side switch in common drain or "source follower" configuration, as it begins to turn on the voltage at the source (high side of the load) begins to rise. In order to keep the gate-to-source voltage (Vgs) the same, the gate voltage relative to ground must rise by the same amount - and in fact by a little more to allow the drain-source (= load) current to continue to rise. What happens if the gate voltage doesn't rise relative to ground is that an equilibrium is reached where the source voltage has risen above ground, reducing the gate to source voltage to the level that sustains the current though the load required to raise the high end of the load to that equilibrium condition.

If you had an N-channel FET with a gate threshold voltage of 2 V and a transconductance of 5 S, and you required 1 ampere through a load you would have to have a gate to source voltage of 2 V (the threshold) plus (5 S / 1 A) = 0.2 V, so the gate would have to be 2.2 V positive with respect to the source. That voltage is required regardless of whether the FET is used in a common drain circuit or a common source circuit.

In a common source circuit, where the source is connected to "ground" you would need to apply at least 2.2 V to the gate relative to ground.

Suppose the load is 5 ohms. With 1 A through 5 ohms, the voltage across the load would be 5 volts. In the common drain circuit. If the load is in between the source of the FET and ground (a common drain or "source follower) circuit, the source of the FET MUST be at 5 volts because it is connected directly to the "high" end of the load. We MUST still maintain at least 2.2 volts gate-to-source for the FET to conduct that 1 ampere. If the source is at 5 V relative to ground, the gate MUST be at at least 7.2 volts relative to ground.

In practice, when a FET is used as a switch the gate to source voltage is always made a good deal higher than is required for the precise amount of current through the load. For a FET with a threshold voltage of 2 V, an actual gate to source voltage of 4 or 5 V might commonly be used for moderate current.
 

noweare

Joined Jun 30, 2017
107
Can you post a schematic, you did say in your first post (#1) that drain is connected to +12 and source to load. Doesnt matter you need a bootstrap cap or a p channel mosfet for high side switching.
 

crutschow

Joined Mar 14, 2008
23,502
The easiest way to do a high-side switch for your application is likely to use a P-MOSFET to drive the load with an N-MOSFET to control its gate from the Arduino signal as shown below:
When the Arduino signal is high it turns on M1.
This pulls M2's gate to ground, applying -12V across the Vgs terminals of M2.
This fully turns on M2, applying 12V to the LED load.

upload_2018-10-12_19-23-32.png
 

ebp

Joined Feb 8, 2018
2,332
You cannot use a capacitive bootstrap for the circuit, if I understand the description correctly. Bootstrapping is defeated by the fact the source of the high side FET is never pulled to ground, so there is no mechanism to charge a bootstrap capacitor. The LED strips probably have a forward voltage too high to allow a bootstrap cap to charge to more than about 2 to 2.5 V with a 12 V supply, and most bootstapped high side drivers will treat that as undervoltage.

If I were designing the circuit I wouldn't consider anything other than P-channel FET in common source for the high side driver. There are plenty of FETs available that would do the job nicely at low cost and since the load is not reactive and doesn't require high speed switching, the level shifter is extremely simple.

I see crutschow was drawing useful pictures while I was yapping.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
@crutschow That did it! Now, between you and @OBW0549 and @ebp, I finally understand what I was doing wrong. As I told @MaxHeadRoom , Ive not used mosfet’s before. This was the perfect application for me to learn. Although I was panicking because I faced a hard deadline for this project.

I just gave to re-breadboard the low side switching to test and then it’s off to make the PCBs.

Thanks y’all for the lessons!
 

ian field

Joined Oct 27, 2012
6,540
I though that Logic Level Mosfets were constructed to compensate for that constraint? I’ve seen several schematics that appear to accomplish what I am attempting.
The on state DS voltage should be as low as you can rate the parts for - there won't be any headroom to drive a nearly ideal gate.

Many integrated high side MOSFET drivers incorporate a flywheel bootstrap circuit to charge a small capacitor above the top Vdd rail.
 

Plamen

Joined Mar 29, 2015
98
My original problem was discussed in https://forum.allaboutcircuits.com/threads/calculating-base-resistor-for-darlington.152509/

I’ve since gone to using Logic Level n-channel Mosfets. I’m using 2N7000 to switch the low side and that is working.

It is the high side switching that I am having trouble with. I purchased some 5 amp Logic Level n-channel Mosfets, to switch 12V at 1.05A. Gate goes to the (Arduino) digital pin. This pin switches between 0V and 5.05V. Source goes to load. Drain goes to +12V.

When the digital pin changes states, source alternates between 0V and 3.43V. NOT 12V.

I added is a 100k resister between the gate and ground, but there is no change in the results.

Why only 3.43V? Am I doing something wrong?
Petkan:
If your load is from + rail - use an N channel MOSFET (source to GND). If your load is towards GND - use P channel MOSFET (source to +5V).
If the frequency of operating the switch is low - consider integrated High side (or low side) drivers for instance from Infineon or International Rectifier
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
One further note. I ended up using a p-channel mosfet to switch the high side, notwithstanding the title.

Thanks again.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
Update: Breadboarded the entire circuit and it has been running for several hours with a test scenario program.

One upside of this circuit (which I knew before wiring it up), is that both high and low sides are triggered with a 5V signal from the Arduino. It isn’t a big deal, because I can define the signal states as constants or a macro and only refer to them in the code by their mnemonics. But still, knowing that 1 is on and 0 is off in both cases makes it easier to read the code.

On to make the digit driver PCB boards!
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
5,687
So, this was built and opening night of the play, for which this project was built, was tonight.

It was complicated by a manufacturing problem. ExpressPCB’s software used to have a design check option I upgraded their software and this option disappeared. I was assured by their support team, that the design check occurred when ordering. It wasn’t. (ExpressPCB has addressed this issue to my satisfaction).

So, while I had changed their clearance parts to 150% of the recommended values, the tinning process created many internal shorts. I drilled out all offending pads and soldered jumpers directly between the traces and the affected resistors.

I got it to work, mostly. Certain combinations of digits displayed some numbers as garbage. One segment was ghosted (sometimes the segment was on dimly instead of shutting off).

For the play, I was able to program a set of digits that worked. But I don’t understand why the garbage characters appeared.

The circuit was built per the circuit previously attached. In short, 7 lines from an Arduino Mega drive 7 2N7000 MOSFets for each of 4 digits. The 7 lines are terminated to ground with a 10k resistor. Per each digit, 4 Arduino digital I/O pins drive a 2N7000 drives a power mosfet which switches 12VDC. There is another 10k pull-up resistor before the power mosfet.

I’ll provide any additional info that you request. In turn, all I ask is this...

Why do the garbage digits appear?
 
Top