You are on page 1of 50

ABSTRACT

Now a days the main problem facing by the population in the world is pollution.
Mainly the air pollution which is caused by the toxic gases of automobiles,
industries and power plants. The air pollution causes global warming, breathing
problems to the human beings especially to the children. Recently the Delhi
government banned the diesel vehicles of life time more than 15years on road in
order to reduce pollution.

Some of the industries does not follows the rules of the pollution control board of
India in terms of the chimney height and the amount of toxity in the smoke which
is released by the industry.

In our project, we are using air quality sensor and temperature and humidity
sensor. The air quality sensor(MQ 135) senses the carbon dioxide which is
harmful present in the air. The temperature and humidity sensor(DHT11) senses
the temperature and humidity in that area. Both these sensors send their
information to micro controller(ESP8266). This microcontroller calculates the
amount of gas, temperature and humidity based on the program which we are
programmed in the micro controller using arduino software. The Wi-Fi module is
inbuilt in the micro controller. This arrangement is placed on the quadcopter and
when the quadcopter is lifted to height near to the chimney the sensors do they
work and give their output to the micro controller. The mobile with Blynk app and
microcontroller is connected to the same wifi. The blynk shows the output.

1
Chapter-1
INTRODUCTION
As we know the Global warming is increasing day by day in the world. The
industries releases harmful gases into the atmosphere in every day. The gases
cause the destruction of the ozone layer which protect us from the ultraviolet
rays from sun.

Air pollution is one of the most important factors affecting the quality of life and
the health of the increasing the urban population of industrial societies . In many
cities, the air is polluted by emissions from sources such as cars and trucks, Power
plants and industries. When gases and particles from those activities accumulate
in the air in high enough concentrations, they can be harmful for human health,
environment . often, terrain and meteorological conditions complicate air quality
issues in the area.

A Quad copter is a multi copter lifted and propelled by four rotors. Quad copter is
also known as Drones. In many countries the drones are used for military missions
and many investigations. In many foreign countries the drones are used for pizza
delivery purposes.

In our project we are using air quality sensor for measuring the toxic level in
atmosphere. Here we are placing the sensor on the quad copter and with the
help of quad copter we can measure the toxic level in the atmosphere up to one
kilometer from the surface. Some of the industries does not follows the rules of
the pollution control board. So with our project we can measure the pollution
content in that area and also we can gave report and it can also used as evidence
and help to the pollution control department.

2
Chapter-2
QUADCOPTER

QUADCOPTER
3

Quad copter also called a multi rotor helicopter that is lifted and propelled by four
rotors. Quad copters are classified as rotor craft, as opposed to fixed wing air craft
because their lift is generated by a set of rotors .the components of quad copter
are

1. Aluminum H-frame

2. BLDC Motors

3. Propellers

4. Electronic speed control

5. Flight control board

6. Transmitter and receiver

7. Battery

4
2.1 ALUMINIUM H-FRAME

• Frame is a structure that holds all the components together.

• The frame should be rigid and able to minimize the vibrations coming from
the motors

• The frame consists of:

1.The center plate where the electronics are mounted

2.Four arms mounted to the center plate

Hollow aluminum square rails is are used because of its relatively light
weight, rigidness and affordability. Here we are using 14 inches frame.
5

2.2 BLDC MOTORS

• Quad copters usually use brushless out runner motors as their power
plants.

• As the name implies, BLDC motors do not use brushes for commutation,
they are electronically commutated.

• The ratings of BLDC motors are usually expressed in 850kv,1100kv etc…


Here the KV does not refer to 1000 volts, but it refers to how much Rpm it
turns per volt. Ex: For 1V it will rotate at 1000rpm(1000kv).

