Project objective
In this project, we build a simple magnetic door/window alarm using:
- Reed switch
- Magnet
- Q1 and Q2 – 2N2222A NPN transistor
- Active Crystal buzzer
- LED 1 – RED
- R1 and R2 1 kΩ resistors
- R3 – 10 KΩ resistors
- 5V power supply
The magnet activates the reed switch, which turns ON the transistor. The transistor then switches both the buzzer and LED.
Circuit Diagram


In version 2 we invert our signal and achieve practical scenario of turning the buzzer on when door is open.
For a practical demonstration view my youtube video from the below link.
