Build your own "door alarm system" to protect your room from a thief. When someone touches the doorknob, it will sound the alarm as a screaming voice from speaker. Use the Node32s board and the authentication and notification alert through a Cloud platform such as Anto.io.
Connect Wire to DoorknobAccording to this video, We use Node32s because it has a capacitive sensor on some leg pins. It will sense the voltage when it was touched by something conductive, like your fingers. We modify it by stripping wire at the end of jumper wire. You will get the copper out and stick it to the knob. Try to test with 'TouchRead' example on ESP32 library before you program the "door alarm system," in order to find the range of threshold when you touch the copper wire at capacitive sensor pins. You can see how on the video.
The green label in this picture show capacitive sensor pins. In this video we use 'touch0' which is on GPIO04. We use GPIO16 and GPIO17 to control DFPlayer mini mp3 module. We need pin on DFPlayer module to play only one pin in one file as the description DFPlayer pins in this picture. It's ADDKEY_1, which triggers play first segment, and ADDKEY_2, which triggers play fifth segment. We need to record voice in SD Card around 5 files, but really use just only two files.
About this "door alarm system," we would like to use ADDKEY_2 to play track "please identify yourself," and ADDKEY_1 to play track "scream".
You can see more information about DFPlayer mini mp3 module from https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299
Anto.io is a cloud platform that you can use for free.You can look at the data in real time, and when the internet is lost, it will save the last value for you.
You can download the library and set in arduino ide from https://github.com/AntoIOT/anto-esp32-arduino
Step 1.After you log in to Anto.io. First, you click on 'thing' at the left side. It will display like this picture below. Then you will see the topic 'create new thing' on the top page.
When you click on "create new thing" it will ask you to create a name.
Step 2.
Click on magnifying glass (number 2), it will show the empty page. You need to click on "create new channel" on the top page.
Then it will give you the fill 'channel name' and select the type for your variable. For example, we create the name "LEDdoor". You want to control LED to on/off when someone touches the sensor. So, it needs to use type "switch". For name "Message," you want to send the message as "your room is safe". It needs to use type "string". For name "password," you want to set the number in order to identify yourself before you enter the room. You need to use type "integer".
Go to topic "key" on the left side. You will see the empty page. Click on "Create new key". One thing in the channel name has only one key.
It will display the index of channel name, which you have created and then click 'read' and 'update' in order to allow the variable to change in real time.
- Aiyarafun/LamLoei Node32S
- Speaker
- DFPlayer mini mp3 module
- SD card
- Jumper wire
- Breadboard
Comments