---
title: Designing wearable and implantable devices
heading: Power budgets with duty cycling, battery life, the energy cost of sending data versus processing it on the device, storage needs, specific absorption rate limits for radio and wireless power, and reliability with a constant failure rate
eyebrow: S15 · Lesson 48 · Designing wearable and implantable devices
xp: 50
---

::: hook
An ECG patch that records for two weeks, a continuous glucose monitor, a hearing aid, an implanted neurostimulator: all are embedded systems (C12) whose hardest constraint is energy. A coin cell holds a couple of kilojoules; a radio can burn through it in days if it streams raw data. Designing these devices means budgeting every microampere, choosing what to compute on the device and what to send, keeping radio and wireless-power exposure within safety limits, and making something that won't fail inside a person.
:::

::: play
- Battery life of a device that is active (sampling, processing, transmitting) a fraction D of the time and asleep otherwise, from a 220 mAh coin cell.
- The average current is $I_aD + I_s(1 - D)$. At low duty cycles the sleep current dominates; at high ones the active current does.
- Halving the active time doubles life only while active current dominates.
:::

```sim plot
view: graph
x: D = 0.0001..1 log
y: L = 0.1..10000 log
slider: a = 1..20 step 0.5 = 5
slider: s = 0.5..50 step 0.5 = 5
plot: 220/((a*D + s*1e-3*(1 - D))*24) | samples: 400 | label: battery life, days (active mA, sleep µA)
readout: average current at 1% duty, µA = (a*0.01 + s*1e-3*0.99)*1000 | digits: 4
readout: life at 1% duty, days = 220/((a*0.01 + s*1e-3*0.99)*24) | digits: 4
```

::: predict
## A sensor draws 5 mA when active and 5 µA asleep, and is active 1% of the time. About how long does a 220 mAh coin cell last?

- [ ] About 2 days
- [ ] About 2 years
- [x] About 5 months
- [ ] About 18 days

::: reveal
The average current is 5 mA × 0.01 + 5 µA × 0.99 = 55 µA, so 220 mAh lasts 4000 h, or 167 days. Active current is 91% of the budget; cutting the duty cycle further, or the active current, is where the gains are.
:::
:::

::: nameit
## Power budgets

With duty cycle D, active current $I_a$ and sleep current $I_s$:

$$I_\text{avg} = I_aD + I_s(1 - D), \qquad \text{life} = \frac{\text{capacity}}{I_\text{avg}}$$

Real capacity is derated for temperature, pulse loads and the cutoff voltage. A coin cell of 220 mAh at 3 V stores about 2.4 kJ.

## Compute or transmit

Radios cost roughly nanojoules per bit, while a microcontroller can process a sample for far less. Streaming a 250 sample/s, 16-bit ECG all day is 345.6 million bits, about 3.5 J/day at 10 nJ/bit; sending only beat times, rhythm alerts or compressed data cuts the radio's share by orders of magnitude. Storing raw data instead needs channels × rate × bytes × time of memory.

## Exposure limits

Radio links and wireless power transfer heat tissue. The **specific absorption rate**,

$$\text{SAR} = \frac{\sigma|E|^2}{\rho}$$

(with E the RMS field, σ the tissue conductivity and ρ its density), is limited, for example to 1.6 W/kg averaged over 1 g of tissue in the United States and 2 W/kg over 10 g in Europe. Implants must also keep surface temperature rises to a degree or two.

## Reliability

With a constant failure rate λ (or mean time between failures 1/λ), the probability of surviving a time t is $R(t) = e^{-\lambda t}$, and a system that fails if any of its n independent parts fails has a failure rate equal to the sum of theirs. Implants are designed with redundancy, hermetic packaging and conservative derating because replacement means surgery.
:::

::: example
## Size the storage and radio energy for a one-day, single-lead ECG at 250 samples/s and 16 bits.

::: solution
1. **Storage per day.**
   $$\begin{aligned} N &= 250 \times 16 \times 86\,400 \\ &= 345.6\ \text{Mbit} \\ &= 43.2\ \text{MB} \end{aligned}$$
