PWM High-side MOSFET switch question.

Discussion in 'Power Electronics' started by Dream-, Aug 31, 2016.

  1. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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? :)
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,229
    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.
     
  3. Bordodynov

    Active Member

    May 20, 2015
    637
    188
    R3 and R4 there is a voltage divider. R3=10 R4=10kOhm Gain_divider=10000/(10000+10)=0.999
     
  4. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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: Aug 31, 2016
  5. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,229
    Forgot to say you also need to add a diode to ground (anode) from the MOSFET drain.

    See below:

    upload_2016-8-31_16-20-14.png
     
    Last edited: Aug 31, 2016
  6. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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.
     
  7. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,229
    Not if you want to deliver an amp or two from the power supply to a grounded load.
     
  8. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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.
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,229
    Then you do whatever makes the simplest circuit. :)
     
  10. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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.
     
  11. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,229
    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?
     
  12. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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.
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,777
    1,103
    What is the capacitor value?
     
  14. Dream-

    Thread Starter Active Member

    Nov 26, 2010
    69
    0
    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.
     
Loading...