0% found this document useful (0 votes)
114 views18 pages

HGN Iot PDF

The document discusses using Node MCU, a smoke detection sensor, and a vibration detection sensor with the Blynk app for machine maintenance. Specifically, it discusses: - Using a Node MCU microcontroller to connect sensors to a WiFi network and the Blynk IoT platform. - An MQ2 smoke detection sensor that can detect smoke and gases like LPG between 200-10,000 ppm. - A vibration detection sensor that uses a roller switch to detect vibrations or movements and trigger an alarm. - How these sensors could be used with the Node MCU and Blynk app for machine condition monitoring and fault detection.

Uploaded by

Gagan Singhvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views18 pages

HGN Iot PDF

The document discusses using Node MCU, a smoke detection sensor, and a vibration detection sensor with the Blynk app for machine maintenance. Specifically, it discusses: - Using a Node MCU microcontroller to connect sensors to a WiFi network and the Blynk IoT platform. - An MQ2 smoke detection sensor that can detect smoke and gases like LPG between 200-10,000 ppm. - A vibration detection sensor that uses a roller switch to detect vibrations or movements and trigger an alarm. - How these sensors could be used with the Node MCU and Blynk app for machine condition monitoring and fault detection.

Uploaded by

Gagan Singhvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

INTERNET OF THINGS

USING NODE MCU, SMOKE DETECTION SENSOR & VIBRATION DETECTION


SENSOR WITH BLYNK APP FOR MACHINE MAINTENANCE.

SUBMITTED BY: GAGAN SINGHVI(BFT/17/77)


HARSH RAJ(BFT/17/437)
NEERAJ KUMAR(BFT/17/137)
BREADBOARD
A breadboard is a solderless device for temporary prototype with electronics and test circuit
designs. ​Most electronic components in electronic circuits can be interconnected by
inserting their leads or terminals into the holes and then making connections through wires
where appropriate. The breadboard has strips of metal underneath the board and connect
the holes on the top of the board. The metal strips are laid out as shown below. Note that
the top and bottom rows of holes are connected horizontally and split in the middle while
the remaining holes are connected vertically.

Jumper wires
Jumper wires are simply wiring that have connector pins at each end, allowing them to be
used to connect two points to each other without soldering. Jumper wires are typically used
with breadboards and other prototyping tools in order to make it easy to change a circuit as
needed. Fairly simple. In fact, it doesn’t get much more basic than jumper wires.
Though jumper wires come in a variety of colours, the colours don’t actually mean anything.
This means that a red jumper wire is technically the same as a black one. But the colours can
be used to your advantage in order to differentiate between types of connections, such as
ground or power.
Jumper wires typically come in three versions: male-to-male, male-to-female and
female-to-female. The difference between each is in the end point of the wire. Male ends
have a pin protruding and can plug into things, while female ends do not and are used to
plug things into. Male-to-male jumper wires are the most common and what you likely will
use most often. When connecting two ports on a breadboard, a male-to-male wire is what
you’ll need.

NODE MCU esp8266


This small module allows microcontrollers to connect to a Wi-Fi network and make simple
TCP/IP connections using ​Hayes​-style commands. However, at first there was almost no
English-language documentation on the chip and the commands it accepted. The very low
price and the fact that there were very few external components on the module, which
suggested that it could eventually be very inexpensive in volume, attracted many hackers to
explore the module, chip, and the software on it, as well as to translate the Chinese
documentation.
SMOKE DETECTOR SENSOR

What is MQ2 Gas Sensor?

MQ2 is one of the commonly used gas sensors in MQ sensor series. It is a Metal Oxide
Semiconductor (MOS) type Gas Sensor also known as ​Chemiresistors​ as the detection is
based upon change of resistance of the sensing material when the Gas comes in contact
with the material. Using a simple voltage divider network, concentrations of gas can be
detected.

MQ2 Gas sensor works on 5V DC and draws around 800mW. It can detect ​LPG​, ​Smoke​,
Alcohol​, ​Propane​, ​Hydrogen​, ​Methane​ and ​Carbon Monoxide ​concentrations anywhere
from 200 to 10000ppm.
SPECIFICATIONS

Operating voltage 5V

Load resistance 20 KΩ

