PIC Microcontroller Self-Regulates Its Power Supply Using PWM

Nov. 22, 1999
Developing consumer products can often involve the design of small, low-cost, handheld, battery-powered circuits with an embedded controller. Thanks to the availability of inexpensive 8-bit...

Developing consumer products can often involve the design of small, low-cost, handheld, battery-powered circuits with an embedded controller. Thanks to the availability of inexpensive 8-bit processors packing lots of functionality, this challenge can be met by letting the processor do as much as possible. One function the processor can handle with a minimum of external components and minor software overhead is regulation of its own power supply.

The idea presented here uses the analog-to-digital converter (ADC) and pulse-width-modulation (PWM) hardware in the PIC16C72 processor to implement an efficient, low-cost, regulating power supply (see the figure). First, a common 9-V battery is stepped down (using R2) to an adjustable 4.6 V to 7.0 V. The supply is intended to source less than 10 mA with minimal ripple but can source as much as 40 mA if more ripple can be tolerated. Ripple also can be decreased by increasing the inductor and capacitor values if size permits, and by modifying the software feedback control.

Although the power supply topology shown has no functionality, it’s a starting point for designing any number of battery-operated standalone systems that need an embedded processor. In this example, the powersupply control software overhead is only about 10%. By using surfacemount components and adding other low-power circuitry (such as LCDs, CMOS op amps, and sensors), this circuit represents a good starting point for real-world applications.

The circuit works as follows. When the On/Off switch S1 is switched on, the PIC is initially powered through D2 with just enough power (regulated by R1 and the 5.1-V Zener D1) so that the PIC can come out of reset and begin regulating as a step-down controller. Once the PIC is out of reset, it begins driving the LC step-down regulator with a pulse-width-modulated 50-kHz signal through the dual (nchannel and p-channel) FETs contained in the IRF7105 (Q1).

If any additional circuitry is added to this system, care should be taken so that it doesn’t load down the circuit too heavily during the initial powerup stage. Once the step-down voltage exceeds the voltage sourced through D2, then R1, D1, and D3 merely act as the voltage reference for the PIC ADC. The circuit as shown draws approximately 4 mA from the battery with the regulation voltage set at 5 V. The PWM control in this example is done entirely during the analog-to-digital interrupt service routine.

Sponsored Recommendations

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Bidirectional power for EVs: The practical and creative opportunities using power modules

March 18, 2024
Bidirectional power modules enable vehicle-to-grid energy flow and other imaginative power opportunities. Learn more about Vicor power modules for EVs

Article: Tesla commits to 48V automotive electrics

March 18, 2024
48V is soon to be the new 12V according to Tesla. Size and weight reduction and enhanced power efficiency are a few of the benefits.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!