Comment on PWM resolution for switch mode power supplies.
xthexder@l.sw0.com 1 day agoI tend to agree with litchralee, changing the duty cycle is usually how these things are done rather than having multiple voltages.
From a control perspective, it’s much easier to turn a digital signal on for 1/4 the time than it is to generate 1/4 the voltage for the full time. But that’s just for basic PWM. If you’re trying to boost the voltage up from your source though, the mechanism for getting a target voltage is a bit different, and relies on “charging up” an inductor and disconnecting it to spike the voltage. I found this reference that seems to have some good diagrams of how it works: analogcircuitdesign.com/boost-converter/
In a boost converter, duty cycle and frequency should be tuned to the inductor so that energy isn’t being wasted after the inductor reaches steady-state and starts acting like a short circuit.
I explained it poorly. The chip has an ADC that can operate in window mode. I. E. when my output voltage jitters high or low out of bound, I can use logic to very quickly effectively increase or decrease my duty cycle. (Actually substitute another pwm signal that is in pnase but with a larger or smaller duty)
5V square PWM from the ATtiny goes to a gate driver capable of several amps at 5V, that gate driver switches a pair of logic level MOSFETs, one of the MOSFETs switching the coil and the other acting as the recitfier. Topology is a synchronus inverting buckboost.
Changing the duty cycle then raises or lowers the voltage.
At the same time, via interrupt or event channel, the cpu starts calculating a new duty cycle and setting the timers. Interrupts may take 100 cycles. Whereas, pwm at 625kHz will have completed an additional three cycles before I can even start to modify the duty from the program.
None of this may matter. Static dumb resistive load, I could probably just about run my MOSFETs off a 555 and not even worry about feedback or regulation.
However, the idea is interesting to me. Quick response regulation with more precise regulation happening as the CPU catches up.
Seems like it would give you a flatter output.
I’ve found when I discover an interesting electronic or programming technique or problem, that usually means I don’t know the name. It’s usually something figured out decades ago and there are references and papers that explain it and consider angles that I didn’t know about.
xthexder@l.sw0.com 1 day ago
I see, yeah that seems like a decent design going through the interrupt. Since your load is static, the responsiveness of your IC interrupts shouldn’t matter too much, but if you were trying to drive a high bandwidth load, then it would start becoming an issue. 625kHz or even the effective 200kHz you have control over would be plenty accurate even for something like audio (which wouldn’t change faster than maybe 48kHz). You can size your output capacitor accordingly so that if you suddenly hook up a bigger load, the voltage drop is acceptable until the IC can catch up.