IoT LabManual
IoT LabManual
EXPERIENTIAL LEARNING
LIST OF EXERCISES:
3. Design and Simulate ultrasonic sensor and LCD interfacing with Arduino.
5. Design and Implement to capture Gas Sensor and send sensor data to cloud from your
NodeMCU device using Arduino IDE.
6. Design and Implementation of Humidity and Temperature Monitoring Using Arduino and
upload data to cloud using MQTT.
7. Design and Implementation of an IoT ECG (Electrocardiogram) System to record heart's
electrical activity.
8. Design and Simulate controlling an LED 7-Segment Display with Raspberry Pi.
9. Design and implementation of Raspberry Pi Home Security System with Camera and PIR
Sensor with Email Notifications.
10. Design and Implement to upload Light sensor (TSL) data to cloud through Raspberry Pi.
11. Design and Implementation of Motion Detector with NodeMCU and BLYNK.
12. Design and Implementation of Fire notification IoT system with BLYNK.
EXPERIMENT – 1-a
1. (a) DESIGN AND SIMULATE LED 7-SEGMENT DISPLAY INTERFACING WITH ARDUINO
AIM:
Using 7-Segment Module circuit using Arduino and display the values.
PROCEDURE
In Common Anode all LED pins of 7 segment connected to arduino GPIO, and Vcc pin connected in Common,
In Common Cathode all LED pins of 7 segment connected to arduino GPIO, and Ground pin connected in
Common
1. Make the connection as per the circuit diagram
2. Open the Arduino IDE in computer and write the program.
3. Compile the program for any errors and upload it to the Arduino.
4. Use the 220 Ohm resistor’s to connect the 7 Segment display at anode to power 3.3V.
5. Observe the 7 Segment display is updated .
Components :
2 7 Segment 1
4 Bread Board 1
7- Segment
Figure: 1.2 Circuit Diagram for 7 Segment Common Cathode to connect to Arduino
Figure: 1.2 Circuit Diagram for 7 Segment Common Cathode to connect to Arduino
Program Code:
A) Code for 7
Segment:
void setup()
{
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
}
void loop() {
//EIGHT : 6
digitalWrite(12,HIGH); // A
digitalWrite(11,LOW); // B
digitalWrite(10,HIGH); // C
digitalWrite(9,HIGH); //D
digitalWrite(8,HIGH); //E
digitalWrite(7,HIGH); // F
digitalWrite(6,HIGH); //G
delay(500);
//EIGHT : 7
digitalWrite(12,HIGH); // A
digitalWrite(11,HIGH); // B
digitalWrite(10,HIGH); // C
digitalWrite(9,LOW); //D
digitalWrite(8,LOW); //E
digitalWrite(7,HIGH); // F
5
digitalWrite(6,HIGH); //G
delay(500);
//EIGHT : 8
digitalWrite(12,HIGH); // A
digitalWrite(11,HIGH); // B
digitalWrite(10,HIGH); // C
digitalWrite(9,HIGH); //D
digitalWrite(8,HIGH); //E
digitalWrite(7,HIGH); // F
digitalWrite(6,HIGH); //G
delay(500);
}
EXPERIMENT – 1-b
Aim : To design and simulate servo motor interfacing with Arduino to perform 180
degree movement.
PROCEDURE:
6
1. Orange Wire: PWM output from pin9 to Motor Control Input
2. Red Wire: +6V supply for Motor
3. Black Wire: 0V (Ground)
4. Connect the Supply to the board (5-12V DC). Connect USB with PC and upload the
sketch to the board.
5. On connecting the board first time, it’ll ask for the drivers (which can be
downloaded from arduino website).
6. Open Arduino IDE and Create a new Sketch (In Arduino world code/program is
called a ‘sketch’).
7. Write the code and ‘verify’ (option on toolbar) it. After verifying it will notify if
there are any errors otherwise ‘Done Compiling’ will be shown.
8. Now Upload the sketch to the Hardware. When sketch is Uploaded, Press Reset on
the board. Now connect Servo control Pin at respective Pin and provide supply to
it. The Pin9 of PWM port of the board provides motor control.
Components :
3. Servo Motor
Circuit Diagram :
7
Program Code :
#include <Servo.h>
void setup()
void loop()
for (posn = 0; posn < 180; posn += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
delay (10); // waits 10ms for the servo to reach the position
for (posn = 180; posn>=1; posn-=1) // goes from 180 degrees to 0 degrees
// in steps of 1 degree
delay (10); // waits 10ms for the servo to reach the position
8
EXPERIMENT – 2-a
2. (a) Design and Simulate ultrasonic sensor and LCD interfacing with Arduino.
Aim :To find the distance between , using SR04 Ultrasonic distance sensor coding in
Arduino
Procedure :
Distance measuring instrument design and development using Arduino UNO and
Ultrasonic Sensor SR04.
9
10
Components:
1. Arduino UNO
2. Ultrasonic sensor SR04
3. 16×2 LCD (HDD44780 driver based)
4. 6v battery or 5v USB power source (Mobile adapter/laptop)
5. I2C Board
6. Jumper wires
7. Breadboard
Circuit Diagram :
11
Program Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <HCSR04.h>
// set the LCD address to 0x27 for a 16 chars and 2 line display & 20 X 4 for 20 chars and
4 line display
LiquidCrystal_I2C lcd(0x27,16,2);
void setup()
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.setCursor(3,0); //column,row
lcd.print("SVEC");
lcd.setCursor(2,1);
lcd.print("DEPT IT");
delay(2000);
lcd.setCursor(1,2);
lcd.print("Distance");
void loop()
float dist;
dist=distanceSensor.measureDistanceCm();
Serial.println(round(dist));
delay(1000);
lcd.clear();
12
lcd.setCursor(0,0);
lcd.print("Distance : ");
lcd.setCursor(10,0);
lcd.print(round(dist));
lcd.setCursor(13,0);
lcd.print(" cm");
13
EXPERIMENT – 2-b
Aim : To perform an alarm when a fire is detected , using FlameSensor with photo diode and
coding in Arduino.
Procedure :
The flame sensor detects the presence of fire or flame based on the Infrared (IR)
wavelength emitted by the flame. It gives logic 1 as output if a flame is detected,
otherwise, it gives logic 0 as output. Arduino Uno checks the logic level on the output pin
of the sensor and performs further tasks such as activating the buzzer and LED, sending
an alert message.
A flame detector is a sensor designed to detect and respond to the presence of a flame
or fire. Responses to a detected flame depend on the installation but can include
sounding an alarm, deactivating a fuel line (such as a propane or a natural gas line), and
activating a fire suppression system. The IR Flame sensor used in this project is shown
below, these sensors are also called Fire sensor module or flame detector
sensor sometimes.
Pin Description
GND Ground
Dou
Digital output
t
Applications
Flame Sensors are very important devices in detecting fire and they can be used in a
variety of applications/areas like:
Hydrogen stations
Combustion monitors for burners
Oil and gas pipelines
Automotive manufacturing facilities
Nuclear facilities
Aircraft hangars
Turbine enclosures
Car or Automobile
Fire Fighting Robots
Garage Safety Equipment
Warehouses
14
Components Required
Circuit Diagram
The below image is the Arduino fire sensor circuit diagram, it shows how to interface
the fire sensor module with Arduino.
15
16
Code explanation
The complete Arduino code for this project is given at the end of this article. The code
is split into small meaningful chunks and explained below.
In this part of the code, we are going to define pins for Flame sensor, LED and
buzzer which are connected to Arduino. The flame sensor is connected to digital pin 4 of
Arduino. The buzzer is connected to digital pin 8 of Arduino. LED is connected to digital
pin 7 of Arduino.
Variable “flame_detected” is used for storing the digital value read out from the flame
sensor. Based on this value we will detect the presence of flame.
int buzzer = 8 ;
int LED = 7 ;
int flame_sensor = 4 ;
int flame_detected ;
In this part of the code, we are going to set the status of digital pins of Arduino and
configure
Baud rate for Serial communication with PC for displaying the status of the flame
detection circuit.
void setup()
Serial.begin(9600) ;
pinMode(buzzer, OUTPUT) ;
pinMode(LED, OUTPUT) ;
pinMode(flame_sensor, INPUT) ;
This line of code reads the digital output from flame sensor and stores it in the variable
“flame_detected”.
flame_detected = digitalRead(flame_sensor) ;
Based on the value stored in “flame_detected”, we have to turn on the buzzer and LED.
In this part of the code, we compare the value stored in “flame_detected” with 0
or 1.
If its equal to 1, it indicates that flame has been detected. We have to turn on buzzer
and LED and then display an alert message in Serial monitor of Arduino IDE.
If its equal to 0, then it indicates that no flame has been detected so we have to turn
off LED and buzzer. This process is repeated every second to identify the presence of fire
or flame.
if (flame_detected == 1)
17
Serial.println("Flame detected...! take action immediately.");
digitalWrite(buzzer, HIGH);
digitalWrite(LED, HIGH);
delay(200);
digitalWrite(LED, LOW);
delay(200);
else
digitalWrite(buzzer, LOW);
digitalWrite(LED, LOW);
delay(1000);
We have built a fire fighting robot based on this concept, which automatically detects the
fire and pump out the water to put down the fire. Now you know how to do fire detection
using Arduino and flame sensor, hope you enjoyed learning it, if you have any questions
leave them in the comment section below.
Code
int buzzer = 8;
int LED = 7;
int flame_sensor = 4;
int flame_detected;
void setup()
{
Serial.begin(9600);
pinMode(buzzer, OUTPUT);
pinMode(LED, OUTPUT);
pinMode(flame_sensor, INPUT);
}
void loop()
{
flame_detected = digitalRead(flame_sensor);
if (flame_detected == 1)
{
Serial.println("Flame detected...! take action immediately.");
digitalWrite(buzzer, HIGH);
digitalWrite(LED, HIGH);
delay(200);
digitalWrite(LED, LOW);
delay(200);
}
else
{
Serial.println("No flame detected. stay cool");
digitalWrite(buzzer, LOW);
18
digitalWrite(LED, LOW);
}
delay(1000);
}
EXPERIMENT – 3
3. Design and Implement to capture Gas Sensor and send sensor data to cloud
from your NodeMCU device using Arduino IDE.
Aim : To find the quality of air using Gas Sensor MQ135 with Nodemcu and send data to
Thingspeak cloud
Procedure :
19
Components
1. NodeMCU
2. GAS Sensor MQ135
3. Breadboard
4. Male to Male Jumper Cables – 3Nos
20
Circuit Diagram :
Code :
#include <ESP8266WiFi.h>
String apiKey = "EVSGQZMUPF1CH82A"; // Enter your Write API key from ThingSpeak
const char *ssid = "IOTLAB 403"; // replace with your wifissid and wpa2 key
WiFiClient client;
void setup()
delay(10);
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
delay(500);
Serial.print(".");
Serial.println("");
21
Serial.println("WiFi connected");
void loop()
float h = analogRead(A0);
if (isnan(h))
return;
postStr += "&field1=";
postStr += String(h/1023*100);
postStr += "r\n";
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);
Serial.println(h/1023*100);
delay(500);
client.stop();
Serial.println("Waiting...");
delay(1500);
22
EXPERIMENT – 4
Aim : To get temperature and humidity data from DHT11 Module using
Nodemcu microcontroller , and then uploading the same data to adafruit mqtt
cloud.
Procecudre :
Introduction
This example will demonstrate how to report the temperature and humidity data
collected by the DHT11 sensor to the MQTT service in the cloud through the MQTT
protocol and the NodeMCU based on ESP8266 , and show how the application subscribes
to and processes the data. The reason why mqtt protocol is used in this article is that it is
lightweight and energy-saving, which is very suitable for the use scenarios of the Internet
of things. At present, all major public cloud providers have basically opened IOT hub
services based on MQTT protocol. For example, the IOT Core of AWS and the IOT Hub of
Azure can easily access these data to these public cloud services through MQTT protocol.
Hardware Configuration
Breadboard x 1
23
Arduino IDE Configuration
URL: https://arduino.esp8266.com/stable/package_esp8266com_index.json
Sketch -> Include Library -> Manage Libraries… -> Type AdaFruitMQTT in Search field ->
Install , AdaFruit MQTT with Client Service
After the data is successfully collected through NodeMCU, it needs to be sent to the
MQTT cloud service in the cloud. This article uses the MQTT cloud service provided by
Adafruit. We choose other MQTT cloud services according to their own circumstances,
such as Azure IoT Hub or AWS IoT Core.
Each cloud service needs to provide different authentication methods when accessing.
Therefore, when connecting to the MQTT service in the cloud via NodeMCU, it is required
to set the connection method according to the security requirements of the target cloud
service. For the sake of simplicity, this article uses a non-secure connection method. In a
formal production environment, a connection with a secure authentication method must
be set.
https://www.adafruit.com/
After registration, then signin , click on IO MyKey and collect API Authentication Key
and User Name,
Then choose, Feeds View All -> Create New Feed , Give a Name to the Feed ,
then press OK ,to Create Feed .
Repeat the process of creating Feed , then update the Feed Names in code given for the
Adafruit MQTT client program to be uploaded into NodeMCU Device.
Components :
1. Nodemcu – 1No
2. DHT11 - 1 No
3. BreadBoard -1 No
4. JumperCables-3 No
5. USB Cable – 1No
24
Circuit Diagram :
25
Coding :
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include <SimpleDHT.h>
// Adafruit IO
WiFiClient client;
//WiFiClientSecure client;
// Setup the MQTT client class by passing in the WiFi client and MQTT server and login
details.
SimpleDHT11 dht11(pinDHT11);
void setup() {
Serial.println(F("Adafruit IO Example"));
Serial.println(); Serial.println();
delay(10);
Serial.print(F("Connecting to "));
Serial.println(WLAN_SSID);
WiFi.begin(WLAN_SSID, WLAN_PASS);
delay(500);
Serial.print(F("."));
Serial.println();
Serial.println(F("WiFi connected"));
Serial.println(WiFi.localIP());
// connect to adafruitio
connect();
void connect() {
27
int8_t ret;
switch (ret) {
if(ret >= 0)
mqtt.disconnect();
Serial.println(F("Retrying connection..."));
delay(10000);
Serial.println(F("Adafruit IO Connected!"));
void loop() {
if(! mqtt.ping(3)) {
// reconnect to adafruitio
if(! mqtt.connected())
connect();
delay(5000);
Serial.println(F("Failed"));
28
if (! Humidity1.publish(hum)) { //Publish to Adafruit
Serial.println(F("Failed"));
else {
Serial.println(F("Sent!"));
29
EXPERIMENT – 5
Aim :
Procedure :
The EKG or ECG (Electrocardiogram) is a non-invasive diagnostic test that assesses heart rhythm and
function through a recording of the electrical activity of the heart that occurs with each heartbeat.
This electrical activity is recorded from the patient’s body surface and is drawn on a paper using a
graphical representation or tracing, where different waves are observed that represent the electrical
stimuli of the atria and ventricles. The device with which the electrocardiogram is obtained is called
an electrocardiograph.
The normal rhythm of an ECG is formed by a P wave, a QRS complex and a T wave. To interpret an
electrocardiogram, the presence of these waves, their shape and duration, as well as the ST segment
(time that elapses between the end of depolarization and the beginning of repolarization of the
ventricles, measures less than 1 mm, if it is greater than 1 mm it indicates infarction or ischemia).
The P waves allow us to know the time between the heartbeats, it is represented as a straight line
between the lowest and the highest point. The T wave represents the small perceptible beat after
the first and marks the end of the heartbeat. The time elapsed between one and the other must be
fairly regular throughout the entire test, if on the contrary, during the test we see that the elapsed
time is variable, this indicates an irregularity in the heartbeat.
Connect the A0 to OUTPUT in the module , LO- to 11 pin in arduino , LO+ to 10 pin in arduino.
Upload code and check the graph in Serial Plotter.
Understanding graphical diagram of ECG Value at Serial Plotter Connection Locations at Limbs
30
Components :
1. Arduino Uno
2. ECG module (AD8232)
3. ECG electrode - 3 pieces
4. ECG electrode connector - 3.5 mm
5. DATA Cable
6. Jumper Wires
Circuit Diagram
Code :
void setup()
{
// initialize the serial communication:
Serial.begin(9600);
pinMode(10, INPUT); // Setup for leads off detection LO +
pinMode(11, INPUT); // Setup for leads off detection LO -
}
void loop()
{
if((digitalRead(10) == 1)||(digitalRead(11) == 1))
{
Serial.println('!');
}
else
{
// send the value of analog input 0:
Serial.println(analogRead(A0));
}
//Wait for a bit to keep serial data from saturating
delay(1);
}
Procedure:
A seven segment display is a simple displaying device that uses 8 LEDs to display decimal numerals. It
is generally used in digital clocks, calculators, electronic meters, and other devices that displays
numerical information.
A seven segment display has 8 LEDs in it. Each LED is controlled through specific pin. It is made of
seven different illuminating segments which are arranged in such a way that it can form the numbers
from 0-9 by displaying different combinations of segments. It is also able to form some alphabets like
A, B, C, H, F, E, G, DP.
These can be two type common anode and common cathode. In common cathode type the cathode
is common for all 8 LEDs and in common anode type the anode is common for all 8 LEDs. A seven
segment display has 10 pin interface, 2 pins are for Common and 8 pins are for each LED. Both
common pins are internally shorted.
The RPi.GPIO is used to import and to the OUTPUT or INPUT mode of a pin action is mentioned then
OUT / IN is used to
Open the editor thonny , type the program code to perform , write Python 3 file_name.py > Press
Enter. (.py is file extension).click on run-button.
33
Raspberry Pi pin diagram:
34
Components :
1. Raspberry PI - 1No
Circuit Diagram :
35
7 Segment connections at Raspberry Pi
Code :
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
digitclr=[1,1,1,1,1,1,1]
36
digit0=[0,0,0,0,0,0,1]
digit1=[1,0,0,1,1,1,1]
digit2=[0,0,1,0,0,1,0]
digit3=[0,0,0,0,1,1,0]
digit4=[1,0,0,1,1,0,0]
digit5=[0,1,0,0,1,0,0]
digit6=[0,1,0,0,0,0,0]
digit7=[0,0,0,1,1,1,1]
digit8=[0,0,0,0,0,0,0]
digit9=[0,0,0,1,1,0,0]
gpin=[35,12,36,33,32,38,40]
def digdisp(digit):
GPIO.output(gpin[x], digitclr[x])
GPIO.output(gpin[x], digit[x])
digdisp(digit0)
time.sleep(1)
digdisp(digit1)
time.sleep(1)
digdisp(digit2)
time.sleep(1)
digdisp(digit3)
time.sleep(1)
digdisp(digit4)
time.sleep(1)
digdisp(digit5)
time.sleep(1)
digdisp(digit6)
time.sleep(1)
digdisp(digit7)
37
time.sleep(1)
digdisp(digit8)
time.sleep(1)
digdisp(digit9)
time.sleep(1)
#tidy up
GPIO.cleanup()
import sys
sys.exit()
38
Output:
39
EXPERIMENT – 7
Aim:
To take the picture and save it in system when a intrusion is detected by PIR and send email
notification
Procedure :
Here we use 5MP Raspberry Pi 3 Model B Camera Module with Cable equips flexible cable for
attaching with Raspberry Pi 3 Model B. The camera connects to the BCM2835 processor on the Pi
via the CSI bus, a higher bandwidth link which carries pixel data from the camera back to the
processor. This bus travels along the ribbon cable that attaches the camera board to the Pi.
Without giving power to Raspberry Pi , Connect the raspberry pi camera facing the terminal line to
HDMI direction and blue color to USB direction, then connect PIR out at raspberry pi GPIO 4, then
GND at any GND and Vcc at 5V at top right.
Open the editor thonny , type the program code to perform , write Python 3 file_name.py > Press
Enter. (.py is file extension).click on run-button.
Components :
3. Power up with USB Cable for Raspberry Pi 3 or power up with USB C for Raspberry Pi 4
Circuit Diagram :
40
41
Code :
import smtplib
pir = MotionSensor(4)
camera = PiCamera()
pir.wait_for_motion()
camera.capture('selfie3.png')
print("Motion detected!")
camera.close()
pir.wait_for_no_motion()
sender_address = '[email protected]'
sender_pass = 'Svec_123'
receiver_address = '[email protected]'
message = MIMEMultipart()
message['From'] = sender_address
message['To'] = receiver_address
message['Subject'] = 'A test mail sent by Python. It has an attachment.' #The subject
line
message.attach(MIMEText(mail_content, 'plain'))
text = message.as_string()
session.quit()
print('Mail Sent')
42
EXPERIMENT – 8
8. Design and Implement to upload Light sensor (TSL) data to cloud through
Raspberry Pi.
Aim : To simulate automatic glow of LED when intensity of Light is LOW using
LDR
Procedure :
The LDR is connected with 3.3v and the other leg of the LDR is connected with the
positive leg of the 10UF capacitor the other leg of the capacitor is connected with the
ground… now take a wire from the middle and connect it with pin number 7 of the
raspberry pi. our circuit diagram is completed. So LED is connected with pin number 11
and the RC circuit is connected with pin number 7
Components :
1. Raspberry zPi
2. LDR
3. Female to Male Jumper Wires – 2 Nos
4. BreadBoard
Circuit Diagram:
43
44
Code :
import time
GPIO.setmode(GPIO.BOARD)
delayt = .1
count = 0
GPIO.setup(ldr, GPIO.OUT)
GPIO.output(ldr, False)
time.sleep(delayt)
GPIO.setup(ldr, GPIO.IN)
count += 1
return count
try:
# Main loop
while True:
print("Ldr Value:")
45
value = rc_time(ldr)
print(value)
GPIO.output(led, True)
GPIO.output(led, False)
except KeyboardInterrupt:
pass
finally:
GPIO.cleanup()
46
EXPERIMENT – 9
9. Design and Implementation of Motion Detector with NodeMCU and
BLYNK.
Aim: To create a IoT based mobile application using Blynk for notification,
we use demonstrating Motion Detection using Nodemcu
Procedure :
Do:
47
In Windows 8/or/Linux do :Arduino IDE
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
48
// Your WiFi credentials.
void setup()
// Debug console
Serial.begin(9600);
void loop()
Blynk.run();
ex2:PIR
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
/* WiFi credentials */
49
BLYNK_WRITE(V0)
pinValue = param.asInt();
void setup()
Serial.begin(115200);
delay(10);
pinMode(pirPin, INPUT);
void loop()
if (pinValue == HIGH)
getPirValue();
Blynk.run();
pirValue = digitalRead(pirPin);
if (pirValue)
Serial.println("Motion detected");
Blynk.notify("Motion detected");
50
EXPERIMENT –10
10. Design and Implementation of Fire notification ΙοΤ system with BLYNK.
Aim: To demonstrate IoT based mobile application get notification when a fire
is detected by firesensor.
Procedure :
Do:
Components :
51
1.Nodemcu
2. FireSensor
Circuit Diagram:
Code :
// BLYNK LIBRARY
// https://github.com/blynkkk/blynk-library
// ESP8266 LIBRARY
// https://github.com/ekstrand/ESP8266wifi
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
int flag=0;
void notifyOnFire()
52
Serial.println("Fire DETECTED");
flag=1;
else if (isButtonPressed==0)
flag=0;
void setup()
Serial.begin(9600);
pinMode(D1,INPUT_PULLUP);
timer.setInterval
53