🌿 CuriousWinds

Energy Harvesting Firmware & Sub-Microamp Sleep

Capacitor voltage tracking, power-fail non-volatile checkpointing, and intermittent computing in microcontrollers.

Executive Summary & Key Takeaways
Foundational Synthesis for Practitioners & Research Systems

Ambient energy harvesting demands microsecond bursts and non-volatile state preservation, defying traditional continuous-power assumptions where microcontrollers consume 100x more than harvested inputs.

01 Power Budget Gap

Harvested energy (10, 50 µW/cm²) demands 15-second capacitor charging for 15 ms bursts, risking brownout at 1.8V thresholds.

02 State Checkpointing

Non-volatile memory must preserve CPU registers, SRAM, and peripherals to avoid infinite reboot loops during brownouts.

03 Brownout Reset Cost

Voltage drops below 1.8V erase volatile state, forcing full reinitialization and draining harvested energy on redundant startups.

04 Adaptive Burst Scheduling

Firmware must execute ≤15 ms bursts after 15-second energy accumulation, deferring writes until stable voltage windows.

In This Article
2 Curated Inquiries • Computing Systems & Machine Cognition

id: 153

title: “Energy Harvesting Firmware: 5 Rules for Micro-Amp Nodes”

slug: “energy-harvesting-firmware-microamps”

canonical_url: “https://curiouswinds.com/technology/energy-harvesting-firmware-microamps/”

domain: “technology”

cluster: “S1”

reading_time: 11

word_count: 1980

stage: “clean_room_v2”

rubric_score: “8.87/10”


NOTE

Executive Summary: Operating computational hardware on harvested ambient energy requires discarding continuous execution models. When a micro-controller relies on intermittent energy harvested from ambient light, thermal gradients, or vibrations, power loss is an expected operating condition rather than an exceptional fault. Designing firmware for sub-milliamp systems demands non-volatile checkpointing, adaptive duty cycling, and hardware brownout calibration.

Ledger Identity: `ART-P4-POST153`

Curation Standard: Peer-Reviewed Embedded Systems Architecture


01. The Reality of Intermittent Power

In conventional embedded development, electrical energy is treated as an infinite reservoir. Code assumes that if instruction $N$ executes, instruction $N+1$ will follow five nanoseconds later. A coin cell battery or USB power bus guarantees a stable voltage rail across months of runtime.

Batteryless edge sensors and ambient energy harvesters destroy this assumption.

When a solar cell indoors receives 200 lux of diffused fluorescent illumination, it generates approximately $10 \text{ to } 15\ \mu\text{W}$ per square centimeter. Piezoelectric vibration harvesters on industrial motors deliver brief bursts of $50\ \mu\text{W}$ at 60 Hz. Thermoelectric generators (TEGs) attached to human skin produce less than $20\ \mu\text{W}$ under a standard temperature differential ($\Delta T \approx 3^\circ\text{C}$).

A modern 32-bit ARM Cortex-M0+ microcontroller executing from flash memory consumes roughly $40 \text{ to } 70\ \mu\text{A}/\text{MHz}$ at 3.0V ($120 \text{ to } 210\ \mu\text{W}/\text{MHz}$). A single radio transmission burst over Bluetooth Low Energy (BLE) or LoRa demands instantaneous current spikes between $8\text{ mA}$ and $40\text{ mA}$.

The thermodynamic reality is stark: the incoming ambient power is two to three orders of magnitude smaller than the active execution budget.

The hardware must store ambient microwatts into a small storage capacitor ($10\ \mu\text{F} \text{ to } 470\ \mu\text{F}$) over several seconds, discharge that capacitor in a sudden 20-millisecond computational burst, and experience an involuntary brownout collapse when the voltage drops below the microcontroller’s minimum operating threshold ($V_{\text{min}} \approx 1.8\text{V}$).

POWER HARVESTING DYNAMICS
The Power Asymmetry Paradox: Continuous Influx vs. Burst Execution
1,000:1 Power Dissimilarity
Stage 01 · Influx Accumulation
Ambient Harvester Source
Solar / RF / Thermal harvester generates trickling 15 µW continuous influx into a local storage capacitor over 15 seconds (1.8 V ⟶ 3.3 V).
Stage 02 · Transient Demand
Computational Radio Burst
Radio transmission / sensor read demands 15 mW (1,000× influx rate). Without sub-millisecond atomic checkpointing, voltage drops below 1.9 V triggering an unrecoverable brownout.

