Door Alarm Using Arduino

Photo of hIOTron

Made by hIOTron / Security / Sensors / IoT

About the project

Security is a major concern so we have designed a door alarm system to recognize the presence of anybody at the door.

Project info

Difficulty: Moderate

Platforms: Arduino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Tiny Breadboard Tiny Breadboard x 1
Usb A/micro Cable - 2m Usb A/micro Cable - 2m x 1
Redbot Buzzer Buzzer Redbot Buzzer Buzzer x 1
Ultrasonic Sensor Hc-sr04 Ultrasonic Sensor Hc-sr04 x 1
Arduino Mkrfox 1200 Arduino Mkrfox 1200 x 1

Software apps and online services

Arduino IDE Arduino IDE


About Project


Ultrasonic sensor HC-SR04 is utilized here to recognize the presence of any person at the door. The sensor module involves an ultrasonic transmitter, receiver as well as a control circuit. It includes two circular eyes out of which one is utilized to transmit the ultrasonic wave and the other to receive it.

( Learn more about such IoT Course )

We can estimate the distance of the object depends on the time taken by the ultrasonic waves to return back to the sensor. With the help of formula:

Distance = (Time x Speed of Sound) / 2

Trigger pin of the ultrasonic sensor is attached to pin no. 12 of Arduino and Echo pin of sensor is attached to pin no 11 of Arduino. Vcc of the sensor is attached to the 5V pin of Arduino and the GND of the sensor is attached to the GND of Arduino. One pin of the buzzer is connected to the GND of Arduino and the other pin is connected to the 8th pin of Arduino.

Working of Project

Whenever anyone comes within the range of Ultrasonic Sensor, the microcontroller recognizes the distance of the object from the sensor and if the object is within the defined range, it sends the High signal to the buzzer and buzzer will start beeping.

We can test the entire circuit by simply putting anything in front of the sensor within a specific range.


Run a program


Leave your feedback...