HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Input Devices, Output Devices and Sensors
  1. 1Input devices
  2. 2Output devices
  3. 3Sensors and choosing the right one
  1. Computer Science
  2. /Input Devices, Output Devices and Sensors
  3. /Sensors and choosing the right one

Course 3.2·Lesson 3 of 3

Sensors and choosing the right one

A sensor is an input device that measures something in the world around it. This lesson goes through the fourteen sensors of the syllabus, the data each one captures and where it is used. You then practise choosing the most suitable sensor for a task.

about 25 min1 simulation1 practice question
Lesson 3 of 3Show all lessonsHide
Input Devices, Output Devices and Sensors
  1. 1Input devices
  2. 2Output devices
  3. 3Sensors and choosing the right one

Try the code and the simulations beside the lesson.

What a sensor is

How does a street light know when it is getting dark? It has a light sensor. A sensor is an input device that measures a physical quantity, such as light, temperature or pressure, and sends the reading to a computer or a microprocessor.

The purpose of a sensor is to let a system monitor the world, or control something in it, without a person taking the readings. A sensor only measures. It never decides and never acts. The microprocessor compares each reading with a stored value and decides what to do. Then it sends a signal to an actuator, which acts.

A loop of four boxes joined by arrows: a sensor sends a reading to a microprocessor, the microprocessor compares it with a stored value and sends a signal to an actuator, the actuator changes the world, and the change is measured again by the sensor.

The picture shows the loop. The sensor sends a reading to the microprocessor. The microprocessor sends a signal to an actuator. The actuator changes the world, and the sensor measures the change.

The fourteen sensors

For each sensor, learn what it measures and one place where it is used.

  • Acoustic: sound. It hears breaking glass in a burglar alarm, or measures noise near a road.
  • Accelerometer: acceleration, a change in speed or direction, and tilt. It turns a phone screen round, and detects a crash to fire a car's airbag.
  • Flow: how fast a liquid or a gas moves through a pipe. It measures water use, or fuel going into an engine.
  • Gas: the amount of a particular gas, such as carbon monoxide or carbon dioxide. It is used in gas alarms and pollution monitoring.
  • Humidity: the amount of water vapour in the air. It is used in greenhouses and in museums that protect old paintings.
  • Infra-red: infra-red radiation, such as the heat given off by a person, or a beam that is broken. It detects intruders and counts people at a door.
  • Level: how high a liquid or a material is in a container. It warns when a tank is nearly empty or a river is too high.
  • Light: how bright the light is. It switches on street lights, and adjusts the brightness of a phone screen.
  • Magnetic field: a magnetic field and changes in it. It is used in the compass of a phone, and to find a car waiting at traffic lights.
  • Moisture: how much water is in a material such as soil. It tells an automatic watering system when to water.
  • pH: how acidic or alkaline a liquid or soil is. It monitors a fish tank, a swimming pool or a river.
  • Pressure: a force pressing on it, or the pressure of a gas or liquid. A pressure pad in a floor detects a footstep. It also measures tyre pressure.
  • Proximity: how close an object is, without touching it. Car parking sensors use it. A phone turns its screen off when it is held near your ear.
  • Temperature: how hot or cold something is. It is used in central heating, fridges, ovens and greenhouses.

Choosing the most suitable sensor

An examination often gives a situation and asks for the best sensor. Ask one question: what physical quantity must be measured? Then choose the sensor that measures exactly that.

  • The soil in a plant pot is dry. That is water in soil, so use a moisture sensor. A humidity sensor measures water vapour in the air, which is the wrong thing.
  • Water must not overflow a tank. That is the height of the water, so use a level sensor. A flow sensor measures how fast water moves, not how high it is.
  • A car must stop before it hits a wall. That is distance to an object, so use a proximity sensor.

Some systems need more than one sensor. A greenhouse may use temperature, humidity, light and moisture sensors together.

Practise with new numbers

Try it in Python

The program plays the part of the microprocessor in a greenhouse. It compares each temperature reading with two stored values and prints what should happen.

Read it first. Then run it. At which times is the window opened?

1. Change heater_below = 16 to 18. Predict how many readings now switch the heater on.

2. Add a reading of 12 to the end of the list. What does the program print for it?

Common mistakes

  • Saying the sensor switches the heater on. The sensor only measures. The microprocessor decides and the actuator acts.
  • Mixing up humidity and moisture. Humidity is water vapour in the air. Moisture is water in a material such as soil.
  • Mixing up level and flow. Level is how high. Flow is how fast it moves.
  • Choosing infra-red for distance. To measure how close an object is, choose a proximity sensor.

Remember these

  • A sensor measures a physical quantity and sends the reading on. It does not decide or act.
  • Learn the data each of the fourteen sensors captures, with one use.
  • To choose a sensor, name the quantity that must be measured, then pick the sensor for exactly that.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. What does a humidity sensor measure?
  1. Which sensor would tell a phone that it has been turned on its side?
  1. A swimming pool system must check that the water is not too acidic. Which sensor should it use?
  1. Why is a flow sensor the wrong choice for warning that a water tank is full?
  1. In a burglar alarm, which part decides to sound the siren: the sensor or the microprocessor?

References

  • Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), section 3.2 Input and output devices, outcome 3: sensors, the data they capture and choosing a sensor.

Enroll free in Input Devices, Output Devices and Sensors

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (2)

An engineer is choosing sensors for five systems…Medium · High School (9–10) · by StemPy Lab
A greenhouse temperature sensor sends a reading every 10 minutes…Hard · High School (9–10) · by StemPy Lab

Python Labs (1)

That was the last lessonBack to the course: take the test
← Input Devices, Output Devices and Sensors
← Output devicesNext →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A greenhouse controllerPython Lab · by StemPy Lab

Question Sets (1)

Devices and Sensors: Concept Check10 questions · by StemPy Lab

Notes (1)

Input Devices, Output Devices and Sensors: Quick RevisionNote · by StemPy Lab