Software apps and online services
In this article we will see how to make a IoT based Door Security Alarm using Blynk.
Today security is one of the prime aspect in our society. Securing our home and family is important.This is a simple but effective door security system.Parts List
This project requires simple components and modules. These are easily available in the market.
- WeMos D1 Mini x 1
- Magnetic Door Sensor x 1
- Buzzer 5V x 1
- Transistor BC547 x 1
- Resistor 330Ω x 3
- LED x 2
- 2 Pin Screw connector x 1
- Male/Female berg strip x 1 (Each)
- Dotted PCB small x 1
If you have a PCB project, you can visit the NEXTPCB website to get exciting discounts and coupons.
Only $0 for 1-4 layer PCB Prototype: https://www.nextpcb.com/pcb-quote
New customer get $100 coupons, register at: https://www.nextpcb.com/registerHow it Works?
WeMos D1 Mini wifi module constantly checks the status of magnetic door sensor. If there is a change in door sensor the alarm gets activated and buzzer beeps. IoT based Door Security Alarm will also notify you through your smartphone using blynk app.
There are two modes available to set. You can enable the alarm when you are not at home or when you think it should be enabled.
- Alarm ON – In this mode if door is opened buzzer will start beeping and you will be notified via Blynk app.
- Alarm OFF – In this mode there will be no buzzer beeps neither blynk notification.
Magnetic Door Sensor
Magnetic Door sensor is used to detect the movement of the door. These sensors are available in two types.
- Normally Open
- Normally Closed
In this project we are using normally open type.How does Magnetic Door Sensor work?
It’s very very simple.
The electrical circuit is closed when a magnet is near the switch (less than 13 mm (0.5’’) away). When the magnet is far away from the switch, the circuit is open. See the figure below.
WeMos D1 Mini
This wifi module is used to connect with internet and send data to blynk app. This also controls buzzer and Led’s as per the code.Blynk Setup
Open Blynk app and tap on New Project
Give a name of the Project, Select Device as WeMos D1 Mini, Connection Type Wi-Fi and tap on Create
You will receive an email with Auth Token. Tap on OK
Tap on + Button to add widgets Labeled Value
Add Notification Widget
Add Segmented Switch
Configure Labeled Value Setting as per below
Configure Segmented Switch Setting as per below
Configure Notification Setting as per below
Finally the complete setup
The code is simple and easy to understand. Just update the Auth Token, Network SSID and Password. You can download the code from thislink and upload the code in wifi module using Arduino IDE.
IoT based Door Security Alarm is a economical project which can be built by beginners.
This project will help you to interface magnetic door sensor with WeMos D1 Mini. Also you will be able to learn interfacing blynk to make the project IoT based.