If what you're looking for is missing, call us — we'll help you find it

Electronics Projects

Motion-Activated Night Light

Switch a light on automatically when a PIR sensor detects movement.

Motion-Activated Night Light — main component

Overview

A PIR module signals the board when something moves; the board lights an LED for a set time.

Build Steps

  1. Build the LED branch

    Place an LED and a 220 Ω resistor on the breadboard, driven from a digital pin.

  2. Mount the PIR

    Wire to power, ground and an input. Let it settle for a minute after power-up.

  3. Write the hold timer

    Switch on at motion and off a fixed interval after the last trigger using millis().

  4. Test the field of view

    Walk through from different angles and tune the sensitivity dial.

Related Projects