2. **Radio energy.** Streaming it at 10 nJ/bit costs
   $$E = 3.46\ \text{J per day}$$
3. **Against the battery.** That's about 0.15% of a 2.4 kJ coin cell per day, which adds up to a big share over two weeks, so many patches store data locally and upload later.

**Answer:** a day of ECG takes 43.2 MB of storage, and streaming it costs 3.46 J of radio energy.
:::
:::

::: example
## What SAR does a field of 30 V/m (RMS) produce in tissue with σ = 0.5 S/m and ρ = 1000 kg/m³? What's the chance a device with a 50-year MTBF survives 5 years?

::: solution
1. **SAR.**
   $$\begin{aligned} \text{SAR} &= \frac{0.5 \times 30^2}{1000} \\ &= 0.45\ \text{W/kg} \end{aligned}$$
   within the 1.6 W/kg limit.
2. **Survival over 5 years.**
   $$\begin{aligned} R &= e^{-5/50} \\ &= 0.905 \end{aligned}$$
   One device in ten fails within five years, which would be far too many for an implant.

**Answer:** the SAR is 0.45 W/kg, and the device survives 5 years with a probability of 0.905.
:::
:::

::: example
## A wrist device harvests body heat with a thermoelectric module giving 25 µW/cm² at a 5 K skin-to-air difference. With 3 cm² of module and a 60% efficient boost converter, can it run a monitor that averages 30 µW?

::: solution
1. **Module output.**
   $$\begin{aligned} P &= 25\ \mu\text{W/cm}^2 \times 3\ \text{cm}^2 \\ &= 75\ \mu\text{W} \end{aligned}$$
2. **After the converter.**
   $$\begin{aligned} P &= 0.6 \times 75\ \mu\text{W} \\ &= 45\ \mu\text{W} \end{aligned}$$
   15 µW more than the monitor uses on average, enough to keep a small battery topped up while the wearer is still.
3. **In a warm room.** The temperature difference may halve, and thermoelectric power goes as its square, so the harvest falls to a quarter, 11 µW; the battery must then carry the deficit.
4. **Planning around it.** Harvesters set a budget that the duty cycle must respect.

**Answer:** yes, while the wearer is still: 45 µW reaches the load, 15 µW more than the monitor's 30 µW. In a warm room the harvest falls to 11 µW and the battery must carry the deficit.
:::
:::

::: check
given: a = 2 | 5 | 15; s = 1 | 5 | 20; D = 0.001 | 0.01 | 0.1
answer: (a*1e-3*D + s*1e-6*(1 - D))*1e6
unit: µA
tolerance: 0.5%

## A device draws {a} mA when active and {s} µA asleep, active a fraction {D} of the time. What's its average current?

::: right
Right. $I_aD + I_s(1 - D)$ = {answer} µA.
:::

::: misses
- [any] Not yet. Duty-weighted average.
:::
:::

::: check
given: C = 100 | 220 | 1000; i = 20 | 55 | 200
answer: C/(i*1e-3)/24
tolerance: 0.5%

## A {C} mAh battery supplies an average of {i} µA. How many days does it last?

::: right
Right. Capacity over current: {answer} days.
:::

::: misses
- [C/(i*1e-3)] That's in hours; divide by 24.
- [any] Not yet. mAh over mA gives hours.
:::
:::

::: check
given: f = 250 | 500 | 1000; b = 12 | 16 | 24; e = 1 | 10 | 50
answer: f*b*86400*e*1e-9
unit: J
tolerance: 0.5%

## A device streams {f} samples/s of {b}-bit data all day by radio at {e} nJ/bit. How much energy does the radio use per day?

::: right
Right. Bits per day × energy per bit = {answer} J.
:::

::: misses
- [any] Not yet. Count the bits in 86,400 s.
:::
:::

::: check
given: s = 0.3 | 0.7 | 1.5; E = 10 | 30 | 60; p = 1000 | 1050
answer: s*E^2/p
unit: W/kg
tolerance: 0.5%

## Tissue with conductivity {s} S/m and density {p} kg/m³ sees an RMS field of {E} V/m. What's the specific absorption rate?

