Professional Documents
Culture Documents
Automati Csmokeanalyserusi NG MI Crocontroller
Automati Csmokeanalyserusi NG MI Crocontroller
Automati Csmokeanalyserusi NG MI Crocontroller
CSMOKEANALYSERUSI
NG
MI
CROCONTROLLER
APr
ojectRepor
t
Submi
tt
edi
npar
ti
alf
ulf
il
lmentoft
her
equi
rementf
ort
heMai
n
pr
ojectof
BACHELOROFTECHNOLOGY
I
N
MECHANI
CALENGI
NEERI
NG
Submi
tt
edby
1. K.
RAVIKUMAR (17T91A0311)
2. GOWTHAM (17T91A0325)
3. K.
VIKAS (17T91A0312)
4. K.
SURYAPRAKASH(
18T95A0314)
5. J.
LAKSHMAN (17T91A0317)
Undert
heEst
eemedgui
danceof
Mr
.P.
VIPI
NRAJSI
RM .
Tech
Assi
stantpr
ofessor
DEPARTMENTOFMECHANI
CALENGI
NEERI
NG
Col
legeofEngi
neer
ing
(
APPROVEDBYAI
CTE,
AFFI
LATEDTOJNTUKAKI
NADA)
NH-
16,
Chai
tany
aKnowl
edgeCi
ty,
RAJAMAHENDRAVARAM-
533296A.
P
APRI
L-2020
DEPARTMENTOFMECHANI
CALENGI
NEERI
NGGI
ET
COLLEGEOFENGI
NEERI
NG
Col
legeofEngi
neer
ing
(
Appr
ovedbyA.
I.
C.T.
E,Af
fi
li
atedt
oJNTUKaki
nada)
NH-
16,
Vel
ugubanda,
Raj
amahendr
avar
am,
E.G.
Dist
,A.
P-533296.
BONAFI
DECERTI
FICATE
Thi
sist
ocer
ti
fyt
hatt
hepr
ojectr
epor
tent
it
led."
AUTOMATI
CSMOKE
ANALYSERUSI
NGMI
CROCONTROLLER”isabonafiderecordofworkofthefollowing
candi
dat
eswhocar
ri
edoutt
hepr
ojectwor
kunderoursuper
visi
ondur
ing2019-
2020.
1. K.
RAVI
KUMAR (
17T91A0311)
2. GOWTHAM (
17T91A0325)
3. K.
VIKAS (
17T91A0312)
4. K.
SURYAPRAKASH(
18T95A0314)
5. J.
LAKSHMAN (
17T91A0317)
Di
sser
tat
ionsubmi
tt
edi
spar
ti
alf
ulf
il
lmentoftherequi
rementf
ort
heawar
doft
he
Mainprojectof
BACHELOROFTECHNOLOGY
I
N
MECHANI
CALENGI
NEERI
NG
Mr
.P.
VIPI
NRAJSI
RM.
Tech Mr
.P.
POORNAMOHANM.
Tech,
PhD
(
HeadofDepar
tment
)
(
Proj
ectGui
de)
Cer
ti
fi
edt
hatt
hecandi
dat
eexami
nat
iont
hev
iva-
voi
ceexami
nat
iont
hehel
don
ACKNOWLEDGEMENT
Wet
hankwi
thdeepsenseofacknowl
edgementt
othemanagementofGI
ET
Col
l
egeofEngi
neer
ingandt
oourr
espect
edPr
i pal“
nci Dr.T.
VAMSIKI
RAN”PhD f
or
ext
endi
ngal
lfaci
l
iti
es.
Weexpr
essmysi
ncer
et o“
hankst Mr
.P.
VIPI
NRAJ”M.
Tech(
PhD)
.Associ
ate
pr
ofessor and Head of Depar
tment
, Mechani
cal Engi
neer
ing f
or hi
s excel
l
ent
encour
agementi
ncour
seoft
hiswor
k.
Wet
aket
hei
mmensepl
easur
einconv
eyi
ngourt
hanksanddeepsenseof
gr
ati
tudet
oourcoor
di or“
nat Mr.
M.SURYANARAYANA”M.
Tech.Assi
stantpr
ofessorand
o“
t Mr
.RAJESH”Mechani
cal
Engi
neer
ingl
abassi
stantf
orsuppor
ti
ngusi
nev
erymoment
ofourwor
k.
Lastbutnotl
eastwewoul
dli
ket
othankal
lthet
eachi
ng f
rat
erni
tyf
or
suppor
ti
ngadv
isi
ngaswhenev
eri
nneed,
co-
oper
ati
ngwi
thusandar
rangi
ngt
henecessar
y
f
aci
l
iti
es.
Wewoul
dli
ket
oconv
eygr
ati
tudet
oourpar
ent
swhosebl
essi
ngswer
eal
way
s
t
her
ewi
thus,
final
l
ywewoul
dli
ket
othankourf
ri
endswhodi
rect
lyori
ndi
rect
lyhel
pedusi
n
successf
ulcompl
eti
onoft
hiswor
k.
1.K.
RAVIKUMAR (
17T91A0311)
2.GOWTHAM (
17T91A0325)
3.K.
VIKAS (
17T91A0312)
4.K.
SURYAPRAKASH (
18T95A0314)
5.J.
LAKSHMAN (
17T91A0317)
DECELERATI
ON
Ther
esear
chwor
kcar
ri
edoutbyusi
ntheDepar
tmentofMechani
cal
Engi
neer
ing,
GI
ETCol
l
egeofEngi
neer
ing,
Raj
ahmundr
y“AUTOMATI
CSMOKE
ANALYSERUSI
NGMI
CROCONTROLLER”undert
heest
eemedgui
danceofAssi
stantpr
ofessorMr
.
P.
VIPI
NRAJM.
Tech.
Depar
tmentofMechani
cal
Engi
neer
ing,
GIETCol
l
egeof
Engi
neer
ing,
Raj
ahmundr
y.
Thi
srepor
tisor
igi
nal
andhasnotbeensubmi
tt
edi
npar
torf
ull
forot
herdegr
eeor
di
plomaoft
hisoranyot
heruni
ver
sit
y.Theext
entofi
nfor
mat
ionder
ivedf
rom t
heexi
sti
ngl
i
ter
atur
ehas
beeni
ncor
por
atedi
nthi
srepor
tatappr
opr
iat
epl
aces,
indi
cat
ingt
hesour
ceofi
nfor
mat
ion
1.
K.RAVI
KUMAR (17T91A03
11)
(17T91A03
2.
GOWTHAM
25)
(17T91A03
3.
K.VI
KAS
12)
(18T95A03
4.
K.SURYAPRAKASH
14)
(17T91A03
5.
J.LAKSHMAN 17)
5
ABSTRACT
6
CONTENTS
CHAPTER:
1
I
NTRODUCTION
1.
1 GENERALINTRODUCTI
ON
2GOALOFRESEARCHWORK13
1-
PROBLEM I
DENTI
FICATI
ON
14
PROJECTOBJECTIVES
1.
5
PROJECTSCOPE
CHAPTER:2
LI
TERATURESURVEY
CHAPTER:3
LI
NEDIAGRAM
3.
1 REQUIREDMODULES
3.
2 I
NPUTMODULES
3.
3 OUTPUTMODULES
3.
4 POWERSUPPLY
3.
5 TEMPERATURESENSOR
3.
6 MQ2SENSOR
3.
7 ARDUINOUNO
3.
8 LCDDISPLAY
3.
9 COSENSOR
CHAPTER4
CI
RCUITDI
AGRAM
4.
1 COSENSOR
4.
2 MQ2SENSOR
4.
3 ARDUINOUNO
4.
4 LCDDISPLAY
4.
5 TEMPARATURESENSOR
CHAPTER5
7
ARDUI
NOUNOANDESP8266MODULES
5.
1 ARDUINO
5.
2 ESP8266MODULE
CHAPTER6
SOFWAREUSED
6.
1 ARDUINOIDESOFTWARE
8
LI
STOFFI
GURES
3 No
S. LI
DN
EED
S I
AT
CRI
P G
IR
OA
NM 6
PageNo
4.
1 CARBONMONOXI DESENSOR 12
4.
2 SCHEMATICDIAGRAM 1
4.
23 CONFIGURATI
ON 2 1
4.
24 BASI
CTESTLOOP 4 1
4.
4.1 PINDIAGRAM 4 16
4.
5 TEMPARATURESENSOR 17
4.
5.1 MODULEOFTHECOMPONENT 2
5.
1.4 PINDI
SCRIPTI
ON 0 2
5
5.
2 ARDUINOUNO 27
5.
3 ESP8266MODULE 3
5.
4 PINDIAGRAM OFESP8266 1 3
1
11
Chapter-1 General Theory
CHAPTER-1
Chapter 1
Introduction
The project is also been designed to be further working vision using minimum hardware at the
lower level of processing. These systems are directed at specific applications.
Nowadays the air condition is much polluted. In recent years, car emissions, chemicals from
factories, smoke and dust are everywhere. That is the reason why now air condition is much
polluted. The effect of air pollution is very bad for our health, especially for place where the
air in our body is taken for breathing. In our lungs may cause some diseases, such as asthma,
cough, and lung disorders.
Chapter-2 Literature survey
CHAPTER 2
LITERATURE SURVEY
Few locations, with usually high volume of traffic, may be identified to be monitored.
In this framework, for each monitored location, the RFID readers are placed on the
either side of a road with a fixed short distance in between them. Each vehicle passing
through the road is equipped with a passive RFID tag. Sensor nodes, composed of gas
sensors, are placed on the roadside. The sensor nodes may be identified and addressed
by unique IP address or a unique ID. These nodes gather sensor data continuously and
send it wirelessly to the server. Whenever the sensor nodes sense abrupt rise in
pollution, search is initiated for concerned RFID tags, i.e. vehicles causing pollution
are identified using the RFID tag attached on them. Pollution data is printed on arduino
terminal not sent on internet server.The RFID readers identify corresponding tag
number and transmit the same via the GPRS modem to the server. This framework also
generates alert when pollution level increases. Authorities may take appropriate actions
accordingly. All the gathered data may be monitored and analyzed by authorities
concerned. The system has a significant meaning in terms of cost and effectiveness in
comparison to other non-RFID based vehicle detection system as image processing
solution, GPS and satellites solution requires a large number of expensive and powerful
equipment for processing. Also Wireless sensor along with active RFID can be used in
the wireless sensor system to monitor the vehicular pollution based on IoT. At monitor
location, the RFID reader, wireless gas sensors are integrated along with
microcontroller. This entire system is placed in either of the road. Whenever the
vehicles equipped with RFID tags passed through the sensor node, RFID reader
presented in the monitoring system detects the vehicles and the sensors measures
quality of the air produced by that vehicle. The sensed continuous data is sent to the
microcontroller for verification of the pollution level of the vehicle. The
microcontroller verifies the levels of the pollutants of the air produced by the vehicle.
If the pollutants levels are beyond the threshold levels, then it sends the warning
message to the vehicle owner. The same data is displayed on the Liquid Crystal Display
(LCD). The information about the levels of CO2 and SOx, vehicular number, RFID of
the vehicle and time and date of vehicle are also sent to the server of the authorized
agencies. This information is stored in the server database for future analysis. In this
system using wireless sensor network that provides a framework for collecting the
sensor data at any place using IoT. Wireless sensor along with active RFID is used in
Chapter-2 Literature survey
the proposed wireless sensor system to monitor the vehicular pollution based on IoT.
Pollution data is displayed on LCD & Message alert sent to vehicle owner for exceeding
pollution level. Another proposed system consists of two modules vehicle unit and
remote monitoring unit. Vehicle units, which resides in a vehicle consists of CO2, LPG
GAS sensors, RFID tags and GSM modem. Remote monitoring server area holds the
server unit, GSM modem and Laptop. XAMPP is used as local host server to view the
Arduino contents in the remote area of server. From the proposed system, a low cost
RFID based application can be designed using Arduino and the applications of Home
automation, Industrial control, Transportation can be achieved easily. The vehicle unit
periodic monitoring of the sensor values are noted and send to the laptop via GSM
modem. Along with the Sensor values, Vehicle FC details, Insurance Details, Periodic
Service details are viewed on the laptop using VB. If any increase in the sensor
readings/Date expired of any insurance, FC, Service an alert will be send to the owner,
also the Transport service regarding vehicle insurance. A compact system can be
developed to detect the pollutants in the vehicle which could be assembled in the
vehicle itself. Tremendous innovations have been made in the technology and
manufacturing of cars as well as in the pollution control department but still nothing
significant achieved of it. This idea employs an MQ7 sensor which is economical and
capable of detecting Carbon Monoxide gas emitted from the vehicle. An initial warning
is given to the driver regarding the amount of CO gas with the help of LCD display and
later the same information is transferred to the Pollution Control Board in case of
negligence. This is done with the help of GSM system incorporated in the vehicle. The
AVR Microcontroller is used to transfer the information to the GSM system from the
MQ7 sensor. This paper is capable to measure the value of pollutants emitted by the
vehicle continuously and display it on 16x2 alphanumeric LCD display. Also if the
pollutant level exceeds the prescribed value, then a SMS will be sent to the respective
authority to take necessary disciplinary action. Over the years, there have been several
regulations made by the Government to control the emission from vehicles; most of
them being unsuccessful at the same. The standards and the timeline for implementation
are set by the Central Pollution Control Board under the Ministry of Environment &
Forests. Bharat stage emission standards are emission standards instituted by the
Government of India to regulate the output of air Pollutants from internal combustion
engine equipment, including motor vehicles. The first emission norms were introduced
in India in 1991 for petrol and 1992 for diesel vehicles. These were followed by making
Chapter-2 Literature survey
the Catalytic converter mandatory for petrol vehicles and the introduction of unleaded
petrol in the market. On April 29, 1999 the Supreme Court of India ruled that all
vehicles in India have to meet Euro I or India 2000 norms by June 1, 1999 and Euro II
will be mandatory in the NCR by April 2000. Car makers were not prepared for this
transition and in a subsequent judgment the implementation date for Euro II was not
enforced. The standards, based on European regulations were first introduced in 2000.
Progressively stringent norms have been rolled out since then. All new vehicles
manufactured after the implementation of the norms have to be compliant with the
regulations. Since October 2010, Bharat stage III norms have been enforced across the
country. In 13 major cities, Bharat stage IV emission norms are in place since April
2010. In this paper, the semiconductor sensors have been used to detect the pollutant
level of the vehicles. This Paper concentrates mainly on three blocks; smoke detector,
microcontroller and fuel injector. The smoke detector detects the pollutants (CO, NOx,
etc.) continuously. The microcontroller compares the level of pollutants with the
stipulated level allowed by the government. When the pollutant level exceeds the
standardized limit, it sends a signal to the fuel injector. On receiving a signal from the
controller, the fuel injector stops the fuel supply to the engine after a particular period
of time.
Chapter-3 Line Diagram
CHAPTER-3
LINE DIAGRAM
In this diagram represents about the description of the each block with the help of line
diagram.
sms
Gas sensor
L293D
MOTOR
Arduino
Co sensor
Chapter-3 Line Diagram
• Power Supply
• Temperature sensor
• Co sensor
• MQ2 sensor
• Arduino Uno
• LCD display
3.2 INPUT MODULES:
• Power supply
• Temperature sensor
• Mq2 sensor
• Recommended: 7~12V
• Absolute: 6~20V
• Input/output (I/O) pins: -0.5V to +5.5V (the actual max is “Vcc + 0.5V,” which
for a 5V Arduino, is +5.5V)
A temperature sensor is an electronic device that measures the temperature of its environment
and converts the input data into electronic data to record, monitor, or signal temperature
changes. There are many different types of temperature sensors. Some temperature sensors
require direct contact with the physical object that is being monitored (contact temperature
sensors), while others indirectly measure the temperature of an object (non-contact temperature
sensors).
The Grove - Gas Sensor (MQ2) module is useful for gas leakage detection
(home and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol, Smoke
or Propane. Due to its high sensitivity and fast response time, measurement can be taken
as soon as possible. The sensitivity of the sensor can be adjusted by potentiometer.
The Design &Implementation of line diagram will be discussed in next chapter with the
help of circuit diagram and other components.
3.9 CO SENSOR
Sensitive material of MQ-7 gas sensor is SnO2, which with lower conductivity in clean
air. It make detection by method of cycle high and low temperature, and detect CO
when low temperature (heated by 1.5V). The sensors conductivity is more higher along
with the gas concentration rising. When high temperature (heated by 5.0V), it cleans
the other gases adsorbed under low temperature. Please use simple electrocircuit,
Convert change of conductivity to correspond output signal of gas concentration.
Chapter-4 Circuit Diagram
CHAPTER-4
CIRCUIT DIAGRAM
4.1 Co Sensor
MQ-7 gas sensor has high sensitity to Carbon Monoxide. The sensor could be used to
detect different gases contains CO, it is with low cost and suitable for different he
carbon monoxide sensor we will use is the MQ-7 sensor. This is a sensor that is sensitive
to effects of CO.
Carbon monoxide (CO) is a very dangerous gas which is odorless, colorless, and
tasteless, so it cannot be smelt, seen, or tasted. A person really would have no idea that
they are breathing in CO besides the fact that they would start to feel horrible. The most
common symptoms of CO poisoning is headache, nausea, vomiting, dizziness, fatigue,
and a feeling of weakness. Neurological signs include confusion, disorientation, visual
disturbance, syncope, and seizures.
Carbon monoxide poisoning is the most common type of fatal air poisoning in many
countries. Being colorless, odorless, and tasteless, it is very hard to detect but highly
toxic. Carbon monoxide is absorbed through breathing and enters the bloodstream
through gas exchange in the lungs. CO combines with hemoglobin to produce
carboxyhemoglobin, which usurps the space in hemoglobin that normally carries
oxygen, but is ineffective for delivering oxygen to bodily tissues. This leads to oxygen
deprivation, which can be deadly.
CO is measured in parts per million (ppm). To give you some perspective, the natural
atmosphere is composed of 0.1ppm. Ther average level in homes is 0.5-5ppm. The level
near properly adjusted gas stoves in homes and from modern vehicle exhaust emissions
is 5-15ppm. The exhaust from automobilies in Mexico City central area is 100-200ppm.
The amount of CO that can be created from the exhaust from a home wood fire is
5000ppm. Concentrations as low as 667ppm may cause up to 50% of the body's
hemoglobin to convert to carboxyhemoglobin. A level of 50% carboxyhemoglobin may
result in seizure, coma, and fatality.
In the United States, OSHA limits long-term workplace exposure levels above 50ppm.
According to the Florida Department of Health, every year more than 500 people in the
United States die every year from accidental exposure to carbon monoxide and
thousands more across the US require emergency medical care for non-fatal CO
Chapter-4 Circuit Diagram
Carbon monoxide can be measured through laboratory testing requiring a blood sample
(arterial or venous) and can also be analyzed on a CO-oximeter.
Having this overview of carbon monoxide gives some background to how it is created
and the real severe dangers it can pose. It creates context to just how important it is to
be able to detect and measure the amount of CO that may be present in the environment
during any given time.
application.
Character
Technical Data
Chapter-4 Circuit Diagram
According to its datasheet, the MQ-7 carbon monoxide sensor detects 20 to 2000 ppm
of CO in air. Here is its sensitivity characteristic curve:
This is a graph of Rs/R0 vs. gas concentration in ppm. Rs is the resistance of the sensor
in target gas while R0 is the resistance in clean air. We will use this graph later when
we create our code.
There are two ways to read the output from the MQ-7. One is through the DOUT pin
which gives a high when the concentration threshold is reached and low otherwise. The
threshold can be varied by adjusting the trimmer on the breakout board which is Rp in
the schematic.
Meanwhile, the AOUT pin gives varying voltage representing the CO concentration.
We can convert the voltage reading to ppm if we look at the characteristic curve above.
The relationship between concentration in ppm and RS/R0 is:
4.2.1 Character:
4.2.2 Application:
4.2.3 Configuration:
The above is basic test circuit of the sensor. The sensor need to be put 2 voltage,
heater voltage (VH) and test voltage(VC). VH used to supply certified working
temperature to the sensor, while VC used to detect voltage (VRL) on load resistance
(RL)whom is in series with sensor. The sensor has light polarity, Vc need DC power.
Chapter-4 Circuit Diagram
VC and VH could use same power circuit with precondition to assure performance of
sensor. In order to make the sensor with better performance, suitable RL value is
needed: Power of Sensitivity body (Ps):
Pin Configuration:
Pin Pin Name Description
Number
1 Vcc Input voltage is +5V for typical applications
2 Analog There will be increase in 10mV for raise of every 1°C. Can range from -1V(-
Out 6V(150°C)
3 Ground Connected to ground of circuit
Note: Complete Technical Details can be found at the datasheet give at the end of
this page.
If the temperature is 0°C, then the output voltage will also be 0V. There will be rise of
0.01V (10mV) for every degree Celsius rise in temperature. The voltage can converted
into temperature using the below formulae.
LM35 can be used in two circuit configurations. Both yield different results.
In the first configuration, you can only measure the positive temperature from
2 degrees Celsius to 150 degrees Celsius. In this first configuration, we simply
power lm35 and connect the output directly to analog to digital converters. In
the second configuration, we can utilize all the sensor resources and can
measure the full range temperature from -55 degree centigrade to 150-degree
centigrade. This configuration is a little complex but yields high results. We
have to connect an external resistor, in this case, to switch the level of negative
voltage upwards. The external resistor value can be calculated from the
formula given below the configuration circuit. The second configuration
circuit can be made in various ways.To see about the second configuration
Chapter-4 Circuit Diagram
Although the first configuration did not need a resistor at the output side, I recommend
connecting an 80 k to 100 k resistor between vout and gnd pin. When I performed
several experiments I noticed that the readings some time fluctuate and the vout pin
floats. So a resistor between vout and gnd tights the vout pin low and prevents the pin
from floating.
LM35
accuracy level
The accuracy parameters for both configurations are different. The average
accuracy level is +- 1 degree Celsius for both configurations. But the accuracy
level decreases for temperature between 2 degrees to 25-degree centigrade.
Now that we have discussed the LM35 temperature sensor pinout, structure,
linear scale factor and accuracy level its time to list down the steps on how to
measure temperature using LM35 temperature sensor.
Following the above steps and tutorial, you can easily interface LM35
temperature sensor with any microcontroller that has a built-in analog to
Chapter-4 Circuit Diagram
digital converter pins. Almost all the microcontrollers today have built-in
ADC.
Chapter 5 Arduino and ESP modules
CHAPTER 5
ARDUINO UNO AND ESP8266 MODULES
5.1 ARDUINO:
5.1.1 Introduction:
"Uno" means one in Italian and was chosen to mark the release of Arduino
Software (IDE). The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno board is the
first in a series of USB Arduino boards, and the reference model for the Arduino
platform. The ATmega328 on the Arduino Uno comes preprogrammed with a boot
loader that llows uploading new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol. The Uno also
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it uses the Atmega16U2 (Atmega8U2 up to version R2) programmed as
a USB-to-serial converter.
The Arduino project started at the Interaction Design Institute Ivrea (IDII) in
Ivrea, Italy. At that time, the students used a BASIC Stamp microcontroller at a cost of
$100, a considerable expense for many students. In 2003 Hernando Barragán created
the development platform wiring as a Master's thesis project at IDII, under the
supervision of Massimo Banzi and Casey Reas, who are known for work on the
Chapter 5 Arduino and ESP modules
Processing language. The project goal was to create simple, low-cost tools for creating
digital projects by nonengineers. The Wiring platform consisted of a printed circuit
board (PCB) with an ATmega168 microcontroller, an IDE based on Processing and
library functions to easily program the microcontroller. In 2003, Massimo Banzi, with
David Mellis, another IDII student, and David Cuartielles, added support for the
cheaper ATmega8 microcontroller to Wiring. But instead of continuing the work on
Wiring, they forked the project and renamed it Arduino. Early arduino boards used the
FTDI USB-to-serial driver chip and an ATmega168. The Uno differed from all
preceding boards by featuring the ATmega328P microcontroller and an ATmega16U2
(Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
LED: There is a built-in LED driven by digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.
Vin: The input voltage to the Arduino/Genuino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the power
jack, access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 20V), the USB connector (5V),
or the VIN pin of the board (7-20V). Supplying voltage via the 5V or 3.3V pins
bypasses the regulator, and can damage the board.
3.3V: A 3. 3 volt supply generated by the on-board regulator. Maximum current draw
is 50 mA.
IOREF: This pin on the Arduino/Genuino board provides the voltage reference with
which the microcontroller operates. A properly configured shield can read the IOREF
pin voltage and select the appropriate power source or enable voltage translators on the
outputs to work with the 5V or 3.3V.
Chapter 5 Arduino and ESP modules
Reset: Typically used to add a reset button to shields which block the one on the board.
Each of the 14 digital pins and 6 Analog pins on the Uno can be used as an input
or output, using pin Mode (), digital Write (), and digital Read () functions. They operate
at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition
and has an internal pull-up resistor (disconnected by default) of 20-50k ohm. A
maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid
permanent damage to the microcontroller. The Uno has 6 analog inputs, labeled A0
through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By
default they measure from ground to 5 volts, though is it possible to change the upper
end of their range using the AREF pin and the Analog Reference () function.
• Serial / UART: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit
(TX) TTL serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB to-TTL Serial chip.
• External Interrupts: pins 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
• PWM (Pulse Width Modulation): 3, 5, 6, 9, 10, and 11 Can provide 8-bit PWM
output with the analog Write () function.
• SPI (Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).
These pins support SPI communication using the SPI library.
• TWI (Two Wire Interface) / I²C: A4 or SDA pin and A5 or SCL pin. Support
TWI communication using the Wire library.
• AREF (Analog Reference): Reference voltage for the analog inputs.
Chapter 5 Arduino and ESP modules
Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection.
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the Barrel Jack.
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on
top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000
Hertz or 16 MHz
Pins 5, 17: Arduino Reset you can reset your Arduino board, i.e., start your program
from the beginning. You can reset the UNO board in two ways. First, by using the reset
button (17) on the board. Second, you can connect an external reset button to the
Arduino pin labelled RESET (5).
The Arduino UNO board has six analog input pins A0 through A5. These pins
can read the signal from an analog sensor like the humidity sensor or temperature sensor
and convert it into a digital value that can be read by the microprocessor.
Each Arduino board has its own microcontroller (11). You can assume it as the
brain of your board. The main IC (integrated circuit) on the Arduino is slightly different
from board to board. The microcontrollers are usually of the ATMEL Company. You
must know what IC your board has before loading up a new program from the Arduino
IDE. This information is available on the top of the IC. For more details about the IC
construction and functions, you can refer to the data sheet.
Chapter 5 Arduino and ESP modules
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino
consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an
SPI (Serial Peripheral Interface), which could be considered as an "expansion" of the
output. Actually, you are slaving the output device to the master of the SPI bus.
This LED should light up when you plug your Arduino into a power source to
indicate that your board is powered up correctly. If this light does not turn on, then there
is something wrong with the connection.
On your board, you will find two labels: TX (transmit) and RX (receive). They
appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to
indicate the pins responsible for serial communication. Second, the TX and RX led
(13). The TX led flashes with different speed while sending the serial data. The speed
of flashing depends on the baud rate used by the board. RX flashes during the receiving
process.
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM
(Pulse Width Modulation) output. These pins can be configured to work as input digital
pins to read logic values (0 or 1) or as digital output pins to drive different modules like
LEDs, relays, etc. The pins labeled “~” can be used to generate PWM.
5.2.1 Introduction:
The ESP8266 arduino compatible module is a low-cost Wi-Fi chip with full
TCP/IP capability, and the amazing thing is that this little board has a MCU (Micro
Controller Unit) integrated which gives the possibility to control I/O digital pins via
simple and almost pseudo-code like programming language. This device is produced
by Shanghai-based Chinese manufacturer, Espressif Systems.
This chip was first time seen in August 2014, in ESP-01 version module, made
by AI-Thinker, a third-party manufacturer. This little module allows the MCU to
connect to WiFi network and create simple TCP/IP connections.
ESP8266 Arduino module comes with PCB trace antenna which seems to have
a very good coverage. Other version can have on-board ceramic antenna or an external
connector which allows you to attach external Wi-Fi antennas modules. ESP-01 has
only 6 active pins, although the MCU can support up to 16 I/O. Board dimensions are
14.3 x 24.8 mm.
Chapter 5 Arduino and ESP modules
Over the internet it found that ESP8266 arduino module, version 01, is sold in
two or more versions, which at first glance seem quite the same. After buying both of
them I saw that there is a difference in size of the flash memory. You may encounter
issues while flashing if you don’t make the proper settings according to board
specifications. Although the board default has 2 available GPIOs, you can do some
workarounds and use other MCU available pins if you have the proper soldering tools.
I managed to use GPIO 16 in order to wake up the device after DEEP SLEEP mode.
Pins are arranged in two rows, having 4 on each row. Some models have pin
description on the PCB, which make it simple. On the top row you can find following
pins from the left to the right:
All esp8266 arduino compatible modules must be powered with DC current from any
kind of source that can deliver stable 3.3V and at least 250mA. Also logic signal is rated
at 3.3v and the RX channel should be protected by a 3.3v divisor step-down. You should
be careful when using this module with Arduino or other boards which supplies 5v,
because this module usually do not come with overpower protection and can be easily
destroyed.
Chapter-6 Software used
CHAPTER 6
SOFTWARE USED
6.1 ARDUINO IDE SOFTWARE:
• Set the board type and the serial port in the Arduino Programmer.