work/project/2023-12-28

Door Open Detection System

An Arduino-based door monitoring prototype featuring ultrasonic sensing, armed/disarmed system states, and real-time alarm triggering.

Door Open Detection System was an early embedded systems prototype built while experimenting with Arduino, sensors, and real-world automation logic.

"This project introduced the idea of system states — where software logic controlled how the hardware behaved in different operational modes."

Project Overview

The system was designed as a simple door monitoring and intrusion detection prototype using an ultrasonic distance sensor. The system could be manually armed or disarmed using hardware switches and would trigger an audible alarm whenever door movement was detected while armed.

  • Manual armed/disarmed system control
  • Ultrasonic distance-based door detection
  • Visual system-state indicators using LEDs
  • Persistent alarm triggering logic
  • Real-time sensor monitoring

System States

One of the core ideas behind the project was separating system behavior into operational states. The system behaved differently depending on whether it was armed or disarmed.

Disarmed Door Detection System
Disarmed state — green LED active while monitoring systems remain inactive.
Armed Door Detection System
Armed state — ultrasonic monitoring and alarm logic become active.

Detection Logic

The ultrasonic sensor continuously measured the distance between the sensor and the door surface. If the measured distance crossed a defined threshold while the system was armed, the alarm state was activated.

cpp
if (distance < thresholdDistance && !alarmActive) {
    activateAlarm();
}

The project introduced persistent system-state handling using boolean logic — allowing the alarm to remain active until manually disarmed.

Engineering Challenges

The most difficult part of the project was balancing sensor calibration and system responsiveness. Distance thresholds had to be tuned carefully to avoid false triggers while still reacting reliably to actual door movement.

Another challenge was ensuring stable transitions between armed and disarmed states without inconsistent alarm behavior.

"Embedded systems are not just about reading sensors — they are about controlling behavior across changing states."

Circuit Architecture

Door Detection Schematic
System schematic showing ultrasonic sensing, LED indicators, manual controls, and alarm output.

The complete system was physically assembled and tested using a breadboard prototype architecture with manually wired sensor and control connections.

Technical Stack

PlatformArduino UNO
SensorHC-SR04 Ultrasonic
Control LogicArmed / Disarmed States
System TypeSecurity Prototype

Learning Outcome

This project helped me better understand how software and electronics interact together inside physical systems. It also introduced me to state-based logic design, which later became useful while working on larger software systems.

More importantly, it demonstrated how relatively simple hardware components can be combined to create practical real-world automation systems.

"Small embedded projects teach the foundations of systems thinking — inputs, states, outputs, and control."

Project Access

View Repository on GitHub

System Dependencies

Arduino UNOHC-SR04Embedded C++Breadboard Electronics

Reference UID

CPP-PROJECT-2023-DOOR-DETECTION

Data Integrity

Verified Stable / 2023-12-28

Citation Protocol

Harvard / APA / System