Arduino PIR Motion GSM Alarm

by planetleak in Circuits > Arduino

16020 Views, 81 Favorites, 0 Comments

Arduino PIR Motion GSM Alarm

screen.png

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.

The Arduino Connection

hc06.jpg
hc_sr501.jpg
gsmarduino.png

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!

App Inventor 2 App

AI2_screen.png
ai2_block.png

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.