Magnetic field sensor
An input device that detects the presence and strength of a magnetic field. Used in door alarms, compasses, wheel speed counters and metal detectors.
Understanding Magnetic field sensor in IGCSE Computer Science Paper 1
What it does: When the door opens, the magnet moves away and the field strength drops, so the alarm is triggered. Metal near the detector changes the magnetic field, and the high reading makes the output device beep. A magnetic field sensor captures magnetic field strength. Light sensors are the ones that measure brightness. Each time the magnet passes the sensor it gives a signal. The microprocessor counts the signals per second to calculate speed. Sensors capture data from the environment and send it as input. Output devices such as screens are what display information. This is the name of the sensor and describes what it detects, which is the core idea of the module.
Common mistakes: When the door opens, the magnet moves away and the sensor reads a weak field. The alarm must turn ON, so the line should be alarm ← ON. A strong field means the magnet is next to the sensor, so the window is closed. This line should output "Window closed".
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
magnetic field sensorFill in the Blanks
Spot the Error
Student with a class code? Join your class →