List of Lab Experiments: Department of Electronics & Telecommunication Engg. SUBJECT: Internet of Things
List of Lab Experiments: Department of Electronics & Telecommunication Engg. SUBJECT: Internet of Things
Faculty In charge
EXPERIMENT NO: 1
Roll No 1408
THEORY:
I. Name of IoT Board: NodeMCU ESP8266 development board
➢ Introduction
The NodeMCU ESP8266 development board comes with the ESP-12E module
containing ESP8266 chip having Tensilica Xtensa 32-bit LX106 RISC microprocessor.
This microprocessor supports RTOS and operates at 80MHz to 160 MHz adjustable
clock frequency. NodeMCU has 128 KB RAM and 4MB of Flash memory to store data
and programs. Its high processing power with in-built Wi-Fi / Bluetooth and Deep
Sleep Operating features make it ideal for IoT projects.
NodeMCU can be powered using Micro USB jack and VIN pin (External Supply Pin). It
supports UART, SPI, and I2C interface.
➢ Features/Services
• 802.11 b / g / n
• Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
• Operating Voltage: 3.3V
• Input Voltage: 7-12V
• Digital I/O Pins (DIO): 16
• Analog Input Pins (ADC): 1
• UARTs: 1
• SPIs: 1
• I2Cs: 1
• Flash Memory: 4 MB
Army Institute of Technology, BE E&Tc, IoT 2020-21
• SRAM: 64 KB
• Clock Speed: 80 MHz
• USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
• PCB Antenna
• Small Sized module to fit smartly inside your IoT projects
➢ Cost - ₹ 399
➢ Pros & Cons
Cons-
• Does not have inbuilt Bluetooth
• Less flash memory
Pros-
• Cheaper than ESP32
• Easy to program
• Low power consumption
➢ Website- https://components101.com/development-boards/nodemcu-esp8266-
pinout-features-and-datasheet
➢ Applications-
• Home Automation
• Smart Plug and lights
• Mesh Network
• Industrial Wireless Control
• Baby Monitors
• IP Cameras
• Sensor Networks
• Wearable Electronics
II. Name of IoT Board: Raspberry Pi 4 Model B
➢ Introduction
➢ Features/Services
• Processor: Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @
1.5GHz Memory: 2GB, 4GB or 8GB LPDDR4 (depending on model)
• Connectivity: 2.4 GHz and 5.0 GHz IEEE 802.11b/g/n/ac wireless LAN, Bluetooth
5.0, BLE Gigabit Ethernet 2 × USB 3.0 ports 2 × USB 2.0 ports.
• GPIO: Standard 40-pin GPIO header (fully backwards-compatible with previous
boards)
• Video & sound: 2 × micro-HDMI ports (up to 4Kp60 supported) 2-lane MIPI DSI
display port 2-lane MIPI CSI camera port 4-pole stereo audio and composite video
port
• Multimedia: H.265 (4Kp60 decode); H.264 (1080p60 decode, 1080p30 encode);
OpenGL ES, 3.0 graphics
• SD card support: Micro SD card slot for loading operating system and data storage
• Input power: 5V DC via USB-C connector (minimum 3A1 ) 5V DC via GPIO header
(minimum 3A1 ) Power over Ethernet (PoE)–enabled (requires separate PoE HAT)
• Environment: Operating temperature 0–50ºC
Cons:
• May overheat
• Connecting too many devices may cause overload
• Main design is that of a computer
➢ Website- https://www.raspberrypi.org/
CONCLUSION:
In this experiment, we have studied about different Wi-Fi modules and development boards.
We have also compared their features, costs, specifications, and applications.
EXPERIMENT NO: 2
Roll No 1408
THEORY:
I. Name of IoT Platform: Google Cloud IoT Core
➢ Introduction
Cloud IoT Core is a fully managed service that allows you to connect, manage, and
ingest data from millions of globally dispersed devices easily and securely. Cloud IoT
Core, in combination with other services on Google Cloud IoT platform, provides a
complete solution for collecting, processing, analysing, and visualising IoT data in real
time to support improved operational efficiency.
7 companies reportedly use Google Cloud IoT Core in their tech stacks, including
hacker. Works, DevicePilot, and ONKÖL.
➢ Features/Services
• End-to-end security
• Single global system
• Out-of-box data insights
• Device deployment at scale
• Role-level access control
• Fully managed and scalable
➢ Cost
Google Cloud Platform pricing is available in the following plans:
FREE TRIAL
QUOTE-BASED PLAN- Contact vendor
➢ Pros & Cons
Since GCP is built on the Google infrastructure, there are a few facilitations and
challenges that follow.
➢ Cost
• Starts at $500 per instance/month.
➢ Pros & Cons
Pros:
• Vast set of resources and features available
• Processes unstructured data
Cons:
• Customer support has several issues
• Does not process structured data directly
• High switching costs
• Only supports English
EXPERIMENT NO: 3
Roll No 1408
HARDWARE REQUIREMENTS:
▪ Arduino Uno board
▪ Breadboard
▪ Connecting Wires
▪ Resistor
▪ LM35 temperature sensor
▪ Potentiometer
▪ 16x2 LCD
SOFTWARE:
• Tinkercad
PROCEDURE:
1. Open Tinkercad.
2. Connect temperature sensor LM35 to analogue pin A0.
3. Make all the connections of LCD as per the diagram.
4. Write the code and start the simulation.
5. Observe the change in temperature on LCD by manually varying the temperature of
LM35.
SIMULATION RESULTS:
Code:
#include <LiquidCrystal.h>
void setup(){
Serial.begin(9600);
lcd.begin(16, 2);
delay(2000);
Army Institute of Technology, BE E&Tc, IoT 2020-21
lcd.clear();
lcd.print("Temp= ");
}
void loop() {
Simulation Diagram:
CONCLUSION:
In this experiment, we have studied about the working of weather monitoring
system by simulating a temperature sensor and displaying the temperature on LCD.
EXPERIMENT NO: 4
Roll No 1408
HARDWARE REQUIREMENTS:
▪ Arduino Uno board
▪ LED
▪ Resistors
▪ LDR Sensor
SOFTWARE:
• Tinkercad
PROCEDURE:
1. Open Tinkercad.
2. Connect positive pin of LED at pin number 10 of Arduino.
3. Make the connection of LDR as per the diagram.
4. Write the code and start the simulation.
5. Change the value of LDR and observe the Output.
6. After a certain threshold of LDR, the LED will start glowing.
SIMULATION RESULTS:
Code:
const int ledPin = 10;
const int ldrPin = A0;
void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(ldrPin, INPUT);
}
Simulation Diagram:
CONCLUSION
In this experiment, we have successfully implemented and tested Automated Light control
System using LDR sensor. The code was verified by successfully simulated in Tinkercad.
EXPERIMENT NO: 5
TITLE: Smart Building System
AIM: Implementation of a mini project on IoT Smart Building System
Roll No 1408
HARDWARE REQUIREMENTS:
▪ Arduino Uno board
▪ ESP8266 Wi-Fi Module
▪ Breadboard
▪ Connecting Wires
▪ 1K resistor,
▪ LDR sensor
▪ Ultrasonic sensor
▪ Two cables red and black colour
▪ LEDs
▪ L293D motor driver
▪ Servo Motor
▪ DC Motor
▪ LM35 temperature sensor
SOFTWARE:
• Tinkercad
PROCEDURE:
1. Open Tinkercad.
2. Temperature sensor is connected to analogue pin A0.
3. Ultrasonic sensor is connected to digital pin-7 of Arduino.
4. Servo motor is connected to digital pin-8 of Arduino.
5. LDR sensor is connected to digital pin-2 of Arduino.
6. The DC motor is controlled via motor driver L2930, which is controlled via digital
pin-11,12,13.
7. All these sensors coordinate with each other to automate the home.
8. Whenever someone comes close to the gate the ultrasonic sensor detects the distance
and opens the door (by moving servo motor).
9. Whenever there is any movement in front of the LDR sensor it makes all LEDs to
glow and signify some motion is detected in that area.
Army Institute of Technology, BE E&Tc, IoT 2020-21
10. The Temperature sensor data is used to control speed of fan (DC motor).
SIMULATION RESULTS:
Code:
#include<Servo.h>
const int pingPin = 7;
int servoPin = 8;
Servo servo1;
void setup() {
// initialise serial communication:
Serial.begin(9600);
servo1.attach(servoPin);
pinMode(2,INPUT);
pinMode(4,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
pinMode(A0,INPUT);
digitalWrite(2,LOW);
digitalWrite(11,HIGH);
void loop() {
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
// The same pin is used to read the signal from the PING))): a HIGH pulse
// whose duration is the time (in microseconds) from the sending of the ping
// to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
//Serial.print(inches);
//Serial.print("in, ");
//Serial.print(cm);
//Serial.print("cm");
//Serial.println();
//delay(100);
servo1.write(0);
Army Institute of Technology, BE E&Tc, IoT 2020-21
if(cm < 40)
{
servo1.write(90);
delay(2000);
}
else
{
servo1.write(0);
}
if(pir == HIGH)
{
digitalWrite(4,HIGH);
delay(1000);
}
else if(pir == LOW)
{
digitalWrite(4,LOW);
}
Serial.println("temperature");
Serial.println(temperature);
CONCLUSION
Various sensors connected in the home network could communicate with each other and
hence coordinate the Smart Home Automation.
EXPERIMENT NO: 6
TITLE: Smart Irrigation System
AIM: Implementation of a mini project on IoT Smart Irrigation System.
Roll No 1408
HARDWARE REQUIREMENTS:
▪ Arduino Uno board
▪ ESP8266 Wi-Fi Module
▪ Breadboard
▪ Connecting Wires
▪ Resistors
▪ 16x2 LCD Display
▪ Potentiometer
▪ LEDs
▪ NPN Transistor
▪ DC Motor
▪ LM35 temperature sensor
SOFTWARE:
• Tinkercad
PROCEDURE:
1. Open Tinkercad.
2. Connect temperature sensor i.e. LM35 to Analog pin A0 of Arduino.
3. Connect digital pins of LCD display to Digital pins 4,5,6 and 7 of Arduino.
4. Also connect the RS and Enable pin of LCD to pin 2 and 3 of Arduino, respectively.
5. Connect the positive pin of DC motor to pin 13 of Arduino through a NPN transistor
to supply sufficient current.
6. Connect 1 Red and 1 Green LED to pin 12 and 11 respectively for indicating the
current state of motor.
7. If the temperature is more than 50°C, then the Red LED will turn ON and the motor
will start rotating.
8. As soon as the temperature will drop down below 50°C, the Green LED will start
glowing and the motor will turn OFF.
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("Automated Plant");
lcd.setCursor(0,1);
lcd.print("Watering System!");
pinMode(motor, OUTPUT);
pinMode(LedRed, OUTPUT);
pinMode(LedGreen, OUTPUT);
delay(2000);
lcd.clear();
lcd.print("Temp= ");
lcd.setCursor(0,1);
lcd.print("WaterPump= ");
}
void loop() {
Diagram:
CONCLUSION:
In this experiment, we have successfully designed, simulated, and verified the code of Smart
Irrigation system using Tinkercad. We have observed that as soon as the temperature goes
above 50°C, the motor starts rotating.
EXPERIMENT NO: 7
Roll No 1408
HARDWARE REQUIREMENTS:
▪ Arduino Uno board
▪ ESP8266 Wi-Fi Module
▪ Breadboard
▪ Connecting Wires
▪ 1K resistor,
▪ LDR sensor
▪ Ultrasonic sensor
▪ Two cables red and black colour
▪ LEDs
▪ L2930 motor driver
▪ Servo Motor
▪ LM35 temperature sensor
SOFTWARE:
• Tinkercad
PROCEDURE:
1. Open Tinkercad.
2. Connect potentiometer to analogue pin-A0.
3. Connect two LEDs to digital pin-9,10.
4. Potentiometer will act as water Flow meter, moving this we can specify flow of water.
5. When flow increases above a specific level red LED glows.
6. When flow decreases below a specific level green LED glows.
SIMULATION RESULTS:
Code:
void setup()
{
pinMode(A0, INPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
Serial.begin(9600);
void loop()
{
if (analogRead(A0) < 100) {
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
Serial.println(analogRead(A0));
} else {
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
Serial.println(analogRead(A0));
}
delay(10); // Delay a little bit to improve simulation performance
}
Diagram:
Conclusion
The designed waterflow meter works perfectly and indicates the flow rate.