This project implements a finite state machine (FSM)–based smart entry light system using sensor fusion on an Arduino platform.
The system intelligently controls a porch light by combining distance sensing, ambient light detection, and temporal motion analysis.
Designed for embedded systems, robotics, and mechatronics applications.
- Finite State Machine (FSM) control architecture
- Ultrasonic distance sensing (approach vs leaving detection)
- Ambient light sensing with daylight override
- Temporal filtering to reduce sensor noise
- RGB LED lighting control
- Real-time system status displayed on I2C LCD
- Non-blocking timing using
millis()
| State | Description |
|---|---|
| IDLE | No motion detected, light off |
| APPROACH | Person detected approaching |
| ACTIVE | Light turned on |
| LEAVING | Grace period while person walks away |
| OVERRIDE | Daylight detected, system disabled |
- Arduino Uno
- HC-SR04 Ultrasonic Sensor
- LDR (Photoresistor)
- RGB LED
- I2C LCD (16x2)
- Resistors and jumper wires
- Arduino C/C++
- NewPing
- LiquidCrystal_PCF8574
- FSM design pattern
- Sensor fusion logic
This project demonstrates:
- Embedded software architecture
- State-based control systems
- Real-world sensor fusion
- Noise-tolerant embedded logic
- Hardware–software integration
Asibong Ephraim
Inspired Electrical & Computer Engineering / Computer Science / Robotics
This project includes third-party Arduino libraries (LDR, NewPing, RGBLed, LCD). All libraries are used unmodified and are distributed under their original licenses.