Mains voltage is great, it gives us an unlimited supply of 120 volt 60 Hz AC voltage, considering that you pay your electric bill. You can directly power devices such as vacuums or light bulbs. However, this voltage is far too high for certain sensitive electronics, for example, anything with a USB port. The same can be said even if you are only using a 9 volt battery. But how can we get a lower voltage? Sure, we could just use a linear regulator, but that comes with its own problems, like making sure that you select a proper heatsink so that it doesn’t destroy itself, not to mention its level of inefficiency which makes it impractical to run off of a battery. There is an alternative to the linear regulator though, and that is the buck converter, otherwise known as a step-down DC to DC converter. It can efficiently regulate a high voltage down to a lower one, and in this video I will tell you how it works and how you could possibly make one of your own.
If you have already watched my video on boost converters, a lot of this will seem similar, just with some key differences that make the regulator output a lower voltage instead. Anyways, let’s review the basic buck converter circuit. We have a switch, a diode, a coil and a capacitor. Let’s start the explaination with all of the components discharged and the switch open. Then, when the switch is closed, the voltage source will start charging the inductor, capacitor, and load simultaneously, but since the coil will want to oppose the change in current, it will generate a voltage drop so that the other side has a lowered voltage, but this voltage drop will decrease over time until the inductor doesn’t have a voltage drop and the circuit runs at the full voltage. So that’s why we have to reopen the switch and allow the inductor and the capacitor to discharge through the load. The diode is in place to allow the inductor to discharge through itself, but not allow the voltage source to short circuit. This repeated process will generate a lowered voltage overall from the perspective of the load.
To get a real world example of a buck converter, I got this LM2576-ADJ ic, which is a 3A step-down regulator. This IC functions as the switch in this type of circuit. Taking a look at figure 7-4 in the datasheet, we can see that it looks a lot like the basic circuit we were just talking about. The only added components are two resistors which form a resistor divider that feed into the feedback pin on the IC. But why do we need the feedback pin at all? Well that’s because switch needs to know if it is switching fast or slow enough to generate the correct voltage. Sometimes the load might change and that will change the duty cycle required to keep the voltage stable. So to learn more about how the feedback system works, let’s take a look at the IC’s block diagram. Starting with the feedback pin, we can see that it directly connects to the voltage output. Internally it is conencted to a resistor divider, however since we have the adjustable version here, R2 is 0 ohms, meaning that we can choose its value externally. Any ways, the voltage from the divider is then compared to a 1.23 volt reference in a differential op-amp. We can call this output difference the ’error’. The error is then put into a comparator with a 52 kHz oscillator. This is where the duty cycle is determined, since when the error is higher, the duty cycle is higher and vice versa. The output of the comparator is then given to the switch as we described earlier. This feedback circuit allows the IC to basically correct itself when the voltage is too high or low.
Now that we understand how a buck converter like this should work, let’s get to designing one of our own. I will be using the 1N5819 schottky diode because of its low voltage drop, A 100 uF capactior, a 100 uH inductor, and a p-channel IRF5305 mosfet. We can follow the basic circuit earlier to form the basics of the circuit. Connecting the mosfet to my function generator I can manually adjust the duty cycle. And here we can see that adjusting the duty cycle does indeed lower or increase the ouput voltage, from an input voltage of 10 volts. However, it would be quite tedious to have to manually adjust the duty cycle every time the load changes, so we will need to design a feedback circuit, similar to that of the one found in the LM2576.
To start I will generate a reference voltage of 1.23 volts by using this LM385 reference voltage IC. I will then compare the reference to the feedback through a divider and a differential op amp, which in this case is the LM358, kind of confusing with the similar part names. Anyways, the output of this op amp is now the error voltage. We can then take that error voltage and put it into the non-inverting input of a comparator. The inverting input is connected to a 1.23 volt ramp oscillator, meaning that the higher the error, the higher the duty cycle will be. At first I used my function generator to test the ramp oscillator, and the circuit worked as expected, but this was not practical, so I needed to make a permament solution. I solved this by using another pair of op-amps to generate the triangle wave, with a voltage divider on its output to ensure that the peak to peak voltage of its output would be suitable for the comparator. All of the op-amps I used were LM358s. And finally the output of the comparator drives the mosfet.
As we can see, the output of the regulator stays stable even when we change the load. We can also adjust the output voltage by twisting the potentiometer on the feedback voltage divider. I just mentioned a lot of connections so if you are confused about how I put this together, checkout the schematic in the description.
While the circuit does work here on the breadboard, it goes without saying that its performance would improve on a prototyping board. So I gathered all of the components and got to work soldering everything to the board. It did take a while but I did get it to work. As we can see, the converter can regulate from 16 volts all the way down to 5 volts from this 16.4 volt input.
So, should you take the time to make your own buck converter? I’d say that it depends. If you want to learn more about how a buck converter works, definetly make this circuit, however if you are already comfortable with the ideas discussed in this video then you probably should just use either a premade board or a buck converter IC such as the LM2576. It provides much better performance at a cheaper price and with a simpler board. Another thing to mention is that you could make this curcuit using a microcontroller. To learn more about that you can check my boost converter video, because boost and buck converters are very similar.
If you enjoyed this video, please consider subscribing so that you can see more of what I make. Have a good one.