Simple comparator/zener controlled buck converter - Page 1
Forum section: electronics / beginners

author: G-son
author_rank: Regular Contributor
timestamp: February 21, 2023, 11:16:50 pm
content: I had an idea about cobbling together a buck regulator using stuff mostly from the junk boxes, just to see if I can make something useful out of it. There's plenty of example schematics for buck regulators out there, but I haven't seen one quite similar to what I have in mind, using a comparator to turn the transistor(s) on when output voltage goes below a reference voltage (from a zener, for example), and off again as soon as voltage goes above reference. About as simple as it gets, I guess.In my mind it should work, I ran a simulation using random component values and it seems to work pretty well, but the example schematics I see online tend to either exclude the control circuitry, just showing some sort of square wave input to the transistor, or use a more advanced PWM controller, probably running a specific frequency. This usually means I'm missing some sort of more or less obvious problem with my more basic idea... So, let's hear it, would my circuit have a snowballs chance in hell? Not looking for any award winning stability or something like that, just a functional experimental circuit with better efficiency than linear regulators.

author: Benta
author_rank: Super Contributor
timestamp: February 21, 2023, 11:21:34 pm
content: As most comparators have open-collector outputs, it might make more sense using an NPN power switch.

author: G-son
author_rank: Regular Contributor
timestamp: February 22, 2023, 12:04:12 am
content: I assume you mean PNP? The schematics already has NPN.Ditching the pull up resistor and going PNP would make sense. I believe both variants would work so what I end up going with may simply come down to the contents of the junk boxes.

author: Benta
author_rank: Super Contributor
timestamp: February 22, 2023, 12:13:01 am
content: Sorry, of course I meant PNP. My bad.You prolly won't even need a darlington pair.

author: BlackICE
author_rank: Regular Contributor
timestamp: February 22, 2023, 12:56:52 am
content: I did something similar varying the duty cycle to switch a mosfet that fed into the inductor and capacitor like you have. I used it to provide a variable current source to drive an led. It works but the voltage is really noisy but it didn't matter for the led.

author: MrAl
author_rank: Super Contributor
timestamp: February 22, 2023, 11:04:57 am
content: Quote from: G-son on February 21, 2023, 11:16:50 pmHello there,Microchip has an application note that talks about using a comparator for a DC to DC converter circuit. Dont remember the app number though but you could look it up.One thing to think about is the frequency of operation of your circuit as it is now. You might note that if you replace the comparator with an op amp you could end up with a linear regulator not a switcher. That's because there is no mechanism for forcing the output to switch on and off, so it may seek a linear steady state where the output does in fact regulate, but the transistors operate in the linear region meaning high power loss and so very poor efficiency.You could try adding some hysteresis to the comparator that may help this situation even if it is actually switching already. You have to force these things to switch or else they can easily go into the linear mode which defeats the purpose of trying to create a switcher. It's also good to have a set frequency so you dont end up with a race situation, which would cause the transistors to turn on and off so fast that they actually dont switch. Bipolar transistors have a characteristic that prevents them from switching extremely fast. One of those is called the storage time. That's the time it takes to get the base charge out of the base region and that means the transistor stays on when the base is telling it to turn off. It can be significant too so you should check that. It may be hard to notice without a heavy load though because that is when the switching action would try to be the fastest. Consider when the output goes up and then down very fast, the comparator senses the decrease quickly and tries to turn the transistor on, but as soon as it turns on, it senses the output is too high again so tries to turn the transistor off again. When the turn on to turn off time gets too small, it starts to behave like a linear circuit. The idea is to prevent that from happening for all line and load conditions.The Microchip note probably adds a delay to the output of the comparator or something like that. That forces the transistor to stay on for a given minimum amount of time and off for a minimum amount of time regardless what the load is and so linear operation becomes impossible.If you have trouble finding that app note i'll look for it also.This also reminds me of the MC34063 and similar, except they use a latch and oscillator. The output ends up being more noisy than a regular buck circuit using the same filter components for both. The lower frequency components kick in so to get a smoother output you need a larger inductor which increases the cost and probably the size too.Of course a Schottky or other fast diode is required for the catch diode which you probably already know.I also see that your inductor value is extremely large. That's way bigger than most buck circuits today need. 100uH max.Also, the 1k pullup may not provide enough current to the transistors to turn on fully but you can check that.The 4700uf output cap seems a little extreme too, but the main point there is it should be low ESR. If the ESR is too high you end up with more output ripple than you would like to see. A more typical value would be 1000uf, but not as important as the low ESR.

author: ledtester
author_rank: Super Contributor
timestamp: February 22, 2023, 11:39:45 am
content: Quote from: MrAl on February 22, 2023, 11:04:57 amIs it possibly this one?AN216 - DC/DC Converter Controller Using a PICmicro® Microcontrollerhttps://ww1.microchip.com/downloads/en/AppNotes/00216a.pdf

author: mikerj
author_rank: Super Contributor
timestamp: February 22, 2023, 12:25:04 pm
content: Hysteretic control is about the simplest way to make a buck switcher, they can give excellent transient performance but it does have drawbacks. Firstly they depend on the presence of voltage ripple on the output, so the super low ESR caps (e.g. ceramic) that you'd might normally choose for a switcher can cause stability problems. Secondly the output frequency is highly variable, depending on input and output voltages, inductor, smoothing cap ESR etc.

author: G-son
author_rank: Regular Contributor
timestamp: February 22, 2023, 07:56:22 pm
content: Great info, thanks! Adding some hysteresis makes perfect sense, so I'll be reading up on the subject and try to run some simulations.The component values were basically numbers I pulled out of my rear, just to run the simulation. I tried a large variety to see what would happen, but hearing some sensible numbers is great, gives me something to aim for - even if the available components will have the final word. I'll be learning something both if it works perfectly first try and if it lets out the magic smoke.

author: Kim Christensen
author_rank: Super Contributor
timestamp: February 22, 2023, 08:36:17 pm
content: Have you looked atRoman Black's simple SMPS?That's about as cheap/simple as you can get.

author: G-son
author_rank: Regular Contributor
timestamp: February 22, 2023, 09:23:46 pm
content: I had not, but I will now!

author: MrAl
author_rank: Super Contributor
timestamp: February 23, 2023, 09:58:44 pm
content: Quote from: ledtester on February 22, 2023, 11:39:45 amHi,That could be it but regardless that should suffice.Studying the code should help.

author: langwadt
author_rank: Super Contributor
timestamp: February 24, 2023, 02:23:33 am
content: Quote from: mikerj on February 22, 2023, 12:25:04 pmeons ago I tried it with just a HC14, inductor, and capacitor, it worked.I seem to remember a hack to make a boost converter, something like feed the output of a gate via an inductor and using the esd diodes to get output voltage on Vcc