Arduino PIR Motion GSM Alarm

14,865

80

13

Introduction: Arduino PIR Motion GSM Alarm

When the HCSR501 motion sensor detect motion, the arduino send a char with bluetooth (HC05/06) to the android phone.
When the android received char "1" from arduino, make a call to your phone.

The android phone can hide anywhere in the range of the arduino bluetooth.

The app work when screen turned off.

Step 1: The Arduino Connection

Part list:

Arduino (im used nano)

HC-SR501 PIR motion sensor

Bluetooth module (HC05/06)

Bradboard.

Connection:

HC05/06 connection is as anytime (RX to TX, TX to RX)

HC-SR501 connected to the D2 pin (Can use any other pin)

The code:

As you see, ony few line, the most basic serial connection, and one input pin.

If the PIR sensor triggered on the pin2, the arduino send "1" with serial connection.

If upload the code, unplug the bluetooth module!

Step 2: App Inventor 2 App

The used components:

A simple label for the received value (0 or 1)

A bluetooth client for the bluetooth connection.

A clock (its almost a loop function like the arduino. run that block every 100ms time interval)

A phone call for make the call. In the settings, don't forget to set your phone number (00countrycodeyournumber)

When start the app, automatically connect to the HC05/06, set your bluetooth module MAC address in the block.

Be the First to Share

    Recommendations

    • Explore Science Challenge

      Explore Science Challenge
    • Toys & Games Contest

      Toys & Games Contest
    • Barbecue Speed Challenge

      Barbecue Speed Challenge

    13 Comments

    0
    Genuíno Feliz
    Genuíno Feliz

    3 months ago

    Are the stages of building the application completed?
    I don't understand where it ended

    0
    NurulF13
    NurulF13

    4 years ago

    how to setting the number phone?

    0
    harshil_kapadia
    harshil_kapadia

    4 years ago

    can we use ultrasonic distance sensor instead of pir sensor?

    0
    planetleak
    planetleak

    Reply 4 years ago

    You can use anything. No matter what give input to the arduino. It can be ultrasonic, ir sensor, touch sensor or a button too.

    0
    mhummelt
    mhummelt

    5 years ago

    Would there be any way to skip the second phone? and maybe use a notification or sms instead of calling. Or how close would the calling phone have to be? I'm asking for a project for a restaurant. The goal is to get a notification whenever someone walks into the bar. There is a bell whenever the door opens but now in summer the door is mostly open anyways. Also the bell can't be heard from thr basement or upstairs. So the phone that should be notified would be in the same house but possibly in the basement with poor reception :/

    0
    AkhilK45
    AkhilK45

    Reply 4 years ago

    search for intruder detection calling system. this may help you

    0
    Jose GuadalupeG
    Jose GuadalupeG

    5 years ago

    AND THAT PART OF BLOCKS OF TELEPHONE NUMBER CONFIGURATION

    0
    DaumantasN
    DaumantasN

    5 years ago on Introduction

    Hi. I wanted to ask what is the difference between these connections, does it matter? Thanks

    images (1).jpgimages.jpg
    0
    ibenkos
    ibenkos

    6 years ago

    Awesome project! Does this work on a iPhone? So that the iPhone calls another iPhone

    0
    planetleak
    planetleak

    Reply 6 years ago on Introduction

    Thanks! Unfortunately i cannot make same app for iphone, but its possible with xcode, i think.