Embarking on a Journey Into the World of Smart Home Systems

by osoyooproduct in Circuits > Arduino

4 Views, 0 Favorites, 0 Comments

Embarking on a Journey Into the World of Smart Home Systems

6-5.png
Lesson 12: IOT Home Alarm system

In our contemporary IT-driven society, the concept of smart home systems seamlessly integrates into the fabric of our daily lives. But what exactly is this phenomenon, and how can we demystify and create our own smart home ecosystem? Join us on a fascinating exploration as we unravel the intricacies of smart home systems and learn how to bring this technological marvel to life!


Supplies

2.jpg
组合实验图.jpg
未标题-1.jpg
6.jpg
5.jpg

In the project, we're taking complexity and excitement to the next level. In previous lessons, we've explored the realms of human-computer interaction through browsers and smartphones. Today, brace yourself for a thrilling endeavor as we delve into the world of the Internet of Things (IoT). We'll connect one primary board to another using the UDP protocol over the Internet. To embark on this journey, you'll need two sets of our IoT learning kits. We'll utilize the first OSOYOO basic board (referred to as basic A) to interface with a PIR motion sensor. The second mainboard (basic B) will be equipped with a buzzer. When the PIR motion sensor on basic A detects an intruder, it will send an alarm signal to basic B, causing the buzzer to sound the alarm.

More detailed information see :https://osoyoo.com/2020/05/30/wifi-iot-learning-kit-for-arduino/#google_vignette

Please order Raspberry Pi Pico Learning Kit from:https://osoyoo.store/products/osoyoo-wifi-iot-learning-kit

Materials Required

  1. OSOYOO Basic board x 2
  2. OSOYOO ESP8266 Wi-Fi Shield x 2
  3. HC-SR501 PIR motion sensor x 1
  4. Buzzer sensor module x 1
  5. USB cable x 2
  6. Jumper wires


Hardware Setup

buzzer_bb.png
人体红外_bb.png
2.jpg

1.ESP8266 Wi-Fi Shield Setup:

  • Insert the ESP8266 Wi-Fi Shield into your mainboard.
  • Ensure the jumper cap is connected from E_TX to D4 and E_RX to D5.


2.Hardware A (PIR Motion Sensor):

  • Connect the OSOYOO Basic Board + ESP8266 Wi-Fi shield to the PIR motion sensor.
  • The motion sensor’s central OUT pin connects to D3.
  • GND to GND
  • 5V to VCC


3. Hardware B (Buzzer):

  • Connect the OSOYOO Basic Board B + ESP8266 Wi-Fi shield to the buzzer.
  • The buzzer I/O pin connects to D9.
  • GND to GND
  • 5V to VCC


Programming Steps

1.Install the Latest IDE:

  1. If your IDE version is 1.1.16 or later, you can skip this step.
  2. Download the IDE from https://www.arduino.cc/en/Main/Software?setlang=en and install it.

2.Connect the OSOYOO Basic Board:

  1. Use a USB cable to connect the OSOYOO Basic Board to your computer.

3.Configure IDE Settings:

  1. Open the IDE and choose the appropriate board type and port for your project.Board: "Arduino/Genuino UNO"
  2. Port: Select the serial port associated with your mainboard.

4.Download the Sketch File:

  1. Download the sketch file from this link.
  2. Unzip the file to find the "esp8266-lesson12" folder.

5.Configure Wi-Fi Settings:

  1. Inside the "buzzer" folder, open the "buzzer.ino" file.
  2. Locate the following lines and replace the asterisks with your Wi-Fi SSID and password:

char ssid[] = "******"; // your network SSID (name)

char pass[] = "******"; // your network password


6.Upload the Sketch:

  1. Load the modified sketch into the IDE.
  2. Open the Serial Monitor to note the IP address assigned by your router.

7.Configure the Motion Sensor:

  1. Connect your PIR motion sensor IDE to your PC.
  2. Inside the "motionsensor" folder, open the "motionsensor.ino" file.
  3. Replace the asterisks in these lines with your Wi-Fi SSID and password:

char ssid[] = "******"; // your network SSID (name)

char pass[] = "******"; // your network password


8.Set the Remote IP Address:

  • Search for this line and replace the IP address with the one noted from Step 6:

byte remoteIp[] = { 10,0,0,244 }; //...

9.Compile and Upload:

  • Compile and upload the "motionsensor.ino" file to your motion sensor IDE.


Test Results

lesson12 IOT Home Alarm system

Power on both ESP8266 shields and OSOYOO Basic boards. When you move your hand in front of the motion sensor, the remote buzzer will sound, and your DIY IoT security system will be operational.