Resistors in Buck Converter Circuit

Discussion in 'The Projects Forum' started by johndeaton, Feb 18, 2016.

  1. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    Hi All,

    I am making a simple buck converter. My question is around the resistors. Do I need one between the microcontroller and the MOSFET? What about one at the gate of the MOSFET? If yes to the second, should it go from the gate to ground or the gate to the source? Please explain why.

    Thanks,
    John
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,243
    620
    It depends on the output of the microcontroller. If the output sinks and sources current and will always be HIGH or LOW, you don't need a resistor. If the output is open drain, you need a pull up resistor.

    If the MOSFET was being driven by an opamp, you might need a resistor in series with the gate to damp oscillations.

    It's more typical to use a P channel MOSFET in your circuit; otherwise the microcontroller needs a wider voltage swing and power dissipation in the pass transistor could be higher than necessary. With a PMOS device, it just needs to switch to ground. If a HIGH output isn't sufficient to turn the switch off, you can use a pull up resistor.
     
    johndeaton likes this.
  3. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    This can get complicated, but lets not.
    The resistor from gate to source is nice to have in case the micro may not be attached the FET might be turned on by noise when you don't want it to be. This resistor makes it harder to turn it on and will turn it back off if it does get turned on. It should probably be smaller then wht you show - maybe 10K or so.
    The one in series with the gate is more complicated. It helps control the turn on / off time of the FET. This is sometimes an issue with fast high current drivers. You don't really have that problem since you are driving it with a micro. It also helps to damp oscillations from the inductance in the gate source loop. You should try to keep those wires short.
    As dl324 points out the FET should be a PFET and you will need to level shift from your micro voltage of 0 to 5 volts up to 0 to 25 volts.
     
    johndeaton likes this.
  4. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    Thank you both for your feedback. Very helpful. What do you think about the attached circuit? The LT Spice simulation did not turn out well, but I always take the simulations with a grain of thought. Not that it isn't a good tool. I've noticed I get a lot of operator error when I use it :)
     
  5. dl324

    Distinguished Member

    Mar 30, 2015
    3,243
    620
    Don't see anything to comment on other than I'd prefer to see the components "single spaced" (remove some of the white space), and have the image in-line with your post to make it easier to view in the context of the text.
    I don't like to see people using simulators unless they have a good grasp of fundamentals. Otherwise, design becomes more of an exercise in trial and error as opposed to understanding the theory behind the circuit and actually doing circuit design.

    What do you think is wrong with the simulation?
     
  6. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    Dennis,

    I agree with you on that. I want to have a good grasp on why or why won't my design work. I don't like guessing and checking either. Although, getting it wrong is usually the best way to learn. :)

    I know that the simulation is wrong because I should get 12.5 Vdc out with approximately 1% ripple... unless there is something I'm missing. I'll keep digging in to it.

    Thanks
     
  7. dl324

    Distinguished Member

    Mar 30, 2015
    3,243
    620
    Where is your feedback loop?

    This is what I meant about a single spaced, in-line schematic:
    upload_2016-2-18_9-33-40.png
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    It's not the simulation, it's the design that's wrong. :rolleyes:
    Look at the gate voltage and you will see the problem.
    You didn't consider the large gate capacitance of the MOSFET.

    Also you should use a fast Schottky diode for D1 for best efficiency.
     
    johndeaton likes this.
  9. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    The gate of the FET has capacitance. The 3904 can turn it on, but the 10k resistor to the source can't turn it off fast enough at the frequency you are running. Probe the gate with spice and you will see it. You can make the resistor smaller, say 470 ohms and you will like it better.
     
  10. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    I didn't know I would need one. I'll dig back in my textbook on this.

    I understand what you both mean now by the gate capacitance. However, even if I reduce the resistor down to 470 ohm, the FET will still not turn off. If I reduce this resistor too far, it never turns on. Can you suggest a source to research that may discuss how I should calculate this value?
     
  11. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    You guys can disregard this. I forgot that I changed the frequency earlier. When I change it back to 40k, it turns off like it should. Now I'm going to try to figure out why the output isn't like I expect. Thanks
     
  12. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    You raised the frequency. Go back to a 50 usec. period. If you want it to run that fast you will need to "drive" it in both the on and off direction.
     
    johndeaton likes this.
  13. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    Calculating the proper resistor is not simple since the charge is a non-linear function of gate-source voltage. It's easiest to determine it experimentally.

    Typically a MOSFET gate driver circuit or some type of push-pull circuit is used for this purpose because a resistor pull-up is not adequate at high frequencies, as you have determined.

    You might try a MOSFET with a smaller gate capacitance (Qgate).

    Part of the problem is that you are using such a high switching frequency (200kHz).
    Try reducing it to about a tenth of the value (20kHz or so).

    Post your .asc file.
     
  14. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    Thanks for the information. The .asc file is attached.
     
  15. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    What is it you don't like about it?
     
  16. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    The output should be nearly constant 12.5V. It is going up to 28V (which doesn't make sense because my input is only 25V) then levels off at 15.8V.

    upload_2016-2-18_14-31-26.png
     
  17. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    I thought that was probably it. Now we are getting down to the fun part. :D
    If you think about the inductor it stores energy during the on cycle and gives it up on the off cycle. But then you have to think about the start up. The capacitor needs to be charged from 0 to some voltage. This takes current above just the load current. So what happens? It overshoots. You can play with the size of the cap to see this effect. You can also look at the current with spice. This problem is usually solved like dl324 said with a feedback loop.
    As it goes for the voltage you need to look carefully at the gate voltage. It may not be a 50% duty cycle anymore.
    Sneaky those electrons. :eek:
     
    johndeaton likes this.
  18. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    It makes perfect sense. It overshoots because of the LC resonance between the inductor and the output capacitor. If you apply a step voltage to an ideal inductor and capacitor, the overshoot will be 100% (simulate it and see).
    That's why you need a compensated feedback loop to control the PWM duty-cycle as in a normal buck converter.

    The reason the output steady-state value is not 12V is because the duty-cycle is not 50% due to the various transistor delays.
    Look at the duty-cycle at the MOSFET source.

    And you might want to increase the inductance of L1.
    If you look at the inductor current (place cursor over inductor and left click), you will see that it is dropping to zero.
     
    johndeaton likes this.
  19. johndeaton

    Thread Starter Member

    Sep 23, 2015
    48
    3
    That makes sense. I see why the packaged IC controllers are popular now :) Not as easy as it seemed at first. I'll add a voltage divider to measure the voltage and change the duty cycle accordingly.

    What can I do to improve the overshoot? I know I can reduce the capacitor size so it charges quicker, but then I'll have higher ripple voltage. I could also add a zener diode to the output to clamp the voltage. Any reason not to do that or other suggestions?

    Thanks
     
  20. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    You'll also have to add frequency compensation to the feedback loop to cancel the phase shift of the LC resonant circuit otherwise it will oscillate.
    The zener would work.
    The best way is to control it with the feedback loop.
     
    johndeaton likes this.
Loading...