← IGCSE Computer Science Paper 1

Automated systems in lighting

Lights switched on, off or dimmed by sensors and a microprocessor with no one touching a switch, e.g. a street lamp that comes on when its light sensor detects dusk.

Understanding Automated systems in lighting in IGCSE Computer Science Paper 1

What it does: A dimmer is an actuator. Setting it to a lower value makes the microprocessor dim the light instead of switching it fully on or off. At dusk the light sensor reads a low value such as 25. This is less than the stored value 30, so the condition is true and the lamp comes on. An infra-red motion sensor detects the heat given off by a moving person, so it can trigger the light without anyone touching a switch. The actuator is the output part that carries out the action. A switch or dimmer changes the lamp. The sensor is an input.

Common mistakes: The light level must be read from the light sensor, not the lamp. The lamp is the actuator that switches on. The line should be level ← lightSensor.read(). A security light needs an infra-red motion sensor to detect movement. A light sensor only measures brightness. The line should be motion ← irSensor.read().

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 580–607) and word search (Modules 553–607).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which sensor lets a street lamp switch on at dusk?
Pressure sensorLight sensor
Matches
IF lightLevel > 30 THEN streetLamp ← ON
↓
The comparison is the wrong way round. The lamp would switch on in bright daylight, because the reading is high, not at dusk when it is low.
Applying
Meanings
Term
automated lighting
Meaning
Lights switched on, off or dimmed by sensors and a microprocessor with no one touching a switch, e.g. a street lamp that comes on when its light sensor detects dusk.
Practice
WHILE TRUE DO
Testing
Gaps
IF lightLevel darkValue THEN
Check Answer
Spots
1WHILE TRUE
2 level ← lamp.read()

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

The 'Roadrunner' badge — Streak Runner, 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. Which sensor lets a street lamp switch on at dusk?
A. Light sensor ✓
B. Pressure sensor
A light sensor measures how bright it is outside. When the reading drops below the stored value, the microprocessor switches the lamp on.
2. A security light comes on when someone walks past. Which sensor detects the movement?
A. Infra-red motion sensor ✓
B. pH sensor
An infra-red motion sensor detects the heat given off by a moving person, so it can trigger the light without anyone touching a switch.
3. In an automated street lamp, what does the microprocessor do with the light sensor reading?
A. Turns it into heat to power the lamp
B. Compares it with a stored value and decides whether to switch the lamp on ✓
The microprocessor processes the data. It compares the reading with a stored value and then sends a signal to the actuator.
4. Which part acts as the actuator in an automated lighting system?
A. The switch or dimmer that turns the lamp on, off or down ✓
B. The light sensor that measures brightness
The actuator is the output part that carries out the action. A switch or dimmer changes the lamp. The sensor is an input.
5. True or false: in automated lighting, someone must press a switch each time the light changes.
A. True
B. False ✓
Automated lighting works without anyone touching a switch. Sensors send data to the microprocessor, which controls the lights.

Match the Pairs

IF lightLevel < 30 THEN lamp ← ON → A street lamp's microprocessor compares the light sensor reading with a stored value and switches the lamp on at dusk
IF motion = TRUE THEN securityLight ← ON → An infra-red motion sensor detects a person, so the microprocessor switches the security light on automatically
The actuator in an automated light is the part that changes the lamp, such as a dimmer making it less bright → dimmer ← 40
Tracing a street light at dusk: the light sensor reading falls below the stored value, so the lamp is switched on → IF 25 < 30 THEN lamp ← ON
IF lightLevel > 30 THEN streetLamp ← ON → The comparison is the wrong way round. The lamp would switch on in bright daylight, because the reading is high, not at dusk when it is low.
Smart lamp turns on only when someone presses the wall switch → This is manual control, not automation. Automated lighting uses sensors and a microprocessor to switch lights without anyone touching a switch.

Key Term

automated lighting
Lights switched on, off or dimmed by sensors and a microprocessor with no one touching a switch, e.g. a street lamp that comes on when its light sensor detects dusk.

Fill in the Blanks

1. IF lightLevel < darkValue THEN lamp ← ON ENDIF
Hint: Type the comparison operator that checks whether the light reading is lower than the stored dark value.
2. IF infraRed = TRUE THEN securityLight ← ON ENDIF
Hint: Type the state the microprocessor sends to the actuator when the infra-red sensor detects movement.
3. IF lightLevel < darkValue THEN lamp ← ON ENDIF
Hint: Type the keyword that follows the condition and starts the instructions to run.
4. IF phoneNearHome = TRUE THEN hallLight ← ON ENDIF
Hint: Type the keyword that closes the selection block for the smart home light.
5. lightLevel ← READ(lightSensor) IF lightLevel < 30 THEN lamp ← ON
Hint: Type the variable that stores the sensor reading being compared with the stored value.

Spot the Error

Question 1
A WHILE TRUE
B level ← lamp.read()
C IF level < 30 THEN
D lamp ← ON
E ENDIF
F ENDWHILE
Line B — The light level must be read from the light sensor, not the lamp. The lamp is the actuator that switches on. The line should be level ← lightSensor.read().
Question 2
A WHILE TRUE
B motion ← lightSensor.read()
C IF motion = TRUE THEN
D light ← ON
E ENDIF
Line B — A security light needs an infra-red motion sensor to detect movement. A light sensor only measures brightness. The line should be motion ← irSensor.read().
Question 3
A IF level > 30 THEN
B lamp ← ON
C ELSE
D lamp ← OFF
E ENDIF
Line A — The street lamp should switch on when it is dark, so the light level is below the stored value. With > it would come on in daylight. It should be IF level < 30 THEN.
Question 4
A level ← lightSensor.read()
B IF level < 50 THEN
C 80 ← dimmer
D ELSE
E dimmer ← 0
F ENDIF
Line C — Assignment puts the value on the right into the variable on the left. The dimmer setting must be written as dimmer ← 80, not 80 ← dimmer.
Question 5
A time ← clock.read()
B motion ← irSensor.read()
C IF time > 18 AND motion THEN
D light ← OFF
E ENDIF
Line D — In smart home lighting, the light should switch on when it is evening and the infra-red sensor detects someone. Setting it OFF defeats the purpose. It should be light ← ON.

Student with a class code? Join your class →