In short
A wireless sensor network (WSN) is a collection of small, battery-powered nodes that each sense a physical quantity, process it locally and relay it over a low-power radio, multi-hop, to a sink or gateway. The defining constraint is energy: a node's radio dominates its power budget, so protocols, topologies and duty cycles are all designed to keep the transceiver off. WSNs are the hardware-and-protocol layer under India's smart metering, smart city and industrial IoT deployments, and are examined in ECE electives on WSN/IoT, in GATE/ESE communication questions on IEEE 802.15.4 and energy models, and in placement interviews at Tata Elxsi, L&T Technology Services, Bosch, Honeywell, Siemens, Qualcomm, HCL and embedded startups.
Explained
Node architecture and what drains the battery
- Five subsystems: sensing unit (transducer + signal conditioning + ADC), processing unit (MCU + RAM/flash), radio transceiver, power unit (battery, sometimes harvester), and optional units for localization (GPS), mobility or actuation.
- Typical node class: 8/16/32-bit MCU (ATmega128, MSP430, ARM Cortex-M0+), 4-10 kB RAM, a few hundred kB flash, 2 AA cells (~2,000-2,800 mAh), 1-10 kbps to 250 kbps radio.
- Power ranking: radio transmit ≈ radio receive ≈ radio listening ≫ MCU active ≫ MCU sleep. Receiving and idle listening cost nearly as much as transmitting — this is why "just listen" is not free, and why duty cycling exists.
- Classic mote families (exam names): MICA2/MICAz, TelosB, Sun SPOT; Indian/industrial equivalents use CC2530, CC1310, nRF52, SX1276 and ESP32 modules.
- Operating systems: TinyOS (nesC, event-driven, split-phase), Contiki/Contiki-NG (protothreads, uIP/6LoWPAN stack), RIOT, FreeRTOS, Zephyr. Simulators: NS-2/NS-3, Cooja, OMNeT++/Castalia, TOSSIM, MATLAB.
- Energy conservation levers: duty cycling (sleep scheduling), in-network processing and aggregation, short packets and header compression, transmission power control, topology control, and avoiding retransmissions.
Why WSNs differ from ad hoc and cellular networks
- Scale and identity: hundreds-to-thousands of nodes, often unattended, no global addressing by design; data is addressed by attribute ("temperature > 60 °C in zone 3") not by node ID — data-centric rather than address-centric.
- Traffic pattern: mostly many-to-one (convergecast) toward one sink, plus occasional one-to-many queries. MANETs assume peer-to-peer traffic.
- Redundancy: readings of neighbouring nodes are correlated, so aggregation and compression work well; losing a node is tolerable, losing the sink is not (sink is the single point of failure and a hotspot).
- Resources: severe limits on energy, memory, bandwidth and CPU; node cost must be low (tens to a few hundred rupees per node).
- Deployment: random (aerial drop) or deterministic (planned grid); self-organizing and self-healing, with no rechargeable infrastructure.
- Design metrics: network lifetime (time to first node death / to coverage loss / to partition), coverage, connectivity, latency, delivery ratio, energy per useful bit, fault tolerance, scalability.
- The energy hole / funnelling problem: nodes one hop from the sink forward everyone's traffic, so they die first and partition the network; mitigated by mobile sinks, non-uniform node density, or cluster rotation.
Physical layer, IEEE 802.15.4 and the standards stack
- Bands (India, licence-exempt): 865-867 MHz is the de-licensed band notified by the Department of Telecommunications (WPC) for low-power devices, widely used for LoRa/Sub-GHz smart metering in India; 2.4 GHz ISM is global. Power and duty-cycle limits are set by WPC notifications and have been revised more than once — check the current gazette notification before fixing a design.
- IEEE 802.15.4 PHY/MAC is the reference standard: 2.4 GHz with 16 channels, O-QPSK with DSSS, 250 kbps, 5 MHz channel spacing (≈2 MHz occupied bandwidth); 868/915 MHz with BPSK at 20/40 kbps in the original 2003 version. Maximum PHY frame 127 bytes, so payload after MAC/security headers is typically 80-116 bytes.
- 802.15.4 MAC modes: beacon-enabled (superframe = beacon + CAP with slotted CSMA-CA + CFP with guaranteed time slots + inactive period, coordinated by a PAN coordinator) and non-beacon (unslotted CSMA-CA, nodes poll). Device roles: FFD (can be coordinator/router) and RFD (leaf only).
- Stack above it: ZigBee (network + application layers, mesh/tree/star, profiles like Home Automation, now folded into Zigbee 3.0), 6LoWPAN (IPv6 header compression and fragmentation over 802.15.4), RPL (IPv6 routing protocol for low-power lossy networks — builds a DODAG using an objective function such as ETX), CoAP over UDP for REST-style data, MQTT/MQTT-SN over TCP/UDP at the gateway.
- LPWAN alternatives: LoRaWAN (chirp spread spectrum, star-of-stars via gateways, classes A/B/C, 0.3-50 kbps, km-scale range), Sigfox, and cellular NB-IoT / LTE-M (licensed, operator-run, deployed by Jio, Airtel and Vi for metering and tracking). BLE mesh, Wi-SUN, WirelessHART and ISA100.11a cover industrial and utility cases.
- Trade-off: 802.15.4/ZigBee gives mesh and low latency over short links; LoRaWAN gives long range with tiny throughput and no mesh; NB-IoT gives carrier-grade coverage with a recurring SIM cost.
MAC protocols for WSN
- Sources of energy waste at MAC: collisions, overhearing (receiving packets meant for others), idle listening, control-packet overhead, over-emitting (sending when the receiver is not ready).
- Contention-based: CSMA-CA with random backoff; the hidden-terminal problem motivates RTS/CTS, but RTS/CTS overhead is disproportionate for 20-30 byte sensor packets, so it is often dropped.
- S-MAC: fixed listen/sleep schedule shared by neighbours via SYNC packets; adds virtual clustering, message passing for long transfers, adaptive listening. Simple, but fixed duty cycle wastes energy at light load and adds latency at each hop.
- T-MAC: same framework with an adaptive active period ended by a timeout TA when no activity is heard — better under variable load; suffers the early-sleeping problem.
- B-MAC / X-MAC (preamble sampling): receivers sample the channel briefly; the sender prefixes a long preamble (B-MAC) or a strobed preamble with the target address (X-MAC) so non-target nodes sleep again. Low-power listening shifts cost to the sender.
- Schedule-based: TDMA-style TRAMA, LEACH's intra-cluster TDMA, and 802.15.4 GTS — collision-free and predictable, but need time synchronization and handle topology change poorly.
- Hybrid/industrial: TSCH (time-slotted channel hopping, standardized in IEEE 802.15.4e; it descends from TSMP, the scheme WirelessHART is built on, and is the basis of 6TiSCH) combines TDMA slots with frequency hopping for industrial reliability (>99.9% delivery).
- Z-MAC: CSMA under light load, TDMA ownership under heavy load.
Routing and data dissemination
- Flat / data-centric: Flooding (simple, suffers implosion, overlap, resource blindness); Gossiping (forward to one random neighbour — less traffic, more delay); SPIN (negotiate with ADV-REQ-DATA using metadata, avoids redundant sends); Directed Diffusion (sink floods an *interest*, gradients are set up, reinforcement selects a low-delay path); Rumor Routing (agents create event paths, queries walk until they cross one).
- Hierarchical / cluster-based: LEACH (randomized cluster-head rotation each round, CHs aggregate and transmit to sink, intra-cluster TDMA, CDMA between clusters); LEACH-C (centralized CH selection by the sink), PEGASIS (chain formed by greedy algorithm, one leader per round, token passing — less overhead, more delay), TEEN/APTEEN (hard and soft thresholds for reactive, event-driven reporting), HEED (CH election using residual energy plus intra-cluster communication cost).
- Location-based: GPSR / GAF / GEAR — forward geographically toward the destination region, keeping a grid of nodes awake in turn.
- QoS and multipath: SAR, SPEED (soft real-time), multipath routing for reliability; RPL for IPv6 WSNs with storing/non-storing modes.
- Data aggregation / fusion: combine correlated readings at intermediate nodes using SUM, MIN, MAX, AVG or compressive sensing. Reduces traffic greatly but conflicts with end-to-end encryption and makes a compromised aggregator dangerous.
- Transport: no TCP in-network; hop-by-hop reliability with ACKs; PSFQ and RMST for reliable code/image dissemination; congestion control by rate adjustment (CODA).
Coverage, localization, synchronization and security
- Coverage vs connectivity: sensing range Rs and communication range Rc are different; a common sufficient condition for a covered region to stay connected is Rc ≥ 2·Rs. Coverage types: blanket (area), barrier (intrusion lines), point/target coverage; k-coverage means every point is sensed by k nodes.
- Localization: range-based — RSSI (cheap, ±2-5 m indoors, multipath-prone), ToA/TDoA (ultrasound or UWB, cm-level), AoA (antenna array); range-free — Centroid, DV-Hop, APIT, using anchor/beacon nodes. Trilateration needs ≥3 anchors in 2-D, ≥4 in 3-D; triangulation uses angles.
- Time synchronization: needed for TDMA, TDoA ranging and event ordering. RBS (reference broadcast — receivers compare arrival times, removes sender-side uncertainty), TPSN (two-way handshake along a spanning tree, like NTP), FTSP (flooding time sync with MAC-layer timestamping and linear regression for clock skew).
- Threats and defences: eavesdropping, node capture, sinkhole, wormhole, Sybil, selective forwarding, HELLO flood and jamming/DoS. Defences use symmetric crypto (AES-128-CCM* is built into 802.15.4), key management (LEAP, pre-distribution, SPINS with SNEP+µTESLA for authenticated broadcast), secure localization and intrusion detection. Public-key crypto is possible on Cortex-M but costly on 8-bit motes.
- Indian regulatory/standards touchpoints: WPC/DoT de-licensed band notifications for 865-867 MHz; TEC (Telecommunication Engineering Centre) MTCTE mandatory testing and certification for telecom equipment sold in India; BIS registration under the Compulsory Registration Scheme for electronics; smart-meter communication under IS 16444 and NSGM/RDSS programme specifications; data handling now under the Digital Personal Data Protection Act, 2023 (rules have been phased, so verify current status). BIS has also published IoT/WSN-related standards through LITD sectional committees.
Key points
- WSN - many low-cost, energy-constrained nodes sensing a phenomenon and relaying data multi-hop to a sink.
- Energy dominates - radio TX/RX/idle listening consumes far more than computation, so communication is traded for local processing.
- Convergecast - traffic is many-to-one; the sink's one-hop neighbours form the bottleneck (energy hole).
- Data-centric addressing - queries name attributes and regions, not node IDs.
- IEEE 802.15.4 - PHY/MAC standard: 250 kbps O-QPSK at 2.4 GHz, 16 channels spaced 5 MHz apart, 127-byte frames, beacon-enabled and non-beacon modes, FFD/RFD roles.
- ZigBee vs 6LoWPAN - ZigBee adds its own network layer; 6LoWPAN carries compressed IPv6 so nodes are internet-addressable.
- Duty cycle - ratio of active to total time; the single biggest lifetime lever (1% duty cycle ≈ 100× idle saving).
- S-MAC/T-MAC - synchronized sleep schedules; T-MAC adapts the active period to traffic.
- B-MAC/X-MAC - preamble sampling (low-power listening) needs no synchronization.
- TSCH - time-slotted channel hopping gives industrial-grade reliability against interference and fading.
- LEACH - randomized cluster-head rotation with aggregation; probability p of becoming CH gives about pN clusters per round.
- PEGASIS/HEED/TEEN - chain-based, energy-aware and threshold-driven refinements of clustering.
- Directed Diffusion - interest flooding, gradient setup, path reinforcement.
- First-order radio model - transmit energy grows with d² (free space) or d⁴ (multipath), hence multi-hop beats one long hop beyond a crossover distance.
- Localization - RSSI/ToA/AoA (range-based) vs DV-Hop/Centroid (range-free); trilateration needs 3 anchors in 2-D.
- Time sync - RBS, TPSN, FTSP remove sender, round-trip and skew errors respectively.
- Attacks - sinkhole, wormhole, Sybil, HELLO flood; AES-128-CCM* in 802.15.4 provides link-layer confidentiality and integrity.
- LPWAN choice - LoRaWAN for range without mesh, NB-IoT for operator coverage, ZigBee/Thread for in-building mesh.
Formulas and examples
k = packet size (bits), d = distance (m), E_elec = electronics energy per bit (typically 50 nJ/bit), ε_fs = 10 pJ/bit/m² (n = 2, free space), ε_mp = 0.0013 pJ/bit/m⁴ (n = 4, multipath)
Log-distance RSSI model: RSSI(d) = RSSI(d₀) − 10·n·log₁₀(d/d₀) ; n = path-loss exponent (2 free space, 2.7-4 indoors)
Example 1 — Battery life from a duty cycle. A node runs on 2 AA cells, 2,500 mAh. It wakes every 60 s, stays active 300 ms drawing 25 mA, and sleeps at 6 µA.
- Duty cycle D = 0.3/60 = 0.005 (0.5%)
- I_avg = 0.005 × 25 mA + 0.995 × 0.006 mA = 0.125 + 0.00597 = 0.131 mA
- T = 2,500 / 0.131 ≈ 19,080 h ≈ 2.18 years (ignoring self-discharge and battery derating; with a 20% derate, ≈ 1.7 years).
- If the same node listened continuously at 20 mA: T = 2,500/20 = 125 h ≈ 5.2 days — a 150× difference from duty cycling alone.
Example 2 — One long hop versus multi-hop (first-order model). Send a 4,000-bit packet over 100 m, E_elec = 50 nJ/bit, ε_fs = 10 pJ/bit/m², ε_mp = 0.0013 pJ/bit/m⁴, d₀ = 87.7 m.
- Single hop (100 m > d₀, so n = 4): E = 4,000 × 50e−9 + 4,000 × 0.0013e−12 × 100⁴ = 200 µJ + 4,000 × 0.0013e−12 × 1e8 = 200 µJ + 520 µJ = 720 µJ
- Two hops of 50 m (each < d₀, n = 2): per hop TX = 200 µJ + 4,000 × 10e−12 × 2,500 = 200 + 100 = 300 µJ; relay RX = 200 µJ.
- Total = 300 (hop 1) + 200 (relay receive) + 300 (hop 2) = 800 µJ
- Conclusion: multi-hop is *not* automatically cheaper — the relay's receive cost (200 µJ here) can outweigh the saving. Multi-hop wins when the distance is larger: at 200 m, single hop = 200 µJ + 4,000 × 0.0013e−12 × 1.6e9 = 200 + 8,320 = 8,520 µJ, while two 100 m hops cost 720 + 200 + 720 = 1,640 µJ.
Example 3 — LEACH cluster heads and round energy. N = 100 nodes, CH probability p = 0.05, one round = one data frame per node.
- Expected cluster heads per round = 0.05 × 100 = 5, so about 20 nodes per cluster.
- Each round every node is CH at most once in 1/p = 20 rounds; a node's CH turn comes on average once per 20 rounds.
- Traffic to the sink: without aggregation, 100 packets reach the sink; with perfect aggregation at the CHs, only 5 packets do — a 95% reduction in long-haul transmissions.
Example 4 — RSSI ranging. A node measures RSSI = −75 dBm. Calibration: RSSI = −45 dBm at d₀ = 1 m, path-loss exponent n = 3.
- −75 = −45 − 30·log₁₀(d) → log₁₀(d) = 30/30 = 1 → d = 10 m
- Error sensitivity: a ±4 dB fading error gives log₁₀(d) = (30 ± 4)/30 → d between 100.867 = 7.4 m and 101.133 = 13.6 m — i.e. about −26% to +36%, which is why RSSI ranging is used only for coarse localization.
Example 5 — 802.15.4 airtime and channel load. A 2.4 GHz network, 250 kbps, 50 nodes each sending a 100-byte frame every 10 s.
- Airtime per frame = 100 × 8 / 250,000 = 3.2 ms; plus ACK (11 bytes ≈ 0.35 ms) and turnaround/IFS ≈ 1 ms → about 4.6 ms per exchange.
- Offered load = 50 × 4.6 ms / 10,000 ms = 2.3% channel occupancy — comfortable. At a 1 s interval it becomes 23%, where slotted CSMA-CA collisions and retries start to bite.
| Technology | Band (India) | Data rate | Range | Topology | Typical use |
|---|---|---|---|---|---|
| IEEE 802.15.4 / ZigBee | 2.4 GHz, 865-867 MHz | 20-250 kbps | 10-100 m | Mesh/tree/star | Building automation, metering |
| 6LoWPAN / Thread | 2.4 GHz | 250 kbps | 10-100 m | IPv6 mesh | IP-native IoT, lighting |
| BLE / BLE Mesh | 2.4 GHz | 125 kbps-2 Mbps | 10-50 m | Star/mesh | Wearables, beacons |
| LoRaWAN | 865-867 MHz | 0.3-50 kbps | 2-15 km | Star-of-stars | Smart meters, agriculture |
| NB-IoT / LTE-M | Licensed cellular | 20 kbps-1 Mbps (LTE-M peak) | Cellular | Star (operator) | Utility metering, tracking |
| Wi-Fi (low power) | 2.4/5 GHz | Mbps | 30-100 m | Star | Cameras, mains-powered sensors |
| Criterion | Flat routing (Directed Diffusion) | Hierarchical (LEACH) |
|---|---|---|
| Structure | No roles, gradients | Cluster heads rotated per round |
| Overhead | Interest flooding each query | CH advertisement + join each round |
| Aggregation | At any forwarding node | At cluster heads |
| Scalability | Moderate | Good for large N |
| Weakness | Flooding cost, state per interest | CH near sink drains; needs sink in radio range |
Where it is used
- Smart metering and distribution utilities: RF-mesh and LoRaWAN/NB-IoT smart energy meters under the Revamped Distribution Sector Scheme and NSGM; vendors such as Genus, Secure Meters, HPL and L&T, and system integrators for state discoms.
- Industrial and process plants: WirelessHART/ISA100 vibration, temperature and pressure transmitters in refineries and steel plants (Honeywell, Emerson, Yokogawa, ABB India); condition monitoring and predictive maintenance roles.
- Smart cities and environment: CPCB/SPCB-linked air quality monitoring nodes, street lighting controllers, water level and flood sensors, Smart Cities Mission command-and-control centres.
- Agriculture and water: soil moisture and weather nodes for irrigation scheduling (ICAR/IARI pilots, Fasal, CropIn-type platforms), canal and borewell telemetry.
- Transport, structural and defence: railway axle/track monitoring and asset tracking (RDSO/Indian Railways projects), structural health monitoring of bridges, border and perimeter intrusion barrier networks (DRDO-linked work).
- Job roles: embedded firmware engineer (802.15.4/BLE/LoRa stacks), RF and antenna engineer, IoT solution architect, protocol validation and certification engineer (MTCTE/BIS), network planning for utility AMI, and research roles at CDAC, CDOT, ISRO, DRDO and campus IoT labs.
Interview questions
- Q: Why is energy, not bandwidth, the primary design constraint in a WSN? A: Nodes are battery-powered and unattended, and the radio dominates consumption; a dead node costs coverage permanently, whereas slower data is usually acceptable for the slowly varying quantities being sensed.
- Q: Which costs more — transmitting or receiving a packet? A: They are comparable; receive and idle-listen currents are typically 60-110% of transmit current — on the CC2420 receive (18.8 mA) actually exceeds transmit at 0 dBm (17.4 mA) — which is why idle listening is the biggest avoidable waste and duty cycling matters more than reducing TX power.
- Q: How does IEEE 802.15.4 differ from ZigBee? A: 802.15.4 defines only the PHY and MAC; ZigBee adds the network layer (mesh/tree routing, addressing) and application framework on top of it.
- Q: What is the difference between beacon-enabled and non-beacon mode? A: Beacon-enabled mode uses a superframe with slotted CSMA-CA plus guaranteed time slots and lets devices sleep between beacons; non-beacon mode uses unslotted CSMA-CA with no superframe and devices poll the coordinator.
- Q: Explain LEACH in two sentences and name its main weakness. A: Nodes probabilistically elect themselves cluster heads each round, aggregate their members' data and send one packet toward the sink, with rotation to spread the energy cost. Its weaknesses are the assumption that every CH can reach the sink in one hop, no guarantee that CHs are well distributed or energy-rich, and per-round setup overhead.
- Q: Why is multi-hop forwarding not always more energy-efficient than one long hop? A: Each relay pays a receive cost plus its own electronics energy; only when the distance exceeds the crossover point, where the distance-dependent amplifier term dominates, does splitting the hop save energy.
- Q: What does 6LoWPAN actually do? A: It compresses IPv6 and UDP headers and performs fragmentation/reassembly so that IPv6 packets fit inside 127-byte 802.15.4 frames, making constrained nodes directly IP-addressable.
- Q: What is a sinkhole attack and how do you detect it? A: A malicious node advertises a very attractive route so traffic converges on it for dropping or inspection; detection relies on monitoring route-metric plausibility, geographic consistency and multipath or hop-count cross-checks, with authenticated routing messages as prevention.
- Q: How is time synchronization achieved and why is RBS accurate? A: A reference node broadcasts a beacon and receivers compare their own timestamps of the same broadcast, eliminating sender-side send/access delay — the largest and most variable source of error — leaving only receive-side uncertainty.
- Q: When would you choose LoRaWAN over ZigBee for an Indian deployment? A: When nodes are kilometres apart with tiny, infrequent payloads and no need for mesh or low latency — for example rural water or agriculture telemetry in the de-licensed 865-867 MHz band; ZigBee suits dense in-building meshes needing frequent, low-latency exchanges.
- Q: What breaks when you combine end-to-end encryption with in-network data aggregation? A: Intermediate nodes cannot read the ciphertext to aggregate it; you must either use hop-by-hop link encryption (exposing data at every relay) or homomorphic/privacy-preserving aggregation schemes.
- Q: What is the energy-hole problem and one practical fix? A: Nodes nearest the sink relay everyone's traffic and die first, partitioning the network; fixes include a mobile sink or multiple sinks, higher node density near the sink, and unequal clustering with smaller clusters close to the sink.
Common mistakes
- Treating a WSN as a small MANET — missing the convergecast traffic pattern, data-centric naming and the fact that nodes are expected to sleep most of the time.
- Assuming "more hops = less energy" without checking the crossover distance and the receive energy at each relay.
- Mixing up 802.15.4's 250 kbps raw rate with achievable application throughput, or forgetting the 127-byte frame limit when sizing payloads.
- Computing lifetime from active current only, or ignoring sleep current, self-discharge and battery derating — then promising 10-year life on paper.
- Unit slips in the radio model: nJ/bit with pJ/bit/m², bits with bytes, mAh with mA — recheck exponents before writing the answer.
- Claiming RSSI gives metre-level localization indoors; it is coarse because of multipath and shadowing, and needs calibration per environment.
- Quoting a de-licensed band's power or duty-cycle limit from memory in a design review — WPC notifications and TEC/MTCTE requirements change, so cite the current notification.
Related topics
Mobile communication: 2G to 5G · Embedded systems and microcontrollers · Computer networks and TCP/IP · Antennas and RF propagation · Internet of Things architecture and protocols · Measurements and instrumentation