Part XII: Edge, Embedded, Streaming, and Federated Sensor AI
Chapter 63: Batteryless and Intermittent Sensing

Energy harvesting and power constraints

"I do not have a battery. I have a capacitor the size of a lentil and a promise from the sun. Ask me again in the shade and I will have forgotten the question."

A Solar-Powered AI Agent

Prerequisites

This section assumes you have met the kilobyte-and-milliwatt regime of microcontroller sensing and, above all, the energy-per-decision argument built out in Chapter 61; the on-device optimization that shrinks a model to fit it comes from Chapter 59. The transducer physics behind each harvesting source (photovoltaic, thermoelectric, piezoelectric) is the same measurement-model physics developed in Chapter 2, read in reverse: here the energy flow powers the node rather than encoding a measurement. The arithmetic is elementary: watts, joules, farads, and volts, with one capacitor energy formula. Power-electronics detail (boost converters, maximum-power-point tracking) is surveyed in Appendix C; no new mathematics is introduced.

The Big Picture

Every chapter before this one quietly assumed a battery: a reservoir of energy large enough that computation is limited by memory, latency, or accuracy, but never by whether the lights stay on. A batteryless node breaks that assumption. It scavenges microwatts to milliwatts from its environment (light, heat, vibration, stray radio), buffers them in a capacitor that holds a fraction of a joule, and spends them the instant they arrive. Power is not a budget you draw down; it is a weather system that flickers on and off with the sun, the machine, or the passing forklift. This section establishes the physics and the accounting that govern that regime: what the common harvesting sources actually yield, why storage is a capacitor and not a battery, how much usable energy that capacitor really holds, and why the supply is fundamentally intermittent. Get this arithmetic right and the rest of the chapter (surviving power loss, adapting inference, scheduling around charge) has a foundation. Get it wrong and your model is correct, small, fast, and completely unpowered.

Harvesting sources: microwatts to milliwatts, and never on demand

Energy harvesting converts ambient energy into electrical power using a transducer, the same class of device that turns a physical quantity into a signal in Chapter 2, run as a generator instead of a sensor. Four sources dominate deployed batteryless sensing, and their yields span four orders of magnitude. Photovoltaic cells are the workhorse: outdoors in full sun a small cell delivers on the order of \(10\ \mathrm{mW/cm^2}\), but indoors under office lighting that collapses to \(10\) to \(100\ \mathrm{\mu W/cm^2}\), a factor of a hundred or more. Thermoelectric generators exploit a temperature difference across the device (the Seebeck effect) and yield roughly \(20\) to \(100\ \mathrm{\mu W/cm^2}\) for a modest few-degree gradient, such as the skin-to-air difference on a wearable. Piezoelectric and kinetic harvesters turn vibration or motion into charge and produce anywhere from a few microwatts to a milliwatt depending on the source's frequency and amplitude. RF harvesting rectifies ambient or dedicated radio energy and is the weakest, typically \(0.1\) to a few \(\mathrm{\mu W/cm^2}\) at usable distances, which is why RFID-scale systems put the transmitter close by.

Two properties matter more than the raw numbers. First, the yield is small: a node that harvests \(50\ \mathrm{\mu W}\) on average has, over a full second, only \(50\ \mathrm{\mu J}\) to spend, and a single neural inference plus a sensor read can cost more than that. Second, and decisively, the supply is uncontrollable. You cannot ask the sun to shine or the motor to vibrate when your scheduler is ready; the source turns on and off on its own timetable. This is the property that makes batteryless computing a distinct discipline rather than merely aggressive low-power design, and it is why the sources here connect directly to the environmental and energy-sensing systems of Chapter 39, where the same ambient conditions are the phenomenon of interest.

Key Insight

Separate power (watts, the rate energy arrives) from energy (joules, the amount you have stored). A harvester is characterized by its average power; a task is characterized by the energy it consumes. When the task's instantaneous power demand exceeds what the harvester supplies, the deficit must come from storage, and storage is a small capacitor, not a battery. The whole design reduces to one question asked continuously: is there enough energy buffered right now to finish the next atomic unit of work before the capacitor droops below the point where the processor browns out? Everything else in this chapter is an answer to that question.

Storage is a capacitor, and it holds less than you think

Batteryless nodes buffer energy in a capacitor (increasingly a supercapacitor) rather than a rechargeable battery, and the choice is deliberate. Capacitors charge and discharge in milliseconds, tolerate effectively unlimited cycles, survive cold and heat, and do not wear out over a decade in the field, all properties a lithium cell lacks. The price is that they store very little energy and their voltage sags continuously as they discharge. The energy held in a capacitor of capacitance \(C\) charged to voltage \(V\) is

\[ E = \tfrac{1}{2}\,C\,V^2. \]

