Wearable and handheld devices
Practical introduction to wearable and handheld devices for pervasive computing: definitions, hardware/software architecture, sensors, power and radio considerations, example calculations and exam-focused notes.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Wearable and handheld devices are the physical points where pervasive computing meets people. Engineers design these devices to gather context, interact with users, and communicate with other systems under strict power, size and privacy constraints.
Key ideas
Start from first principles and simple definitions.
Wearable device — a computing device designed to be worn on the body (clothes, wrist, head, eyewear, implanted) that senses, computes and often communicates. Define before use: "worn on the body" includes direct attachment and carried on-person. Typical constraints: small size, low power, comfort.
Handheld device — a handheld computing device (mobile phone, PDA, portable scanner) intended to be held in the hand during use; larger than wearables but still portable.
Sensor — a component that converts a physical quantity (motion, light, heart rate) into an electrical signal. Examples used below: accelerometer, gyroscope, magnetometer, photoplethysmograph (PPG). Each has a physical range and resolution.
Actuator — a component that converts electrical signals into physical effects (vibration motor, speaker, display).
Microcontroller (MCU) — a small processor with integrated memory and peripherals used for low-power real-time control. It runs firmware for sensing, local processing and communication.
System-on-chip (SoC) — integrated chip that may include MCU, radio, sensors, and power management.
IMU (Inertial Measurement Unit) — a sensor package combining accelerometer and gyroscope, often magnetometer; used for orientation and motion tracking.
Context data — data describing the user’s situation (motion, location, activity). See related topics: Context and context-aware computing; Modelling context-aware systems.
Battery constraints — wearables are energy-limited. Engineers balance sensing rate, radio use and processing to meet required lifetime.
Sampling theorem (Nyquist) — for an analog signal bandlimited to f_max, sampling frequency f_s must satisfy f_s >= 2·f_max. Assumption: ideal band-limited signal and ideal sampling. This is used to choose sensor sampling rates.
Quantization — ADC converts analog sensor voltage to discrete levels. For an N-bit ADC, quantization step Δ = V_FS / (2^N), where V_FS is the full-scale input span; for unipolar 0..V_ref, V_FS = V_ref so Δ = V_ref / (2^N), and for bipolar ±V_ref, V_FS = 2·V_ref so Δ = (2·V_ref) / (2^N) = V_ref / (2^(N-1)). This affects resolution and noise.
Power budget — compute average power from current draw and duty cycle. Engineers derive device lifetime from battery capacity and average current. Basic laws used: Ohm’s law and power relation. For duty-cycled systems with states i having currents I_i and duty fractions d_i (sum d_i = 1), the averages are I_avg = sum d_i·I_i and P_avg = sum d_i·P_i.
Radio trade-offs — radio transmissions consume significant energy. Engineers use low-power radios (BLE, Zigbee) and duty-cycling, adjusting packet size, interval and connection parameters.
Form factor and ergonomics — mechanical design, placement on body affects sensing (body-shadowing for radio, movement artefacts for sensors) and comfort.
Security and privacy — wearables collect personal data. Definitions: authentication, encryption, pairing, and data minimization. These are covered deeper in Wearable computing security and privacy and Privacy and trust in pervasive computing.
What to draw in an exam when asked for architecture: draw a block diagram with these labelled blocks and arrows: (battery) -> (power management) -> (MCU/SoC) connected to (sensors: accelerometer, gyroscope, PPG), (actuators: haptics, display), (radio transceiver), (storage), and optionally (secure element). Label sample rates, power draw next to each block.
Derivations universities expect:
Battery life derivation: Battery capacity C (in ampere-hours) and average current I_avg (in amperes) gives operating time T = C / I_avg (hours). This assumes constant current drain and neglects battery voltage change effects.
Energy from power: Power P = V · I (watts). Energy E for time t: E = P · t (joules). Combine with battery nominal voltage V_batt and capacity C to get stored energy E_batt = V_batt · C (converted to coulombs if needed); with C in ampere-hours, E_batt (in joules) = V_batt · C · 3600.
Sampling theorem application: human motion frequency content often lies below a certain value. If f_max is maximum signal frequency, choose f_s >= 2·f_max, and typically add safety margin (choose 4×–10× for reliable feature extraction). State the assumptions (signal band-limited or anti-aliasing filter used).
Quantization noise: for uniform quantizer, SNR_q ≈ 6.02·N + 1.76 dB (for full-scale sine input). Assumes ideal ADC and full-scale sinusoid.
Formulas
P = V · I — P is power in watts (W), V is voltage in volts (V), I is current in amperes (A). Applies to DC or instantaneous values for small time windows.
E = P · t — E is energy in joules (J), t is time in seconds (s). Use when power is approximately constant over interval t.
T = C / I_avg — T is operating time in hours (h), C is battery capacity in ampere-hours (Ah), I_avg is average current in amperes (A). Applies for approximately constant current draw.
E_batt = V_batt · C · 3600 — stored energy in joules; V_batt in volts (V), C in ampere-hours (Ah). Use to compare energy budgets. Equivalently, energy in watt-hours: E_Wh = V_batt · C (Wh); 1 Wh = 3600 J.
f_s >= 2 · f_max — Nyquist sampling theorem. f_s and f_max in hertz (Hz). Applies if input is band-limited to f_max.
Δ = V_FS / (2^N) — quantization step in volts (V), where V_FS is the ADC full-scale input span. For unipolar 0..V_ref, V_FS = V_ref so Δ = V_ref / (2^N); for bipolar ±V_ref, V_FS = 2·V_ref so Δ = (2·V_ref) / (2^N) = V_ref / (2^(N-1)).
SNR_q(dB) ≈ 6.02 · N + 1.76 — approximated SNR due to quantization for full-scale sine input, in decibels (dB). N is ADC bits.
mag = sqrt(ax^2 + ay^2 + az^2) — acceleration magnitude from 3-axis accelerometer components ax, ay, az in m/s^2. Use to detect steps or orientation-independent motion.
Worked examples
Example 1 — Battery life (numerical)
Problem: A wrist wearable uses a 300 mAh lithium-ion battery with nominal voltage 3.7 V. Average device current draw is 50 mA. Find operating time in hours and stored energy in joules.
Steps:
- Battery capacity C = 300 mAh = 0.300 Ah.
- Average current I_avg = 50 mA = 0.050 A.
- Operating time T = C / I_avg = 0.300 / 0.050 = 6.0 hours. Answer: 6.0 hours.
- Stored energy E_batt = V_batt · C · 3600 = 3.7 V · 0.300 Ah · 3600 s/h = 3.7 · 0.300 · 3600 J = 3.7 · 1080 J = 3996 J ≈ 4000 J.
(Units carried through; assumption: constant average current.)
Example 2 — Sampling rate for human motion (numerical / reasoning)
Problem: You must sample accelerometer data to recognise steps. Human step-related acceleration has significant content up to about 20 Hz. Choose a sampling frequency and explain why.
Steps:
- f_max ≈ 20 Hz (assumed maximum significant frequency for step/ gait signals).
- By Nyquist, f_s >= 2·f_max = 40 Hz. For feature extraction and filter design, pick safety margin; common choice f_s = 50–100 Hz.
- Choose f_s = 50 Hz (simple and commonly used). This satisfies f_s >= 2·f_max and gives some margin for filter roll-off.
Answer: sample at 50 Hz. (Assumptions: step signals are band-limited to ~20 Hz; anti-aliasing filter used.)
Example 3 — Step detection algorithm trace (simple threshold on magnitude)
Problem: Given accelerometer magnitude samples (unit m/s^2) at 50 Hz: [9.6, 10.2, 11.5, 12.8, 11.0, 9.8, 9.7, 10.5, 11.8, 13.0, 11.1, 9.6]. Using a simple peak threshold method with threshold = 12.0, detect peaks representing steps. Use a simple rule: a step is a sample > threshold and greater than its immediate neighbors.
Trace:
- Index 0: 9.6 (no)
- 1: 10.2 (no)
- 2: 11.5 (no)
- 3: 12.8 > 12.0 and neighbors 11.5 and 11.0 -> peak -> step count = 1
- 4: 11.0 (no)
- 5: 9.8 (no)
- 6: 9.7 (no)
- 7: 10.5 (no)
- 8: 11.8 (no)
- 9: 13.0 > 12.0 and neighbors 11.8 and 11.1 -> peak -> step count = 2
- 10: 11.1 (no)
- 11: 9.6 (no)
Answer: two steps detected. (Explain limitations: noise, false positives, and need for debouncing or timing constraints between steps.)
Common mistakes
- Treating instantaneous peak current as average when computing battery life — must use average current including duty cycles.
- Forgetting to include radio transmission energy, which often dominates overall energy use.
- Mistaking ADC bit count for effective resolution without considering noise (ENOB — effective number of bits).
- Not labelling axes or units in diagrams requested in exams.
For your exam
Types of questions expected: definitions (wearable vs handheld, IMU, MCU), short notes (power management, sensor selection), derivations (battery life, Nyquist sampling), numericals (battery time, quantization step), algorithms/trace (simple step detection), and block-diagram labelling (architecture of a wearable device).
What full-marks answers include:
- Definitions with bold terms and simple examples.
- Clear assumptions before deriving formulas (e.g., constant current, band-limited signal).
- Step-by-step derivations with units carried through.
- Diagrams described or drawn with labelled blocks: battery, power management, MCU/SoC, sensors, radio, storage, actuators, secure element.
- For algorithms, a trace on small input and discussion of limitations and parameter choices.
Quick check
- Define a wearable device in one sentence.
- State the Nyquist sampling theorem and one assumption behind it.
- A device has a 250 mAh battery and draws 40 mA average. How many hours will it run?
Answers: 1) A wearable device is a computing device designed to be worn on the body that senses, computes and often communicates. 2) Nyquist: to sample a band-limited signal with maximum frequency f_max without aliasing, f_s must be at least 2·f_max; assumes the signal is band-limited or an anti-aliasing filter is used. 3) 250 mAh = 0.250 Ah; T = 0.250 / 0.040 = 6.25 hours.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?