Here is a very unusual variable supply:
High voltage supplies can be a pain: they require special, high-voltage components, are dangerous to debug and to work with, and easily have reliability issues.This project is safe, tolerant, undemanding, and involves practically no high voltage business: everything is carried out on the safe side of a low voltage mains transformer, with the actual high voltage appearing practically only on the output node.
All the components are cheap and commonly available, and the supply can be dimensioned for practically any voltage or current output.
It is not quite a lab-grade supply: although the average output voltage is accurately regulated, it is only partially filtered, and there is no real current limitation: only the power is limited, and under 40V there is no limitation at all, and some other protection like a fuse has to be provided.
It is nevertheless a useful piece of workshop equipment for people working with tubes or SMPS's. It also has a few amazing tricks up his sleeve, more on that later.
The core of the circuit is basically a flyback converter, revisited by the lunatic asylum tech team.
Firstly, the step up function relies solely on the converter's boost ratio, and not on a transformer, and secondly, there is no explicit inductor, and the switching is performed directly on the AC raw from the ~30V transformer.
This looks like sheer madness: the switching is routed through a slow rectifier bridge, and uses the transformer's leakage inductance as a flyback inductor.
For those unfamiliar with magnetic technology, using a minor, parasitic parameter of a low frequency, iron transformer as a high frequency power inductor may look like a crazy idea.
In fact, this principle of "cryptoconverter"* is much sounder than it appears at first sight: the leakage inductance is practically independent from the core's nature, and the primary, shorted by a large capacitor, acts as a shield from the secondary for most of the iron.
The converter itself is of the current-mode variety, to cope with the straight AC, and is built around a LM339 quad comparator: this allows for a maximum of flexibility and avoids the use of a dedicated, harder to find specific IC.
The switch element is connected directly across the secondary via the rectifier bridge. It can be of a slow type, because it doesn't switch at a high frequency: it simply routes the switching signal.
This converter is controlled by an error amplifier consisting of half a LM358.
The control circuit has its own 12V supply, because it would be difficult to derive it efficiently from the main transformer.
Since the circuit relies on the transformer's leakage inductance, it has to be sufficient for proper operation. In practice, most types are suitable except toroidals.
EI types exist in two varieties: with the windings superposed or side-by-side.
Here, the side-by-side type is preferable, since it has a larger leakage inductance.
In the prototype, the transformer is not only of the side-by-side type, but in addition has a special form factor, which further increases the inductance.
This allows for a relatively low switching frequency (4KHz).
The output voltage ranges from 40V (converter becomes inactive) to more than 400V.
The output power is 80W, independent of the voltage setting. This is favorable compared to a classical supply, because the current mode converter acts partly as a PFC. It also reduces the ripple voltage compared to a plain rectifier+capacitor.
The iron becomes a little warmer on the secondary side, but nothing alarming.
One drawback of the direct boost topology is the demand on the switch element: it must be able to pass the full peak current of 6A, and to block the full output voltage, 400V here. This is not too much of a problem, as big switching FETs are available cheaply and easily.
*Because the main element remains hidden in another component