Skip to content
MakerBuddy

Term 2 · Weeks 9–16

Converting physical phenomena — light, heat and motion — into data and mechanical movement. Each lesson includes its full classroom material, activity and challenge.

Learning Objective

Detect biological movement using infrared technology.

Security Sensing (PIR Motion)

Week 13 Term 2 45-60 minutes
Hardware

Hardware: HC-SR501 PIR Motion Sensor

Dashboard

Dashboard: PIR Motion Indicator Card

Theory: Passive Infrared (PIR) Sensors

From Environmental Sensing to Presence Detection

Over the past weeks, we've learned to measure light, temperature, humidity and distance - all environmental conditions. This week introduces something different: detecting living beings! The PIR (Passive Infrared) Motion Sensor doesn't measure the environment. instead, it detects the presence of warm-blooded creatures (humans, pets, etc.) by sensing the infrared radiation (heat) they emit. This opens the door to security systems, automatic lighting and occupancy detection - technologies that respond to people, not just conditions.

How PIR Sensors Work

Everything with heat emits infrared radiation - invisible light beyond the red end of the spectrum. The PIR sensor contains two pyroelectric crystals that detect changes in infrared levels. Here's the clever part: when a warm body (like a person at about 37°C) moves across the sensor's field of view, it creates a differential change between the two crystals. The sensor divides its viewing area into zones using a special Fresnel lens(the white dome you see on the sensor). When you move from one zone to another, the difference triggers detection. The sensor is "passive" because it doesn't emit anything - it only receives infrared radiation, unlike active sensors (like ultrasonic) that send out signals.

Technical Details: Detection Range and Sensitivity

The PIR sensor typically has a detection range of 3-7 meters (depending on the model) with a viewing angle of about 120 degrees. Most PIR modules include two adjustment potentiometers: one for sensitivity (how much infrared change triggers detection) and one for time delay (how long the output stays HIGH after detecting motion). The sensor outputs a simple digital signal: HIGH (motion detected) or LOW (no motion). There's typically a "lockout" period of 2-3 seconds after detection before it can trigger again, preventing constant triggering from small movements. PIR sensors work best detecting movement perpendicular to the sensor rather than directly toward or away from it.

Real-World Applications

PIR sensors are everywhere in modern security and automation! Home security systems use them to detect intruders without visible cameras. Automatic lighting in hallways, bathrooms and offices turns lights on when you enter and off when you leave, saving massive amounts of energy. Smart thermostats use PIR sensors to detect room occupancy and adjust heating/cooling accordingly. Outdoor security lights illuminate driveways when someone approaches. Occupancy sensors in commercial buildings track which conference rooms are in use. Even wildlife cameras use PIR sensors to capture photos only when animals are present, conserving battery life!

For Teachers

This lesson introduces biological sensing - detecting humans rather than environmental conditions. Emphasize the difference between "passive" (receiving only) and "active" (sending and receiving) sensors. PIR is passive while ultrasonic is active. Demonstrate the detection zone concept by having students walk at different angles relative to the sensor - perpendicular movement triggers much more reliably than approaching directly. Discuss privacy implications: PIR sensors detect presence without identifying individuals, unlike cameras. Connect to energy conservation: automatic lights can reduce electricity use by 30-50% in commercial buildings. The "Red Light, Green Light" challenge demonstrates sensor delay and helps students understand that sensors aren't instantaneous.

For Parents

Your child is learning about motion detection technology - the same technology used in home security systems, automatic doors and energy-saving lights. PIR sensors detect the infrared heat that all living things emit, allowing devices to know when people are present without using cameras or violating privacy. This technology is crucial for both security (detecting unwanted intruders) and sustainability (automatically turning off lights in empty rooms saves significant energy). Understanding motion detection helps students appreciate how "smart buildings" respond to occupancy and prepares them for careers in security technology, building automation and sustainable design.

Hands-On Activity: Motion Detection

Activity Duration: 20-25 minutes

Students will connect the PIR motion sensor, explore its detection capabilities and conduct experiments to understand detection zones, sensitivity and response time.

