An open-source, low-cost prototype circuit that detects eye blinks to control IoT devices hands-free.
- Dual-Input Control - supports both bio-potential (blink) and manual (push-button) inputs with a priority-based logic system.
- Active Noise Cancellation to reject 50Hz mains hum and RF interference.
- Use it to control smart devices, play games, detect drowsiness.
| Component | Description |
|---|---|
| Microcontroller | ESP32 (DOIT DevKit V1) |
| Instrumentation Amplifier | AD620 |
| Op-Amp | LM324N (optional) |
| Electrodes | Standard Ag/AgCl wet ECG/EOG electrodes |
| Feedback | LED (visual), Buzzer (audio) |
| Communication | Bluetooth Low Energy (BLE) – HID Keyboard |
led_eye_blink.ino– LED on/off with blinksdual_toggle.ino– use eye-blink or a push button (higher priority)drowsiness_detector.ino– blink-duration based safety systemuser_admin_blinks.ino– FreeRTOS-based admin/user priority control
- Place EOG electrodes as shown above.
- Upload
eog_plotterto calibrate baseline and trigger level. - Update threshold values in the desired application code.
- Upload the target sketch and power the ESP32.
- Set the trigger threshold slightly below the blink peak to ensure reliable detection.
| Circuit Schematic | PCB Layout |
|---|---|
![]() |
![]() |
Due to the use of low-cost analog components, the system remains susceptible to noise and motion artifacts.
The analog front-end is designed to attenuate these effects through filtering and proper biasing, though complete elimination is not possible at this stage.