::: right
Right. $\sigma E^2/\rho$ = {answer} W/kg.
:::

::: misses
- [s*E/p] SAR goes as the field squared.
- [any] Not yet. Power per unit mass.
:::
:::

::: check
given: M = 20 | 50 | 200; t = 2 | 5 | 10
answer: exp(-t/M)
tolerance: 0.5%

## A device has a constant failure rate with an MTBF of {M} years. What's the probability it survives {t} years?

::: right
Right. $e^{-t/\text{MTBF}}$ = {answer}.
:::

::: misses
- [any] Not yet. Exponential reliability.
:::
:::

::: check
given: a = 50 | 200 | 500; b = 100 | 300; c = 20 | 80
answer: 1e9/((a + b + c)*24*365.25)
tolerance: 0.5%

## A device has three parts, any of which failing ends its life, with failure rates of {a}, {b} and {c} per billion hours. What's its MTBF in years?

::: right
Right. Rates add: MTBF = 1/λ = {answer} years.
:::

::: misses
- [any] Not yet. Sum the failure rates, then invert.
:::
:::

::: check
kind: parts
given: h = 10 | 25 | 40; A = 2 | 6; e = 0.5 | 0.7; L = 20 | 60; k = 0.5 | 0.7

## A thermoelectric harvester gives {h} µW/cm² over {A} cm² through a converter of efficiency {e}, powering a {L} µW average load.

::: part
answer: h*A*e - L
unit: µW
tolerance: 0.5%

### What surplus (positive) or deficit (negative) power results?

::: misses
- [h*A - L] Include the converter's efficiency.
- [any] Harvested power times efficiency, less the load.
:::
:::

::: part
answer: h*A*e*k^2 - L
unit: µW
tolerance: 0.5%

### What if the temperature difference falls to {k} of its value?

::: misses
- [h*A*e*k - L] Thermoelectric power goes as the square of the temperature difference.
- [any] Scale the harvest by $k^2$.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.5..20, s = 0.5..20, D = 0.001..0.5, C = 50..1000

## A device draws a mA when active and s µA asleep, active a fraction D of the time, from a C mAh battery.

::: step
answer: D*a*1000 + (1 - D)*s

### What is its average current, in µA?
:::

::: step
answer: C*1000/(D*a*1000 + (1 - D)*s)/24

### How many days does the battery last?
:::

::: right
Right. At low duty cycles the sleep current, not the active current, sets the battery life.
:::
:::

::: explain
## Why do wearable devices process data on board instead of streaming everything to a phone?

::: model
In a battery-powered device, sending a bit by radio typically costs far more energy than the computation needed to decide whether it's worth sending. A continuous raw ECG or accelerometer stream keeps the radio busy all day and can dominate the power budget. Detecting beats, measuring heart rate or recognizing an abnormal rhythm on the device's microcontroller reduces the data to a few numbers or occasional events, cutting the radio's energy by orders of magnitude and stretching battery life from days to weeks. It also lets the device keep working when the phone is out of range, storing events until the link returns.
:::
:::

::: practice

::: check
given: a = 0.5 | 30; s = 0.2 | 50; D = 0.0005 | 0.5
answer: (a*1e-3*D + s*1e-6*(1 - D))*1e6
unit: µA
tolerance: 0.5%

## Average current: {a} mA active, {s} µA asleep, duty {D}?

::: misses
- [any] $I_aD + I_s(1 - D)$.
:::
:::

::: check
given: C = 20 | 3000; i = 1 | 1000
answer: C/(i*1e-3)/24
tolerance: 0.5%

## Battery days: {C} mAh, {i} µA?

::: misses
- [any] Capacity over current, in days.
:::
:::

::: check
given: s = 0.1 | 2; E = 1 | 100; p = 900 | 1100
answer: s*E^2/p
unit: W/kg
tolerance: 0.5%

## SAR: σ = {s}, E = {E} V/m, ρ = {p}?

::: misses
- [any] $\sigma E^2/\rho$.
:::
:::
:::
