The document discusses Internet of Things (IoT) and how to implement a basic IoT system using an ESP8266 microcontroller. IoT refers to connecting physical devices to the internet. An ESP8266 allows connecting sensors like a DHT11 temperature/humidity sensor and an MQ-2 smoke sensor to WiFi. The Arduino IDE is used to program the ESP8266. Code is provided to read from the sensors and transmit temperature, humidity, and smoke detection data over serial. When implemented, this basic IoT system could detect and report on environmental conditions from a remote location.
2. What is IOT?
Internet Of Things-
It is network that connect all the devices with each Other . “It is
the network of physical devices, vehicles, home appliances and electronics items like
software, sensors, motors. Which enable these objects to connect and exchange data
with other.”
Smart Phone, Smart Watches, Laptop Or any other device which is connected with Internet comes
under the category of IOT .
In Electronics we Learn how to connect Various sensors, motors etc. with a Internet, So that they can be
accessible from anywhere in the World.
2
4. Future scope
As India is a developing country, it has a wide IoT
scope, the demand for an IoT Developer has
jumped over 300 percent.
Fields -
Agriculture.
Traffic monitoring.
Automation.
Health Tracking.
4
5. “If you think that the internet
has changed your life, think
again . IOT is about to change
it all over again!
5
6. Microcontrollers
It is an Electronic device, that is responsible for all
the processing and calculation Part .
Basically it is same as your Brain Just like brain
things that I have to buy chocolate if Mom gives
me the Money , here money is working as a input
and our brain is a processor and chocolate is the
output .
6
7. How to implement
IOT
╸ For the implementation of IOT we must a
procssor or brain that has the ability to work
with internet or wifi.
╸ So we Have NODE MCU Board, that has inbuilt
WIFI and Bluetooth connectivity.
Various models of NODEMCU are Available in
Maket like ESP32, ESP8266 etc.
7
8. ESP 32
It is a Dual Core Processor.
It has wifi and bluetooth.
It has a ROM of 448 kb.
In-built temp. sensor
included.
Expensive than 8266.
Comparison
of ESP32 and 8266
ESP 8266
It is a Single Core Processor.
It has only wifi .
It has a ROM of 80 kb.
No In-built temp. sensor is
there.
Cheaper than 8266.
8
9. What is ESP8266?
It is a low-cost Wi-Fi microcontroller.
It supports Wi-Fi Connectivity, that
means we can monitor or control
anything with our mobile phone from
anywhere in the world.
Example- Suppose That you connect a led with
that and now the led is in home and you are in
school, you can turn in on and off from school by
just using the phone.
9
10. Pins diagram
ESP8266
10
╸ It has 17 GPIO pins
╸ 1 Analog input Pin
╸ It has 3.3v Output pin
╸ And various communications
protocol pins like I2C , UART
etc.
11. What is DHT 11?
It is a low-cost Temperature and Humidity
Sensor, that comes with a dedicated NTC to
measure temperature and an 8-bit
microcontroller to output the values of
temperature and humidity as serial data.
11
12. Pins diagram
DHT11
12
╸ VCC And GND pin connects
to the power supply of 3.3v
to 5v
╸ Output pin is Data [2]pin,
that Outputs both
Temperature and Humidity
through serial Data
It is 3 pin Sensor
13. What is MQ-2?
It is a low-cost Smoke Sensor, used for the
detection of gas leakage (home and
industry). It is suitable for detecting H2, LPG,
Alcohol, Smoke etc.
13
14. Pins diagram
MQ-02
14
╸ VCC And GND pin connects
to the power supply of 5v
╸ Output pin is are 2 one is
Analog and other one is
Digital Output.
It is 4 pin Sensor
15. What is Arduino IDE?
It is a Open Source Software that
means anyone can use it free.
Just like when we need anything from
father we go to mother and tell ask dad
for that . Here Mother works as a
medium between you and your dad.
It provide us the medium to
communicate with microcontroller .
15
16. How to add ESP 8266 ?
Step-1:
In your Arduino IDE,
Go to File> Preferences
16
17. How to add ESP 8266 ?
Step-2:
Enter
http://arduino.esp8266.com/stable/pac
kage_esp8266com_index.json into the
“Additional Boards Manager URLs”,
then press ok.
17
18. How to add ESP 8266 ?
Step-3:
Open the Boards Manager.
Go to Tools > Board > Boards
Manager…
18
19. How to add ESP 8266 ?
Step-4:
Search for ESP8266 and press install
button for the
“ESP8266 by ESP8266 Community“:
19
20. How to add ESP 8266 ?
Step-5:
That’s it.
It should be installed after a few
seconds.
20
21. How to Interface?
╸ For the interfacing we must have DHT11, Mq-2,
jumper wires, Esp 8266 and laptop for coding.
21
22. How to connect DHT 11 ?
First Connect Vcc of sensor to 3.3v of Esp
board and ground to Gnd pin.
Then connect data Pin of Dht 11 to D0 pin of
Esp board
22
23. How to connect MQ-02 ?
First Connect Vcc of sensor to 3.3v of Esp
board and ground to Gnd pin.
Then connect the A0 Pin of MQ-02 to A0 pin
of Esp board
23
24. Programming
╸ For the measurement of temp. we need to
install dht11 library from library manager .
╸ And for the measurement of smoke we just
need to use if else statement.
24
25. Programming
For Temperature we have to use function float t = dht.readTemperature();
For Humidity the function is float h = dht.readHumidity();
And for smoke detection-
25
27. OUTPUT
╸ When it detect smoke the serial monitor will
show smoke detected and if there is no smoke
then it show smoke not detected
╸ After that serial monitor will show the Temp. and
Humidity level
27