Required Components
The ESP32 development board serves as the main controller of the Smart Door Alarm. It receives the signal from the magnetic reed switch and determines whether the door is open or closed. A USB cable is used to connect the ESP32 to a computer for programming through the Arduino IDE.
The magnetic reed switch and magnet work together as the door-position sensor. The reed switch is mounted on the door frame while the magnet is attached to the door. When the door is closed, the magnet keeps the reed switch in its normal state. When the door opens, the magnet moves away and the switch changes state.
The buzzer and LED provide audible and visual indications when the door is opened. The buzzer produces an alarm sound, while the LED lights up to show that the alarm has been triggered. A 220Ω resistor is connected in series with the LED to limit current and protect it from excessive electrical current. A breadboard and jumper wires are used to assemble the circuit without soldering, making the project easy to build, test, and modify. A computer with Arduino IDE is required to write, upload, and test the ESP32 program that controls the door alarm system.