After completing my GSM Home Alarm V1.0 and some time of using, I decided to make some modifications.
In the hardware the main changes are the replacement of the ultrasonic sensor and the introduction of a keypad. On the software, I change the SMS notification by e-mail. Also I decided to scale down the circuit and design and 3D print a box for the circuit.
Step 1: Components
Step 2: Connect the Components
The FireBeetle ESP32 IOT Microcontroller will be the brain of this project. The big advantage is that you can get WIFI and Battery management in one very small footprint. It is powered directly from the USB port (+5V) but I also added a battery as backup power (this last one is opcional).
The keypad is connected from pin D2 to pin D8. The led is connected to pin MOSI/IO19. The PIR Sensor signal pin is connected in pin A1/IO39.
A +5V power supply (normal smartphone wall adapter) needs to be connected to the nano USB connector. One +3.7V battery can be also added as backup power.
Step 3: Pushing Box
During this project I discovered this IOT service that allows you to setup several notifications.
1 – Go to https://www.pushingbox.com and create an account.
2- Go to “My Services”
3 – “Add a service”
4 – In “Email” line, press “Select this service”.
5- Configure the email that will receive the notification.
6 – Go to “My Scenarios”
7 – Press “Test”.
8 – If everything is ok, you should get an email in you inbox.
Step 4: Code
For you to use my code, some changes are necessary.
Define your WIFI network name and password.
Copy the DEVID from “My Scenarios” on Pushingbox and paste it in the code.
Upload and open a Serial Monitor window to check if everything is working.
For activating the system just press “1234”, my default password, and the alarm will be armed in 8s (this can be also changed in the code).
Step 5: Conclusion
Comparing with my previous project, the upgrade to the PIR sensor is a big improvement. I’m getting almost none of “false, positive” alarm.
Almost in the end phase, I remember, “Why did I not used an RFID???!!!”, or better, the Bluetooth module available in the ESP32, instead of the keypad. Also the code is very basic, with a lot of opportunity’s of improvement, so I do not think that this will be my last alarm system.
Feel free to comment or send me a message if you found any mistakes, or if you have any suggestions/improvements or questions.
Source: Mail Alarm