# Sensors in Context

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 3: Hardware & Architecture
- **Estimated Duration:** 10 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

A sensor measures a physical property and supplies data to a computer. A processor compares readings with a rule or stored threshold. An actuator then changes a physical condition. Sensors provide input; actuators provide output.

  
| Sensor | Physical property / suitable application |
| --- | --- |
| Acoustic | Sound level, such as noise monitoring |
| Accelerometer | Acceleration, such as detecting a fall |
| Flow | Rate of fluid movement through a pipe |
| Gas | Concentration/presence of a gas, such as a leak |
| Humidity | Water vapour in air, such as a greenhouse atmosphere |
| Infra-red | Infra-red radiation, such as detecting a warm body |
| Level | Height of liquid in a tank |
| Light | Light intensity, such as automatic lighting |
| Magnetic field | Magnetic field, such as a door-position detector |
| Moisture | Water content in a material, such as soil |
| pH | Acidity/alkalinity, such as nutrient solution |
| Pressure | Force per area, such as tyre pressure |
| Proximity | Presence of a nearby object, such as parking assistance |
| Temperature | Temperature, such as a freezer |

## Worked decision: irrigation

Air may be humid while soil is dry. Choose a soil moisture sensor to decide when plants need water. A humidity sensor answers a different question. Read the moisture value, compare with the required threshold, operate the valve actuator, and keep reading so watering stops when appropriate.

An analogue sensor varies continuously. An analogue-to-digital converter (ADC) converts its signal into a digital reading for the processor. A digital sensor may incorporate this conversion; do not assume every external sensor needs a separate ADC box.

## Independent application

Choose sensors for a water tank's height, its pipe's flow rate, and the acidity of its contents. Explain why one sensor cannot directly measure all three quantities.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Application: Different measurements (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Height of water in a tank: Rate of water through its pipe: Acidity of water: Water content of soil: Water vapour in air:


**Starter Code:**
```text
{"prompt":"Application: Different measurements","template":"1. Height of water in a tank: [blank_1]\n2. Rate of water through its pipe: [blank_2]\n3. Acidity of water: [blank_3]\n4. Water content of soil: [blank_4]\n5. Water vapour in air: [blank_5]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"},{"id":"blank_4"},{"id":"blank_5"}],"word_bank":["level","flow","pH","moisture","humidity","pressure","temperature","acoustic"]}
```


### Exercise 2: Transfer: Sensor selection (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Rate of change of motion: Vehicle approaching an obstacle: Change in a magnetic field: Signal conversion needed for an analogue reading:


**Starter Code:**
```text
{"prompt":"Transfer: Sensor selection","template":"1. Rate of change of motion: [blank_1]\n2. Vehicle approaching an obstacle: [blank_2]\n3. Change in a magnetic field: [blank_3]\n4. Signal conversion needed for an analogue reading: [blank_4]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"},{"id":"blank_4"}],"word_bank":["accelerometer","proximity","magnetic field","ADC","DAC","gyroscope","light"]}
```


### Exercise 3: Application: Further measurements (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Noise level: Gas leak: Infra-red radiation: Light intensity: Force per area in a tyre: Freezer temperature:


**Starter Code:**
```text
{"prompt":"Application: Further measurements","template":"1. Noise level: [blank_1]\n2. Gas leak: [blank_2]\n3. Infra-red radiation: [blank_3]\n4. Light intensity: [blank_4]\n5. Force per area in a tyre: [blank_5]\n6. Freezer temperature: [blank_6]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"},{"id":"blank_4"},{"id":"blank_5"},{"id":"blank_6"}],"word_bank":["acoustic","gas","infra-red","light","pressure","temperature","pH","level","humidity"]}
```


