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).
Source: Mail Alarm