Lab - Manual - Iot 22
Lab - Manual - Iot 22
Lab - Manual - Iot 22
LAB MANUAL
PRACTICAL INDEX
Sr. Aim Assignment Completion Grade Assessment Signature
No. Date Date Date
1 Introduction and demonstrate
LED on-off using tinker cad.
2 Analyse the performance of PIR
sensor on tinker cad.
3 Introduction to Arduino IDE
tools and ESP32/Node MCU.
a. Arduino IDE configuration.
b. ESP 32 understanding.
4 Demonstrate LED blinking
program on Node MCU.
5 Introduction to different sensor
and interfacing.
a. DHT11.
b. Soil moisture sensor.
c. LM35.
d. MQ2 (Gas sensor).
e. Jumper Cable.
f. Display.
g. Breadboard.
6 Develop a hardware and get
temperature and humidity data
using
Mobile application.
a. ESP32.
b. DHT11/LM35.
c. Blynk IOT application.
7 Study on MQTT protocol on
cloud
8 Study on Raspberry pi
hardware.
9 Implement MQTT protocol
using Raspberry pi using cloud
platform.
10 Introduction to Jetson Nano
Hardware.
11 Project: Sign Language
Recognition
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
Output:
void setup() {
pinMode(2, INPUT);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}
void loop() {
int motionDetected = digitalRead(2);
if (motionDetected == HIGH) {
digitalWrite(13, HIGH);
}
else {
digitalWrite(13, LOW);
}
}
Output:
#include "Arduino.h"
void setup()
{
Serial.begin(14440);
// Initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
Serial.println("NodeMCU blink!");
// Turn the LED on (the built-in LED on a NodeMCU board is active low)
digitalWrite(LED_BUILTIN, LOW);
// Wait for a second
delay(1000);
// Turn the LED off (the built-in LED on a NodeMCU board is active low)
digitalWrite(LED_BUILTIN, HIGH);
// Wait for a second
delay(1000);
}
Conclusion: In this practical we learn about how to implement LED blinking program using Node
MCU
Grade:
Signature:
Remarks:
The DHT11 sensor is a basic and affordable digital temperature and humidity sensor
that is commonly used for measuring environmental conditions in various applications. It's
often used in hobbyist projects, home automation, weather stations, and other scenarios where
simple temperature and humidity measurements are needed.
Key features of the DHT11 sensor include:
Temperature Measurement: The DHT11 sensor can measure temperature in the range of 0°C
to 50°C (32°F to 122°F) with an accuracy of around ±2°C.
Humidity Measurement: It can measure relative humidity in the range of 20% to 90% with
an accuracy of around ±5%.
Digital Output: The sensor communicates using a digital signal protocol, which means it
outputs the data as digital values that can be read by microcontrollers or other digital devices.
Single-Wire Interface: The DHT11 sensor uses a single-wire interface for both power supply
and data communication. This makes it relatively easy to integrate into various electronic
projects.
Low Power Consumption: The sensor has low power consumption, making it suitable for
battery-powered applications.
Simple Usage: The sensor's protocol is relatively easy to work with, and there are libraries
available for various microcontroller platforms that simplify the integration process.
Limitations: While the DHT11 is cost-effective and easy to use, it has some limitations such
as limited accuracy compared to more advanced sensors. Its response time can also be relatively
slow.
Notable Alternatives: If higher accuracy and faster response times are required, the DHT22
(also known as AM2302) is a more advanced version of the DHT11 that offers better
performance in terms of temperature and humidity measurements.
E. Jumper Cable:
Jumper cables, also known as jumper wires or simply jumpers, are essential electronic
components used to create temporary connections between electronic components on
breadboards, circuit boards, or other prototyping platforms. They're commonly used in
electronics projects and experiments to establish electrical connections without the need for
soldering.
Here's some key information about jumper cables:
Purpose: Jumper cables are used to connect various components like microcontrollers, sensors,
LEDs, resistors, and other electronic elements on a breadboard or prototyping board. They
enable you to quickly prototype and test circuits.
F. Display:
In the realm of the Internet of Things (IoT), a variety of display technologies are utilized
to facilitate user interaction, data visualization, and feedback. The choice of display type often
depends on factors such as power consumption, visibility, form factor, and the specific
application's requirements.
Here are some common types of displays used in IoT devices:
OLED (Organic Light Emitting Diode) Displays: OLED displays are known for their vibrant
colours, high contrast ratios, and thin form factor. They emit light directly, which eliminates
the need for a backlight, resulting in energy efficiency. OLED displays are commonly found
in wearable devices, smartwatches, fitness trackers, and some industrial IoT applications.
AMOLED (Active Matrix Organic Light Emitting Diode) Displays: AMOLED displays
enhance the performance of OLED displays by incorporating an active matrix for better pixel
G. Breadboard:
A breadboard, also known as a protoboard or solderless breadboard, is a fundamental
tool used in electronics for quickly and easily assembling and testing electronic circuits without
soldering. It's widely used by hobbyists, students, and professionals to prototype and
experiment with circuits before committing to a permanent design.
Here's an overview of what a breadboard is and how it's used:
Structure and Components: A typical breadboard consists of a rectangular plastic housing
with a grid of interconnected holes. These holes are arranged in rows and columns, and each
row is electrically connected while the columns are isolated from each other. The board
typically has two main sections separated by a gap in the middle: the terminal strips and the
main breadboard area.
Terminal Strips: The terminal strips are located on the sides of the breadboard and are used
for power distribution. They usually have multiple interconnected rows where you can insert
wires or components to provide power and ground connections. One side might be used for
power (usually red for positive and black for ground), and the other side for the opposite power
polarity.
Main Breadboard Area: The main area of the breadboard is where you place and connect
components to create your circuit. The holes in this area are interconnected in a specific pattern,
usually referred to as "tie points." These interconnected holes in a row are used to create
electrical connections between components.
int RawValue = 0;
double Voltage = 0;
double tempC = 0;
double tempF = 0;
void setup()
{
Serial.begin(9600);
pinMode(A1, INPUT);
}
void loop()
{
RawValue = analogRead(analogIn);
Voltage = (RawValue / 1023.0) * 5000;
tempC = (Voltage - 500) * 0.1;
Serial.print("Temperature in C = ");
Serial.print(tempC, 1);
humiditysensorOutput = analogRead(A1);
Serial.print("\t Humidity: ");
Serial.print(map(humiditysensorOutput, 0, 1023, 10, 70));
Serial.println("%");
delay(5000);
}
MQTT’s communication model avoids direct connections between devices by relaying data
through a central server called the broker. This is really desirable in IoT because it’s easy to add
new devices without touching the existing infrastructure, and since new devices only need to
communicate with the broker, they don’t actually need to be compatible with the other clients.
When a device (or client) wants to send data to a server (or broker) it is called a publish. When
the operation is reversed, it is called a subscribe. Multiple clients can connect to the broker and
subscribe to topics that they are interested in. Clients can also publish messages to specific topics
of their interest through the broker. The broker is a common interface for devices to connect to,
and exchange, data.
Another useful analogy is the post office, where instead of a device sending messages directly
to the recipient device(s) as in a peer-peer connection, they are sent to the post office (the broker),
and the broker forwards it to everyone that needs that message. The big difference is that MQTT
doesn’t use the address of the intended recipient, rather it uses a subject line called the ‘topic”. If
anyone wants a copy of that message, all they need do is to subscribe to that topic. And if a broker
receives a message on a topic for which there are no current subscribers, the broker discards the
message unless the publisher of the message designated the message as a retained message.
For example, let’s say you have a setup where a humidity sensor needs to send its readings to
the broker. And on the other end, a computer and a mobile device need to receive this humidity
value. In order to get the readings across to the receiving devices, the MQTT publish/subscribe
data flow process goes through the following steps:
Firstly, the humidity sensor defines the topic it wants to publish on, in this case, “Humidity”.
Then, it publishes the message “humidity value”. Secondly, the computer and mobile device at
the receiving end subscribes to the topic “Humidity”. This enables them to receive the message
that the humidity sensor has published–humidity value. As stated earlier, the role of the broker
here is to take the message “humidity value” and deliver it to the receiving computer and mobile
device
import base64
import requests
Once the function is deployed successfully, you will notice that it indicates the Test_Topic
as the trigger for the function.
When we run the “message_publish” script, it will publish the data to the Test_Topic and
trigger the Google Cloud Function (print_message_pubsub_test), which will send the data to
the Webhook site. We can see the messages published to the topic within the Pub/Sub topic
Problem statement:
• Recent studies show that up to 2% to 3% of the Indian population suffers a degree of speech,
language or communication need.
• Only a very small fraction (0.25%) of Deaf individuals have access to education that
prioritizes sign language, which is crucial for communication within the Deaf community.
Additionally, there's a severe shortage of registered interpreters, with only 250 available for
the 18 million Deaf people in India. A Sign Language Recognition .
Technology stack:
• Windows 10+ OS
• Python 3.9+
• Tensorflow 1.5.1
• Mediapipe
DEPENDENCIES:
Use cases:
• Communication for Deaf-mute Individuals
• Sign Language Accessibility in Media
• Job Accessibility
• Medical Interpreting
• Emergency Services.
• the process of sign language recognition using deep learning involves collecting keypoints
with MediaPipe Holistic, training a neural network with LSTM layers to understand
sequential data, and performing real-time detection with OpenCV.
• This technology has the potential to enhance communication and accessibility for the
hearing-impaired community, making communication more inclusive and efficient.