I am designing a buck converter with PWM circuitry for a school project to drive a MOSFET switch to keep my output voltage constant. The specs are:

  • input voltage of 20v DC +/- 4
  • output voltage of 5v DC
  • Maximum output current of 1A
  • No more than 10% change in voltage over entire range of input voltage and load
  • Min. 80% efficiency at full load
  • No micro-controllers can be used

I am having trouble keeping the voltage constant with the PWM circuitry. When simulating the circuit, the voltage goes to around 5.7 to 6v. Can you please help me correct the PWM circuitry and/or the inductor and capacitor values? They may not be correct.

EDIT: The lm555 Timer with the BC557BG transistor creates a ramp voltage by repeatedly charging and discharging capacitor C6. The 741 Op-Amp is set up as a differential amplifier with a gain of 1, which will subtract a sample voltage from the output with a reference voltage of 5v. The output of the 741 Op-Amp goes into an input of the lm311n voltage comparator, and the ramp voltage into the other input, the output should be a square wave with varying duty cycle to drive the MOSFET. Click for full-size. EDIT:

The light blue lines represent 5v from the zener diode, black for ground.

The 555 Timer Sawtooth wave generates at 30kHz Sawtooth

The main Buck converter Buck Converter
The calculations I used to select inductor and capacitor values. Inductor
I solved these values by setting LIR to 0.2 and dV to 75mV.
Feedback circuit Feedback
Summing amp and voltage comparator Feedback

The Voltage to the gate pin of the MOSFET MOSFET GATE

The comparator inputs Comparator inputs

The output voltage before and after the inductor Comparator inputs

The output voltage does not stay around 5v, it slowly increases to 10v

  • \$\begingroup\$ You're going to have to at least put in the effort of explaining why you designed this the way it is, or it'll be hard to motivate us to put in the effort of figuring out the intentions. \$\endgroup\$
    – Asmyldof
    Commented Mar 27, 2016 at 17:59
  • 1
    \$\begingroup\$ Sorry, I am new to this. I have added the necessary changes \$\endgroup\$
    – Krentin018
    Commented Mar 27, 2016 at 18:33
  • 2
    \$\begingroup\$ I do not like the way you MOSFET is driven. Notice that your MOSFET work here in voltage follower configuration (common source amplifier) instead-of working as a switch. This means that the voltage at MOSFET source cannot be larger then 7.5V - Vgs(th) = 5.5V. So your coil do not see full voltage range during Ton (Vin - Vout = 15V). To fix this you need to use a P-Channel MOSFET. \$\endgroup\$
    – G36
    Commented Mar 28, 2016 at 16:00
  • \$\begingroup\$ I changed the MOSFET to p-type and moved the pull-up to the 20v supply. The inductor now sees the full 20v \$\endgroup\$
    – Krentin018
    Commented Mar 28, 2016 at 20:58

1 Answer 1


Without researching your circuit i want to warmly recommend something. Prepare three stages on your feedback, and have their sum on another opamp. One stage is buffer, another one is integrator and the third one is derivator. Each should have a nice convenient potentiometer to set the gain. Then you will be able to tune your system for best performance.


Most importantly, simulate before you go to solder anything!!!


Based on assumption that your components are appropriate for voltage and current, and that you know the basics, I will explain what you should do to close the loop.

I will add a little bit more info. First of all, your PWM controller must have a saw-tooth waveform of constant frequency and "command signal" which is basically voltage, that you compare to this saw-tooth. If the command is smaller than the saw-tooth, your switch is on, otherwise- off. Make sure it works for a constant command, this is an open-loop PWM controller.

Now you have to close the loop. Closing the loop basically means making your error zero. So you have first of all to measure it by subtracting your output voltage from a reference voltage. Reference is generated by a zener diode with resistor. Or you can take an IC that will do it inside more accurately. The output voltage is usually higher than your reference, so use resistor divider, so error is 0 when the divided voltage equals to your reference.

Now when you have your error, feed it to the three opamp circuits I mentioned: one with just gain, another one- integrator, third- derivator. Add all three- the result should be used as the PWM command signal (remember?).

And you will have to tune the system, so use potentiometers around opamps.

  • 1
    \$\begingroup\$ Can you please clarify the order in which these opamp are to be placed, are all the opapms inputs taken from the output or are they going to flow into each other? \$\endgroup\$
    – Krentin018
    Commented Mar 27, 2016 at 19:37
  • 1
    \$\begingroup\$ All three have their input from the error, which is the difference between the output and a reference \$\endgroup\$
    – user76844
    Commented Mar 27, 2016 at 19:39
  • 1
    \$\begingroup\$ Thank you for all your help, the PWM circuitry seems to be outputting a proper square wave now, however the output voltage is not quite right, but that can probably be adjusted with the potentiometers like you said. Just as a point in the right direction, which values will most likely affect the output voltage and how? \$\endgroup\$
    – Krentin018
    Commented Mar 28, 2016 at 0:41
  • 1
    \$\begingroup\$ I have added the new schematic \$\endgroup\$
    – Krentin018
    Commented Mar 28, 2016 at 13:55
  • 1
    \$\begingroup\$ Alright, much better. You don't have the ability to tune U3. maybe the 1k resistor? Now, the question is, how you test the circuit. The basic test is to inject a step function. Make your input change from x to y and again to x with certain frequency (low! maybe 10Hz) and see how the output responds. \$\endgroup\$
    – user76844
    Commented Mar 28, 2016 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.