1 Overview

In this lesson, we’ll learn how to monitor the HC-SR501 PIR motion sensor through Cayenne IOT platform.

2 Hardware Preparation

UNO R3 Board 1
Ethernet Shield W5100 1
USB cable 1
HC-SR501 PIR motion sensor 1
Jumper wires several
Breadboard (Optional) 1

3 Hardware connection

Connect the HC-SR501 sensor with UNO as following diagram:

UNO Board Gas detector sensor

4 Add new device

Log in Cayenne IOT platfrom, Add new…->Device/Widget

Choose Sensors->”Motion”

Choose: Digital motor Sensor

Setting the datasheet as followed:

In you dashboard, click”Step 1:Sketch File”, the sample sketch will be displayed, copy and paste the sketch into Arduino IDE.

Choose the Board type Arduino Uno and corret Port, remember to use your authentication token. upload the sketch to Uno board, in your Cayenne dashboad click”Setp 2 :Add Actuators” .

Once the Arduino connects to the Dashboard it should automatically update the Digital Motion Sensor widget with data

If the PIR sensor detected any human motion, the data will become to”1″, otherwise it stays “0”.

You can monitor the PIR sensor at any where from Smart Phone.

Leave a Reply

WordPress spam blocked by CleanTalk.
Bombax Theme designed by itx