Authorized Online Retailers:
In this lesson, we will use OSOYOO Uno board , PIR motion sensor and buzzer to make a home alarm system. When an intruder is detected by PIR motion sensor, the buzzer will beep and Osoyoo Uno board will send alarm notification by email through Internet.
2 Hardware Preparation
|Ethernet Shield W5100||1|
|HC-SR501 PIR motion sensor||1|
|buzzer sensor module||1|
3 Hardware connection
4 Add new device
Log in Cayenne IOT platform, Add new…->Device/Widget
Choose: Digital motor Sensor
Setting the datasheet as followed:
Please Note: If V1 pin was used by other widgets, you can select other pins. and change the VIRTUAL PIN in sketch to the pin number you have selected.
In you dashboard, click”Step 1:Sketch File”, the sample sketch will be displayed, in this example,we created a new sketch. please download the sketch from: http://osoyoo.com/driver/pir_alarm.txt
Choose the Board type Arduino Uno and correct Port, remember to use your authentication token. upload the sketch to Uno board, in your Cayenne dashboard click”Step 2 :Add Actuators” .
Once the Arduino connects to the Dashboard it should automatically update the Digital Motion Sensor widget with data
5 Setting up triggers
Click the setting button at the upper right corner of the Digital Motion Sensor, click Trigger:
The Create Trigger screen appears. please set the , you can fill in all the details required for creation of your trigger. in this examples, we created a trigger: if the Digtal Motion Sensor on(1), then send email or tex message for notification.
1) give the trigger a name: Alarm.
2) drag & drop the Arduino device into the IF statement.
3)choose whether we want to trigger an action if pir motion sensor is on or off.
4) We want to receive a notification once the buzzer on, then we add email or mobile phone into the Then statement area.
5) Click save, we’re done.
Once completed our trigger, we’ll return to the Triggers list where our new trigger is shown as below.
When any human motion detected by PIR motion sensor, the buzzer will beep and Osoyoo Uno board will send alarm notification by email.
DownLoad Url osoyoo.com