Switching regulator using MCUs

10 bits at 200kHz requires a 200MHz peripheral clock, and 12 bits at 0.5MHz requires a 2GHz peripheral clock unless you have a fancy enhanced resolution PWM peripheral.

So lower PWM frequency means more expensive, heavier larger inductor. It’s difficult to get the MCU to regulate its own power. “Soft” firmware disruptions or bugs can cause physical damage.

Some processor bandwidth and resources are consumed by the (interrupt driven) control loop unless your chip has a dedicated processor for the purpose. That may increase latency for servicing lower priority interrupts or compromise the regulator performance.

Microchip has marketed versions of their PICs with peripherals optimized for SMPS control.. if Olin was still here he could tell you a lot more about actually using them, personally I tend to err on the conservative side.

There are also some small very low power MCUs that actually contain an entire switching regulator (except the inductor) to allow 1.5V operation.

There are a lot of similarities between a motor controller implemented by a DSP or microcontroller and a switching power supply so the existing peripherals often aimed at motor control could be used for a SMPS (although the frequency would typically be very low compared to a modern SMPS chip). Might be useful for special applications such as a polyphase low EMI power supply.


Some points:

  • An MCU definitely requires a gate driver and power transistors (your examples have built in power transistors, though some SMPS controller may need a driver and external transistors as well)
  • A switching regulator IC is specifically built and tailored for the tasks, whereas a MCU in general is built to be able to do a lot of other tasks as well.
  • An MCU requires code and code can contain bugs, deadlocks, etc.

The main issue is you have to make your control loop run fast enough with low latency but it has been done. Look up digitally controlled/programmed regulators.

Variability in execution time from loop to loop will also cause harmonics and noise. It's less of a problem for something executed in hardware like an FPGA or ASIC since every cycle takes the same amount of time and is more deterministic cycle-to-cycle. They also react faster (less latency) to external events and more predictably compared to software.