Infra-red sensor

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Infra-red sensor

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

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
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
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
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
5. Which of these uses an infra-red sensor?
A A TV remote control receiver
B A pH probe in a swimming pool

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

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

Definitions

infra-red sensor

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
__ beamBroken = TRUE THEN OUTPUT "Alarm" ENDIF
2.
heat ← _____ FROM infraredSensor OUTPUT heat
3.
IF heat _ 30 THEN OUTPUT "Person detected" ENDIF
4.
IF beamBroken = ____ THEN OUTPUT "Open door" ENDIF
5.
IF motion = TRUE THEN ______ "Alarm on" ENDIF

Spot the Error

Shade in the letter of the line that contains an 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
Question 2
A data ← read_ir_sensor()
B IF data = beam_broken THEN
C close_door()
D ENDIF
Question 3
A IF light_level < 10 THEN
B turn_on_uv_camera()
C display_heat_image()
D ENDIF
Question 4
A WHILE camera_on = TRUE
B heat ← read_sound_sensor()
C display_image(heat)
D ENDWHILE
Question 5
A intruders ← 0
B IF ir_beam_broken = FALSE THEN
C intruders ← intruders + 1
D ENDIF

Answer Key

Infra-red sensor
Section A: Quick Questions
Q1
B — Infra-red radiation, such as heat given off by people and objects
Q2
A — Heat or movement of an intruder
Q3
A — It detects a person's heat or a broken infra-red beam and opens the door
Q4
B — The beam is broken
Q5
A — A TV remote control receiver
Section B: Match the Pairs
Q1
infra-red sensor → A sensor that detects infra-red radiation, such as the heat given off by people and objects
Q2
if infraRedSensor = HIGH then sound_alarm() → A burglar alarm that sounds when the sensor detects heat or movement from an intruder
Q3
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()
Q4
The data an infra-red sensor captures is heat or movement → data ← infraRedSensor.read()
Q5
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.
Q6
if infraRedSensor = LOW then sound_alarm() → The alarm should sound when the sensor detects heat or movement (HIGH), not when nothing is detected (LOW).
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
IF beamBroken = TRUE THEN OUTPUT "Alarm" ENDIF
Q2
heat ← INPUT FROM infraredSensor OUTPUT heat
Q3
IF heat > 30 THEN OUTPUT "Person detected" ENDIF
Q4
IF beamBroken = TRUE THEN OUTPUT "Open door" ENDIF
Q5
IF motion = TRUE THEN OUTPUT "Alarm on" ENDIF
Section E: Spot the Error
Q1
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().
Q2
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().
Q3
B — Night vision cameras use infra-red radiation to see heat in the dark, not ultraviolet. Line 2 should be turn_on_ir_camera().
Q4
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().
Q5
B — An intruder is detected when the infra-red beam IS broken. The condition should test for TRUE, not FALSE.