Learn
3.2.3 | SENSORS
01 | A SENSOR IS AN INPUT DEVICE
A sensor detects a physical or chemical property and produces a signal representing it. A computer system can use that signal as input.
A temperature sensor provides information about temperature; a pressure sensor provides information about pressure. Choosing a sensor starts with identifying the quantity you need, not just the action you want to happen.
Sensors allow automatic collection of data, including continuous or repeated measurements without a person entering each reading. They are used in monitoring, control, alarms and data logging.
02 | FROM A MEASUREMENT TO A DECISION
A sensor may produce a changing analogue signal. Suitable conversion circuitry can sample and convert it into digital data using an analogue-to-digital converter (ADC). Other sensors provide digital readings or simple on/off outputs already.
Measure a quantity→PROCESSING
Apply programme rules→OUTPUT
Report or act
The sensor measures; the processor interprets and applies rules; an output device reports the result or changes the environment.
Do not say every sensor needs a separate external ADC. The conversion may be built into the sensor, or its output may already be digital.
03 | TEMPERATURE, HUMIDITY AND MOISTURE
| Sensor | Data captured | Suitable example |
|---|---|---|
| Temperature | How hot or cold something is | Room heating; refrigerator monitoring |
| Humidity | Water vapour in the air, often relative humidity | Greenhouse air monitoring |
| Moisture | Water content or wetness in material such as soil | Soil irrigation control |
A greenhouse can need all three. Temperature checks heat, humidity checks water vapour in the air, and soil moisture checks whether the growing medium needs water.
A low soil-moisture reading can trigger irrigation. An air-humidity reading alone does not establish how wet the soil is.
04 | LIGHT, INFRA-RED AND PROXIMITY
| Sensor | Data captured | Suitable example |
|---|---|---|
| Light | Light intensity | Street lighting or automatic screen brightness |
| Infra-red | Infra-red radiation or a change in received infra-red | Motion detection; beam interruption |
| Proximity | Presence / nearness of an object without contact; some provide distance | Obstacle detection; automatic tap |
A light sensor can detect darkness even when nobody is present. A proximity sensor can detect a nearby object even when the room is bright.
A passive infra-red (PIR) motion detector detects changes in infra-red from its surroundings. It does not emit a measuring beam. An active infra-red system can emit and detect radiation, for example when an object interrupts or reflects a beam.
Infra-red describes a detection technology; proximity describes a sensing purpose. An infra-red sensor can be used for proximity, so the categories can overlap. The device’s specification tells you what it reports.
05 | FLOW, LEVEL AND PRESSURE
| Sensor | Data captured | Suitable example |
|---|---|---|
| Flow | Rate of fluid passing a point | Water supply or process-pipe monitoring |
| Level | Height / fill level of fluid or material in a container | Tank filling or flood monitoring |
| Pressure | Force per unit area exerted by gas or liquid | Tyre-pressure monitoring; pipe safety |
A tank can have a high level while no water is moving through its inlet. A flow reading describes movement through the pipe; a level reading describes how full the tank is.
To stop filling at a chosen height, select a level sensor. To detect whether a pump is moving water, a flow sensor may be more useful. To check whether pressure is outside a permitted range, use a pressure sensor.
06 | GAS AND pH
| Sensor | Data captured | Suitable example |
|---|---|---|
| Gas | Presence or concentration of a specified gas | Carbon monoxide warning; air-quality monitoring |
| pH | Acidity / alkalinity of a solution | Water treatment; aquarium monitoring |
A gas sensor is not automatically able to detect every gas. A carbon monoxide detector needs a sensing method suitable for carbon monoxide.
pH 7 is neutral in the usual classroom model; lower values are acidic and higher values alkaline. A pH reading does not by itself establish that water is safe to drink, because other contamination may be present.
07 | ACOUSTIC, ACCELEROMETER AND MAGNETIC FIELD
| Sensor | Data captured | Suitable example |
|---|---|---|
| Acoustic | Sound / vibration associated with sound, such as sound level | Noise monitoring or sound-triggered events |
| Accelerometer | Acceleration along one or more axes | Movement detection; phone orientation / motion applications |
| Magnetic field | Magnetic field strength, direction or presence, depending on design | Compass sensing; magnetic door detection |
An acoustic sensor measures sound-related input; it does not produce the alarm sound. A speaker provides that output.
An accelerometer does not directly measure a GPS location or absolute speed. Its acceleration readings can support movement or tilt estimates in a suitable system.
A magnetic door sensor can detect a change when a magnet moves away as the door opens. A compass application uses magnetic-field information differently. Not every magnetic sensor reports the same kind of value.
08 | MONITORING VERSUS CONTROL
Monitoring: measure and report. A classroom noise logger records sound level over time. It may display a warning, but need not change the measured environment.
Control: measure, apply rules and issue outputs to influence a process. An irrigation controller reads soil moisture and requests a valve to open when the soil is too dry.
A data logger stores readings, often with timestamps, so changes can be reviewed. Logging alone is not the same as automatic control.
09 | FOLLOW AN IRRIGATION CONTROLLER
- A moisture sensor provides a soil reading.
- The programme compares it with the chosen threshold.
- If the reading indicates dry soil and watering is permitted, the controller requests the valve or pump to operate.
- New readings are collected as conditions change.
- The controller stops watering when the required condition is reached.
Real control designs may use separate start and stop thresholds to avoid repeatedly switching around one boundary. They also need appropriate checks for invalid readings and maximum operating time.
The moisture sensor does not pump water. The processor follows rules, while the valve actuator or pump performs the physical output.
10 | CHOOSE AND JUSTIFY
Use this pattern: quantity → sensor → reason in context.
| Requirement | Suitable sensor | Justification |
|---|---|---|
| Avoid overfilling a tank | Level | Measures how full the tank is |
| Switch street lights on in darkness | Light | Measures ambient light intensity |
| Warn about tyre pressure | Pressure | Measures the required pressure rather than temperature alone |
| Water dry soil | Moisture | Measures soil water content |
| Monitor greenhouse air dampness | Humidity | Measures water vapour in the air |
| Check solution acidity | pH | Measures acidity / alkalinity |
| Warn about a specified harmful gas | Suitable gas sensor | Detects that gas’s presence or concentration |
“Use a sensor because it is automatic” is too vague. “Use a level sensor because it measures the fill height, allowing the controller to stop filling at the target level” connects choice to purpose.
11 | READINGS HAVE LIMITS
Sensors have a measurement range, accuracy and response time. They may need calibration, suitable positioning and maintenance.
Noise, dirt, damage or environmental conditions can make a reading misleading. The system should not assume every received number is valid.
An absent reading is not the same as a genuine zero. Zero pressure, zero flow and a disconnected sensor have different meanings. How faults are identified depends on the sensor and system.
12 | COMMON MISTAKES
- Sensor equals actuator: a sensor measures; an actuator acts.
- Humidity equals soil moisture: air vapour and material water content differ.
- Flow equals level: rate of movement and fill height differ.
- Accelerometer gives exact location: it directly measures acceleration.
- Every infra-red sensor emits beams: passive and active designs differ.
- A gas sensor detects all gases: check the target gas.
- Every sensor reading is exact: range, accuracy and faults matter.