It finally occurred to me, I've been using these things for so long, yet never built my own. And therefore, never fully understood nor trusted what the documentation says (or hides!).
So here's the challenge:
Design a phase shift PWM controller.
Example applications: Full bridge forward converter (SMPS, UPS, motor control, etc.) Frequency-locked, resonant systems (resonant SMPS, induction heating): PWM provides linear, continuous power control, independent of frequency.
Requirements:
- Constant 50% +/- 3% duty cycle per output (complementary outputs with dead time for full bridge gate driving are easily added on)
- Variable frequency, using a control voltage/current, or single variable resistor (duty cycle and phase shift remain ~constant)
- Variable phase shift, from a control voltage input
- Phase shift adjustable from 0-180 degrees or more (or 180-360, same thing)
- Must use continuous-time methods, not sampled/divided. (Or, ENOB > 12, which will rule out most digital methods for rather modest output frequencies anyway.)
- Uses discrete transistors, comparators, logic gates (no more than MSI), that sort of thing. ("Transistors" includes the hollow FET kinds, if you like.)
Homework: The basic prototype is an astable multivibrator (makes 50% duty cycle reference clock), followed by a delay and ramp circuit. The tricky parts are:
- The multivibrator has to be timed from the same global (frequency control) bias current (e.g., using a current steering triangle-wave oscillator, like you'd find in an analog function generator)
- Essentially, an oscilloscope's triggered sweep circuit is required for the delay generator. Multivibrator triggers it on rising edge; cap charges for almost the whole cycle time (again, charged by the global bias current), making a sawtooth wave; comparator picks a point along that ramp, thus implementing the delay.
- Thus, delay is adjustable anywhere along the sawtooth ramp, which might be, say, 10-350 degrees. It can't go quite to zero due to delay (which could be subtracted out by delaying the original clock source), and can't quite go to 360 because of reset time and trigger window.
- To square up the output, a 50% duty cycle generator is needed, which can be: injection locked multivibrator (otherwise matched to the clock multivibrator); or another triggered delay generator with the required slope; or:
- Or instead of using a triggered sweep for the delay generator, the clock multivibrator can be a sawtooth type. Use one comparator to bisect the sawtooth, yielding the non-delayed 50% output. Use another comparator to generate the delayed trigger (the multivibrator slope sets range). A triggered delay generator is still required, to produce the delayed 50% duty output.
- Symmetry bonus: you can start with a clock pulse, and run two triggered delay generators, where one delay control voltage is inverse of the other. Each one only needs 90 degrees of adjustable range. This probably incurs more hardware than the lopsided-phase version, though.
Possibly useful: 50% duty can be obtained by dividing a square wave in half (type T flip-flop), without having to match capacitors. But half the frequency means twice the phase shift, and if the flip-flops ever end up out of sync, phase suddenly inverts. May be tricky to use.
The basic breadboarding of this ("RTA level") description used an LM339,
5/6ths CD40106, 1/2 CD4013, and five transistors (true, I could've better squared up an edge using /Seven Transistors/..). On a good old fashioned solderless breadboard, that's a full row of stuff. Very messy!So if I've captured your fancy at all... Simplify it, if you think you can! ;-)
(Special note to you in the monolithic peanut-gallery: yes, I know you can make all of this, and more, in a tiny 1mm chip. Unless you have one available that can be bought for less than the parts listed above, STFU. :-P )
Tim