Motion Detection with SMS notification using Sim800L RTC and PIR Sensor

May 1st, 2019 by

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 (1102 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 (1102 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


Comments

2 Comments

  1. Melvin

    March 7, 2020 at 11:20 pm

    Better still what do I have to change (in the codes) if I’m to use DS3231 RTC

    Reply
  2. John

    September 22, 2020 at 2:39 pm

    Do you find a result for DS3231 RTC?
    Thanks

    Reply

Leave a Reply

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