Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Pervasive devices, interfaces and connectivity

Overview of pervasive devices, their interfaces and wireless/wired connectivity: definitions, core laws (Friis, Shannon), link-budget and battery-life math, interface patterns and exam-focused examples.

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

Pervasive devices (sensors, wearables, smart objects) must connect and interact reliably and efficiently. Engineers use these principles when selecting radios, designing interfaces (I2C/SPI/UART/USB/GPIO), estimating battery life, and proving a wireless link meets range and throughput requirements.

Key ideas

  • Radio connectivity technologies: understand purpose and trade-offs rather than memorising every number.

    • Wi‑Fi (IEEE 802.11): high throughput, higher power, local-area networking. Operates in 2.4 GHz and 5 GHz bands (and 6 GHz for newer standards).
    • Bluetooth Classic / Bluetooth Low Energy (BLE): short-range, low-power, good for personal-area and wearable connectivity.
    • Zigbee (based on IEEE 802.15.4): low-power mesh networking for sensors and home automation.
    • LoRa / LoRaWAN: long-range low-data-rate for wide-area sensing; uses sub-GHz bands.
    • Cellular (2G/3G/4G/5G NB-IoT/eMTC): wide-area, operator-managed, suitable for mobility and large-scale deployments.
  • Throughput, Bandwidth, Latency, Jitter, and Reliability: define each before use. Bandwidth (B) is the frequency span available (Hz). Throughput is useful data rate (bits/s). Latency is time delay (s). Jitter is variation in latency. Reliability is typically expressed as packet delivery ratio (PDR), bit error rate (BER), or link availability (% over time).

  • Wireless fundamentals and exact theorems used in exam answers:

    1. Friis transmission equation (free-space): relates transmitted power to received power assuming line-of-sight and no multipath. Statement: For two antennas in free space, the received power Pr is Pr = Pt · Gt · Gr · (λ / (4·π·d))^2 where Pt is transmit power (W), Gt and Gr are linear antenna gains, λ is wavelength (m) and d is distance (m). Assumptions: far-field (d >> antenna sizes and d >> λ), matched antennas, no obstructions, polarisation matched. Derivation to write in an answer: start from spherical spreading of power density, multiply by effective aperture of receive antenna (A_e = Gr·λ^2/(4π)), substitute and simplify to Friis form. Diagram to draw: left box labelled Tx with antenna gain Gt and power Pt; right box labelled Rx with Gr and Pr; draw straight line distance d between them and label d; annotate wavelength λ and show free-space.

    2. Free-space path loss (FSPL) is derived from Friis: in decibels FSPL(dB) = 20·log10(4·π·d / λ) This is the loss term to subtract in dB from Pt(dBm)+Gt(dBi)+Gr(dBi).

    3. Shannon–Hartley theorem (channel capacity): Statement: For an additive white Gaussian noise (AWGN) channel with bandwidth B (Hz) and signal-to-noise ratio S/N (linear), the channel capacity C (bits/s) is C = B · log2(1 + S/N) Assumptions: AWGN channel, optimal coding, infinite coding block length, no other impairments.

    4. Battery life approximation for steady average current: Statement: For a battery with nominal capacity Q (mAh) and a device drawing average current Iavg (mA), approximate runtime T (hours) is T = Q / Iavg Important assumptions: constant current draw, battery is fresh and delivers nominal capacity, converter inefficiencies ignored. For more accuracy include converter efficiency η and self-discharge.

  • Link budget thinking: write everything in dBm/dBi and subtract losses (FSPL, cable losses) and add gains (antennas). Compare received power to receiver sensitivity to decide whether link works. If sensitivity is not provided, estimate it from thermal noise N ≈ −174 dBm/Hz + 10·log10(B) + NF and required SNR, then include implementation margin.

  • Interface design rules: always match logic voltages (use level shifters if different), add pull-up resistors for I2C, use proper MOSFETs/transceivers for RS-232/RS-485 levels, decouple power rails with capacitors near ICs, and include ESD protection on exposed pins.

Formulas

Pr = Pt · Gt · Gr · (λ / (4·π·d))^2 — Pr: received power (W), Pt: transmitted power (W), Gt, Gr: antenna gains (linear, unitless), λ: wavelength (m), d: distance (m). Applies in free-space far-field.

FSPL(dB) = 20·log10(4·π·d / λ) — FSPL in dB, d in metres, λ in metres. Applies when converting Friis to dB form.

C = B · log2(1 + S/N) — C: channel capacity (bits/s), B: bandwidth (Hz), S/N: linear signal-to-noise ratio (unitless). Applies to AWGN channels under Shannon assumptions.

P(dBm) = 10·log10(P(mW)) and P(mW) = 10^(P(dBm)/10) — convert between mW and dBm.

