Unit 2 of 5 · about 54 minutes
2.1 Sensors and actuators
Sensors and actuators are where the Internet of Things meets the physical world. A sensor converts something physical, such as heat, light, pressure or movement, into an electrical signal that a computer can read. An actuator does the opposite: it takes an electrical signal and turns it into a physical effect, such as moving a valve, switching on a pump or sounding an alarm. Understanding the basics of both helps you judge whether a proposed system can actually measure or control what matters.
Common types of sensor
- Environmental sensors measure temperature, humidity, air pressure, carbon dioxide, particulates or noise. They are widely used in buildings, cold chains and air quality monitoring.
- Motion and position sensors include accelerometers, which detect movement and vibration, gyroscopes, which detect rotation, and satellite positioning receivers, often called GPS, which report location outdoors.
- Presence and occupancy sensors use infrared, radar, pressure pads or simple door contacts to detect whether people or objects are present.
- Level, flow and pressure sensors monitor liquids and gases in tanks, pipes and industrial processes.
- Electrical sensors measure current, voltage and energy use, which helps track consumption and detect faults.
- Image and sound sensors, such as cameras and microphones, capture rich information but raise more privacy questions and generate far more data.
Qualities that matter
Not all sensors are equal, and the cheapest option is not always good enough. Key qualities include:
- Accuracy: how close the reading is to the true value.
- Precision: how consistent repeated readings are. A sensor can be precise but inaccurate if it is consistently wrong by the same amount.
- Resolution: the smallest change it can detect.
- Range: the span of values it can measure reliably.
- Sampling rate: how often it takes a reading. Monitoring room temperature every 15 minutes may be enough, whereas detecting faults in a fast-rotating machine may need thousands of readings per second.
- Drift and calibration: many sensors gradually lose accuracy and need periodic checking against a trusted reference.
Tip: Before buying sensors, write down how accurate the measurement needs to be for the decision it supports. A sensor that is accurate to within half a degree may be essential for vaccines and unnecessary for an office meeting room.
Actuators
Actuators include relays that switch electrical circuits, motors that open blinds or gates, solenoid valves that control water or gas flow, smart locks, and lights or sirens that signal to people. Because actuators change the physical world, mistakes can have direct consequences: a valve closed at the wrong moment, a door unlocked when it should not be, or a heater left running. Systems that control actuators therefore need safeguards, such as confirmation steps for risky actions, limits on what remote commands can do, and a safe default state if communication is lost.
Measuring the right thing
Often the quantity you care about cannot be measured directly, so a proxy is used. Footfall might be estimated from door openings; machine health from vibration and temperature; desk use from motion under the desk. Proxies are useful but imperfect. A door sensor counts openings, not people, and a vibration reading may change because a machine has been moved rather than because it is failing. Good system design is honest about these gaps and checks proxies against reality during a pilot.
Placement and environment
Where a sensor is installed matters as much as its specification. A temperature sensor near a freezer door will read differently from one at the back. An outdoor sensor may be affected by direct sunlight, rain, dust or vandalism. Industrial settings may expose devices to heat, chemicals or electrical interference. Many devices carry an ingress protection rating, shown as "IP" followed by two digits, which indicates resistance to dust and water. Check that the rating suits the location.
In practice
When reviewing a sensor-based proposal, ask four questions. What exactly is measured, and is it the real quantity of interest or a proxy? How accurate and frequent do readings need to be? Where will the sensor be placed, and what environmental conditions will it face? How will calibration be checked over time? For actuators, add a fifth question: what happens if a command is wrong, delayed or never arrives? Clear answers to these questions usually separate realistic proposals from optimistic ones.
2.2 Inside an embedded device
Most IoT devices are built around an embedded system: a small computer designed to do one job reliably, usually without a screen or keyboard. Knowing what is inside helps you understand why devices behave as they do, why battery life varies so much, and why software updates matter.
The main components
- Microcontroller. A single chip containing a processor, a small amount of memory and connections for sensors and other components. Microcontrollers are inexpensive and use very little power, but they have far less computing capacity than a laptop.
- Sensors and actuators, connected to the microcontroller, as described in the previous lesson.
- Radio or network interface, which may be built into the microcontroller or provided by a separate module.
- Power supply: mains power, a battery, or energy harvested from sources such as small solar panels or vibration.
- Firmware: the software permanently stored on the device that controls everything it does.
- Enclosure, which protects the electronics and determines where the device can be installed.
More capable devices, such as gateways, smart cameras or industrial controllers, may use a microprocessor running a full operating system, often a version of Linux. These can do more local processing but use more power and need more careful security maintenance.
Firmware and updates
Firmware determines how often a device measures, how it handles errors, how it connects and how it protects itself. Like any software, it can contain bugs and security weaknesses. Well-designed devices support over-the-air updates, often shortened to OTA, which allow new firmware to be delivered remotely. Without this, fixing a problem might mean visiting every device in person. When choosing devices, ask how updates are delivered, how they are checked to ensure they come from the genuine manufacturer, what happens if an update fails halfway, and how long the manufacturer commits to providing them.
Power: the hidden constraint
For battery-powered devices, energy is the scarcest resource. The biggest consumers are usually the radio and any sensors that need heating or active scanning. Designers save power by keeping the device asleep most of the time, waking briefly to take a reading, and transmitting only when necessary. The trade-offs are direct:
| Design choice | Effect on battery life |
|---|---|
| Reading every minute instead of every hour | Shorter |
| Sending only changes or alerts, not every reading | Longer |
| Using a low-power wide-area network instead of Wi-Fi | Usually longer |
| Operating in very cold conditions | Often shorter |
| Frequent firmware updates over the air | Shorter |
Manufacturers' battery life claims usually assume particular settings and conditions. Ask what those assumptions are and whether they match your use.
Remember: Every extra reading, transmission and feature costs energy. Battery life is a design decision, not a fixed property of the device.
Identity and provisioning
Each device needs a unique identity so that the platform knows which readings came from where and can trust them. Provisioning is the process of giving a device its identity, credentials and configuration and registering it with the platform. Good practice avoids shared or default passwords and uses unique credentials for each device, ideally stored in secure hardware on the chip. Provisioning hundreds or thousands of devices by hand is slow and error-prone, so larger deployments use automated methods.
Lifespan and end of life
Industrial devices may be expected to run for ten years or more, while some consumer devices stop receiving updates after a few years. Networks also change: some older mobile networks have already been switched off in many countries, leaving devices that depended on them unable to communicate. Plan for the full life of a device, including how it will be replaced, how its data and credentials will be wiped, and how it will be disposed of responsibly as electronic waste.
In practice
Before approving a device purchase, ask the supplier for five things: the expected battery life under your intended settings, the method and duration of firmware support, how devices are given unique credentials, the environmental rating of the enclosure, and the plan for end of life. Recording these answers in a simple comparison sheet makes it much easier to compare suppliers fairly and to hold them to their claims.
2.3 Edge computing and gateways
In the simplest IoT systems, every device sends every reading to a central cloud platform, where all processing takes place. This works well for small numbers of devices sending small amounts of data. As systems grow, or when decisions must be made very quickly, it becomes useful to process some data closer to where it is created. This is the idea behind edge computing.
What gateways do
A gateway is a device that sits between local devices and the wider network. It often has more processing power and a reliable power supply. Gateways commonly:
- translate between local wireless protocols used by sensors and the internet protocols used by cloud platforms;
- collect readings from many devices and forward them in batches;
- store data temporarily if the internet connection is lost and send it when the connection returns;
- apply security controls, such as encrypting traffic and blocking unexpected connections;
- run local rules or analytics.
Why process data at the edge
There are four main reasons to move processing closer to devices.
- Speed. Sending data to a distant data centre and waiting for a reply takes time. A safety system that must stop a machine when a person enters a hazardous zone cannot wait for a round trip over the internet.
- Bandwidth and cost. A vibration sensor sampling thousands of times per second, or a camera streaming video, produces far more data than it is sensible to send continuously. Processing locally and sending only summaries or alerts reduces network and storage costs.
- Resilience. A site that can keep operating when its internet link fails is more reliable. Local control loops, such as keeping a cold room at the right temperature, should not depend on a cloud connection.
- Privacy. Processing sensitive data, such as camera images, locally and sending only anonymous results, such as a count of people, can reduce privacy risks.
Edge and cloud working together
Edge computing does not replace the cloud. A common pattern is for the edge to handle immediate, local decisions while the cloud handles long-term storage, analysis across many sites, reporting and the training of analytical models. For example, a model that detects faulty products on a production line might be developed in the cloud using data from many factories, then installed on edge devices so that each line can inspect items instantly. The cloud then receives summaries to track overall performance.
Tip: A useful rule of thumb is to decide at the edge when speed, safety or resilience matter, and to analyse in the cloud when you need history, comparison across sites or heavy computation.
The costs of edge processing
Edge computing brings its own challenges. More computing equipment is spread across more locations, each of which must be powered, secured, monitored and updated. Software running on hundreds of gateways needs a reliable way to be deployed and managed remotely. If something goes wrong, diagnosing it may require a site visit. There is also a risk of inconsistency, with different sites running different software versions or rules. Organisations should weigh these costs against the benefits rather than assuming that edge processing is always better.
A worked example
Imagine a water company monitoring pressure in its pipes. Sensors sample pressure many times per second to detect sudden surges that can damage pipes. Sending every sample would use large amounts of data. Instead, a gateway at each pumping station analyses the samples, sends a summary every 15 minutes, and sends an immediate alert if it detects a surge. If the network link fails, the gateway stores summaries and continues to protect the pumps locally. In the cloud, engineers compare summaries across the network to identify areas where surges are becoming more frequent and plan maintenance accordingly.
In practice
For a use case you are considering, ask three questions. How quickly must a decision be made after a reading is taken? How much data will each device produce, and what would it cost to send it all? What must keep working if the internet connection is lost? If the answers involve split-second decisions, very large volumes of data or essential local operations, some form of edge processing is probably needed. If not, a simpler cloud-centred design may be easier to run.
Case study: Choosing sensors for a fruit packing warehouse
Greenacre Produce, a fictional fruit packer, wanted to reduce spoilage in its ripening rooms. A supplier proposed low-cost combined temperature and humidity sensors that would report every minute over Wi-Fi.
The quality manager asked how accurate the readings needed to be. Ripening depends on narrow temperature bands, so the team chose sensors with better stated accuracy and agreed to check them against a calibrated reference thermometer every six months. They also noticed that the rooms had thick insulated walls that weakened Wi-Fi, and that readings every minute would drain batteries quickly.
The revised design placed sensors at three heights in each room, reported every ten minutes, and sent readings over a low-power radio to a mains-powered gateway in the corridor. The gateway stored data during internet outages and triggered a local warning light if a room went out of range, so staff could respond even without the cloud dashboard. The supplier confirmed that firmware updates would be signed and supported for at least seven years.
Activity
Pick a physical quantity in your workplace that would be useful to monitor, such as temperature, occupancy, energy use or vibration. Specify the accuracy and reading frequency you would need, where the sensor would go and how it would be powered. Then decide whether any processing should happen at the edge and explain why.
Compare with a model answer
A good answer links the specification to a real decision. For example, monitoring meeting room occupancy to release unused bookings might need presence detection every few minutes, not high precision, and could use battery-powered sensors under tables, giving several years of battery life if they report only changes.
It considers placement, such as avoiding spots where sunlight or air vents could cause false readings, and mentions how readings would be checked during a pilot. It makes a reasoned edge decision: occupancy data is small and not time-critical, so cloud processing is adequate. By contrast, an answer about machine vibration should argue for edge processing, because high-frequency data is costly to send and alerts may need to be immediate. The strongest answers note a power or maintenance trade-off.
Key takeaways
- Sensors turn physical quantities into data and actuators turn commands into physical effects; actuators need safeguards because errors have real-world consequences.
- Accuracy, precision, sampling rate, placement and calibration determine whether a sensor is fit for its purpose, and many measurements are imperfect proxies.
- Embedded devices combine a microcontroller, sensors, a radio, power and firmware; secure over-the-air updates and unique device identities are essential.
- Battery life is a design decision shaped by how often a device measures and transmits and by the network it uses.
- Edge computing suits decisions that need speed, resilience, privacy or reduced data volumes, while the cloud suits history, comparison and heavy analysis.
Unit check
Create a free account to answer the check, save your progress and receive your free certificate.
Create a free account Log in