Alarm Using Arduino+ Pir+rfid Badge+servo Motor+nfc




Introduction: Alarm Using Arduino+ Pir+rfid Badge+servo Motor+nfc

This is a silent alarm using s4a to program an arduino which when pir detects a movement makes a servo motor carrying a rfid badge on it triggering an nfc tasker to send an sms.

Step 1: Introduction

Hi, I am

Guerbas from a small Algerian city called Medrissa. This is my first project , and since English is my third language, I hope that you would forgive any mistakes.

Step 2: Hardware

To accomplish the task , I used these :

· A computer

· An Arduino board (I used Uno R3)

· A servo motor

· A pir sensor

· A bread board

· A badge with RFID

· An android smartphone with NFC feature

Step 3: Software

As software, I used:

· Scratch for Android software (s4a), go to this site to download the software :

· NFC tasker, download it from Google play store it's free.

Step 4: Proceding

I chose S4a to program the Arduino because it’s a visual language addressed to kids, this helps me to explain to kids how arduino works, that said you can use any other language or simply arduino IDE.

1. Connect the PIR and the Servo motor to the arduino as shown on the image. The signal of servo motor goes to the digital 8 pin of arduino. The out of the PIR goes to the Analog 0 of the arduino. Please do all this before you connect the arduino.

2. Launch the s4a and upload the following script. I assume that you have S4A installed and you know how to use it. you can my script as on image or download the file nfc_medrissa.

3. Execute the script and check if the servo is responding after the pir detects a movement and then getting back to the initial position.

4. Far from the circuit, launch NFC tasker , you have to activate NFC , then register the rfid tag by placing near the mobile, and choose the task to be done. I opted for sms option, with my friend’s phone number and a little message indicating that someone is in. Some times when NFC tag detected, the phone would ask you to choose among more than one app, please try to prevent this, personally I unistalled all other apps suposed to deal with NFC. Yes it’s a radical option so up to you have to find a better way.

5. Put the phone with nfc in parallel with the servo motor and near to it. Find a way to fix the badge on the servo ‘some soft glue e.g), but make sure that initially the badge is in parallel with the nfc device and when it moves it has it’s half over the smartphone forming almost 90 degrees with it, in way it could be detected to finally launch the programmed task. ( using sms at this stage, may cost you some money, to avoid this, try to experiment with calling the second phone or playing music. Go to the sms sending, when everything is fine).

6. Click on the green flag of s4a and make a movement. If everything is well done, you would see the servo motor moving the badge which would activate the NFC, by doing so you, an alarm must occur.

7. Up to you to make different versions from this, just let’s know about it.

Step 5: Little Help From My Friends

Finally I thank the city’s youth center manager S.Mustafa and my lab's partner B.Kouider who helped me on this..

Be the First to Share


    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    2 Discussions


    4 years ago

    Great looking project. Thank you for sharing, and welcome to instructables! :)


    Reply 4 years ago