Here's a situation we see a lot: a sensor designed to last two years on a coin cell runs flat in a few weeks. The MCU is sleeping exactly as intended, but a single floating pin and a regulator with high quiescent current are quietly eating the battery. If you've put your microcontroller into its deepest sleep and the meter still shows hundreds of microamps instead of the few promised in the datasheet, you're in good company. It's one of the most common problems in battery-powered IoT devices, and it quietly destroys battery life. The good news is that a sleep current too high almost always comes from a short list of causes. Fixing it takes a mix of low-power firmware discipline and hardware awareness. This is the checklist our engineers use for low power optimization on nRF52, ESP32 and STM32 products.
1. Measure Sleep Current the Right Way
Use a Proper Power Profiling Tool
A standard multimeter is too slow for accurate current measurement on a sleeping device. Current in a sleeping IoT device is a pattern of long low-current periods broken by short spikes when the radio transmits or a sensor wakes up. Power profiling tools such as Nordic's Power Profiler Kit, a source measure unit or a current shunt with an oscilloscope capture both the microamp current floor and the milliamp peaks. You need both numbers. The sleep floor tells you about leakage, while the spikes and their timing tell you how much energy each wake-up costs.
Remove the Debugger and Other Measurement Errors
An attached SWD debugger keeps the debug domain of many chips powered, adding hundreds of microamps or more. Disconnect it and power-cycle the board before measuring. The same applies to USB-to-serial adapters, which can back-power the MCU through the UART pins, and to development kit LEDs and on-board interface chips. Measure the bare board from a clean supply. Many teams spend days chasing a "leak" that was really the debug interface power or the measurement setup.
Compare Against the Datasheet Sleep Current Correctly
The datasheet sleep current figure assumes specific conditions: a certain supply voltage, temperature, RAM retention setting and which oscillators stay running. Read the footnotes. A chip quoted at 1 µA with no RAM retention may draw several microamps when you keep RAM and a low-frequency crystal running for an RTC wake-up. Write down the expected number for your exact configuration before you start. That gives you a realistic target and tells you how far off the board really is.
2. Fix the Usual Firmware Causes
Configure Every GPIO Before Sleeping
A floating GPIO is the classic cause of excess current consumption. An input pin left floating near mid-rail makes its input buffer switch constantly and can draw tens or hundreds of microamps. Before sleeping, set every unused pin to a defined state: analog or disconnected input where the chip supports it, or a driven output. Check pins connected to sleeping peripherals too, because driving a pin high into a powered-down chip can leak current through its protection diodes. Good GPIO configuration alone often removes most of the excess.
Turn Off Peripherals and Clocks
Many MCUs don't enter their deepest deep sleep mode if a peripheral is still requesting a clock. A UART left enabled is a common offender: UART power consumption in receive mode can keep a high-frequency clock running and add hundreds of microamps. Disable UARTs, timers, ADCs and serial buses before sleeping, and use peripheral clock gating where the chip provides it. On an RTOS such as Zephyr power management, make sure device power management is enabled so drivers suspend automatically when the system goes idle.
Use the Correct Sleep Mode for the Chip
Each family names its low-power states differently. STM32 Stop mode keeps RAM and wakes quickly, while Standby saves more power but behaves like a reset on wake-up. ESP32 deep sleep turns off most of the chip and only keeps the RTC domain alive, while light sleep is much more forgiving but draws more. For nRF52 sleep current, System ON idle with RAM retention is usually the right choice for products that need fast wake-up, while System OFF gives the lowest current. Pick the mode that matches your wake-up and data retention needs, then confirm in a power profile that the chip actually reaches it.
3. Find the Hardware Leaks
Check the Regulator's Quiescent Current
The power supply itself can consume more than the sleeping MCU. A typical LDO quiescent current ranges from under 1 µA for parts designed for batteries to 50 µA or more for general-purpose regulators. The same applies to buck converters, battery chargers and load switches. Look up the voltage regulator quiescent current of every part that stays powered during sleep and add them up. If the total is already larger than your target, no firmware change will fix the board. The regulator choice must change.
Look for Resistor Dividers and Pull-Ups
Resistor dividers used to measure battery voltage draw current all the time unless they are switched. A divider made of two 100 kΩ resistors on a 3 V battery wastes 15 µA continuously. Pull-up resistor leakage adds more: a 10 kΩ pull-up on a line held low during sleep draws over 300 µA. Use higher resistor values, switch dividers with a transistor or GPIO, and make sure I2C and reset lines sit in their idle state while the system sleeps.
Put Sensors and External Memory Into Standby
External chips are easy to forget. Accelerometers, environmental sensors, displays and SPI flash often power up in an active state and stay there until told otherwise. Send each one its sensor standby mode command, and put serial flash into external flash deep power-down, which can reduce its current from tens of microamps to well under one. Where a part has no good sleep mode, power it through a load switch controlled by the MCU. Read each datasheet's standby current and include it in your sleep budget.
4. Build an Energy Budget and Verify Battery Life
Reduce Wake-Ups and Shorten Active Time
Sleep current is only half of the picture. Every wake-up costs energy for clock start-up, sensor reads and radio transmissions. Polling a sensor every 100 ms when once per second would do can cost more than the entire sleep floor. Use interrupt-driven wake-up sources such as motion interrupts instead of timers, batch data before transmitting, and finish active work quickly. A lower duty cycle is often the biggest single gain in ultra-low power design.
Calculate Battery Life From Measured Data
A real battery life calculation uses measured average current, not the datasheet minimum. Record a power profile over a full operating cycle, including radio events and sensor reads, and compute the average. Then divide usable battery capacity by that average, and derate for temperature, self-discharge and the battery's ability to supply pulses. A coin cell battery loses capacity quickly with high current peaks, so add a buffer capacitor where needed. Keep this energy budget in a spreadsheet and update it whenever firmware or hardware changes.
Make Low Power a Regression Test
Low-power behaviour breaks easily. A new driver, a debug log left enabled or a library update can quietly add 200 µA. Add an automated current check to your test process, even if it's just a power profile captured on every release candidate. Catching a regression before shipping costs minutes. Finding it after thousands of devices are in the field costs a recall, which is why mature embedded firmware engineering teams treat current as a tested requirement.

FAQ: Frequently Asked Questions
Q: Why is my ESP32 deep sleep current 1 mA instead of a few microamps?
A: On development boards the USB-serial chip, power LED and regulator usually dominate. On custom boards, check floating pins, RTC peripherals left enabled, the regulator's quiescent current and pull-ups on strapping pins.
Q: What is a good sleep current for a BLE sensor?
A: Many well-designed BLE sensors sleep between 2 µA and 10 µA, including RTC and RAM retention. The right target depends on battery size and how often the device wakes up.
Q: Can a firmware update reduce sleep current on devices already in the field?
A: Yes, if the excess comes from GPIO setup, peripherals or sleep modes. If it comes from the regulator or resistor dividers, a hardware revision is needed.
Q: How long should a coin cell IoT device last?
A: With an average current of around 10 µA, a 220 mAh coin cell can last a couple of years in theory, but pulse loads, temperature and self-discharge reduce this. Always test with real profiles.
Conclusion
When your sleep current too high problem appears, measure properly, fix the firmware basics, hunt for hardware leaks and then build a real energy budget. Most boards can be brought close to datasheet figures with a methodical checklist. VelocityCreate helps hardware teams with low-power firmware, power profiling and board reviews, so your battery-powered IoT devices reach the battery life customers were promised. Explore our Embedded Firmware Engineering work, read more technical notes, or book a technical call to talk it through with an engineer.