The quadratic in \(V\) is the whole story. A processor does not run from zero volts: it needs a minimum operating voltage \(V_{\min}\) to stay out of brownout, and the capacitor is charged to some ceiling \(V_{\max}\). The energy you can actually spend is only the slice between those two levels,

\[ E_{\text{usable}} = \tfrac{1}{2}\,C\,\bigl(V_{\max}^2 - V_{\min}^2\bigr), \]

which is always less, often far less, than \(\tfrac12 C V_{\max}^2\). Consider a \(100\ \mathrm{\mu F}\) capacitor charged to \(3.3\ \mathrm{V}\) with a brownout floor of \(2.4\ \mathrm{V}\). The total stored energy is about \(545\ \mathrm{\mu J}\), but the usable slice is only \(\tfrac12(100\times10^{-6})(3.3^2 - 2.4^2)\approx 256\ \mathrm{\mu J}\). Nearly half the charge is stranded below the floor. That \(256\ \mathrm{\mu J}\) is your entire working budget between refills, and if one inference costs \(200\ \mathrm{\mu J}\) you get essentially one shot before the node must recharge. This is the hard wall that the intermittent-computing techniques of Section 63.2 exist to work around.

Real-World Application: a batteryless structural-health tag on a highway bridge

A civil-infrastructure team instruments a highway bridge with adhesive tags that classify vibration signatures to flag developing cracks, a condition-monitoring task of the kind treated in Chapter 37. Running wires to a bridge deck is prohibitively expensive and replacing thousands of batteries on a twenty-year structure is a maintenance nightmare, so the tags are batteryless. Each harvests from a piezoelectric strip that flexes as trucks pass, yielding bursts of a few hundred microwatts only while traffic crosses, and buffers them in a \(1\ \mathrm{mF}\) supercapacitor. The engineers size the tiny classifier so that one inference over a vibration window fits inside the usable energy slice the capacitor holds between the brownout floor and the charge ceiling, and they accept that when traffic is light the tag simply sleeps, harvesting, until it has banked enough charge to think again. The harvesting source and the sensed phenomenon are literally the same passing truck: the vibration that powers the node is also the signal it measures, a coupling with no analogue in battery-powered design.

The power constraint: intermittency, brownout, and forward progress

Put the source and the store together and you get the defining operating model of this chapter: harvest, store, use, repeated forever, with the "use" phase gated on having banked enough charge. Because the harvested power \(P_{\text{harvest}}\) is usually far below the active power \(P_{\text{active}}\) an inference draws, the node cannot run continuously. It charges its capacitor slowly, computes in a short burst that drains the capacitor faster than the harvester refills it, browns out when the voltage crosses \(V_{\min}\), and then charges again. The result is an intermittent execution: bursts of activity separated by dead time whose length is set entirely by the weather of the source. The average duty cycle is roughly the ratio of harvested to active power, \(P_{\text{harvest}} / P_{\text{active}}\), which for a \(50\ \mathrm{\mu W}\) harvester feeding a \(5\ \mathrm{mW}\) processor is about one percent: the node is awake one moment in a hundred.

This reframes the central design goal. On a battery node the goal is to minimize average power; on a batteryless node the goal is to guarantee forward progress despite an unpredictable supply, so that useful work accumulates across power failures rather than restarting from scratch each time the lights come back. The energy trace itself becomes an input the system must reason about, much as a signal is reasoned about in Chapter 3. The simulation below makes the harvest-store-use loop concrete: it drives a capacitor with a fluctuating harvest trace, fires an inference whenever enough energy has banked, and counts how often the node actually gets to think.

import numpy as np

C          = 100e-6     # 100 uF storage capacitor
V_MAX      = 3.3        # charge ceiling (V)
V_MIN      = 2.4        # brownout floor (V)
E_INFER    = 220e-6     # energy for one inference + sensor read (J)
DT         = 1e-3       # 1 ms simulation step

def usable(v):                       # energy above the brownout floor
    return 0.5 * C * max(v*v - V_MIN**2, 0.0)

# A flickering indoor-light harvester: mean ~60 uW, occasional shade dips.
rng     = np.random.default_rng(0)
p_harv  = np.clip(60e-6 + 30e-6*rng.standard_normal(20_000), 0, None)

v, inferences, brownouts = V_MAX, 0, 0
for p in p_harv:
    e = usable(v) + p * DT                       # bank incoming energy
    if e >= E_INFER and v >= V_MIN:              # enough to think, and awake
        e -= E_INFER; inferences += 1
    v = np.sqrt(2*e/C + V_MIN**2)                # convert energy back to volts
    if v > V_MAX: v = V_MAX                       # clamp at the ceiling
    if v <= V_MIN: brownouts += 1                 # drooped to the floor

