Arduino Nano Alarm Clock With PIR Sensor
by DESHBOT in Circuits > Arduino
19 Views, 0 Favorites, 0 Comments
Arduino Nano Alarm Clock With PIR Sensor
To make a simple digital alarm clock using an Arduino Nano, 16×2 LCD, buzzer, push buttons, and PIR sensor. The alarm can be stopped using either the D10 button or by detecting movement with the PIR sensor.
Supplies
Arduino Nano
16×2 LCD display
PIR motion sensor
Buzzer(inbuild)
2 Push buttons(in build)
Jumper wires
USB cable/power supply
Working
The Arduino Nano keeps track of the time using the millis() function and displays the current time on the 16×2 LCD.
The D12 button is used to set the alarm. Pressing it first selects the alarm hour, pressing it again selects the alarm minute, and pressing it a third time saves the alarm.
The D10 button is used to increase the hour or minute while setting the alarm. When the alarm is ringing, pressing D10 stops the buzzer.
The PIR sensor connected to D9 detects human movement. When the alarm is ringing, movement detected by the PIR sensor automatically stops the buzzer.
Alarm Operation
When the current time becomes equal to the programmed alarm time, the buzzer starts beeping and the LCD displays:
*** ALARM! ***
The alarm can then be stopped in two ways:
- Press the D10 STOP button.
- Move in front of the PIR sensor.
After the alarm is stopped, the alarm is disabled until it is set again.
Result
The Arduino Nano successfully works as a basic digital alarm clock. The time and alarm are displayed on the LCD, and the buzzer provides the alarm sound. The alarm can be stopped either by pressing the button or by detecting movement through the PIR sensor.