If firmware running on this hardware relies on standard state machines stored in volatile SRAM, it falls into an infinite reboot trap. The device charges to 3.0V, boots, initializes its clock tree, allocates memory, starts reading a sensor, drops below 1.8V, dies, reboots, and executes the exact same initialization sequence forever.

It makes zero forward computational progress.

To build useful computational machines that survive decades without battery replacement, firmware engineers must abandon linear programming models and adopt intermittent computing architectures.

For analysis of how fundamental physical entropy bounds all computing engines, explore our foundation on Complex Systems & Emergent Order.


02. The Mechanics of Non-Volatile State Preservation

Solving the intermittent execution problem requires decoupling computational state from volatile electrical rails.

Every micro-controller retains three categories of state:

  1. CPU Registers: Program Counter (PC), Stack Pointer (SP), General Purpose Registers (R0–R12, LR).
  2. Volatile SRAM: Stack frames, heap allocations, static variables.
  3. Peripheral Hardware State: Analog-to-Digital Converter (ADC) configuration, GPIO states, radio transceiver registers.

In traditional systems, preserving state across power resets requires writing data to EEPROM or NAND Flash. However, Flash memory has asymmetric physics: writing a single 32-bit word requires erasing an entire 4KB sector, drawing upwards of $10\text{ mA}$ for $5\text{ ms}$ ($150\ \mu\text{J}$). For an energy-harvesting node running on a $22\ \mu\text{F}$ capacitor, executing a single flash erase triggers the very brownout it is attempting to survive.

The Physics of Ferroelectric RAM (FRAM)

Modern intermittent architectures rely on Ferroelectric Random-Access Memory (FRAM). FRAM exploits the bistable polarization of zirconium and titanium atoms within a lead zirconate titanate (PZT) crystal lattice.

Applying an electric field shifts the central atom between two stable minimum-energy states:

FERROELECTRIC PHYSICS
FRAM Non-Volatile Ferroelectric Dipole Cell (PZT)
Zero-Energy State Retention
POSITIVE POLARIZATION (LOGIC 1)
Central Ti / Zr Atom Displaced Upward
Remains stable in crystal lattice indefinitely with 0 μA leakage.
NEGATIVE POLARIZATION (LOGIC 0)
Central Ti / Zr Atom Displaced Downward
Switched by applying < 1.5V electric field across electrodes in ~10 ns.

Writing to FRAM requires only $1.5\text{V}$, executes in under $50\text{ ns}$ without pre-erasure, draws less than $100\ \mu\text{A}$, and endures over $10^{14}$ read/write cycles (compared to $10^5$ for Flash).

Mathematical Formulation: The Capacitor Discharge Budget

The energy $E$ stored within a storage capacitor $C$ operating between an upper turn-on threshold $V_{\text{on}}$ and a hardware brownout cutoff $V_{\text{off}}$ is strictly bounded:

ENERGY HARVESTING CAPACITY
Capacitive Buffer Limit
Usable Capacitive Storage Energy (Eusable)
Eusable = ½ · C · (Von2 − Voff2)
C: Buffer capacitance in Farads (e.g., 47 µF ceramic / tantalum)
Von: Voltage turn-on supervisor threshold (typically 3.0 V)
Voff: Minimum microcontroller operating cut-off / brownout threshold (1.9 V)

For a typical ceramic capacitor where $C = 47\ \mu\text{F}$, $V_{\text{on}} = 3.0\text{V}$, and $V_{\text{off}} = 1.9\text{V}$:

E_usable = 0.5 × (47 × 10^-6 F) × (9.0 – 3.61) = 0.5 × (47 × 10^-6) × 5.39 ≈ 126.7\ µJ

Every clock cycle consumed by the CPU burns energy:

E_active = V_core × I_active × t_cycle × N_cycles

If a node attempts to execute a machine learning inference task requiring $N = 250,000$ cycles at $16\text{ MHz}$ ($t = 15.6\text{ ms}$) with $I_{\text{active}} = 2.4\text{ mA}$ at $2.5\text{V}$:

E_task = 2.5V × (2.4 × 10^-3 A) × (15.6 × 10^-3 s) = 93.6\ µJ

The task consumes $93.6\ \mu\text{J}$ of the available $126.7\ \mu\text{J}$, leaving a margin of $33.1\ \mu\text{J}$.

If ambient energy drops or capacitor Equivalent Series Resistance (ESR) causes an internal $I \times R$ voltage drop, the node browns out mid-execution.

To guarantee forward progress, the firmware must partition the task into discrete atomic transactional checkpoints.

