Ultrasonic motion-activated light & distance estimator built with Arduino Nano — a compact, smart system that automatically turns on a light when motion is detected, while simultaneously estimating the distance of the object on the serial monitor using an HC-SR04 ultrasonic sensor.
- Detects motion using an ultrasonic sensor (HC-SR04)
- Activates an LED or light when someone approaches
- Calculates real-time distance to the object in centimetres.
- Motion-triggered lighting
- Real-time distance display (can be seen on the Arduino serial monitor)
- Portable and beginner-friendly
- Great for smart desks, stairways, closets, or hallway automation
| Component | Quantity | Description |
|---|---|---|
| Arduino Nano | 1 | Microcontroller board for controlling the system |
| HC-SR04 | 1 | Ultrasonic sensor for motion and distance sensing |
| LED | 1 | Light that activates when motion is detected |
| Jumper Wires | - | For connecting components |
| Breadboard | 1 | Base for building and wiring the circuit |
| Resistor (220Ω) | 1 | For limiting current to the LED |
estimator-working.mp4
I love automating the tiny things that make life smoother.
This system is my take on motion-sensing activated light, and not only that— it also tells you how far the object detected is.



