7 Tricks from Microchip to Drop Power Consumption on any Microcontroller

Microchip is an incredibly successful microcontroller vendor with a massive array of chips to choose from. The company has a series of low-power microcontrollers and refers to them as NanoWatt XLP (extremely low power) devices. In support of those devices, Microchip published a chapter on “Tips ‘n Tricks” to wring every nanoWatt of waste out of a design using their brand of microcontroller, but the first seven tricks will work with any vendor’s microcontroller, so these seven are well worth reviewing.

1. Switch Off Unneeded External Circuits and Control Duty Cycle

Almost all microcontrollers from all vendors have multiple similar-sounding low-power modes (sleepy, snoozy, droopy, drowsy, etc.) Sounds like the silicon version of the Seven Dwarfs, right? Well, all the low power modes in the world won’t help application if your application code doesn’t manage the power consumed by circuits that are external to the microcontroller. Microchip’s document uses lighting an LED as an example. Just a single lit LED is equivalent to running most of Microchip’s PIC microcontrollers at 5V and 20 MHz. When you design your microcontroller-based embedded system, always decide what physical modes or states it requires and make sure the microcontroller can cut power to external circuits when their function isn’t required.

For example, cut power to that boot EPROM after your circuit boots if the first thing the microcontroller does is download code from the EPROM to the microcontroller’s internal RAM. Alternatively, if you’ve got a high-resolution A/D converter outside of the microcontroller—because perhaps you needed more than the 12-bit resolution provided by the on-chip converter—be sure to include a transistor in the external converter’s Vcc line so that you can cut its power when it’s not needed.

2. Budget Your Power

Calculate the amount of charge used by each system mode by multiplying the current in mA by the amount of time spent in that mode during one loop of the application. Then average the sum of all the results in mA*sec over the entire length of the application loop to get the average operating current for all modes during one iteration of the application. Divide that result by the length of the application loop to get average operating current. Use that figure to help you size the battery needed by using the battery’s mAh rating and the number of days, weeks, or years you want the battery to last.

3. Do Something Smart with Port Pins

All microcontrollers have configurable ports that may serve as input, output, input/output, or analog input pins. Make sure you always configure all of the microcontroller’s pins to use the minimum amount of power.

4. Use High-Value Pull-up Resistors

If you use a pull-up resistor to keep an input high, then make sure to use a big resistor to minimize current consumption. Don’t just use a 2.2K or 4.7K resistor from habit or rule of thumb. Maybe you can use a 10K resistor. Maybe 100K or 1M. The bigger the resistor, the smaller the drain on your battery.

5. Reduce the Clock Speed and Operating Voltage to Minimums

Don’t run the microcontroller any faster than needed for the system design. Then set the operating voltage accordingly. Each clock cycle drives charge through the microcontroller and that charge comes straight from the battery. Fewer clocks per second means fewer charge packets to suck from the battery and fewer clock cycles per second also mean the operating voltage can be lower.

6. Disable the Microcontroller’s Internal Voltage Regulator and Get the Core Voltage Elsewhere

If your selected microcontroller operates the processor core on a separate voltage from the peripheral circuitry, chances are you can disable the internal voltage regulator and supply that core voltage externally. The advantage here is that you can then set the core operating voltage exactly where you need it, not where the internal regulator wants it.

7. Use Schottky Diodes to Switch Between a Power Supply and Battery

If your system can be powered from either a mains-powered supply or a battery, you can put a diode in series with each supply and the diodes will automatically supply power from the source with the highest voltage. Use Schottky diodes to minimize power loss through the diode.

If you’d like to peruse the full text of the Microchip document, you’ll find it here.

This entry was posted in Low-Power and tagged . Bookmark the permalink.

Leave a Reply