print(f"inferences fired : {inferences}")
print(f"brownout steps   : {brownouts}")
print(f"duty cycle        : {inferences*E_INFER / (p_harv.sum()*DT):.1%} of harvest used")
Listing 63.1.1. A minimal harvest-store-use loop on a \(100\ \mathrm{\mu F}\) capacitor under a flickering indoor-light trace. It banks incoming energy each step, fires an inference only when the usable slice above \(V_{\min}\) covers E_INFER, and tracks brownouts. Raise E_INFER past the capacitor's usable slice (about \(256\ \mathrm{\mu J}\)) and the inference count drops to zero: the node can never bank enough to think in one shot, the exact failure the next section addresses by splitting work across power cycles.

Listing 63.1.1 shows the two levers that decide whether a batteryless node is viable at all: the usable energy slice of the capacitor (set by \(C\), \(V_{\max}\), and \(V_{\min}\)) and the energy cost of one atomic inference. When the cost exceeds the slice, no amount of patience helps within a single charge cycle, which is precisely why the rest of the chapter turns to splitting work and adapting the model.

The Right Tool

You do not hand-code the boost converter, the maximum-power-point tracking that keeps a photovoltaic cell near its optimal operating voltage, or the brownout-detect comparator that gates the processor. A power-management integrated circuit such as the Texas Instruments BQ25570 harvester chip does all of it: it cold-starts from a few hundred millivolts, tracks the source's peak power, charges the storage capacitor, and raises a "power good" signal when \(V_{\max}\) is reached, so your firmware waits on one interrupt line instead of sampling the rail.

// C, on-device: the harvester PMIC gates compute for you.
void on_power_good_irq(void) {   // fires when the cap reaches V_MAX
    read_sensor_window();
    run_inference();             // spend the banked energy in one burst
    enter_deep_sleep();          // let the PMIC recharge; MPPT runs in HW
}
Listing 63.1.2. With a harvesting PMIC, the entire charge-track-threshold loop of Listing 63.1.1 collapses into a single "power good" interrupt handler. Replicating maximum-power-point tracking, cold-start, and brownout detection in firmware and discrete parts is hundreds of lines plus a board redesign; the PMIC reduces it to one IRQ and a sleep call. The energy budgeting, sizing E_INFER against the usable slice, is still yours to own.

Research Frontier

The reference platform for a decade of this research is WISP, the Wireless Identification and Sensing Platform from the University of Washington, a radio-powered sensing tag that harvests from an RFID reader's field and runs a microcontroller with no battery at all. Modern work pushes toward genuine perception on such platforms: Camaroptera and its successors add a batteryless camera and on-device vision to the harvest-store-use loop, and the Capybara and Flicker projects treat the energy-storage capacitor bank itself as a reconfigurable, task-aware resource rather than a fixed part. The open frontier this section frames is co-designing the harvester, the capacitor sizing, and the model so that a useful inference reliably fits inside one energy-buffer slice under a realistic, adversarial power trace. Progress is measured with recorded and synthetic energy traces (EKHO-style emulation) so that two systems can be compared under the identical supply weather, the leakage-safe evaluation discipline of this book applied to power rather than data.

Exercise

Using the usable-energy formula, compute \(E_{\text{usable}}\) for three storage choices at \(V_{\max}=3.3\ \mathrm{V}\), \(V_{\min}=2.4\ \mathrm{V}\): (a) \(100\ \mathrm{\mu F}\), (b) \(1\ \mathrm{mF}\), and (c) \(10\ \mathrm{mF}\). For an inference costing \(220\ \mathrm{\mu J}\), how many inferences does each hold in one full charge? Then modify Listing 63.1.1 to sweep the capacitor value and plot inferences fired against \(C\) under the same harvest trace. Explain why the curve is not simply linear in \(C\), and identify the smallest capacitor for which the node fires at least one inference per charge.

Self-Check

1. Distinguish power from energy in one sentence each, and explain which one characterizes a harvester and which characterizes an inference task.

2. A \(1\ \mathrm{mF}\) capacitor is charged to \(3.3\ \mathrm{V}\). Why is the energy available to a processor with a \(2.4\ \mathrm{V}\) brownout floor much less than \(\tfrac12 C V_{\max}^2\), and roughly what fraction is stranded?

3. Why is the supply on a batteryless node called "intermittent" rather than merely "low," and what design goal does that intermittency make primary in place of minimizing average power?

What's Next

In Section 63.2, we confront the consequence that this section set up: when the usable energy slice cannot cover a whole computation, the node browns out mid-task and, on an ordinary microcontroller, loses everything in volatile memory. Intermittent computing and checkpointing is the discipline of saving just enough state to non-volatile memory that work resumes across a power failure instead of restarting, turning a string of disconnected energy bursts into steady forward progress.