Checkpoint PhaseVolatile Bytes SavedEnergy Cost ($\mu\text{J}$)Failure Recovery Time
Just-in-Time (JIT) Stack Frame128 Bytes$1.4\ \mu\text{J}$$< 12\ \mu\text{s}$
Full Register State + PC68 Bytes$0.8\ \mu\text{J}$$< 6\ \mu\text{s}$
Radio Peripheral Descriptor32 Bytes$0.4\ \mu\text{J}$$< 4\ \mu\text{s}$
Total Atomic Checkpoint228 Bytes$2.6\ \mu\text{J}$$< 22\ \mu\text{s}$

By restricting checkpoint cost to $2.6\ \mu\text{J}$ (less than $2.1\%$ of the total capacitor budget), the firmware reserves over $97\%$ of its stored energy for compute and sensing.

For comparative analysis of how physical hardware constraints bound information processing, explore our study on Information Entropy & the Landauer Bound.


03. Edge Failure Modes: The Four Brownout Traps

Deploying intermittent firmware in field conditions reveals failure modes that never appear on bench power supplies.

1. The Capacitor Leakage Floor

Real capacitors do not hold charge indefinitely. A supercapacitor ($0.1\text{F} \text{ to } 1.0\text{F}$) exhibits internal leakage currents between $1\ \mu\text{A}$ and $15\ \mu\text{A}$. If an ambient photovoltaic harvester produces $4\ \mu\text{A}$ indoors while the storage capacitor leaks $5\ \mu\text{A}$, the system reaches an asymptotic voltage ceiling below the turn-on threshold. The node enters a permanent dormant state, bleeding energy faster than it harvests.

Mitigation: Use low-leakage high-density multilayer ceramic capacitors (MLCCs) with dielectric materials such as X7R or X5R for primary energy buffering, reserving supercapacitors only for secondary high-capacity bulk reservoirs gated by physical P-channel MOSFET disconnect switches.

2. The Peripheral Inconsistency Hazard

A microcontroller can save its CPU registers to FRAM in $20\ \mu\text{s}$, but an external $I^2\text{C}$ temperature sensor or SPI accelerometer has internal analog settling times and capacitive charge pumps.

If power fails halfway through an $I^2\text{C}$ read transaction:

  1. The CPU powers off.
  2. The external sensor remains partially charged by bus pull-up resistors through internal protection diodes.
  3. Upon reboot, the sensor’s internal shift register remains locked halfway through byte transmission, driving the SDA line permanently LOW and freezing the system bus.

Mitigation: Every peripheral transaction must be idempotently bracketed. On power restoration, firmware must never assume peripheral state is intact; it must execute a dedicated bus recovery routine (toggling SCL 9 times to flush external shift registers) before restoring CPU execution contexts.

3. The Time-Travel Paradox (Non-Volatile Clocks)

In volatile software, elapsed time is strictly monotonic: time increases continuously. In an intermittent system, the core may execute for 10 ms, sleep in a complete blackout for 45 minutes, wake up, and resume execution at the very next instruction.

If an algorithm computes differential rates (e.g., velocity $v = \frac{\Delta x}{\Delta t}$ or temperature change $\frac{\Delta T}{\Delta t}$), assuming $\Delta t = 10\text{ ms}$ yields absurd numerical infinities.

Mitigation: Intermittent nodes must integrate ultra-low-power non-volatile real-time counters (drawing $< 50\text{ nA}$) or employ remanence-decay counters (measuring the discharge decay of a dedicated reference capacitor) to measure the exact duration of the blackout interval upon wake-up.

4. Non-Volatile Memory Wear Skew

While FRAM boasts $10^{14}$ cycles, naive checkpointing algorithms that write checkpoint headers to a fixed memory address during high-frequency intermittency (e.g., 200 power cycles per second on vibrating machinery) can exhaust specific memory cells in under two years.

Mitigation: Implement circular double-buffered transaction logs with rolling sequence numbers, spreading write wear evenly across physical FRAM blocks.


04. Systemic Synthesis: Five Architectural Rules

Designing reliable micro-amp firmware requires translating these physical constraints into engineering rules.

TRANSIENT EXECUTION
Transient Power Lifecycle: Cold Boot to Just-In-Time Sleep
Idempotent Micro-Task Checkpoints
1. Brownout Reset: Microcontroller wakes from zero-voltage state. Reads FRAM checkpoint table (10 ns read).
2. State Restoration: Restores CPU stack pointer, core registers, and peripheral descriptors without executing cold initialization code.
3. Task Slice Execution: Executes atomic, idempotent computational slice while capacitor voltage stays above Vexec (2.2V).
4. JIT Checkpoint & Sleep: On-chip ADC detects voltage approaching Vwarn (2.0V). DMA flushes active state to FRAM in < 40 μs, entering sub-microamp hibernation before brownout collapse.

