← IGCSE Computer Science Paper 1

Infra-red sensor

A sensor that detects infra-red radiation, such as heat given off by people and objects, or a broken infra-red beam. Used in burglar alarms and automatic doors.

Understanding Infra-red sensor in IGCSE Computer Science Paper 1

What it does: The sensor data (heat or a broken beam) is checked, and if it shows someone is there the door actuator opens the door. An infra-red sensor detects infra-red radiation. Warm objects and people give off heat as infra-red radiation. A remote control sends infra-red signals and the TV has an infra-red sensor to receive them. A pH probe measures acidity, so it is a different sensor. With the wrong condition the burglar alarm would ring when nobody is there and stay silent when an intruder is detected.

Common mistakes: A burglar alarm that detects body heat with an infra-red sensor should sound the alarm, not open a door. Line 4 should be sound_alarm(). In an automatic door, a person breaking the infra-red beam means someone wants to go through, so the door should open. Line 3 should be open_door().

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 283–292) and word search (Modules 283–303).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does an infra-red sensor detect?
The amount of acidity in a liquidInfra-red radiation, such as heat given off by people and objects
Matches
An infra-red sensor detects visible light so it works in the dark
↓
An infra-red sensor detects infra-red radiation (heat), not visible light. It works in the dark because it senses heat, as in night vision.
Applying
Meanings
Term
infra-red sensor
Meaning
A sensor that detects infra-red radiation, such as heat given off by people and objects, or a broken infra-red beam. Used in burglar alarms and automatic doors.
Practice
REPEAT
Testing
Gaps
beamBroken = TRUE THEN
Check Answer
Spots
3 IF data = heat_detected THEN
4 open_door()

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Lion' badge — Inheritance King, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does an infra-red sensor detect?
A. The amount of acidity in a liquid
B. Infra-red radiation, such as heat given off by people and objects ✓
An infra-red sensor detects infra-red radiation. Warm objects and people give off heat as infra-red radiation.
2. Which data does an infra-red sensor in a burglar alarm capture?
A. Heat or movement of an intruder ✓
B. The humidity of the room
A passive infra-red (PIR) sensor picks up the heat given off by a person, or movement that changes the heat pattern.
3. How can an automatic door use an infra-red sensor?
A. It detects a person's heat or a broken infra-red beam and opens the door ✓
B. It measures the air pressure and slides the door open
The sensor notices a person's heat or a broken beam, sends the data to the microprocessor, and the door opens.
4. A beam of infra-red light is aimed across a doorway. What does the sensor detect when someone walks through?
A. The beam gets louder
B. The beam is broken ✓
When the beam is broken, the sensor no longer receives the infra-red light. The system treats this as movement.
5. Which of these uses an infra-red sensor?
A. A TV remote control receiver ✓
B. A pH probe in a swimming pool
A remote control sends infra-red signals and the TV has an infra-red sensor to receive them. A pH probe measures acidity, so it is a different sensor.

Match the Pairs

infra-red sensor → A sensor that detects infra-red radiation, such as the heat given off by people and objects
if infraRedSensor = HIGH then sound_alarm() → A burglar alarm that sounds when the sensor detects heat or movement from an intruder
An automatic door uses an infra-red sensor to detect a person's body heat or a broken beam, then opens → if infraRedSensor = HIGH then open_door()
The data an infra-red sensor captures is heat or movement → data ← infraRedSensor.read()
An infra-red sensor detects visible light so it works in the dark → An infra-red sensor detects infra-red radiation (heat), not visible light. It works in the dark because it senses heat, as in night vision.
if infraRedSensor = LOW then sound_alarm() → The alarm should sound when the sensor detects heat or movement (HIGH), not when nothing is detected (LOW).

Key Term

infra-red sensor
A sensor that detects infra-red radiation, such as heat given off by people and objects, or a broken infra-red beam. Used in burglar alarms and automatic doors.

Fill in the Blanks

1. IF beamBroken = TRUE THEN OUTPUT "Alarm" ENDIF
Hint: Type the keyword that starts a selection statement checking whether the infra-red beam is broken.
2. heat ← INPUT FROM infraredSensor OUTPUT heat
Hint: Type the pseudocode keyword used to take data from an input device such as a sensor.
3. IF heat > 30 THEN OUTPUT "Person detected" ENDIF
Hint: Type the comparison operator that checks whether the heat reading is greater than the limit.
4. IF beamBroken = TRUE THEN OUTPUT "Open door" ENDIF
Hint: Type the Boolean value that means the infra-red beam has been broken by a person.
5. IF motion = TRUE THEN OUTPUT "Alarm on" ENDIF
Hint: Type the keyword that sends a message to an output device when movement is detected.

Spot the Error

Question 1
A WHILE alarm_set = TRUE
B data ← read_ir_sensor()
C IF data = heat_detected THEN
D open_door()
E ENDIF
F ENDWHILE
Line D — A burglar alarm that detects body heat with an infra-red sensor should sound the alarm, not open a door. Line 4 should be sound_alarm().
Question 2
A data ← read_ir_sensor()
B IF data = beam_broken THEN
C close_door()
D ENDIF
Line C — In an automatic door, a person breaking the infra-red beam means someone wants to go through, so the door should open. Line 3 should be open_door().
Question 3
A IF light_level < 10 THEN
B turn_on_uv_camera()
C display_heat_image()
D ENDIF
Line B — Night vision cameras use infra-red radiation to see heat in the dark, not ultraviolet. Line 2 should be turn_on_ir_camera().
Question 4
A WHILE camera_on = TRUE
B heat ← read_sound_sensor()
C display_image(heat)
D ENDWHILE
Line B — Night vision needs the heat data captured by an infra-red sensor, not sound data from an acoustic sensor. Line 2 should use read_ir_sensor().
Question 5
A intruders ← 0
B IF ir_beam_broken = FALSE THEN
C intruders ← intruders + 1
D ENDIF
Line B — An intruder is detected when the infra-red beam IS broken. The condition should test for TRUE, not FALSE.

Student with a class code? Join your class →