Toddlers are naturally inquisitive, often learning to operate door latches and gates long before they comprehend the dangers of swimming pools or busy streets. Unsupervised exit events are a leading cause of childhood injury, prompting the need for proactive security systems. The Smart Gate Guard integrates low-cost photoelectric beam sensors, ultrasonic distance sensors, and edge computer vision to detect height-based anomalies and alert guardians instantly when a child attempts to exit alone.
The Danger of Unsupervised Wandering
Children aged one to five possess rapid physical development but lack risk awareness. A child can slip through an unlocked back door or a partially closed garden gate in a matter of seconds while parents are performing household chores.
Conventional burglar alarms focus on perimeter security at night, often triggering generic alerts that fail to distinguish between an adult walking into the garden and a toddler wandering toward hazard zones. A context-aware system that dynamically filters exit events based on physical attributes is essential.
Physical Attribute Filtering (Height Detection)
To avoid alarm fatigue, the system must ignore normal adult traffic and focus exclusively on child-sized targets. The Smart Gate Guard achieves this through dual-sensor fusion:
- Photoelectric Beams: Infrared emitter-receiver pairs are installed horizontally across the exit doorway at height intervals of 50cm (infant level) and 120cm (adult level). If the 50cm beam is broken while the 120cm beam remains uninterrupted, the system immediately tags the object as a child or a pet.
- Ultrasonic Height Mapping: An ultrasonic sensor (such as the HC-SR04) mounted vertically above the door frame scans downwards when the door opens. It logs the physical height of the passing subject in real-time, validating the beam sensor data.
- Computer Vision Validation: A camera running a local object detection model (YOLOv8-nano) validates the height mapping, distinguishing between a child and a family pet (such as a large dog) to prevent false alerts.
Real-Time Warning Loop
When a child-matching signature is detected passing through the exit point without an accompanying adult:
- Audible Deterrent: A local siren or warning speaker near the gate sounds a high-decibel alarm, combined with a voice command (e.g., "Stop, go back inside").
- Immediate Broadcast: The system instantly sends a high-priority push notification containing the camera snapshot directly to the guardians' mobile devices.
- Escalation: If the gate is opened and the child remains outside for more than 30 seconds, the system activates strobe lights and sends emergency VoIP calls to preset family contacts.
Technical Architecture
The Smart Gate Guard is built using modular, reliable hardware:
- Processing Unit: Raspberry Pi Zero 2 W or ESP32-S3.
- Sensors: Active infrared photoelectric beam sensors (10m range), HC-SR04 ultrasonic sensor.
- Actuators: 12V Active piezo buzzer, relay modules controlling LED strobe lights.
- Communication: Wi-Fi communicating via Home Assistant using ESPHome, providing local control and remote monitoring.