Rule 1: Enforce Idempotent Task Slices

Every computation unit between two checkpoints must be mathematically idempotent: executing it three times due to repeated mid-slice power crashes must produce the exact same physical outcome as executing it once. Avoid in-place modifications of raw input data; write results to shadow buffers and commit pointers atomically with a single 32-bit swap.

Rule 2: Hardware-Assisted Pre-Brownout Interrupts (JIT)

Never poll battery voltage in software loops. Configure the microcontroller’s internal Low-Voltage Detect (LVD) or Brownout Reset (BOR) hardware comparator to trigger a non-maskable interrupt (NMI) at $V_{\text{warn}} = 2.1\text{V}$, exactly $200\text{ mV}$ above the hard shutdown threshold ($V_{\text{min}} = 1.9\text{V}$).

This $200\text{ mV}$ buffer provides the precise energy slice required to flush the register bank to FRAM before the clock tree collapses.

Rule 3: Dynamic Frequency Downscaling

CMOS dynamic power dissipation scales quadratically with voltage and linearly with operating frequency:

P_dynamic = \alpha C_load V_dd^2 f

When ambient energy is low, dropping system clock frequency from $48\text{ MHz}$ to $2\text{ MHz}$ reduces internal current consumption from $3.2\text{ mA}$ to $140\ \mu\text{A}$. While the CPU takes longer to complete instructions, the internal parasitic voltage drop ($I \times R_{\text{internal}}$) across the power rail decreases, preventing premature brownout triggers.

Rule 4: Decouple Sensing, Computation, and Transmission

Never interleave sensor reads, numerical filtering, and radio transmission within a single execution block. Partition the workload into an asynchronous pipeline:

  • Phase A (Harvester): Accumulate energy until $V \ge 3.0\text{V}$.
  • Phase B (Sense): Sample sensor, write raw bytes to FRAM, return to low-power standby ($I < 300\text{ nA}$).
  • Phase C (Compute): Run statistical filtering on FRAM buffer across multiple energy bursts.
  • Phase D (Transmit): Accumulate maximum capacitor charge ($V = 3.3\text{V}$), fire a single compressed packet, and allow the system to brownout cleanly.

Rule 5: Pure Monotonic Sequence Numbering

Never rely on timestamps generated by volatile software counters to order events. Tag every persisted data packet with a 64-bit monotonic sequence counter stored in non-volatile FRAM. When the packet arrives at a powered gateway, the gateway reconciles the chronological timeline using network arrival metadata, eliminating the need for energy-expensive GPS or NTP synchronization at the edge.


Technical Summary & Architectural Specs

ParameterLaboratory TargetDefensive FallbackCritical Threshold
Quiescent Current ($I_Q$)$< 350\text{ nA}$$< 800\text{ nA}$$> 1.5\ \mu\text{A}$ (Depletes buffer)
Turn-On Threshold ($V_{\text{on}}$)$3.0\text{V}$$2.7\text{V}$$< 2.4\text{V}$ (Insufficient energy)
Pre-Brownout Interrupt ($V_{\text{warn}}$)$2.1\text{V}$$2.2\text{V}$$< 2.0\text{V}$ (JIT write truncation)
Hard Shutdown ($V_{\text{min}}$)$1.85\text{V}$$1.90\text{V}$$< 1.75\text{V}$ (Memory corruption)
Checkpoint Storage MediumOn-chip FRAMLow-leakage MRAMExternal SPI Flash (Forbidden)
Duty Cycle Ratio$0.05\%$ ($500\ \mu\text{s} : 1\text{s}$)$0.2\%$$> 1.0\%$ (Rail collapse)

Energy-harvesting firmware is fundamentally an exercise in thermodynamic realism. By acknowledging that power loss is not a fatal crash but a natural phase transition in the lifecycle of an edge computer, we can build computational infrastructure that outlasts the humans who deployed it.

Curated Inquiry Series • 10 Investigations

Machine Cognition Architecture

An empirical exploration through mechanistic circuits, quadratic scaling limits, memory walls, and semantic manifold geometry.

Primary Scholarly Provenance & Empirical Attribution
Hester, J., & Sorber, J. (2017). Flicker: Rapid prototyping for the batteryless Internet of Things. In Proceedings of the 15th ACM Conference on Embedded Network Sensor Systems (SenSys ’17), 1–14.
DOI: 10.1145/3131672.3131673