Internet of Things,  Tutorials

Motion Detection with SMS notification using Sim800L RTC and PIR Sensor

In this tutorial, we will learn how to connect Real-time clock, PIR Sensor and SIM800L module to send us a notification whenever motion is detected. This is a great way to monitor if unauthorize person/burglar enters your house.

Demonstration

 

Requirements

Arduino

Sim800L GSM Module

DS1302 Real-time Clock Module 2

DS1302.zip (10 downloads) Library

PIR Sensor

Jumper Wires

Breadboard

 

Pin Wiring

GSM Module

VCC5V
GNDGND
RXDigital Pin 2
TXDigital Pin 3

RTC Module

VCC5V
GNDGND
CLKDigital Pin 4
DATDigital Pin 5
RSTDigital Pin 6

PIR Sensor

VCC5V
GNDGND
OUTDigital Pin 13

 

Installing the Library

Open up your Arduino IDE. Click on “Sketch -> Include Library -> Add .ZIP Library” and browse your downloaded DS1302.zip (10 downloads) Library.

 

Sourcecode

Upload the following source code to your Arduino.

Change the YY to your country code proceeding with your number. (e.g 914564321) where 91 is country code for India, followed by 10 Digit code.

 



If you have not set the time in your RTC module, you can uncomment and change the values. Follow the form

 

Screenshot

 

If you like this tutorial, please share by clicking the social media icons below 🙂

If you have inquiries, feel free to comment down below.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *