PWM High-side MOSFET switch question.

Thread Starter

Dream-

Joined Nov 26, 2010
69
Hi,

I am building a high side switch for a portable experimental setup.

I have a 0-5V PWM source from a microcontroller fed into an NPN and that into a P-Channel MOSFET with a 12V supply. My load is "high current", maybe a couple amps, and purely resistive (some capacitance may exist).

I modeled my RC low pass filter using a 10 Ohm resistor and a 1000uF capacitor, as can be seen below (from http://sim.okawa-denshi.jp/en/PWMtool.php). At 50% duty cycle the voltage settles at 6V, as expected.

RCFilter1.jpg

But when I build the circuit or model it with LTSpice I dont get that result. The voltage does not settle at 6V but rather at around 9-10V. (Blue is PWM, Red is voltage at the Drain, and green is voltage after the filter)

LTSpice-sim2.jpg

I have tried changing the load resistance, the values of the RC filter to no avail. Here is a sim using 1k, 10uF for the filter and 1K for the load, this time the output is less than 6V.

LTSpice-sim3.jpg

What am I doing wrong? :)
 

crutschow

Joined Mar 14, 2008
38,423
You are not getting 6V because the PWM voltage to the filter is not going between V2 and ground, it is going between V2 and floating. You would need to add a push-pull pull-down transistor to the circuit.

But you said the load is "a couple amps" so why are you using such a high resistance in your simulation?

If you want to get the average current into such a high current resistive load then you need to use an inductor in series with the load as a low-pass filter, not a resistor and capacitor.
With that you won't need a pull-down transistor.
 

Thread Starter

Dream-

Joined Nov 26, 2010
69
Thank you for your replies.

Ok, so the drain of the MOSFET is floating, so how is this usually solved in high side switching supplies?

The high resistance was part of the multiple tests I ran. I reality my load will have a very small, but variable, resistance.

So I substituted the RC filter for an LR filter. Here is the simulation of the filter:

LRFilter1.jpg

I then did an LTSpice sim, (I assume that the MOSFET is simulated with the inductive protection diode) and got the following result:

LTSpice-sim4.jpg

The inductor resistance is set to 1mOhm so the voltage division should not be a problem.

This is definitely not the result I was expecting. :)
 
Last edited:

Thread Starter

Dream-

Joined Nov 26, 2010
69
Great! It works well.

After all this trouble I am left wondering if it was easier to go with a low side switch. :)

Thank you very much for all the help and learning provided.
 

Thread Starter

Dream-

Joined Nov 26, 2010
69
Not if you want to deliver an amp or two from the power supply to a grounded load.
I don't need the load to be grounded, it just makes things easier for the voltage measurement in my feeback loop. But I could do a differential voltage measurement as well.
 

Thread Starter

Dream-

Joined Nov 26, 2010
69
I have a new question :)

Is the only way to smooth the ripple though the use of an inductor? I tried adding a capacitor connected to ground after the inductor but while the output is indeed smooth, then the voltage does not converge to what I would expect from the PWM. It seems now very dependent on the load resistor.
 

crutschow

Joined Mar 14, 2008
38,423
.............
Is the only way to smooth the ripple though the use of an inductor? I tried adding a capacitor connected to ground after the inductor but while the output is indeed smooth, then the voltage does not converge to what I would expect from the PWM. It seems now very dependent on the load resistor.
The capacitor shouldn't make a significant difference.
So is it not dependent on the load resistor without the capacitor?
Is this observed in the real circuit or simulation?
 

Thread Starter

Dream-

Joined Nov 26, 2010
69
Well, without the capacitor, the load affects mostly the ripple and the response time, but the effect on the output voltage is not too large.

I added the capacitor in an attempt to control the ripple, but then the load largely affects the output voltage. The output voltage is affected to such a degree that it becomes impossible to regulate with the PWM signal.

What I am trying to achieve here is to have decent control over the voltage, as I have a control loop which will adjust the PWM until the desired voltage is reached. And also have a decent ripple, say 5-10%.

So far I have not been able to achieve both for a varying resistive load. :(

This is both in simulation and in the real circuit.
 

Thread Starter

Dream-

Joined Nov 26, 2010
69
I think all I can do is increase the PWM frequency (currently 1KHz), and/or use a higher inductance (my real circuit is using a 220uH inductor and a 1000uF capacitor).

With a 330uH inductor, 10uF capacitor and a 62500Hz PWM, it simulates "decently" in a range of 1 to 100 Ohm load.

I am left wondering how this is done in the industry.
 
Top