Heater resistance 33Ω ± 5%

Heating consumption <800mw

Sensing Resistance 10 KΩ – 60 KΩ

Concentration Scope 200 – 10000ppm

Preheat Time Over 24 hour


Internal structure of MQ2 Gas Sensor
The sensor is actually enclosed in two layers of fine stainless steel mesh called
Anti-explosion network​. It ensures that heater element inside the sensor will not cause an
explosion, as we are sensing flammable gases.

It also provides protection for the sensor and filters out suspended particles so that only
gaseous elements are able to pass inside the chamber. The mesh is bound to rest of the
body via a copper plated clamping ring.

This is how the sensor looks like when outer mesh is removed. The star-shaped structure
is formed by the sensing element and six connecting legs that extend beyond the Bakelite
base. Out of six, two leads (​H​) are responsible for heating the sensing element and are
connected through ​Nickel-Chromium coil​, well known conductive alloy.
The remaining four leads (​A​ & ​B​) responsible for output signals are connected using
Platinum Wires​. These wires are connected to the body of the sensing element and convey
small changes in the current that passes through the sensing element.

The tubular sensing element is made up of ​Aluminum Oxide​ (AL2O3) based ceramic and
has a coating of ​Tin Dioxide​ (SnO2). The Tin Dioxide is the most important material being
sensitive towards combustible gases. However, the ceramic substrate merely increases
heating efficiency and ensures the sensor area is heated to a working temperature
constantly.

So, the Nickel-Chromium coil and Aluminum Oxide based ceramic forms a ​Heating System​;
while Platinum wires and coating of Tin Dioxide forms a ​Sensing System​.
How does a gas sensor work?

When tin dioxide (semiconductor particles) is heated in air at high temperature, oxygen is
adsorbed on the surface. In clean air, donor electrons in tin dioxide are attracted toward
oxygen which is adsorbed on the surface of the sensing material. This prevents electric
current flow.

In the presence of reducing gases, the surface density of adsorbed oxygen decreases as it
reacts with the reducing gases. Electrons are then released into the tin dioxide, allowing
current to flow freely through the sensor.

Hardware Overview – MQ2 Gas Sensor Module

Since MQ2 Gas Sensor is not breadboard compatible, we do recommend this handy little
breakout board. It’s very easy to use and comes with two different outputs. It not only
provides a binary indication of the presence of combustible gases but also an analog
representation of their concentration in air.
The analog output voltage provided by the sensor changes in proportional to the
concentration of smoke/gas. The greater the gas concentration, the higher is the output
voltage; while lesser gas concentration results in low output voltage. The following
animation illustrates the relationship between gas concentration and output voltage.

The analog signal from MQ2 Gas sensor is further fed to LM393 High Precision Comparator
(soldered on the bottom of the module), of course to digitize the signal. Along with the
comparator is a little potentiometer you can turn to adjust the sensitivity of the sensor.
You can use it to adjust the concentration of gas at which the sensor detects it.

Calibrate MQ2 Gas Sensor Module

To calibrate the gas sensor you can hold the gas sensor near smoke/gas you want to
detect and keep turning the potentiometer until the Red LED on the module starts
glowing. Turn the screw clockwise to increase sensitivity or anticlockwise to decrease
sensitivity.
The comparator on the module continuously checks if the analog pin (​A0​) has hit the
threshold value set by potentiometer. When it crosses the threshold, the digital pin (​D0​)
will go HIGH and signal LED turns on. This setup is very useful when you need to trigger an
action when certain threshold is reached. For example, when the smoke crosses a
threshold, you can turn on or off a relay or instruct your robot to blow air/sprinkle water.
You got the idea!

MQ2 Gas Sensor Module Pinout


VCC​ supplies power for the module. You can connect it to 5V output from your Arduino.

GND​ is the Ground Pin and needs to be connected to GND pin on the Arduino.

D0​ provides a digital representation of the presence of combustible gases.

A0​ provides analog output voltage in proportional to the concentration of smoke/gas.

VIBRATION DETECTOR SENSOR

PRINCIPLE

