🌙 NightSentinel
A vigilant edge-AI guardian that sees, verifies, tracks, and responds—only when its sensors agree.
đź’ˇ Inspiration
Most security systems are passive. They record an incident, send a notification, and leave the response to someone else.
We wanted to build something that felt more like a guardian than a camera: a system that actively watches its surroundings, investigates suspicious activity, tracks a person, and makes a careful decision using multiple independent sensors.
That idea became NightSentinel.
Our goal was not simply to detect motion. A tree branch can create motion. A shadow can change a camera frame. An ultrasonic sensor can produce a bad reading. Instead, NightSentinel combines radar, computer vision, distance sensing, ambient-light detection, and physical tracking before responding.
It does not blindly react to one signal. It looks for agreement.
What It Does
NightSentinel is an autonomous nighttime perimeter-monitoring system powered by an NVIDIA Jetson Nano and an Arduino Nano.
When the system detects activity:
- mmWave radar notices movement or presence.
- A servo-mounted camera begins searching the area.
- YOLO computer vision determines whether the target is a person.
- The camera locks onto and follows the detected person.
- A JSN-SR04T ultrasonic sensor verifies that the target is within the configured range.
- An LDR light sensor confirms that conditions are dark enough for nighttime operation.
- Only after these conditions agree can the Jetson authorize the deterrent strobe.
- A web-based command center displays the live annotated camera stream and system status.
The result is a system that does more than say, “Something moved.”
It asks:
Is it a person? Are they close enough? Is it nighttime? Is the system authorized to respond?
🛡️ The NightSentinel Difference
Many security projects connect a motion sensor directly to an alarm. NightSentinel uses layered verification.
A radar detection begins the investigation, but it does not automatically activate the deterrent. The final decision depends on several pieces of evidence:
- Presence from mmWave radar
- Person confirmation from YOLO
- Distance verification from the ultrasonic sensor
- Nighttime confirmation from the light sensor
- Authorization from the Jetson
- Persistent target tracking from the servo-mounted camera
This reduces false alarms and makes the system’s behavior easier to understand and control.
NightSentinel also performs its vision processing locally on the Jetson, keeping the core detection system fast, private, and functional without depending on cloud inference.
How We Built It
Edge AI and Target Tracking
The NVIDIA Jetson Nano runs a Python vision pipeline using Ultralytics YOLO. It detects people, assigns persistent tracking IDs, and calculates where a target appears horizontally inside the camera frame.
The Jetson sends steering commands to the Arduino, which moves the camera’s servo. A dead zone prevents constant tiny corrections, while smoothing and confirmation logic help the system avoid chasing momentary or unstable detections.
When the target is lost, NightSentinel resumes scanning for another person.
Sensor and Motion Control
The Arduino Nano manages the physical hardware:
- mmWave radar
- LDR light sensor
- JSN-SR04T ultrasonic sensor
- MG996R servo
- Relay-controlled strobe
The Jetson and Arduino communicate through a serial protocol. The Arduino reports structured sensor events, while the Jetson sends commands for scanning, tracking, stopping, and strobe authorization.
We also designed the strobe routine as a nonblocking state machine, allowing the Arduino to continue processing safety conditions and serial commands while the effect is running.
Safety Interlocks
The deterrent is intentionally separated from ordinary motion detection.
The strobe cannot be triggered by radar alone. It requires a confirmed person, verified range, nighttime conditions, and explicit Jetson authorization. If daylight is detected, the Arduino can reject or abort the action.
We also added a software environment switch that allows the entire vision and tracking system to operate with the strobe physically disabled during testing.
Command Center
We built a FastAPI-powered dashboard that provides:
- A live annotated camera feed
- Jetson API status
- Camera-stream status
- Safety-interlock status
- Sensor and detection events
- A custom Sentinel Signal startup animation
We wanted the interface to feel less like a generic admin template and more like the command center for a real nighttime guardian.
đźš§ Challenges We Faced
The Arduino Literally Smoked
At one point during hardware development, our Arduino began smoking.
That was the moment the project stopped being only a software challenge. We had to slow down, trace the wiring, inspect the power setup, separate high-current components from the controller, and rebuild more carefully.
It was stressful—but it permanently changed how we approached the system. We stopped treating wiring as the final step and started treating power delivery, grounding, and hardware safety as part of the architecture.
The Jetson Would Not Install Ubuntu
The NVIDIA Jetson also refused to cooperate. We spent hours trying to get Ubuntu installed, only for it to finally work the following day.
That delay cost us valuable development time, but it taught us how dependent an AI hardware project is on its environment. Drivers, operating-system versions, camera devices, permissions, and hardware interfaces all have to cooperate before a single model can run.
Making Hardware and AI Agree
Each component worked differently:
- YOLO produced detections frame by frame.
- The radar produced presence events.
- The ultrasonic sensor occasionally returned noisy distances.
- The LDR changed with ambient lighting.
- The servo needed smooth, bounded movement.
- The strobe could not interrupt the rest of the system.
The real challenge was not connecting the parts. It was designing a system in which they could communicate, disagree safely, recover, and continue operating.
Tracking a Person Who Stops Moving
Early versions detected moving people more reliably than stationary people. The servo could overshoot, continue searching, or lose the target when someone stopped moving.
We improved this using persistent tracking IDs, detection confirmation, target smoothing, a horizontal dead zone, scan interruption, and lost-target timing.
The final system can stop its sweep when it finds a person, follow them, and resume searching after losing them.
🏆 Accomplishments We’re Proud Of
We are proud that NightSentinel became a working physical system, not simply a model running on prerecorded footage.
By the end, we had:
- Real-time person detection on the Jetson Nano
- Persistent camera tracking
- A servo-mounted scanning system
- mmWave presence detection
- Ultrasonic range verification
- Functional daylight safety gating
- Jetson-authorized strobe control
- A live camera stream accessible from a laptop
- A custom web command center
- Automated tests for the serial and tracking logic
- Safe shutdown behavior that parks the servo and disables autonomous scanning
Most importantly, we built a system where the individual components cooperate as one product.
What We Learned
NightSentinel taught us that building an intelligent physical device requires more than training or running an AI model.
We learned:
- How to run computer vision on an edge device
- How to connect Python and Arduino firmware through serial communication
- How to translate camera coordinates into controlled servo movement
- How to filter noisy sensor readings
- How to design nonblocking embedded behavior
- How to stream a live annotated feed over a local network
- How to create safety interlocks across software and hardware
- How to debug under extreme time pressure
- How much a shared ground can matter
- Why smoke is a very effective debugging notification
We also learned that a reliable system should not assume every sensor is correct.
Confidence comes from corroboration.
🚀 What’s Next
Our next step is to make NightSentinel easier to deploy as a complete outdoor security platform.
Future improvements include:
- A weather-resistant enclosure
- Improved ultrasonic filtering and sensor placement
- Automatic startup services on the Jetson
- Recorded incident clips and event history
- Remote notifications
- Multiple-camera support
- Improved target re-identification
- A mobile-friendly control interface
- Configurable security zones
We would also like to integrate the Grok API as an intelligent incident-analysis layer.
Instead of sending every raw sensor update to an API, NightSentinel would first combine rapid readings into a single meaningful incident.
Grok could then produce summaries such as:
“A person was detected after dark, tracked for 14 seconds, and entered the verified proximity zone. The deterrent was activated once.”
This would transform a noisy stream of sensor values into useful, human-readable security intelligence without making an API request every second.
Built With
- NVIDIA Jetson Nano
- Arduino Nano / ATmega328P
- Ultralytics YOLO
- Python
- C++ / Arduino
- FastAPI
- OpenCV
- HTML, CSS, and JavaScript
- Logitech C920 webcam
- mmWave radar
- JSN-SR04T ultrasonic sensor
- LDR light sensor
- MG996R servo
- Relay-controlled strobe
🌟 Closing
NightSentinel began as an idea for a smarter security camera. It became a lesson in AI, embedded systems, networking, electronics, safety, teamwork, and persistence.
The Arduino smoked. The Jetson refused to install Ubuntu. The camera lost its targets. The sensors disagreed. The servo overshot.
And eventually, it all worked together.
NightSentinel does not just watch the darkness.
It verifies the threat before it answers.