This project presents an embedded drowsiness monitoring system developed using a Raspberry Pi, Pi Camera, OpenCV, and an optional AI vision service. The main aim of the system is to identify signs of driver fatigue and provide immediate warning alerts through a buzzer and LED indicator. The project continuously captures camera frames and processes them locally using OpenCV-based face and eye detection techniques. When the user’s eyes remain closed for a short period, the system assumes possible drowsiness and activates the warning outputs.
The system was designed to demonstrate real-time embedded processing, camera interfacing, GPIO device control, and fault-tolerant system behaviour. Alongside the local OpenCV detection, selected image frames can also be analysed using an AI API for more advanced drowsiness recognition, including sleepy expressions and head posture analysis. However, to improve reliability, the project continues functioning locally even if the internet connection or AI service becomes unavailable.
Several hardware and software technologies were integrated during development. The Raspberry Pi acts as the central embedded controller, while the Pi Camera captures image frames every 0.5 seconds. OpenCV performs local face and eye detection, and gpiozero controls the buzzer and LED outputs connected to the GPIO pins. The project also demonstrates multithreading by allowing AI processing to run independently without interrupting continuous frame capture.
The hardware setup consists of a Raspberry Pi, Pi Camera Module, active buzzer, LED, resistor, jumper wires, and breadboard connections. The camera is connected through the CSI interface, while the buzzer and LED are connected to GPIO pins 22 and 23 respectively.
This project demonstrates how embedded systems can combine computer vision, continuous monitoring, local processing, and hardware alerts to build an intelligent real-time safety application. It also highlights the importance of backup processing and fault tolerance in embedded system design.
*This article is part of an assignment submitted to Deakin University, School of Information Technology, Unit SIT210/730 Embedded Systems Development.*





















Comments