Monday, December 23, 2024

Smart Home Security System With Automatic Phone Calling System Using Arduino With The IoT

CCTV (closed-circuit television) camera systems are installed to protect your home and shops from burglary and break-ins. But with our busy lives, it is not possible to monitor it 24*7. So, we need a more reliable and robust smart security system that can notify us when someone breaks into our shop or home.

When a thief enters a jewellery shop, the shop owner automatically gets a notification on his/her phone. Also, the device automatically calls the cops while the thief is busy stealing the valuables. This is possible with our smart device that we are going to make.

[defineweblang title=”Change Video Language” language=”English,Hindi”]

- Advertisement -

[getvideolang url= “https://www.youtube.com/embed/a0ZGj7zNCco?start=53″ language=”English”][/getvideolang]

[getvideolang url= “https://www.youtube.com/embed/BYeQWO-E1eA?start=53″ language=”Hindi”][/getvideolang]

- Advertisement -

[/defineweblang]

To make this project first gather the following components.

Bill Of Material

Arduino Coding

After gathering all the components, open the Arduino IDE and write the following code (Fig 1).

First of all, take a variable for motion sensor pin. Here we have used Arduino digital pin 7. After that create a set-up function and set the Bluetooth baud rate (here we have used baud rate 9600) and set the pin mode for PIR sensor as input. Then in the next part of the code, create a loop function and under that create an ‘if condition’ that checks the status of motion detection by PIR sensor. When the PIR motion sensor detects any human motion, the Arduino sends a number over Bluetooth to our Android app that we are going to make in next part.

Fig 1. Arduino Code

App making

To make the app, use MIT App Inventor. First, create a layout for an app  and add the following components (Refer fig  2 ).

  • Vertical arrangement
  • A list picker
  • 3 Text levels
  • A text bar
  • Bluetooth client
  • Phone call
  • Clock Timer
Fig 2. App Layout

After adding all the components and creating layout, go to phone caller components and set the number to which you want to get call. You can either set your own number or any other number (Refer Fig 3 ).

Fig 3. Setting phone number in phone call component

Now, join the MIT app inventor code blocks according to Fig 4.

Fig 4. MIT app inventor code blocks

Connection

Now connect the components as illustrated below (Refer fig 5).

Arduino Components
Pin 7 PIR Motion sensor OUT
5V VCC of Bluetooth and PIR
GND GND of Bluetooth and PIR
RX Bluetooth TX
TX Bluetooth RX

 

Fig 5. Connection Diagram

Testing and working

Cross check all the connections and then power the Arduino with battery and fix the device in a room. After that connect the app that we have created. Now, whenever anyone enters your room, it will send a number to the app and the app will automatically call on the phone number that we have set earlier. So, now you can fix this device in your home and leave for a vacation without worrying about security.

Download Source Code

If you found this IoT project useful then you may also like Top 30+ IoT Projects | IoT Project Ideas for Enthusiasts.

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

81 COMMENTS

  1. Hello mem.. I want more details about that project. Bcz you provide connection diagram and i want circuit diagram and overall block diagram . So that i can put on my PowerPoint presentation.. Please share all the details related to thi project. Reply me as soon as possible

  2. Everything is done as per the described method, when I connected it to Bluetooth, it is just randomly opening the call log (when there is no motion and it is not calling the person). Can you please send a video with clear instructions.

    • Have connect the Bluetooth module and paired with phone. Also check the app inventor blocks. The block should be in such a way that the what ever the command is received from Bluetooth on motion detection the code blocks call the “makephone.call immediately function”. if still face any problem please ask me back

  3. I had done the project as you said still getting same error. Along with that when I connect Blue-tooth HC-05 RX-TX and TX-RX blue-tooth is getting turn off. I had changed the 5 blue-tooth modules but getting the same error. “Bad argument” and “Kindly turn on the blue-tooth”. How can I get out of this.?

    • Dude First turn on the Bluetooth of phone and then open the app now connect the Bluetooth HC 05 and its done .If still get this error then press back or tap any were outside the this black pop of box.
      Now let’s understand why error come :-
      The app is trying to read values from the Bluetooth before the Arduino actually send that or before you actually pair with Bluetooth module.

      You can also get rid of this by modifying the code blocks to
      when the blurtooth.connected and bluetooth bytes available >0
      then read the Bluetooth value.

  4. hello mam my board name is unknown how can i get to know my board name??
    and i have an error occur always ” avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 ” while uploading

  5. I m making this project and go it and it an issue that when the app start it automatically open contact & show only the number which i add in app , but its not calling………………………..??can u help me?

  6. sir, when i directly install your apk file and enter any number more than 10 on the screen, it directly dials your no. but when i modify your AIA file to set my no and create the apk file online, it only pastes the no on the dialer screen, but do not dial. can you give me the solution to direct dial.

    DHURJATI SINHA
    GENERAL MANAGER( ELECT)
    [email protected]
    BHILAI STEEL PLANT

  7. When I open application on mobile device, I find this error. ‘The opertion > cannot accept the arguments:,[“”],[10] ‘
    So please help me how to deal with such error or what I have to do. I have completed my connections, uploaded code to Arduino and developed application as described by you.

    • try to tap outside the popup message or press back to get out of this popup and then try to connect. if still got the problem use if serial bytes available code block during app making. if face a problem in making app contact me on whats app 7061350809

  8. Hello everyone, i am facing a problem in this project. It is as in this project, when motion sensor detects any motion, call is suppose to generate in those circumstances. Problem is, when i connect my application with bluetooth HC05, it directly generates phone call, but when any motion is performed in front of motion sensor, no phone call is generated. What can be the issue and how to tackle with it.

  9. Hello everyone, as in this project call is supposed to be generate when motion sensor detects any motion.

    There is a problem in My side, when I connect my application with Bluetooth HC05 at that time application is generating call directly, but when I perform any motion against PIR motion sensor, no call is generated. So what can be the problem? Can anyone help me out of this? Thank you.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics