Let's Scope a Buck Converter
HTML-код
- Опубликовано: 6 фев 2025
- Putting an oscilloscope on the simple buck converter circuit. Measuring voltage and current in the circuit. Trying different switching frequencies and different inductors.
playground.ard...
Perfect! Lots of questions answered and more raised I guess. I suggest this is what makes us all interested to the point of obsession. More like this please?
Interesting to see the big inductor doing all the smoothing without any capacitors. It's sort of like running a big flywheel that keeps it's momentum between pushes. Just ordered one of the 36mm diameter toroids to play around with myself.
A lot of people argued this was not a DC to DC converter without an output capacitor. Thank you for clarifying things.
Satyajit Roy3 said weeks ago "Robonza do you ever realize what DC actually is ?" haha yes I do,
haha, you told satyajit roy3 whos boss!
Make a basic Roman Black 2 transistor smps and show the feedback loops in regulation, that'll bring a smile to your face Julian, and anyone else wanting to make an efficient and educationally rewarding little buck converter.
Thanks for the damage to my ear drums, Julian :') The squeling was a profound experience
Messrs Heath and Robinson would be proud of your setup...
Nice explanation! If you vary the load, how would it affect the smoothing?
If you added a parallel capacitor to the inductor, instead of in series, how will it affect the output waveform?
Interestingly, flicker of an incandescent bulb is lower than you would get from an LED principally because the warm filament may stay somewhat illuminated throughout the cycle.
Yes, it's the thermal inertia of the filament. White LED's also don't mind small ripple, because the phosphor used to convert the blue light into white has some afterglow. Plus the camera or your eye can't see variations that fast, 4kHz is too fast for the ordinary camera to see.
Ah, the lovely noise of 3.92 kHz :D
I hate it :)
Hopefully to see more video regarding Buck Boost converter
I can suggest you to scope a ton of buck converters you have to see what khz do they run on with power LED 1-3W etc. connected, this is very important for using it as LED driver and avoiding flicker to camera CCD. If the khz range is high enough when gone dim it should not flicker. I think many would appreciate this as not everyone has a scope and believing Chinese specification is stupid at best.
One of the inductor's characteristics is resisting the change of current passing through it. So in a buck converter when the PWM is HIGH the initial current passing through the inductor is zero and as time passes it begins to increase. The gradual increase of current gradually increase the voltage across the load (Ohm's Law V=IR). When the PWM is LOW the initial current in the inductor is the max current that flows through it during the PWM's HIGH state.
Cutting off the current from the source, the inductor's current goes down but because it resists the change of current the rate of decrease is slow. That is why comparing the SIGNAL from the FET to the SIGNAL across the load (inductors output), we will see that the FET's shift from low to high and vice versa is almost discontinuous while on the LOAD's side its gradually increasing and decreasing. We might also see that the signal from the load is out of phase from the PWM's signal.
Hope my analysis is right. =)
Nice video. If you connect the pwm output of the arduino to the scope's external trigger then you won't have to worry about losing triggering as you adjust the signal.
Yeah, that would work - cheers Chris
You should connect the node before the coil to the second channel
Julian, your bigger inductor is still nowhere big enough to feed a load like this at this frequency. You can see a better bucking effect by plugging a higher resistance load than an incandescent bulb. Since you have a scope connected you don't really need to monitor the brightness. Something like 100-200 Ohm resistor as a load would give a really smooth output current, a proper DC with very little ripple.
And yet the bigger inductor clearly IS feeding the load with no problems, and in fact the scope shows that at 50% duty cycle only around half of the energy stored in the inductor is being used during the off period, ie: the current only drops by roughly 30%.
Oh it feeds all right, just the ripples are too big. No problem for a lamp because it is inertial, but anything more sensitive may not work with it. A good DC is where the ripples are a tiny percentage of the mean, this is clearly not the case here.
I would measure the inductor time constant from your waveform and see if it corresponds to t = L/R where R is approximately the load Resistance (winding resistance ignored). Then you can (if you wanted to) calculate the expected operation of the circuit, for example the rise and fall times to ensure your PWM frequency is matched to the L/R values. Again assuming minimal stray capacitance.
I'll look forward to the LC circuit next ;-)
It looks like your load is too large to demonstrate the functionality of the circuit properly. The slightly smoothed PWM voltage is a product of the fixed resistance of the load and the inductor impeding the rate of change of current a little, but that effect is entirely based around load resistance, which means you don't have a working buck regulator for that load - a variable load resistance would alter the output voltage, which isn't really what you want to demonstrate.
The idea behind the buck converter is to use the inductor as a charge store which keeps the load energised while the switch is in the off state, but here you can clearly see that the inductor charge is depleting within that period. You could show this by looking at the current through the diode; my guess is that you'd see a spike just after the transition and then a quick return to zero due to the inductor depleting its charge.
Try using a load somewhere around the 100-300mW range, rather than what seems to be a several-watt incandescent lamp.
EDIT: And you definitely need the capacitor on the output stage!
You seem to have a good understanding of buck converters maybe you could post a video, I don't want to wait many more weeks for this to be fully resolved/explained.
I don't have the time to do one unfortunately, but Dave from EEVBlog does a great job at explaining boost converter design in episode #139, which you can use to better understand the principles involved here. Buck and boost are two configurations of the same design principles.
That certainly looks possible with the smaller inductor at the start, but did you watch the whole video? Later on he uses a larger inductor with 32kHz switching. At around a 0.5 duty cycle the scope is then clearly showing that the current through the load is being maintained well above zero during the entire off period. That current must be being generated from the energy stored in the inductor's magnetic field, and the current at the end of the off period is still 2/3rds that at the start so the magnetic field is a long way from being fully depleted. (It's capacitors that store charge by the way, not inductors.) He even makes the point that the buck converter is operating in continous mode with this larger inductor.
+ Paul Grimshaw Agreed, I was thinking the varying DC offset was an indication that the circuit was working, but then went down the wrong path. Thanks for clarifying.
Paul, yes, you're probably right for the larger inductor, although it's certainly depleting quickly before the period completes. w.r.t. "charge", I was using it in the layman sense rather than in the electrical sense; the inductor stores energy as a magnetic field and dissipates it into the load, which is what I was referring to. It really needs the output capacitor to demonstrate that the buck converter is working properly.
Setting the scope triggering to AC-coupled would've helped here; it would've triggered fine near the top and the bottom of the range as well.
That's true - missed a trick there!
What about getting a second pwm output on the arduino at let's say 50%, and feed that to the external trigger - or to channel b and trigger from there. Assuming both outputs are on the same frequency, you should get perfect trigger no matter what the output signal is doing. Once you're close to 0% or 100% triggering on the buck's output might prove tricky.
@renxula But then you can't see the average move up and down
Yes you can. The displayed signal is still DC-coupled, but it can be internally AC-coupled to the triggering logic.
renxula ah, true.
Please don't say that it will take you another three weeks to add the capacitor :D I see you enjoy the slow journey through development of the buck converter ;)
Take a look at this appnote: SLVA477B from TI, it has some simple formulas to calculate the all the necessary values.
Hopefully not - but I am very involved with another project at the moment - another 10 days or so and all will be back to normal :)
That's cool, good luck on your project.
BTW, those comments I wrote before are not to harass you, I just wanna say that without cap it's not really useful. For the fun, try adding feedback to it while it has no cap on the output :) It'll squeal even at 32kHz, the loop will spring into oscillation.
"Fundamentals of Power Electronics", Robert W. Erickson
The bible of SMPS design. It's even referenced in the document you posted. Not too heavy on math either.
emmm.... maybe Julian could do a tutorial on "how to find inductance of inductor with its resonance frequency using oscilloscope?"
i guess this will make an excellent tutorial series for the whole "diy buck and boost converter"
An easy way is to use one of cheap (
it's easy.
1st method: Just pulse it once and watch it ring like a bell. It rings at its resonant frequency. A one-shot or a mono-stable multivibrator with long(ish) delays between each pulse, using a 555 will do the job nicely. A high value resistor is connected in parallel with the inductor for the current to go back and forth, until the oscillation dies out. Once you have the resonant frequency, you can calculate the inductance.
2nd method: Connect a ceramic capacitor in parallel with the inductor, any value cap will do. Use a signal generator and hunt for the new resonance frequency by looking for the highest amplitude. Once the new resonant frequency is known, the capacitor is also known, you can calculate the inductance.
Enjoyed the video. Thanks. So what’s the point of an lm317? Are they essentially just mosfets with a pwm controller built in?
The LM317 is a linear regulator.
Julian Ilett Thanks for the reply. It would be helpful if you could explain the difference between a linear buck converter and this one in a future video. The learning curve in this hobby is quite steep!:) I have noticed that the lm317 buck converters I have really require liquid nitrogen cooling and I would be interested to know why? 😄
@@johnarmstrong3782 The LM317 is not a buck converter, it is a linear voltage regulator. Linear regulators essentially "lose" the dropped voltage (i.e. Vin - Vout) as energy in the form of heat, hence their getting hot.
@Julian Ilett can you add current limit to a buck? Mixing two pwm together one slow the other fast kind of like pulse frequency modulation (pfm) to limit current?
Finally
Although i do note you're teasing this out.
:)
Julilan Id love to know the values of the inductors youre using here, stick them in your component tester?
yo...Love your vids....and you have good english...also I have learned alot from you thanks....So Question. is their a relay or
circuit or a way to ...switch from lets say a 12 volt battery pack when its gets drawn down to 9 volts ....and automatically
switch to another pack..of 12 volts...so you dont have to plug and unplug units.....thanks Charlie...
Just a point to note is you cannot measure current with the oscilloscope probes these only measure voltage. To measure current you would need to put a low value shunt resistor in Series with the load then measure the voltage across it and use Ohms Law to find the Current..You could also use a current probe....Just remember a Scope is a Voltage measuring device...Cheers good Video as always.
ummm I thought he explained that. He was viewing the current through the inductor...... as you say, with a low series resistance, the bulb?
E/R = I
do you always use a buck converter to test your buck converter
What does a Chinese buck module look like on a scope.
sir I want to make high frequency switch of upto 1 Mhz and adjustable duty cycle. please suggest any irf540n mosfet driver for high speed switching of upto 20 V and the current flowing in the circuit is less than 1 A
good scope of information here ........ ever built your own buck converters with SMPS chips like the uc 3843? im still struggling with it, and blew up a 555 timer trying to use that instead :P
let me guess, your resistors Ra & b value you chose is too low.
no It wasn't putting enough current through so I decided bridging the 1k resistor to the npn transistor was a good idea...
better to use mosfet for this project, no worries for the current at the switching and gain. just enough voltage to pass the gate voltage threshold Vgs will do.
i was using BJT first then mosfet save me lots of brain cells.
well it is a rather high voltage booster circuit ... so im trying to use a bit more rugged BJTs, it needs to turn low voltage dc into high voltage, low power (200V or more) for a T.E.N.S./ E.M.S. project
Yep, massively SATURATED. A bit above 3½ trace bars is where the inductor saturates (i.e. stops being an inductor, and becomes a wire).
If you reduce the number of turns a LOT, it may fix it. :)
what about a X3 capacitor across the output terminals you might get a cleaner signal.
could you turn the mosfet on and off w/ a 555? and then bcus you could make rly high frequency
Super Loops You can..sort of, but higher freq demands more powerful Gate charging and discharging and also dont forget the capacity of gate of that tranny. In theory yes, some amplifying and quick acting circuitry to charge/discharge gate might be needed due to facts mentioned above. Don know how much power 555 can deliver and how good and steep the signal would be.
I had the same idea as you. I already made a circuit but i am a bit stuck at a point to make my circuit fully AC or, go from DC to AC to DC. Working with inductors is awesome, but also a problem.
you said that the second inductor is bigger, but does it have more turns? does that even matter?
Excellent question, I'll count them. Small inductor 43 turns - big inductor 35 turns. Interesting :)
Bigger does matter. Inductance is roughly proportional to the area contained within a turn, which I would guesstimate for the larger inductor is around 4-5 times that of the smaller one. Inductance is also proportional to the square of the number of turns, but there look to be about the same number on each, just with thicker wire on the larger inductor.
What's the efficiency of an average BUCK converter?
( Thinking of using a USB & BUCK to power a battery radio )
80-90% depending on load, there are plenty of graphs available on google images.
Not the best choice for the radio, the receiver's performance will be impaired by the switching noise. I recommend to use Low Dropout Regulator instead. Your radio is powered by 2 or 3 cells, right? That means there's not much voltage to drop. Let's say it uses 2 cells and draws 100mA, than the efficiency of 3.3V LDO is gonna be (3.3*0.1)/(5*0.1)=66% Not as good as a buck converter, but the output will be very clean.
If its not AM or SW, its fine.
The square wave has very rich harmonic content, 100kHz squarewave can have harmonics in the FM band very easily. Just try it yourself.
I've actually used a boost converter to power an FM Radio with no ill effects.
Using a pencil as a pointer for electrical circuits has been the death of some. It would be best if you used something insulated.
Yesss!! finally. Thaks!!!
14:05 Inductor don't smooth voltages but always currents… It's basic knowledge.
What I'm missing from your "buck converter" is the doubling/increase of the output voltage.
Originally: fill two buckets, stack one on top of the other and get more voltage, repeat...
You're thinking of a boost converter.
Interesting! Can you say anything about the efficiency of this circuit?
Yes. I'll probably do that in the next video. Wattmeter on the input, Wattmeter on the output.
This begs the obvious question: "Can it convert 1 buck into 5 bucks? Or only 4 quarters?" Sorry, couldn't resist(or). :)
What are you using now that the RUclips Editor is gone?
He mentioned Windows Movie maker... eeuu!
Yeah, Movie Maker, which does horrible things to the audio track.
Yeah, I missed that. Thanks.
I'd recommend NCH Videopad.
+Julian Ilett Does yours allow you to save videos in HD?
Yes, there must be an output capaciter in order for your circuit to be a dc-dc converter; otherwize its a dc-to ac converter. To trigger the scope use the inductor input while monitoring the capacitor filtered output.
Can you put the inductor on your ebay component tester? If i remember it will tell you it's value!
A buck converter steps down voltage by a variable FREQUENCY, you are using PWM which isn't the same. With PWM you have the same frequency but variable duty cycle.
Wrong
Sweet... But you should have scoped it with cap too.
Like the 3rd video and you still have yet to put a output cap on it.
31KHz did the trick, by not letting it get saturated.
Ouch that squeal!
Hi Julian, I believe you are missing one important component in your design, output capacitor. Without it your circuit is just over complicated PWM regulator. But true purpose of buck converter is to provide DC to DC conversion, while your circuit has AC voltage and current on the output (or actually it will be DC with strong AC component, depends on what you will consider as ground). You cannot make PWM circuit to provide output with reasonably small AC component in DC output voltage with just capacitor or inductor, while with combination of both the inductor and capacitor of reasonable values (and a diode) you can make DC to DC conversion with low AC ripple on the output with reasonably high current. That's the advantage of buck converter to simple PWM. And obviously there are advantages coming from that, should you use a LED diode instead of bulb, with PWM it will be blinking, while with true DC-DC buck converter it will not blink, but just dim. I the next video, you could demonstrate what would happen to such circuit if the inductor or capacitor value will be lowered or you can even replace that diode with simple resistor (the converter will still work but efficiency will go away).
RaStrNL And probably the bulb is way too big load so the buck converter cant work like it should...
I told him that before already :) I guess he likes to take that circuit from Wikipedia and slowly convert it into a proper buck converter, one change at a time.
I would also "recommend" to omit the diode entirely and see how the spike will kill the MOSFET, or at least cause the breakdown. Without the diode there, the voltage on the source will swing well below ground, it's gonna be interesting to see how much. May be perfectly enough to zap the FET :D
I think Julian clearly shown (after inductor change) that it is not PWM. That triangle voltage levels at the load are the proof. Capacitor would only smooth that output voltage, nothing more.
No, it's still a buck a converter without an output filter. Seeing as many designs exist without a capacitor in the output filter, I don't think it is necessary for the core concept of the circuit to work.
A buck converter is a DC-DC converter whose main benefit is efficiency not output ripple. The energy storage occurs in the inductor not a capacitor. If anything most designs put a capacitor on the end to deal with the inherent switching noise.
Lastly, this is a DC circuit. During switching the stored current in the inductor flows in the same direction due to the diode. There is no change in current direction so I don't see where you are getting AC.
AGAIN: No capacitor is needed for the core concept of a buck converter ... it's only commonly used as an output filter.
Laith Khalil - spot on! All the capacitor does is smooth the output voltage. This is nothing to do with the basic functionality of a buck converter, which is to produce a lower average voltage at a higher average current compared with the supply.
Trigger you fack. :)
Does anyone else hear "Butt Converter" half the time?
use ac triggering
I was going to say the same thing, only to add ... Keep channel 1 as is and use channel 2 with AC coupling and trigger set in the middle.
After 170 view count there is only one comment posted so far. I presume some peoples are just watching what your are trying to do.
I want this video in Arabic please😢 I need it much
No captioning!!! Not for deaf people!