Super Smart Door Alarm

by ardutronic123 in Circuits > Arduino

568 Views, 0 Favorites, 0 Comments

Super Smart Door Alarm

Super Smart Door Alarm

One of the situations that too often get on my nerves when I'm in my room is when someone comes to see me and then leaves my room without closing the door. A sore throat forced me to create a device that will scream for me. It's made very professionally and works just as great.

Idea

DSC_2148.JPG
DSC_2157.JPG
IMG_0106.JPG
DSC_2219.JPG

First, I made a short animation to show the final appearance of the device. Then I started searching the internet for the parts I needed. I found the DFPlayer Mini module, which is a module that allows you to play music files directly from the micro SD card through the built-in slot. It communicates with the microcontroller via the UART interface, i.e. pins RX and TX. I will power it with 5V. I will use Arduino Pro Mini to control this module because it is Mini. Everything will be activated by opening the door. In turn, whether the door is open will be detected by a reed switch and a magnet. Apart from that, I added a few other elements, which I later replaced with others, but first a piece of short information about the sponsor of this project:

Professionalism

DSC_2226.JPG
DSC_2217.JPG

If you do not want to create electronic circuits by connecting individual elements only using cables, you can use the contact plate. If you want to add a bit of professionalism to your projects, you can use a PCB prototype board. If you want to make electronic circuits in a professional way, PCBWay will make PCBs for you at the best quality and great price.

Unfortunately, this time I did not use their services and made my layout on a prototype PCB. Then I found the sounds I was interested in, saved them in a new folder, changed their names to numbers, and saved them on the SD card.

Programming

Untitled_Artwork.png
shot_210412_153949.png

The next step was to write the code. It should work as follows:

If the door is closed, the device is in standby mode all the time. If the system detects an open door, it starts a timer that measures the amount of time it will be open. If it is less than 30 seconds, the device will gently inform you that the door is closed. After 30 seconds, the volume level will increase slightly, and after a minute the sounds will be unbearable. It's time to turn theory into practice. Using a ready example, I created my own code that implements the above assumptions. This is how it works in practice.

Housing

shot_210412_151433.png
shot_210412_151545.png

There was also the case of housing. Using a 3D printer, iron, and frying pan, I created this amazing box that became the housing of my device. All I had to do was make holes for the loudspeaker and the power socket. Using the most durable object, I attached my professionally made device to the wall. I am not satisfied with the way I attached the magnet to the door because I used plain cardboard and some paper tape for it.

My Youtube: YouTube

My Facebook: Facebook

My Instagram: Instagram

Get 10 PCBs for only $5: PCBWay