Inside a Sensor Node: The Five Units
Chapter Seven
Syllabus topic Module 1, "Introduction and Overview of WSNs: Sensor node technology"
Pages 39 to 44 of 862
In one line
A sensor node is five units on one small board: a sensing unit that turns the physical world into numbers, a microcontroller that decides what to do with them, a radio that talks to the neighbours, a memory that holds the program and the data, and a power unit that keeps the other four alive.
In the wording a student can write in an examination: the hardware of a sensor node consists of (1) a sensing unit, made of one or more sensors and an analogue-to-digital converter (ADC); (2) a processing unit, usually a microcontroller, which runs the node's software and controls the other units; (3) a transceiver, the radio that sends and receives packets; (4) memory, the microcontroller's RAM and flash and often an external flash chip for logged data; and (5) a power unit, a battery with a voltage regulator, sometimes helped by an energy-scavenging power generator. Application-dependent units may be added: a location finding system and a mobilizer. Akyildiz and colleagues count four basic units, because they treat memory as part of the processing unit.
Why every unit is chosen for energy first
The node's job is to last. In [The Challenges of Wireless Sensor Networks] the radio alone, left listening, emptied a battery in under a week. So the question asked of every part on the board is not how fast is it? but how little can it draw, how deeply can it sleep, and how quickly can it wake? The same questions run through each unit below, and the practical's phrase, "energy-constrained environments", is the reason.
Figure 7.1 The block diagram of a sensor node
Unit 1: the sensing unit
What it is. A sensor (also called a transducer) converts a physical quantity into an electrical signal: a thermistor's resistance changes with temperature, a photodiode's current with light, a microphone's voltage with sound. Most sensors produce an analogue signal, a voltage that varies continuously. The ADC samples that voltage and turns it into a number the microcontroller can use. Between the two there is usually some signal conditioning, an amplifier or a filter that brings the signal into the ADC's range.
Two properties of the ADC that matter.
- Resolution, the number of bits in each result. The MSP430F1611's ADC has 12 bits, so it divides its input range into 2 to the power 12, which is 4,096, steps. Over a range of 0 to 2.5 volts each step is 2.5 / 4,096 of a volt, about 0.61 millivolts.
- Sampling rate, how many readings a second. A burrow's temperature needs one a minute; the volcano network of the previous chapter needed 100 a second.
Inside a Sensor Node: The Five Units
Its energy. Most simple sensors draw little, but some draw a lot: a gas sensor has to heat its element, and an active sensor such as an ultrasonic range finder transmits a pulse. The rule the software follows is the same as for the radio: power the sensor only when a reading is due.
Unit 2: the processing unit
What it is. A microcontroller (MCU) is a small processor with its memory and its input and output devices on the same chip: timers, an ADC, serial interfaces (UART, SPI and I2C, the three ways chips on a board talk to each other). It runs the node's operating system and application, decides when to sense, what to send and when to sleep, and runs the network protocols.
Why a microcontroller and not something else. A desktop processor is far too hungry. A digital signal processor is faster at arithmetic on signals but draws more. An FPGA (a reconfigurable chip) or an ASIC (a chip designed for one job) can be very efficient but is costly to design and hard to change. The microcontroller wins for most nodes because it is cheap, reprogrammable and above all sleeps deeply and wakes fast.
A real one. The Telos mote, designed at Berkeley and described in 2005, chose the Texas Instruments MSP430 after comparing parts from several makers, because it had the lowest power in both sleep and active modes. The MSP430F1611 on it is a 16-bit processor with a 125-nanosecond instruction cycle, 10 kB of RAM and 48 kB of flash. It moves from standby, at about 1 microampere, to full speed in no more than 6 microseconds.
Why wake-up time matters. A node spends almost all its time asleep and wakes for a few milliseconds at a time. If waking takes as long as the work, half the energy goes on waking. The Telos authors put the whole design principle in one sentence: the node "is asleep for the majority of the time, wakes up quickly on an event, processes, and returns to sleep".
Why the lowest working voltage matters too. Two AA cells in series start at about 3 volts and are exhausted at about 1.8 volts. The MSP430 runs down to 1.8 volts, so it uses the whole battery. The ATmega128 used on the earlier Mica2 motes stops at 2.7 volts, which the Telos paper says leaves "almost 50% of the AA batteries unused".
Unit 3: the transceiver
What it is. The radio: it modulates bits onto a carrier to send them and demodulates received signals back into bits (both explained in [Modulation: ASK, FSK and PSK]). It has an antenna, often printed on the circuit board itself, as on Telos.
Inside a Sensor Node: The Five Units
A real one. The Texas Instruments (originally Chipcon) CC2420 is an IEEE 802.15.4 radio for the 2.4 GHz band, sending 250 kbps and receiving signals as weak as -95 dBm (the unit is explained in [Radio Technology in WSNs: The Sensor Radio and Its Link Budget]). It has 128-byte buffers for one received and one outgoing frame, so the microcontroller can hand over a whole packet and go back to sleep while the radio sends it.
Its energy. The transceiver is the most expensive unit on the board: on the CC2420 it draws 18.8 mA receiving and 17.4 mA transmitting, against a third of a milliampere for the processor. Its states and the cost of moving between them are the subject of the next chapter.
Unit 4: memory
What it is. Three kinds, each for a different job.
- RAM, inside the microcontroller: fast, lost when power is lost, and tiny (10 kB on the MSP430F1611). It holds the running program's variables, the packet being built, the routing table.
- Program flash, inside the microcontroller: keeps its contents without power, holds the program (48 kB on the MSP430F1611).
- External flash, a separate chip for logged readings, and on some motes for a new program image received over the air. Telos carries an ST M25P80, which holds 1,024 kB. The volcano network in [Applications of Wireless Sensor Networks] stored its samples in flash in 256-byte blocks.
Its energy. Reading flash is cheap; writing and erasing it costs far more, and flash wears out after many erase cycles. So a node logs data in large blocks rather than byte by byte.
Unit 5: the power unit
What it is. The battery (almost always), a voltage regulator or converter that gives the other units the steady voltage they need, and sometimes a power generator that scavenges energy from the surroundings, such as a small solar cell. The survey calls the power unit "one of the most important components of a sensor node".
Its role. Everything else is designed around it. A node's lifetime is its battery's energy divided by its average power, so the power unit sets the lifetime and the other four units' job is to keep the average power low. Batteries, their real capacity and energy scavenging are in the next chapter, and the lifetime arithmetic in [How Long a Node Lasts: The Energy Budget Worked Out].
The optional units
The survey names three units that some applications add.
- Location finding system, for example a GPS receiver, because many routing schemes and most sensing tasks need to know where a reading came from. It is expensive in money and energy, so most nodes estimate their position from their neighbours instead, as [Time Synchronisation and Localisation] explains.
- Power generator, a solar cell or other scavenger.
- Mobilizer, which moves the node, for example a robot base. Rare, and used when the network must reposition itself to carry out its task.
Inside a Sensor Node: The Five Units
Worked example: the block diagram of the vineyard node
Meera's vineyard node, from [What a Wireless Sensor Network Is], measures soil moisture and temperature every 15 minutes. Here is its block diagram as a table of the five units, and what each is doing in each part of its 15-minute cycle.
| Unit | Part chosen | During the 60 ms it is awake | During the rest of the 15 minutes |
|---|---|---|---|
| Sensing unit | Moisture probe (analogue) and temperature sensor, 12-bit ADC | Powered, one reading each | Switched off |
| Microcontroller | MSP430-class, 10 kB RAM | Reads, builds the packet, runs the protocol | Standby, timer running |
| Transceiver | 802.15.4 radio at 250 kbps | Sends the packet, waits for the acknowledgement, forwards a neighbour's packet | Powered down |
| Memory | RAM for the packet; flash logs every reading | One write to flash | Retains contents |
| Power unit | Two AA cells, regulator | Supplies peak current | Supplies microamperes |
The analysis the practical asks for, unit by unit.
- Sensing unit: its energy is small because it is on for milliseconds; a heated gas sensor would change that completely.
- Microcontroller: its active current matters less than its standby current and its wake-up time, because it is in standby for more than 99 per cent of the time.
- Transceiver: the largest current by far; everything the protocols do is aimed at shortening the time it is on.
- Memory: the reason the node can log data it could not send at once, for example while a neighbour is down.
- Power unit: sets the lifetime; it must work down to the lowest voltage the other units accept, so no energy is stranded in the battery.
The fraction of time awake. Awake for 60 milliseconds in every 15 minutes, which is 900,000 milliseconds, the node is awake for 60 / 900,000 of the time, about 0.0067 per cent. That fraction is called the duty cycle, and it is what makes a season on two AA cells possible.
A short history of real nodes
The Telos paper traces the Berkeley family, and the direction of travel is the lesson.
| Mote | Year | Microcontroller | RAM | Radio, data rate | Modulation |
|---|---|---|---|---|---|
| WeC | 1998 | AT90LS8535 | 0.5 kB | TR1000, 10 kbps | OOK |
| Mica | 2001 | Atmel, 128 kB flash | 4 kB | TR1000, 40 kbps | ASK |
| Mica2 | 2002 | ATmega128 | 4 kB | CC1000, 38.4 kbps | FSK |
| Telos | 2004 | TI MSP430 | 10 kB | CC2420, 250 kbps | O-QPSK |
Memory grew, radios got faster and moved to the standard 802.15.4, and the sleep current and wake-up time fell. The Mica2 took up to 4 milliseconds to wake; Telos takes 6 microseconds. MicaZ, the Mica family's successor, kept the Mica2 design but replaced its radio with the CC2420. Many later designs put the microcontroller and the radio on one piece of silicon, but the five units are still there, only closer together.
Inside a Sensor Node: The Five Units
Distinctions
| Microcontroller | Transceiver | |
|---|---|---|
| Does | Computes, controls, runs the protocols | Sends and receives bits over the air |
| Current on the Telos parts | About 0.33 mA active | 17.4 to 18.8 mA |
| What matters most | Standby current and wake-up time | Time spent on, and switching cost |
| RAM | Program flash | External flash | |
|---|---|---|---|
| Keeps data without power | No | Yes | Yes |
| Holds | Variables, packets, tables | The program | Logged readings, new program images |
| Size on Telos | 10 kB | 48 kB | 1,024 kB |
What it does not mean
Four units or five is not a contradiction. The survey's four put memory inside the processing unit; the practical's five list it separately. Say which you are using and name every part either way.
The sensor is not the whole sensing unit. The ADC, and usually a conditioning circuit, belong to it too.
The fastest processor is not the best one. A node's processor is judged by how deeply it sleeps and how quickly it wakes, because it is asleep nearly all the time.
A location finding system is not standard equipment. It is optional, and most networks avoid GPS on every node because of its cost and energy.
Quick revision
- Five units: sensing unit (sensor, conditioning, ADC), microcontroller, transceiver, memory, power unit; optional location finding system, power generator, mobilizer. The survey counts four (memory inside processing).
- 12-bit ADC: 4,096 steps; over 2.5 V, about 0.61 mV a step.
- MSP430F1611: 16-bit, 10 kB RAM, 48 kB flash, standby about 1 microampere, wake-up within 6 microseconds, runs down to 1.8 V.
- CC2420: 802.15.4, 2.4 GHz, 250 kbps, -95 dBm, 128-byte buffers; 18.8 mA receive, 17.4 mA transmit.
- Design principle (Telos): asleep most of the time, wake quickly, process, sleep again.
- The vineyard node's duty cycle: 60 ms in 15 minutes, about 0.0067 per cent.
Test yourself
1. Draw the block diagram of a sensor node and explain each unit. The figure: the sensing unit (sensor and ADC) converts the physical quantity to a number; the microcontroller processes it and controls the node; the transceiver sends and receives packets; memory holds the program, variables and logged data; the power unit supplies all of them. Optional units: location finding system, power generator, mobilizer.
2. Why is a microcontroller used as the processing unit? It is cheap, reprogrammable, has memory and interfaces on one chip, and above all sleeps at microamperes and wakes within microseconds, which matters more than speed for a node that is asleep nearly all the time.
Inside a Sensor Node: The Five Units
3. A node's 12-bit ADC measures 0 to 2.5 volts. What is the size of one step? 2.5 / 4,096 volts, about 0.61 millivolts.
4. Why did the Telos designers care that the MSP430 runs down to 1.8 volts? Because two AA cells in series are exhausted at about 1.8 volts. A processor that stops at 2.7 volts, like the ATmega128, leaves almost half of the batteries' energy unused.
5. Which unit uses the most energy, and what follows for the design? The transceiver: on the CC2420 about 17 to 19 mA when on, against about 0.33 mA for the processor. So the node must keep the radio off as much as possible and compute more in order to send less.
The rest of this subject
These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.