DIY Buck converter - TUTORIAL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in almost any electronic project you will definitely need more than just one value of voltage a way to achieve that our voltage regulators like for example this triple tree voltage regulator apply a higher voltage than four volts to this IC and it will always have a stable triple tree volts at its output which is a very common voltage in electronics the batting about this it is very low efficiency that will make your project lose a lot of power so if your project uses batteries this wouldn't be a good option the best and probably the most efficient way to reduce or increase voltage are switched DC to DC converters in these videos we'll take a look at the boost converter the buck converter the buck and boost converter and probably will look a bit at the fly back converter so let's get started clap my friends welcome back in previous videos I often talk about linear voltage regulators like for example the AMS one one one seven or the lm317 these ICS are so easy to use just solder them on your PCB add some capacitors to reduce noise and that's it in the past video I've shown you how to make this variable voltage regulator with the lm317 using the potentiometer I can fix any voltage at the output watch that video for more but this kind of voltage regulators have a very low efficiency at higher voltages for example if you want to power up your Arduino project and the 5 volts LED strip just use an AMS 1 1 1 7 voltage regulator with the 5 volts output but imagine that you only have 20 volts batteries and your entire circuit would run around 1 or 2 amperes of current since you have like two meters of LED strip that will produce a lot of heat on the IC which is last power common linear regulators won't withstand 30 watts of power and this would happen to your circuit that's why for high power projects is better to use a switch converter let's start with the buck converter this is a circuit that will lower the voltage to better understand I will use real values instead of only texts like V in and V out this is the basic circuit of a buck converter you'll need a switch a diode one coil and an output capacitor to store the charge the switch could be a BJT or a MOSFET transistor for better efficiency I recommend you to use MOSFETs in my case the IR FZ 44 and transistor okay so let's take a look on how this circuit will reduce voltage in order to study how it works we will divide it in two stages the on stage and the off stage let's start with the on stage and first remove all the components and only leave the switch and the load in order to understand why we need all the other components okay so let's say that the load in our case will be an LED that needs 5 volts but we only have 10 volts power supply the basic idea of the switching model is that if we fast close and open the switch we could obtain those 5 volts in the on state the switch is closed so the voltage applied to the LED is directly 10 volts but we don't want that and when the switch is off the voltage would rub directly to zero the idea is that if there will be a delay between the charging and discharging process we could open the switch when the output reaches 5 volts and close it back again when we are lower than let's say four point nine volts if we fast close and open the switch we could and then the desired voltage in order to add that delay we put a capacitor to the output a capacitor is like a jerrycan it has to be filled and then it could get empty and that will take some time in this way when we open the switch the voltage won't drop directly to zero volts it will slowly discharge to the output load okay so we now have a small delay for the charging process which is what we wanted but the charging time it's still very fast and to charge a capacitor almost instantly requires a huge amount of current in a fraction of a second and that could damage the circuit over time to also add a delay to the charging process we should add a resistor that will limit the current but the normal resistor would be a very inefficient way to do this since it will lose a lot of power to heat another way to limit the current it's using a coil since it won't dissipate energy through heat a coil doesn't like current changes so it will limit the value but at the same time we have a problem it will also force the coil to flow through the switch in this case a MOSFET even when the switch is open in order to maintain that value coils could create huge spikes that could result into permanent damage to your components so for that we should give the current another path to flow through that path is true this diode that we add now when the switch is open current could flow through the diode and when the switch is closed the diode would block the current since the cathode voltage is higher than the anode connected to ground that's how the diode work okay so now we have the delays that we wanted we close the switch and the output will start charging through the inductor when it reaches the desired value we open the switch and the output will slowly discharge through the output load we should set a tres hold voltage when the output will be lower than that threshold voltage we closed the switch back again and so on that's how we obtain a smaller voltage at the output if you go on my webpage you will also find all the mathematics behind on how to find that the output depends on the duty cycle I won't go over that in this video since it could be quite boring okay so I said that when the switch is open the output voltage will discharge to the load but what would happen if the law changes its resistance to a lower value the discharging process will be a lot faster so it's obvious that the charging process should be faster as well so we need to directly relate the duty cycle of the post that will open and close the switch with the amount of current that will flow through the load if we want the same output value for different loads this process is called feedback if the load is smaller we should increase the pwm signal so we could maintain the 5 volts that we said before if you go to my web page you will find some circuits for the buck converter to better understand how this work I will mount this circuit using an Arduino to create the switch signal the switch will be an IR FZ 44 n MOSFET with a small BJT at the gate as a driver I will read the value of this potentiometer and depending on that value I will map the duty cycle of the poles to a lower or higher value as you can see here on my oscilloscope this is the circuit that I will mount for this test I connect everything on the breadboard apply 12 volts to the input and start moving the potentiometer I connect my oscilloscope in order to observe the output and as you can see here I can increase or decrease the output with the same fixed input in this case the green line on the oscilloscope is the PWM switch signal and the yellow one is the output as you can see if I increase the duty cycle the output will increase as well but if I lower the duty cycle the output will get lower okay so I set the output to 5 volts so we achieved the desired value of 5 volts but now we have a different problem now if I change the value of the output load as you can see here the output is not the same anymore so what do we do well we add a feedback to the circuit let's add a voltage divider to the output with a resistor of tony kaye and one of 10 K in my case I know that the maximum output will be 12 volts since that's what we apply at the input as you know analog grid of the Arduino could go up to 5 volts this voltage divider will drop the voltage from a maximum of 12 volts to around 3.75 volts using this formula so if you have a higher input than 12 volts you should change the voltage divider resistance in order to keep the output always under 5 volts ok so we read the output voltage we set the desired voltage with the potentiometer inside of the Arduino code and if the output voltage is higher than the desired value we decrease the duty cycle and increase it if the output is lower that's it we have just added a crude feedback to our circuit now I change the load and the output is the same here as you can see I can still change the output value using the potentiometer but now I change the output load with this potentiometer here and the output is the same the only thing that changes automatically is the PWM duty cycle as you can see now on the oscilloscope the PWM signal is bouncing a lot in order to maintain always the same output if we look closer the output has a small ripple and it will never be a perfect straight line that's due to the fast charging and discharging of the output capacitor between the threshold voltage and the desired value also if we go even closer we can see this high frequency oscillation due to the LC tank created between the coil and the capacitor which will always resonate also this would be an output without the output capacitor just a high and low voltage with the same frequency of the switching pulse okay so this is not the best way to create a buck converter there are already made special ID I see that will do this feedback this is the lm2577 third driver it already has a feedback pin that will sense the current this is the basic circuit for the buck converter using this IC here we have the output voltage potentiometer that will lower or increase the output I mount this circuit on my breadboard for tests and indeed it works as you can see I can change the output value using the potentiometer the lm2577 for me now here are my oscilloscope I have the input voltage with the green line and the output with the yellow line the input is set to 12 volts and the output to 5 now I change the input value but as you can see the output stays the same the circuit works I've cut myself a buck converter in this case we don't need an external switch since the lm2577 side with the feedback pin connected to the output voltage divider the ln 25 76 will change the width of the poles depending of the output in order to keep it constant in this case use a Schottky barrier rectifier diode because it has a low forward voltage this diode will leave the current flow when the switch is open okay I hope that you have learned something today about buck converters check my web page and all the links below for more circuit schematics and information stay tuned for future DC to DC switch converters tutorials like the boost converter and only one buck and boost converter I will also try to explain how the fly back converter works hey if you like what I do and consider helping my project check my patreon page I will really appreciate that also using the bye links that I provide in the description would help my worship as well and the price for you would be the same I hope that you enjoyed this tutorial if so don't forget to click the like button like crazy and share the video with your friends if you have any question about this video or any other just leave it in the comment section below or on my Q&A page also don't forget to subscribe and watch all of my other great tutorials if you consider helping my projects check my patreon page thanks again and see you later guys [Music]
Info
Channel: Electronoobs
Views: 161,745
Rating: 4.9350052 out of 5
Keywords: buck, converter, DC, arduino, LM2576, driver, tutorial, voltage, regulator, DIY, homemade, circuit, schematic, explained, mosfet
Id: SM5qPrOrDrc
Channel Id: undefined
Length: 14min 52sec (892 seconds)
Published: Wed Oct 11 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.