Step-by-Step Instructions:

  1. Identify the PIR Sensor: Find the PIR motion sensor - it typically has a white dome (Fresnel lens) covering the sensor element and three pins for connection.
  2. Locate the Connector: Find the connector labelled 18 on your MakerBuddy IoT Board.
  3. Connect the Sensor: Connect the PIR sensor to its matching labelled MakerBuddy IoT Board connector, using the connector key for correct orientation.
  4. Open the Dashboard: Navigate to your MakerBuddy web interface and locate the Motion Sensor card displaying detection status.
  5. Baseline Test: Sit perfectly still for 10 seconds. The sensor should read "No Motion Detected" (or LOW/0).
  6. Trigger Detection: Wave your hand in front of the sensor. Watch the status change to "Motion Detected" (or HIGH/1) on the dashboard.
  7. Test Detection Range: Stand at different distances (1 meter, 2 meters, 3+ meters) and move. Determine the maximum detection range of your sensor.
  8. Test Detection Angles: Move at different angles: directly toward the sensor, perpendicular (side to side) and at 45-degree angles. Which direction triggers most reliably?
  9. Observe the Delay: After triggering detection, time how long the status stays HIGH before resetting. This is the "time delay" setting on your PIR module.

What Students Should Observe:

  • Digital output: Motion status is either detected (HIGH) or not detected (LOW), no in-between
  • Perpendicular movement (crossing the sensor's field of view) triggers more reliably than approaching directly
  • Detection range typically extends 3-5 meters depending on sensor model and sensitivity settings
  • A delay period (2-5 seconds) after detection before the sensor resets and can trigger again
  • The sensor detects large movements better than small, slow movements
  • The sensor can detect through the white dome - you don't need to expose the crystals

Challenge

Your Mission: The Stealth Challenge

Can you outsmart a security sensor? Test your understanding of how PIR sensors detect motion by attempting to approach the sensor without triggering detection!

Challenge 1: Red Light, Green Light

This classic game demonstrates PIR sensor behavior perfectly:

  1. Partner A watches the dashboard Motion Sensor card
  2. Partner B starts 4-5 meters away from the sensor
  3. When Partner A says "Green Light," Partner B moves toward the sensor
  4. When motion is detected (card shows "Motion Detected"), Partner A yells "Red Light!"
  5. Partner B must freeze immediately
  6. Wait for the sensor to reset (status returns to "No Motion")
  7. Repeat until Partner B reaches the sensor (or gets caught moving during red light!)

Question: What movement strategy works best? Fast bursts or slow, smooth motion?

Challenge 2: Security System Design

You're designing a security system for a small room. Based on your testing, answer these questions:

  • Where should you place the sensor to cover the entrance effectively?
  • How many sensors would you need to cover all four walls?
  • What are the "blind spots" where someone could hide from detection?
  • Would the sensor detect someone already in the room who is sitting still?

Discussion Questions:

  • Why do PIR sensors detect motion better when you move across their field of view rather than directly toward them?
  • How does the time delay setting affect battery-powered security lights?
  • What's the advantage of PIR sensors over cameras for privacy-conscious applications?
  • Could you trigger the sensor by waving a warm object (like a heating pad) instead of moving yourself?

Bonus Challenge: Design an automatic room light that turns on when you enter and stays on for 60 seconds after the last detected motion. What components would you need? (Hint: You'll learn to build this exact system in Term 4 using automation rules!)

Key Takeaways

✓ PIR Technology

Passive Infrared (PIR) sensors detect motion by sensing changes in infrared radiation (heat) emitted by warm-blooded creatures. Unlike active sensors that emit signals, PIR sensors are completely passive, only receiving infrared energy. Two pyroelectric crystals compare infrared levels across different zones, triggering when a heat source moves from one zone to another, making them ideal for detecting human presence without invasive cameras.

✓ Heat Detection

All objects with temperature emit infrared radiation - invisible electromagnetic waves beyond visible red light. Humans at 37°C body temperature emit significant infrared energy that PIR sensors can detect several meters away. The Fresnel lens on the sensor divides the viewing area into multiple zones, amplifying sensitivity to movement. This heat-based detection works in complete darkness and doesn't require identifying individuals, making it perfect for privacy-conscious security applications.

✓ Motion Sensing

PIR sensors output a simple digital signal: HIGH when motion is detected, LOW when no motion is present. They detect movement best when objects cross their field of view (perpendicular motion) rather than approaching directly. Most PIR modules include adjustable sensitivity (how much infrared change triggers detection) and time delay (how long the output remains HIGH). Understanding these parameters is crucial for designing effective automatic lighting and security systems.

✓ Security Systems

PIR sensors form the backbone of modern security and automation systems, from burglar alarms to energy-saving occupancy detection. They provide presence detection without recording images, respecting privacy while maintaining security. Combined with automatic lighting, buzzers or relays, PIR sensors enable responsive environments that react to human presence. Commercial buildings save 30-50% on lighting costs using PIR-based occupancy sensors, demonstrating how IoT sensors create both security and sustainability.

Coming Up Next Week:

Week 14: Introduction to Motors: SG90 Servo