6
CHOOSING OF BLDC MOTOR FOR
QUADCOPTER
• It is important to make sure that your motor can produce
around 50% more thrust than the total weight of the drone
• It is an important rule to follow for control the multi rotor
in wind and during aggressive flight manures.
• T=[(eta*p)^2*2*Pi*R^2*rho]^0.3333
• Where T=thrust(in Newton's)
• eta=propeller hover efficiency
• Pi=3.14159
• P=shaft power=voltage*current*motor efficiency(in watts)
• R=propeller radius(in meters)
• rho=air density=1.22kg/m^3
• Efficiency=thrust in gm/power in watts

This is an important rule to follow that your motors will have enough extra thrust
to control your multi rotor in wind and during aggressive flight maneures.

If your total weight of your quad copter is 800gm, your motors on a quad copter
will need to produce 1.6kg of thrust in total or 400gm maximum thrust per motor

EFFICIENCY=THRUST in gm/POWER in watts.

7
2.3 PROPELLERS

 Smaller propellers under 8 inches are used for racing and acrobatics with
smaller motors rated with high KV.
 Larger propellers over 8 inches are used for low KV motors
 In our project we are using propellers of “ 10*4.5”
 Here 10 indicates the length in inches and 4.5 indicates the
pitch.
 The pitch can be defined as the travelling distance for a single revolution of
the propeller.
 Generally lower pitch will generate more torque for lifting and the motors
don’t have to work hard to carry heavy loads.
 For stable flight we need an equal number of clockwise and counter
clockwise rotating propellers. so here we are using two propellers in
clockwise and the other two are in counter clockwise. these are connected
to motor shaft

8
2.4 ELECTRONIC SPEED CONTROL

• The brushless motors are multi phased, normally three phases so direct
supply of DC power will not turn the motors on. The ESC comes to play.

• The ESC generates three high frequency signals with different but
controllable phases continually to keep the motor turning. the ESC
connected to flight control

• The choice ESC depends upon the current rating, here we are using ESC
(10A,30A)

Here 10A indicates continous current and 30A indicates burst current.

9
2.5 FLIGHT CONTROL BOARD

• The brushless motors are multiphased,normally three phases so direct


supply of DC power will not turn the motors on.the ESC comes to play.

• The ESC generates three high frequency signals with different but
controllable phases continually to keep the motor turning.the ESC
connected to flight control

• The choice ESC depends upon the current rating, here we are using ESC
(10A,30A)

Here 10A indicates continous current and 30A indicates burst current

10
2.6TRANSMITTER AND RECEIVER

• The radio transmitter is a device that allows the pilots to control the aircraft
wire lessely, the commands are received by a radio receiver which is
connected to the flight controller

• Here we are using six channel transmitter and receiver

• 1-channel:speed(throttle) makes the quad ascend (climb) or descend(come


down)

• 2-channel:yaw(rotating right and left)

• 3-channel:pitch(pitch or lean forward and backward)

• 4-channel:roll(roll or leaning left and right)

• 5-channel:altitude hold

• 6-channel:return to land
11

• Roll – Done by pushing the right stick to the left or right. Literally rolls
the quadcopter, which maneuvers the quadcopter left or right.
• Pitch – Done by pushing the right stick forwards or backwards. Tilts
the quadcopter, which maneuvers the quadcopter forwards or
backwards.
• Yaw – Done by pushing the left stick to the left or to the right. Rotates
the quadcopter left or right. Points the front of the copter different
directions and helps with changing directions while flying.
• Throttle – To increase, push the left stick forwards. To decrease, pull
the left stick backwards. This adjusts the altitude, or height, of the
quadcopter.
• Trim – Buttons on the remote control that help you adjust roll, pitch,
yaw, and throttle if they are off balance.
• The Rudder – You might hear this term thrown around, but it’s the
same as the left stick. However, it relates directly to controlling yaw
(as opposed to the throttle).
• Aileron – Same as the right stick. However, it relates directly to
controlling roll (left and right movement).
• The Elevator – Same as the right stick. However, it relates directly to
controlling
• pitch (forwards and backwards movement)

12
2.7 BATTERY

• Li-Po batteries are the power source of the quad copters, Li-Po is used
because it has high energy density and high discharge rate.

• In the old days Ni-MH was also used, because they were more widely
available and cheaper, however they are also a lot heavier than Li-Po
batteries

• Here we are using battery of 3200mah.

13
Chapter-3
OPERATION OF QUADCOPTER
A quad copter flies with four spinning propellers on a shaped frame. When one
rotor spins faster than the rotor on the opposing side, the faster side will come
more lift, and thus the quadcopter will tilt. When the quad copter is tilted, the air
is being blown slightly sideways instead of directly down and the quad copter will
move. The propellers also need to be in counter rotating pairs, two spin clockwise
and two spin counter clockwise. This way, the quad copter does not spin on the
vertical axis since the rotational inertia is cancelled out. But when the pair that
spinning in one direction is faster than the other pair, the quad copter will spin on
the vertical axis. This is how the quad copter controls its direction.

We are building the flight controller circuit that contains an accelerometer and
gyroscope sensor so that a microcontroller can detect undesired changes in the
quad copters angle, and adjust each rotors speed accordingly to counter the
variation. This microcontroller will do this hundreds of times per second, keeping
the quad copter stable in the air. This microcontroller will also take inputs from a
RC radio receiver, so we can control the quad copter from the ground using a RC
radio transmitter.

14
3.1 QUAD COPTER CONTROLS
With any of these controls, the harder you push the stick, the stronger your
quadcopter will move in either direction.
When you first start out, push the sticks very gently so the quadcopter
performs slight movements.
As you get more comfortable, you can make sharper movements.
There are four main quadcopter controls:

 Roll
 Pitch
 Yaw
 Throttle

Simple sketch of roll, pitch, yaw, and throttle on a transmitter (left image)
and quadcopter (right image).

15
Let’s go through each of them.
Roll
Roll moves your quadcopter left or right. It’s done by pushing the right stick
on your transmitter to the left or to the right.
It’s called “roll” because it literally rolls the quadcopter.
For example, as you push the right stick to the right, the quadcopter will
angle diagonally downwards to the right.

Example of a quadcopter rolling left and right. Notice the tilt of the
quadcopter and the angle of the propellers.

Here, the bottom of the propellers will be facing to the left. This pushes air
to the left, forcing the quadcopter to fly to the right.
The same thing happens when you push the stick to the left, except now
the propellers will be pushing air to the right, forcing the copter to fly to the
left.
Pitch
Pitch is done by pushing the right stick on your transmitter forwards or
backwards. This will tilt the quadcopter, resulting in forwards or backwards
movement.

16
Example of a quadcopter pitching forwards and backwards. Note that this
view is from the left side.

Yaw
Yaw was a little bit confusing for me in the beginning. Essentially, it rotates
the quadcopter clockwise or counterclockwise.
This is done by pushing the left stick to the left or to the right.
Yaw is typically used at the same time as throttle during continuous flight.
This allows the pilot to make circles and patterns. It also
allows videographers and photographers to follow objects that might be
changing directions.
Throttle
Throttle gives the propellers on your quadcopter enough power to get
airborne. When flying, you will have the throttle engaged constantly.
To engage the throttle, push the left stick forwards. To disengage, pull it
backwards.
Make sure not to disengage completely until you’re a couple inches away
from the ground. Otherwise, you might damage the quadcopter, and your
training will be cut short.

17
Important note:
When the quadcopter is facing you (instead of facing away from you) the
controls are all switched.
This makes intuitive sense…

 Pushing the right stick to the right moves the quadcopter to the right
(roll)
 Pushing the right stick forward moves the quadcopter forward (pitch)
 Pushing the right stick backward moves the quadcopter backward
(pitch)
 And so on.

So pay attention to that as you start changing directions. Always be


thinking in terms of how the quadcopter will move, rather than how the
copter is oriented towards you.

18
3.2 REMOTE CONTROL TRANSMITTER
A transmitter is a hand-held controller that lets you pilot your quadcopter
and control its flight pattern. When you make an adjustment with the sticks,
it sends a signal to your copter telling it what to do next.
Check out this picture describing each part of the transmitter:

Transmitters come in different shapes and sizes. They also have different
features. But there are certain parts that are universal for every transmitter.

19
Right Stick
The right stick controls roll and pitch.
In other words, it moves your quadcopter left/right and backwards/forwards.
Left Stick
The left stick controls yaw and throttle.
In other words, it rotates your quadcopter clockwise or counterclockwise,
and it adjusts the height at which you are flying.
Trim Buttons
Each control has its own trim button, as you can see from the image below.

When you first push your throttle to get your quadcopter off the ground, you
may notice that the UAV automatically tilts and flies to one direction (or
multiple).
This happens when the controls are unbalanced. To balance them out,
certain controls need to be trimmed.
20
How to Get Your Quad copter Off the
Ground
Alright! Now that you understand the controls and you’ve taken all of the
right safety precautions, you’re ready to fly.
To get your quadcopter in the air, the only control you need is the throttle.
Push the throttle (left stick) up very slowly, just to get the propellers going.
Then stop.
Repeat this multiple times and until you’re comfortable with the throttle’s
sensitivity.
Slowly push the throttle further than before, until the copter lifts off the
ground. Then pull the throttle back down to zero and let the quadcopter
land.
If you notice any movements happening without you making them happen,
use the corresponding trim button to balance them out.
For example, if you notice the copter moving to the left when you push the
throttle, adjust the “roll” trim button next to the right stick.
Keep adjusting the trims until you get a relatively stable hover off the
ground by only using the throttle.

21
Land How to Hover in Mid-Air and
To hover, you will use the throttle to get airborne. You will then use small
adjustments of the right stick to keep the quadcopter hovering in place.
You may also need to adjust the left stick (yaw) slightly, to keep it from
turning.
Use the throttle to get the copter about a foot to a foot-and-a-half off the
ground.
Make tiny adjustments with the right stick (and the left, if necessary) to
keep the copter hovering in position.
When you’re ready to land, cut back the throttle slowly.
When the quadcopter is an inch or two off the ground, go ahead and cut
the throttle completely and let the UAV drop to the ground.
Repeat this until you get comfortable hovering off the ground and landing
gently.

22
FlyingLeft/RightandForwards/Backwards
To fly a quadcopter left, right, forwards, and backwards, you will need to
hold the throttle at a steady rate to keep it airborne. You will then use the
right stick to maneuver the quadcopter in the direction you want it to go.
First, bring your copter to a hover.
Push the right stick forward to fly it a couple feet forward.
Pull the right stick back to bring it back to its original position.
Now, move it further backwards a couple feet, and return it to its original
position.
Push the right stick to the left to move your copter a couple feet to the left.
Move it back to its original position, then fly it a couple feet to the right.
If it starts to rotate (yaw), adjust the left stick to the left or right to keep the
copter facing the same direction.

23
Chapter -4
TOXIC LEVEL MEASUREMENT
Air pollution is one of the most important factors affecting the quality of life and
health of the increasing urban population of industrial societies. In many cities the
air is polluted by emissions from sources such as automobiles, power plants and
industries. When gases and particles from those activities accumulate in the air in
high enough concentrations, they can be harmful for human health and
environment. Often terrain and meteorological conditions complicate air quality
issues in the area.
This session deals with the measurement of toxic levels in the atmosphere. This
session uses air quality sensor to measure the toxic levels in the air and
temperature and humidity sensor is used to measure the temperature and
humidity.
Toxic level measurement circuit consists of:
1. Air quality sensor (MQ 135)
2. Temperature and humidity sensor
3. Micro controller(ESP8266)
4. Arduino software
5. Mobile with Blynk app

24
4.1 AIR QUALITY SENSOR (MQ 135)

Sensitive material of MQ135 gas sensor is SnO2, which with lower conductivity in
clean air. When target pollution gas exists, the sensor’s conductivity gets higher
along with the gas concentration rising. Users can convert the change of
conductivity to correspond output signal of gas concentration through a simple
circuit.
MQ135 gas sensor has high sensitivity to ammonia gas, sulfide, benzene series
steam, also can monitor smoke and other toxic gases well. It can detect kinds of
toxic gases and is a kind of low-cost sensor for kinds of applications.

25
BASIC CIRCUIT

Instructions: The above fig is the basic test circuit of MQ135.The sensor requires
two voltage inputs: heater voltage(VH) and circuit voltage(VC). VH is used to
supply standard working temperature to the sensor and it can adopts DC or AC
power, while VRL is the voltage of load resistance RL which is in series with
sensor. VC supplies the detect voltage to load resistance RL and it should adopts
DC power.

26
27
28
Features
It has good sensitivity to toxic gas in wide range, and has advantages such as long
lifespan, low cost and simple drive circuit &etc.
Main Applications
It is widely used in domestic gas alarm, industrial gas alarm and portable gas
detector

Domestic gas leakage detector

Industrial Combustible gas detector

29
4.2 TEMPERATURE AND HUMIDITY
SENSOR

This DHT11 Sensor measures the temperature and humidity. The sensor has
greater reliability and very good stability. A resistive-type humidity measuring
component with negative temperature coefficient is used. It
connectsmicrocontroller and shows excellent quality, anti-interference and fast
response ability

30
Specifications of DHT-11 sensor:

31
4.2.1 WORKING OF DHT11 SENSOR
 This sensor consist of a humidity sensing component, a NTC temperature
sensor (or thermistor) and an IC on the back side of the sensor.

For measuring humidity they use the humidity sensing component which
has two electrodes with moisture holding substrate between them. So as
the humidity changes, the conductivity of the substrate changes or the
resistance between these electrodes changes. This change in resistance is
measured and processed by the IC which makes it ready to be read by a
microcontroller.

32
On the other hand, for measuring temperature these sensors use a NTC
temperature sensor or a thermistor. A thermistor is actually a variable
resistor that changes its resistance with change of the temperature. These
sensors are made by sintering of semiconductive materials such as
ceramics or polymers in order to provide larger changes in the resistance
with just small changes in temperature. The term “NTC” means “Negative
Temperature Coefficient”, which means that the resistance decreases with
increase of the temperature.

APPLICATIONS:

 Weather stations
 Humidity regulator
 Data loggers
 Testing and inspection equipment

33
4.3 MICRO CONTROLLER (ESP8266)

 Espressif’s ESP8266EX delivers highly integrated Wi-Fi SoC


solution to meet users’continuous demands for efficient
power usage, compact design and reliable performance in
the Internet of Things industry.
 With the complete and self-contained Wi-Fi networking
capabilities, ESP8266EX can perform either as a standalone
application or as the slave to a host MCU.

34

 When ESP8266EX hosts the application, it promptly boots up


from the flash. The integrated high speed cache helps to
increase the system performance and optimize the system
memory.
 Also, ESP8266EX can be applied to any micro-controller
design as a Wi-Fi adaptor through SPI / SDIO or I2C / UART
interfaces.
 ESP8266EX integrates antenna switches, RF balun, power
amplifier, low noise receive amplifier, filters and power
management modules. The compact design minimizes the
PCB size and requires minimal external circuitries.
 Besides the Wi-Fi functionalities, ESP8266EX also integrates
an enhanced version of Tensilica’s L106 Diamond series 32-
bit processor and on-chip SRAM. It can be interfaced with
external sensors and other devices through the GPIOs.
 Software Development Kit (SDK) provides sample codes for
various applications. Espressif Systems’ Smart Connectivity
Platform (ESCP) enables sophisticated features including fast
switch between sleep and wakeup mode for energy-efficient
purpose, cancellation and radio co-existence mechanisms for
common cellular, Bluetooth, DDR,LVDS, LCD interference
mitigation. Adaptive radio biasing for low-power operation,
advance signal processing, spur

35
PIN DIAGRAM:
36
37
38
4.3.1 FUNCTIONAL DIAGRAM OF
ESP8266

CPU:
ESP8266EX integrates Tensilica L106 32-bit micro controller
(MCU) and ultra-low-power 16-bit RSIC. The CPU clock speed is 80
MHz It can also reach a maximum value of 160MHz. Real Time
Operation System (RTOS) is enabled. Currently, only 20% of MIPS
has been occupied by the Wi-Fi stack, the rest can all be used for
user application programming and development. The CPU
includes the interfaces as below.
• Programmable RAM/ROM interfaces (iBus), which can be
connected with memory controller, and can also be used to visit
flash.
• Data RAM interface (dBus), which can connected with memory
controller.
• AHB interface which can be used to visit the register.

39
Memory:

ESP8266EX Wi-Fi SoC integrates memory controller and memory


units including SRAM and ROM. MCU can access the memory units
through iBus, dBus, and AHB interfaces. All memory units can be
accessed upon request, while a memory arbiter will decide the
running sequence according to the time when these requests are
received by the processor.

AHB and AHB Blocks:

The AHB block performs as an arbiter. It controls the AHB


interfaces through the MAC, SDIO (host) and CPU. Depending on
the address, the AHB data requests can go into one of the two
slaves.
• APB block
• Flash controller (usually for standalone applications)
Data requests to the memory controller are usually high speed
requests, and requests to the APB block are usually register
access.
The APB block acts as a decoder that only accesses the
programmable registers within the main blocks of ESP8266EX.
Depending on the address, the APB request can go to radio,
SI/SPI, SDIO (host), GPIO, UART, real-time clock (RTC), MAC or
digital baseband.

40

2.4 GHz Receiver:

The 2.4 GHz receiver down-converts the RF signals to quadrature


baseband signals and converts them to the digital domain with 2
high resolution high speed ADCs. To adapt to varying signal
channel conditions, RF filters, automatic gain control (AGC), DC
offset cancelation circuits and baseband filters are integrated
within ESP8266EX.

2.4 GHz Transmitter:

The 2.4 GHz transmitter up-converts the quadrature baseband


signals to 2.4 GHz, and drives the antenna with a high-power
CMOS power amplifier. The function of digital calibration further
improves the linearity of the power amplifier, enabling a state of
art performance of delivering +19.5 dBm average power for
802.11b transmission and +16dBm for 802.11n transmission.
Additional calibrations are integrated to offset any imperfections
of the radio, such as:
• Carrier leakage
• I/Q phase matching
• Baseband nonlinearities
These built-in calibration functions reduce the product test time
and make the test equipment unnecessary.
Wi-Fi ESP8266EX implements TCP/IP, the full 802.11 b/g/n/e/i
WLAN MAC protocol and Wi-Fi Direct specification. It supports not
only basic service

41

set (BSS) operations under the distributed control function (DCF)


but also P2P group operation compliant with the latest Wi-Fi P2P
protocol. Low level protocol functions are handled automatically
by ESP8266EX.
• RTS/CTS
• Acknowledgement
• Fragmentation and defragmentation
• Aggregation
• frame encapsulation (802.11h/RFC 1042)
• Automatic beacon monitoring / scanning.

General Purpose Input/Output Interface (GPIO):

ESP8266EX has 17 GPIO pins which can be assigned to various


functions by programming the appropriate registers.
Each GPIO can be configured with internal pull-up or pull-down, or
set to high impedance, and when configured as an input, the data
are stored in software registers; the input can also be set to edge-
trigger or level trigger CPU interrupts. In short, the IO pads are
bidirectional, non-inverting and tristate, which includes input and
output buffer with tristate control inputs.

LED Light and Button:


ESP8266EX features 17 GPIOs, all of which can be assigned to
support various functions of LED lights and buttons.

42
Applications:

• Home Appliances
• Home Automation
• Smart Plugs and Lights
• Mesh Network
• Industrial Wireless Control
• Baby Monitors
• IP Cameras
• Sensor Networks
• Wearable Electronics
• Wi-Fi Location-aware Devices
• Security ID Tags
• Wi-Fi Position System
43

4.4 ARDUINO SOFTWARE


This arduino software is used to programming the microcontroller. Based on this
program the micro controller can calculate the appropriate gas which we are
defined in the program.

If we have used the Arduino Wi-Fi library before, the ESP8266 Wi-Fi library will be
very similar, there just a few differences:

 To include the ESP8266 Wi-Fi library call


#includes<ESP8266WiFi.h> not <WiFi.h>.
 To connect to a network, like the normal Wi-Fi library call
WiFi.begin (NetworkSSID, NetworkPassword).
 You can also set the ESP8266 up as a Wi-Fi access point by calling
WiFi.softAP (AP_SSID, AP_Password).
 To set the ESP8266’s mode, which can be access point(AP),station(STA),or
combo(the ESP8266 can do both at same time!) call
WiFi.setMode([mode]) with either WiFi_AP,WiFi_STA, or WIFI_STA_AP as
the parameter.
44

4.4.1 PROGRAM
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#include <SimpleTimer.h>

#include <MQ135.h>

#include "DHT.h"

#define DHTPIN 4

#define DHTTYPE DHT11

Int pin = A0;

int ledPin = 13;

DHT dht(DHTPIN, DHTTYPE);

MQ135 gas Sensor = MQ135(pin);

char auth[] = "8ee361a30c1348f18a02aa7bc77f5aaa";

char ssid[] = "BLL";

char pass[] = "zxcvbnmk";

void send Sensor()

float h = dht.readHumidity();
float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

45

if (isnan(h) || isnan(t)) {

Serial.println("Failed to read from DHT sensor!");

return;

// You can send any value at any time.

// Please don't send more that 10 values per second.

Blynk.virtualWrite(V5, h);

Blynk.virtualWrite(V6, t);

BLYNK_READ(V7)

float co2_ppm = gasSensor.getPPM();

Blynk.virtualWrite(V7,co2_ppm);

void setup()

// Debug console

Serial.begin(115200);

dht.begin();

Blynk.begin(auth, ssid, pass);


timer.setInterval(1000L, sendSensor);

46

// You can also specify server:

//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);

//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);

void loop()

Blynk.run();

timer.run();

}
47

4.5BLYNK APP
This is an mobile app. This can be download from the play store. This is used as a
display unit

Blynk is a Platform with iOS and Android apps to control Arduino,


Raspberry Pi and the likes over the Internet.

It's a digital dashboard where you can build a graphic interface for
your project by simply dragging and dropping widgets.

It's really simple to set everything up and you'll start tinkering in


less than 5 mins.

Blynk is not tied to some specific board or shield. Instead, it's


supporting hardware of your choice. Whether your Arduino or
Raspberry Pi is linked to the Internet over Wi-Fi, Ethernet or this
new ESP8266 chip, Blynk will get you online and ready for the
Internet Of Your Things. 

Here both the mobile and micro controller should be connected to


the same Wi-Fi. The blynk id is to be including in the micro
controller program and then execute.
48

Chapter-5
SENSOR PART CONNECTION
49

BLYNK APP OUTPUT


50

You might also like