3.2 Input and output devices

Show All Section Notes
Test yourself on Input and output devices 12 questions — drag-to-order, code completion, matching and multiple choice.
Start the quiz

Sensors and Actuators

Watch this lesson Video 3.2.3 · 9:07 · Fourteen sensors, the ADC, and the control loop that has to repeat

Sensors and Actuators

Syllabus Topic 3.2: Interacting with the Real World

1. The Analogue Problem

Physical properties in the real world (light, heat, pressure) are Analogue—they are continuous and constantly changing. However, the Microprocessor is a Digital device—it only understands discrete $1$s and $0$s.

ADC
Analogue-to-Digital Converter

Converts sensor signals for the CPU.

➤ CPU ➤
DAC
Digital-to-Analogue Converter

Converts CPU commands for Actuators.

An ADC is always needed on the input side, because every sensor produces an analogue reading and the processor cannot accept one. On the output side, a DAC is needed only when the actuator requires a varying analogue signal — a motor whose speed must be adjusted, for example. An actuator that is simply switched on or off, such as a buzzer or a heater, can be driven straight from a digital output.

2. Common Sensors (Input)

A sensor is an input device that continually measures a physical property and sends the readings to a microprocessor. It measures — it does not decide anything.

SensorWhat it measuresTypical application
TemperatureHow hot or cold something isCentral heating, ovens, greenhouses, car engines
LightIntensity of light falling on itAutomatic street lights, phone screen brightness
PressureForce applied to a surfaceElectronic scales, security mats, tyre monitors
ProximityHow close an object isCar parking sensors, automatic doors
InfraredInfrared radiation, or a broken infrared beamBurglar alarms, motion detectors, remote controls
HumidityWater vapour present in the airGreenhouses, museums, air conditioning
MoistureWater content in soil or a materialAutomatic irrigation, damp detection in buildings
pHAcidity or alkalinity of a liquidSoil monitoring, swimming pools, fish tanks
GasPresence or concentration of a specific gasCarbon monoxide alarms, air-quality monitoring
FlowRate at which a liquid or gas is movingWater meters, medical ventilators, fuel systems
LevelDepth or height of a liquidFuel tanks, water treatment, washing machines
Magnetic fieldPresence and strength of a magnetic fieldDoor and window contacts in alarm systems
AcousticSound or vibrationDetecting broken glass, leaks in pipes
AccelerometerAcceleration, and change of tilt or orientationRotating a phone screen, airbag deployment, fitness trackers

3. Actuators (Output)

An Actuator is an output device that carries out a physical action based on commands from the microprocessor.

Valves: Controls the flow of liquids or gases by opening/closing.
App: Automated irrigation, Central heating systems.
Motors: Creates rotational movement.
App: Washing machines, Robot arms, Fans.
Beepers / Buzzers: Produces a sound signal.
App: Microwave "finish" chime, Alarms.
Heaters: Converts electrical energy into heat.
App: Smart thermostats, Automated greenhouses.
Pumps: Moves a liquid or gas through a system.
App: Irrigation, central heating, fish tank filters.
Lamps / Lights: Provides illumination or a visual warning.
App: Automatic street lighting, warning indicators.

4. The Role of the Microprocessor

The microprocessor is the decision maker. The sensor measures, the actuator acts, and the microprocessor is the only part that compares anything. It runs a loop that repeats continuously:

  1. Receives Digital data from the ADC.
  2. Compares this data against a Pre-set Value stored in memory.
  3. If the condition is met, it sends a signal to switch the actuator on or off — through a DAC if that actuator needs an analogue signal.
  4. The process repeats, taking new readings continuously.

That last step is not a detail. A system that checked once would not be a control system; it is the constant re-reading that keeps the property within range.

Worked example: a greenhouse kept at 25°C
  1. The temperature sensor continually measures the air temperature and sends an analogue reading.
  2. The ADC converts each reading to digital so the microprocessor can accept it.
  3. The microprocessor compares the reading with the stored pre-set value of 25°C.
  4. If the temperature is below 25°C, it sends a signal to switch the heater on. If it is above, it switches the heater off and may open a vent using a motor.
  5. The whole cycle repeats indefinitely, so the temperature is held near the pre-set value.
⚠️ Exam Tips:
  • Always state that "data from the sensor is converted to digital using an ADC so the microprocessor can understand it." This is a standard mark-scheme requirement.
  • Say that the readings are taken continuously and the process repeats. Describing a single check does not describe a control system.
  • The sensor does not decide anything and cannot switch a device on. It only measures and sends data. The microprocessor makes every comparison and every decision.
  • Name the pre-set value the reading is compared against — questions frequently award a mark for it specifically.