Power supplies provide the backbone for all electronic projects. Without them, none of our circuits would work. These power supplies are all built with different methods, ranging from switching to linear regulation. However, both come with their own disadvantages. So, how can we get around or reduce the effect of said disadavantages? Well, in this video I will show you have to make a compact power supply that will take a 24 volt input and allow you to ajust it down all the way to 1 and a quarter volts, using switiching pre- regulation. Let’s get designing.
First, let’s explain the difference between switching and linear regulators, because both have advantages and disadvantages. Linear regulators, like this LM317, are great at creating very clean and stable output voltages, because they change the excess voltage into heat via a transistor. This advantage doubles as a disadvantage because the heat generated means that a lot of power is wasted and large heatsinks are needed. Switching regulators, on the other hand, are a lot more efficient because they switch on and off to achieve the desired voltage, meaning that only the energy needed is used. However, this switching comes at the cost of a noisy output, which for a lot of cases is fine and won’t be a problem. However sensitive applications may have problems with the noise.
Now that we know the difference between linear and switching regulators, we can now explore switiching pre-regulators. This will allow us the have the benefits of both linear and switching regulators. Basically, this pre-regulator works by using the more efficient switching regulation to regulate most of the input voltage. Then, linear regulation will be used at the end to provide a clean and stable output voltage. Overall, we are able to save power and use smaller heatsinks while still maintaining the nice output. Now let’s put together this idea onto a breadboard.
Let’s start with the linear regulator, because it is much simpler. Let’s use this LM317 for the design. Looking at the functional block diagram, we can see the basic makeup of the circuit. Since it is driven by an op-amp, it is very easy to simply drive the adjust pin to whatever voltage we want + 1.25 volts. For example, we can provide 5 volts to the adjust pin, and since the op-amp wants to keep the inverting and non-inverting sides equal, it will make the output 5 + 1.25 volts or 6.25 volts. This means that we can drive it with a simple voltage divider circuit or even from a microcontroller. However, we will keep it analog for this video and just use a voltage divider. It is also worth noting that we require at least 3 volts between the input and output of the regulator in order to ensure stability of the output.
Now let’s focus on the switching regulator. In this case I will use the LM2576-adj regulator. If you have watched my previous video on buck converters, you should have a good understanding of this topic. I will give a quick review for those who are still unfamiliar with buck converters. This is the basic schematic of a buck converter and it basically works by charging the coil up while the switch is closed. When the switch is open, the coil will discharge through the load. The diode is in place so that the coil can discharge through itself, but prevents the voltage source from shorting to ground. This ic simplifies the whole process by taking care of the switching and feedback system for us. And we see that it works after following the example schematic.
Now, we can connect both regulators together to form a pre-regulated output. However, this has one problem, if we adjust the linear regulator, we also have to adjust the switching regulator, so it would be much better if the switching regulator adjusted to always stay at least 3 volts above the desired output voltage. We can use a method of pre-regulation called tracking to solve this problem. Basically, we need to make sure that the 1.23 volts at the feedback pin on the switching regulator is derived from an output voltage that is 3 volts higher than the linear regulator’s output. The most common way to do that, it seems, is with a PNP transistor in a emitter-follower configuration. How it works is that the output from the linear regulator will drive the base and produce a voltage about 0.6 volts higher on the emitter. This will create a voltage difference between the emitter and the output, creating a current through the resistor. This current is carried all the way through to the second resistor, which senses the current and creates a voltage. The regulator will then adjust the output voltage until the second resistor generates 1.23 volts on the feedback. We can select the value of the first resistor to manipulate how much current will flow, and therefore, manipulate the voltage on the feedback. I choose a 22k resistor because it gives me a voltage 3.5 volts higher on the output, choose a larger or smaller resistor depending on how much of a difference you want. And after a quick test, we can see that the regulator will always generate a voltage that is about 3.5 volts higher than the output of the linear regulator.
We need to add one more protection feature: over-current protection. Basically, we need set a hard limit to how much current that is allowed to run through our supply, so that an external mistake doesn’t destroy it. To figure out the current that is running through the supply, we can use a small resistor to sense the current. Basically, this resistor will have a small voltage drop proportional to the current running through it, thanks to ohm’s law. The resistor I choose is this 5 watt 100 milliohm resistor. So running some calculations, we can see that with a current of 1 amp, we have a voltage drop of 0.1 volts. While we do have a valid voltage drop across the resistor, it is too low for it to be practically measured, so we can use a differential op-amp to amplify the voltage drop. In this case I will use the common LM358 dual op-amp. I used the classic differential op-amp circuit with a gain of 50, set by the 1k and 50k resistors to amplify the voltage drop of 0.1 volts to 5 volts. Then, I used the LM393 comparator IC to detect an over current based on the output from the op-amp. The comparator’s non-inverting input will have a 5volt reference voltage given by a zener diode. Therefore, when the comparator detects a voltage higher than set from the sensing resistor, the comparator will output to ground. That output is then passed to this SR latch, whose output is connected to the on/off pin on the switching regulator. I also added a capacitor to the latch just to make sure that it will always default to setting the supply to off after initial power up. After setting this idea up on a breadboard, we can see that it works. Remember, if you are confused the entire schematic can be found in the description.
Now its time to remove the uncertainty of a breadboard and assemble the circuit onto a circuit board. This time I will be putting it onto a pcb because of its complexity. And so after putting together the schematic as a pcb and waiting for it be delivered, I soldered all of the components onto the board. After running a quick test to make sure that everything is working as expected, I found that my design did not properly work. So I made a new one, and soldered it together too. This design worked thankfully.
I chose this aluminum case to put the board into. To fit all of the parts externally, I simply drilled holes to fit them through, with a little bit of filing when necessary. I then tested the supply one more time to make sure that everything was working before closing it up.
Let’s quickly test the supply’s capabilities to see if pre-regulation is a viable option when you want a clean, yet efficient output signal. First, we can go all the way up to 21 volts and down to 1.25 volts. The output will shutoff if the current goes above about 1 amp. And finally, the oscilloscope shows that the output is very clean despite having a switching regulator inside.
So, while this pre-regulation method is much more complex than just using either a linear or switching setup, it really makes up for it in both its efficiency and low output noise. If you are looking to build a power supply of your own, I would recommend this design if you are able to understand how everything works. Otherwise, I would recommend sticking to making a purely linear design. Stay tuned to see a future linear power supply video.
If you enjoyed this video and found it helpful please consider subscribing so that you can see my other videos. Have a good one.