Usually at any angle switch is ON state, by the vibration or movement, the rollers of the
conduction current in the switch will produce a movement or vibration, causing the
current through the disconnect or the rise of the resistance and trigger circuit. The
characteristics of this switch is usually general in the conduction state briefly disconnected
resistant to vibration, so it's high sensitivity settings by IC, customers according to their
sensitivity requirements for adjustments.

Sensor Details SW-420

Single-roller type full induction trigger switch. When no vibration or tilt, the product is ON
conduction state, and in the steady state, when a vibration or tilt, the switch will be
rendered instantly disconnect the conductive resistance increases, generating a current
pulse signal, thereby triggering circuit. These products are completely sealed package,
waterproof, dustproof.

Use

1. The module does not vibrate, vibrate switch is closed conduction state, the output
low, the green indicator light comes ON.
2. Vibration state, vibration switch instantly disconnect the output high, the green
light is not on.
3. The output is directly connected to the microcontroller to detect high and low,
thereby detecting the vibration environment, play an alarm role.

Application Ideas:

1) Vibration detecting
2) Burglary protection system
3) Object Movement detecting
4) Triggering effect reported theft alarm
5) Smart car
6) Earthquake alarm
7) Motorcycle alarm

It is useful for a variety of shocks triggering, theft alarm, smart car, an earthquake alarm,
motorcycle alarm. This module when compared with a normally open pneumatic shock
sensor module, shock triggered much longer can drive relay module the use of the
company’s production of SW-420 normally closed type vibration sensors. comparator
output signal clean wave well, driving ability, 15mA rated voltage and 3.3V-5V output:
digital switching output (0 and 1) a bolt-hole for easy installation small Board PCB
dimensions: 3.2cm x 1.4cm. using the wide LM393 voltage comparator.

WE USED BLYNK APP TO DISPLAY OUR RESULTS.


CODING

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

char auth[] = "mIYCUlYUmZI4D2WYrRl4chTOr4ZyrJyb";

char ssid[] = "Redmi";


char pass[] = "gagan5729";

SimpleTimer timer;

int vs = D0;
int sdata = 0;
int mq135 = A0; // smoke sensor is connected with
the analog pin A0
int data = 0;

String vdata = "";

void myTimerEvent()
{

Blynk.virtualWrite(V1, millis() / 1000);

void setup()
{
// Debug console
Serial.begin(9600);
pinMode(vs ,INPUT);
Blynk.begin(auth, ssid, pass);
timer.setInterval(1000L, getSendData);
timer.setInterval(10L,sensorvalue);
}

void loop()
{
Blynk.run();
timer.run();

void sensorvalue()
{
long measurement =vibration();
//delay(50);
Serial.println(measurement);
Blynk.virtualWrite(V3, measurement);
if( measurement > 1000 )
{
Blynk.notify("Vibration detected!!");
}
vdata = vdata + "Vibration: " + measurement;

Blynk.virtualWrite(V2, vdata);
vdata = "";
}

long vibration(){
long measurement=pulseIn (vs, HIGH);
return measurement;
}
void getSendData()
{
data = analogRead(mq135);
Blynk.virtualWrite(V5, data); //virtual pin V3

if (data > 500 )


{
Blynk.notify("Smoke Detected!!!");
}

}
Abstract
Here we have used a smoke detector sensor and a vibration sensor in
reference with the maintenance of costly industrial machines. The vibration
sensor will recognize the wear and tear of machines as whenever there is any
problem inside a machine, its vibration increases.
We have used a smoke sensor to avoid accidents and to know where the
problem is as sometimes we can smell smoke but cant detect from where it is
coming from. The various smoke detector attached to the huge machine will
tell us from which part of the machine smoke is coming out from.

Other than the industry the vibration sensor can also be used as an earthquake
detection in earthquake prone areas to avoid accidents.
COMPNENTS AND THEIR CONNECTIONS
Smoke sensor Vibration sensor
Process
We have used blynk app to display the result over cloud.
We uploaded the programme on nodemcu which is connected to the internet through my
mobile hotspot whose details are fed into the programme.
We have added the a new project into the blynk app and created various gauge to display
results.
The app is connected to the nodemcu by providing virtual pins which is also added into the
program.
We need internet as the data is displayed over cloud .
We made the connection of the smoke and vibration sensor and uploded the program to
the nodemcu.

You might also like