Switch-mode power supplies
(SMPSs) traditionally are implemented using a basic analog control loop. But recent advances in digital signal controllers (DSCs) enable designs that begin to make fully digital control schemes practical and economical. Still, early adoption of this technology is expected to be in high-end applications, where the benefits of full digital control are the most immediate.
Yet many analog power applications can greatly benefit from the configurability and intelligence provided by even the smallest and most inexpensive microcontrollers. In fact, at least four discrete levels of digital control are possible in power supplies:
- on/off control
- proportional control
- configuration control
- digital feedback, or full digital control.
The first of these stages, on/off control, offers some compelling advantages.
By simply toggling the shutdown input used to disable the MOSFET driver outputs of a traditional switching power supply, pulse-width-modulation (PWM) techniques can be applied to control the amount of time the power supply operates, slowly increasing its operation from 0% to 100% (Fig. 1). This allows for a flexible "soft-start" that can help prevent the large in-rush of current normally associated with the startup of a switching power supply.
Even the smallest microcontroller has at least four general-purpose I/Os and a lot more computational power than the application needs, so this concept can be immediately extended to two or more outputs. The scheme enables simultaneous control of multiple switching regulators, permitting sequencing of the outputs in a precise order. In addition, if the MCU offers an on-board comparator and a voltage reference, they can implement an effective undervoltage lockout or perform tracking to ensure that two outputs ramp up at the same rate.
Another relatively simple way to add intelligence to power supplies involves using the microcontroller's (4 MHz) internal oscillator. This oscillator can act as a clock source for a switching-regulator PWM generator, such as an MCP1630 (Fig. 2).
In this example, the MCU's clock output (usually divided by 4, resulting in a 1-MHz reference) is connected to the oscillator input of the PWM generator. Alternatively, if the MCU has an onboard PWM peripheral, it can serve as a source for the switching-regulator PWM, providing better control over the duty cycle and frequency.
Microcontrollers' internal oscillators typically are temperature-compensated RC circuits, and they're generally provided with an initial default factory calibration. However, designers can use the MCU's oscillator calibration registers (OSCALs) to adjust the oscillator frequency on-the-fly through software. This can help in meeting emissions requirements mandated by the Federal Communications Commission and other regulatory organizations.
Using a simple pseudorandom sequence to vary the OSCAL setting, the power supply can sweep a range of frequencies from approximately 600 kHz to 1.2 MHz. The random number generator is easily implemented in a few lines of code by using a linear feedback shift register. This well-known technique requires minimal coding effort with 8-bit microcontrollers. By detuning the internal oscillator this way, a power supply's energy can be spread out over a wider range, reducing the emitted energy at each individual frequency by as much as 20 dB (Fig. 3).
There are many simple ways to sprinkle power supplies with a little digital intelligence to improve their performance. By doing so, power-supply designers can get lots of mileage with very little time and money.