2008-12-28

Switching Boost Converter Power Supply

Building switchmode converters is something I had basically no experience with and only a very casual theoretical understanding of. Some might say it would have been safer and easier to just follow someone else's design, or at least pick one of the thousands of commercial blackbox chips out there... If I did that I wouldn't have taught myself as much about the wonderful mix of disciplines such circuits require knowledge of.

Requirements

First the requirements. My lab is lacking a high-voltage DC variable supply, something capable of say 40-200 volts at a few watts (say 10-20 mA) with current limiting protection. Such a device would enable basic vacuum tube experiments amongst a whole bunch of other uses. I wanted it to run from 12 volts input as I have plenty of such DC supplies and could avoid the dangers associated with low impedance mains work.

Critical Components

After reading some theory and sketching circuit ideas I dug through the junkbox looking for suitable parts; a HV MOSFET, a fast HV diode, a low ESR HV cap, and a suitable storage inductor. Unfortunately the best MOSFET I had Vds-wise was the humble IRF510 which at 100 Volts constrains the boost topology to delivering 112 volts. Diodes I had no problems with, I have a stock of BY229-600s which are very over-spec for the project. Output side filtering caps were looking grim, I wanted 1 uF 400 V or better, but had only 100 V in anything but vanilla electrolytic. I tested one 100 Volt mylar cap to over 300 volts - that will do for initial experiments as my MOSFET limits me to ~100 volts anyway unless I go for a flyback topology - maybe later. The inductor was the final remaining critical part, but pot and E-cores I have aplenty, along with power chokes.

Controller

The controller was originally going to be discrete, but after spending 2 days in LT Spice fiddling I decided to do something completely different for me - use software! I'm fairly well tooled up for using the Atmel ATtiny13 so it seemed logical to use it. The tiny13 has fast-PWM and ADC capability and a 9.6 MHz internal clock, so it can easily handle the job with *far* less parts than any other solution I was looking at.

Variable Duty-Cycle Experiments

To begin with I wrote some simple code to allow fiddling with the inductors I had and in general learning about switching boost converters. The code simply sets the PWM output duty cycle to match the ADC conversion reading. This lets you implement a 0-100% duty cycle controller with only the tiny13 and a pot (at a fixed frequency - 37.5 kHz currently). This piece of code is actually quite useful in its own right and can be a speed/power controller for motors, brightness control for lamps, etc. Anything that needs a variable duty cycle.

After some initial tests lighting up LEDs I breadboarded a basic boost converter and tried it out with the variable duty-cycle controller. To my surprise most of the inductors I had "worked" to some degree. Many suffered saturation problems, but the cheapest and most common 1 mH choke I tried worked quite well with a small load, right up to the voltage limit of the IRF510.

Duty-Cycle Experiment Lash-up

This oscillogram shows a roughly 80% duty-cycle gate drive and the corresponding drain waveform with the HV side under several 10s of mA load. With less loading it was possible to see free-wheeling on the drain after diode cut-off, where the inductor and drain capacitance would ring as an LC circuit. This is harmless, normal and quite expected.

Duty-Cycle Experiment Oscillogram

Here is a video of varying the duty cycle. The free-wheeling is observed at low duty drives, eventually continuous mode is entered and voltage increases rapidly, then the inductor saturates and the voltage drops again (with a corresponding rapid rise in input current).

Duty-Cycle Varying Experiment Video
Duty-Cycle Varying Experiment Video
(3.054 Mbytes)

Before long I had a dummy load of neon bulbs glowing brightly and a conversion efficiency of about 74% delivering a few watts. The efficiency isn't too bad considering the relatively large Ron value of the IRF510 and the choke inductor parasitic resistance.

The Neon Bulb Dummy Load

The Inductor

At this point with a 1 mH inductor output current was limited to less than 33 mA, as the 37.5 kHz switching rate only allows the inductor to charge to 282 mA in the 88% duty cycle on-time that corresponds to 100 volts from 12 volts input. Reduction of the inductor value is required to deliver more current, but inductor saturation then becomes more likely - for example a 100 uH inductor can charge to 2.8 Amps in the same time, that's a lot of ampere-turns for most ferrite cores. (And near the drain current limit of the switching transistor).

Time to experiment with gapped cores, and as such I needed an inductor core saturation tester... The test instrument that grew out of this need is quite simple, but I've made it the subject of its own article as it is a useful device in its own right.

Voltage Regulation

Closing the regulation loop was the next step. The controller programming was altered to adjust the duty cycle incrementally based on the ADC input, trying to maintain a value near mid-rail. With simple voltage divider from the HV side feeding the ADC input and some logic to drive a LED when the regulator could no longer retain control (dropout indicator), I had the basics of a working regulating boost converter.

Closed-Loop Regulation at 100 Volts

The delay and incremental adjustment affect a low-pass filtering of the control circuit. This seems to work quite well, but I have not investigated its behaviour extensively and have no idea of its stability. The regulation point does limit-cycle even with several bits of hysteresis, the control logic being digital (only 8-bit PWM) and high duty-cycles having a large "gain" in terms of output voltage change with small changes in duty cycle (approaching 100% is an asymptotic limit of voltage approaching infinity - 50% gives you twice the input voltage - during continuous-mode operation anyway). Operation in discontinuous mode with smaller inductors would allow lower duty cycles, but I am unsure if that would lower the loop gain - need to do the maths. Explicit digital filtering in the controller is probably worth investigating.

The controller logic also misbehaves when the inductor saturates or the MOSFET starts avalanching. When this occurs the duty-cycle to output voltage relation stops being monotonically +ve. The regulation will slam hard on against the upper duty-cycle limit. This condition is noted by the drop-out indication LED, but typically results in a large current consumption and would eventually cause damage. Current limiting in the input-side could allow unconditional safety, but it would be nice to detect the condition explicitly and complain because it is a supply hardware problem, not just overload. I have not investigated the lower boundary as much, the Neon bulb pilot light loads the output enough for it to not be a major problem, and the failure condition of a completely lost load is probably not too bad, the duty cycle lower limit can be selected to prevent dangerous voltages being developed.

Protection

Input-side current limiting is the most obvious protection scheme. Almost all failure modes result in large currents being drawn from the input. A simple circuit to detect this and throttle the current might be the conventional transistor pair with an emitter resistor that eventually biases one of the pair on to deprive the other of base current. The voltage drop would hurt efficiency and perhaps a more sophisticated scheme would be in order... For now my bench PSU is giving the overload protection.

Higher voltage MOSFETs and Capacitors are needed to take the experiments further towards a practical supply for the lab requirements. These devices are on-order, but haven't arrived from their suppliers yet. I'll do more work into the protection system and regulator stability after they arrive, and perhaps take a look at a flyback topology to achieve higher efficiency. The flyback topology also prevents input-supply shorts, as would AC coupling of the output. Filtering of the output ripple is another area that needs investigation, perhaps with LC filters although they have problems with load-dumps generating voltage spikes.

2 comments.