Yug IOt 4
Yug IOt 4
1. Aim: Build a security system with any sensor and alerts using Blynk.
2. Objective: To design and implement a security system using sensors (e.g., PIR
motion sensor, magnetic door sensor, or ultrasonic sensor) and integrate it with the
Blynk platform to send real-time alerts.
3. Hardware Used:
PIR Motion Sensor (HC-SR501)
ESP8266/NodeMCU (or any Wi-Fi-enabled
microcontroller) Buzzer/LED (for local alerts, optional)
Blynk App (installed on your smartphone)
Breadboard and jumper wires
Ultrasonic Sensor (HC-SR04)
4. Procedure:
1. Connect the Hardware: PIR Sensor Pinout:
1
DEPARTMENTOF
COMPUTER SCIENCE &
ENGINEERING
2. Set Up Blynk:
Blynk Library:
o Go to Tools > Manage Libraries and search for
Blynk. o Install the Blynk library.
ESP8266 Board Support:
Go to File > Preferences and add the following URL to the Additional
Boards Manager.
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Go to Tools > Board > Boards Manager and install the ESP8266 package.
4. Code:
2
DEPARTMENTOF
COMPUTER SCIENCE &
ENGINEERING
pinMode(pirPin, INPUT); pinMode(buzzerPin,
OUTPUT); digitalWrite(buzzerPin, LOW);
}}
Blynk Code
6. Output:
Fig 1
4
DEPARTMENTOF
COMPUTER SCIENCE &
ENGINEERING
Fig 2
7. Learning Outcome:
• IoT and Blynk Integration – Learn how to connect sensors with Blynk for
real-time monitoring and remote alerts.
• Sensor and Hardware Interfacing – Gain hands-on experience in working
with motion, door, or gas sensors and microcontrollers like
ESP8266/ESP32.
• Alert Mechanisms – Implement real-time notifications via Blynk (push
alerts, email, or SMS) and physical alerts using buzzers or LEDs.
• Embedded Programming – Develop coding skills in C++ (Arduino IDE)
or Micro Python to process sensor data and trigger security actions.