You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smart Guard is an AI-assisted quadruped surveillance robot that combines intelligent sensor monitoring, real-time camera streaming, and autonomous patrol capabilities. Controlled through a Flutter application over WebSocket, it operates in Manual, Scout, and Guard modes for exploration, monitoring, and security tasks.
Key Features
🤖 Quadruped walking robot
🧠 Sensor-assisted intelligence
📷 Live camera streaming
📡 Motion & presence detection
🛡️ Autonomous guard mode
🔍 Environment scouting mode
🎮 Real-time manual control
📱 Flutter mobile application
Operating Modes
Mode
Description
🕹️ Manual
Full movement control (forward / backward / left / right) via the app
🔍 Scout
Robot scans the environment using distance sensor and camera, streaming data to the app
🛡️ Guard
Automatically detects people via LD2420 and sends an instant alert with direction
Intelligent Behavior
The robot combines data from:
HC-SR04 distance sensor
LD2420 presence sensor
Camera stream
to improve environment awareness, obstacle detection,
target monitoring, and autonomous guard operations.
Hardware
Component
Model
Single-board computer
Raspberry Pi
Servo controller
PCA9685 (16-channel)
Servos
8× 180° servos + 1 scan servo
Distance sensor
HC-SR04
Presence sensor
LD2420 (OT1 / OT2)
Camera
Raspberry Pi Camera
App
Flutter (Android / iOS)
Servo Channel Map — PCA9685
Channel
Leg
Joint
Function
0
Front Left
Upper
Swing (left / right)
1
Front Left
Lower
Lift (up / down)
2
Front Right
Upper
Swing (left / right)
3
Front Right
Lower
Lift (up / down)
4
Back Left
Upper
Swing (left / right)
5
Back Left
Lower
Lift (up / down)
6
Back Right
Upper
Swing (left / right)
7
Back Right
Lower
Lift (up / down)
15
—
Scan servo
Rotate HC-SR04
All servos start at 90°. Right-side legs are automatically mirrored in firmware: angle = 180 - angle
Wiring
PCA9685 → Raspberry Pi
PCA9685
Raspberry Pi
VCC
5V
GND
GND
SDA
GPIO 2
SCL
GPIO 3
HC-SR04
HC-SR04
Raspberry Pi
VCC
5V
GND
GND
TRIG
GPIO 23
ECHO
GPIO 24 ← voltage divider (1K / 2K)
⚠️ Voltage divider on ECHO: 1K resistor between ECHO and GPIO24, 2K between GPIO24 and GND
LD2420
LD2420
Raspberry Pi
3.3V
3.3V
GND
GND
OT1
GPIO 17 (presence detected)
OT2
GPIO 27 (motion detected)
⚠️ Do NOT connect LD2420 to 5V — it runs on 3.3V only
All GND pins (Pi, PCA9685, servos, HC-SR04, LD2420) must share a common ground