T ≈ Q / Iavg — T: runtime (h), Q: battery capacity (mAh), Iavg: average current (mA). Use when current draw is steady or averaged over duty cycle.

λ = c / f — λ: wavelength (m), c: speed of light ≈ 3·10^8 m/s, f: frequency (Hz). Use to convert radio frequency to wavelength.

N_thermal(dBm) ≈ −174 dBm/Hz + 10·log10(B) + NF(dB) — thermal noise in bandwidth B (Hz) with receiver noise figure NF. Receiver sensitivity (dBm) ≈ N_thermal + SNR_min(dB) + implementation margin.

For embedded interfaces: remember syntax/lines: UART frame = start bit (0) + data bits (LSB first) + optional parity + stop bit(s). I2C: SDA and SCL lines, master generates clock, addressing 7-bit or 10-bit. Open-drain with pull-ups; ACK/NACK; START/STOP; clock stretching may occur. SPI: SCLK, MOSI, MISO, SS/CS; modes defined by CPOL/CPHA (0–3); full-duplex; no in-band addressing.

Worked examples

  1. Battery life simple numeric Given: battery Q = 2000 mAh, average current Iavg = 50 mA. Step 1: Use formula T = Q / Iavg. Step 2: T = 2000 mAh / 50 mA = 40 h. Final answer: 40 hours. (If device sleeps most time, compute time-averaged Iavg from active and sleep currents weighted by duty cycle.)

  2. Link budget and FSPL numeric (unshielded free-space case) Given: Pt = 0 dBm, Gt = 2 dBi, Gr = 2 dBi, f = 2.4 GHz, d = 100 m. Step 1: Compute wavelength λ = c / f = 3·10^8 m/s / 2.4·10^9 Hz ≈ 0.125 m. Step 2: FSPL(dB) = 20·log10(4·π·d / λ). Calculate 4·π·d / λ = 4·π·100 / 0.125 ≈ 10053.1. log10(...) ≈ 4.0023. FSPL ≈ 20·4.0023 ≈ 80.05 dB. Step 3: Pr(dBm) = Pt(dBm) + Gt(dBi) + Gr(dBi) − FSPL(dB) = 0 + 2 + 2 − 80.05 = −76.05 dBm. Final answer: Pr ≈ −76.05 dBm. Interpretation: If receiver sensitivity is −90 dBm, the link margin ≈ 13.95 dB and link should work; if sensitivity is −70 dBm, link fails.

  3. Shannon capacity example Given: B = 1 MHz, S/N (linear) = 10 (i.e., 10 = 10 dB). Step 1: C = B·log2(1 + S/N) = 1·10^6 · log2(11). Step 2: log2(11) ≈ ln(11)/ln(2) ≈ 2.3979/0.6931 ≈ 3.459. Final answer: C ≈ 3.459 Mbps. Meaning: theoretical maximum under AWGN assumptions; real protocols achieve less because of overhead and coding limits.

Common mistakes

  • Treating antenna gains in linear units while subtracting losses in dB (mixing dB and linear units). Always work in dB or in linear consistently.
  • Ignoring duty cycle when estimating average current: short high-current bursts can dominate energy use.
  • For I2C, forgetting pull-up resistors or using wrong pull-up value causing slow rise times or bus errors.
  • Confusing bandwidth (Hz) with data rate (bits/s); Shannon shows relation but they are not the same.

For your exam

Types of questions you will see from this topic:

  • Definitions and short notes: define pervasive device, I2C, SPI, UART, throughput, latency.
  • Derivations: derive Friis equation from power density and antenna aperture; derive FSPL in dB; derive λ = c/f.
  • Numericals: battery-life estimate, link-budget calculation with given Pt/Gt/Gr/f/d, Shannon capacity calculation, conversion between dBm and mW.
  • Design questions: choose a radio technology (BLE/Wi‑Fi/Zigbee/LoRa) for a scenario and justify based on power, range, data rate, and cost.
  • Interface/troubleshooting: explain why an I2C bus fails (pull-ups, address conflict, clock stretching) or draw UART framing and compute baud and bit time. What full-marks answers include:
  • Clear definitions with bolded terms if asked, stated assumptions, clean step-by-step derivations, units on every quantity, and a final sentence interpreting the result (e.g., link margin, whether the link meets receiver sensitivity).

Quick check

  1. State the Friis transmission equation and list its main assumptions.
  2. How do you compute runtime for a 1200 mAh battery if average current is 30 mA? Show result.
  3. Using Shannon, what is channel capacity for B = 200 kHz and S/N = 3 (linear)?

Answers: 1) Pr = Pt·Gt·Gr·(λ/(4·π·d))^2; assumptions: free-space, far-field, matched antennas, no multipath. 2) T = 1200/30 = 40 h. 3) C = 2·10^5·log2(1+3) = 200000·log2(4) = 200000·2 = 400000 bits/s (0.4 Mbps).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?