You are on page 1of 39

IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY

TEMPERATURE & INFORMATION

IOT BASED AIR CONDITIONER


CONTROL USING TEMPERATURE
AND HUMIDITY INFORMATION

LOOK UP LIST
1
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

TOPIC

ABSTRACT
INTRODUCTION
SYSTEM MODEL
CIRCUIT DIAGRAM
HARDWARE DESCRIPTION
REFERENCE
EXPENDITURE STATEMENT

2
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

ABSTRACT

IoT (Internet Of Things) is fast emerging


technology which involves interaction among things through
internet without human interference. It has made human life
easier and comfortable. Now-a-days digital devices in home
are increasing rapidly due to which there is a need of
accessing and controlling the devices remotely. This paper
represents an affordable and flexible home control system
using an Wifi Module, web server with IP connectivity for
interacting with devices and appliances remotely using
Android based Smart phone app.
It demonstrates the usefulness of the system
using devices such as temperature & Humidity sensors . In
addition to remote control it also provides reminders, voice
commands functionality. This project is very useful for people
with physical disability. It also plays a vital role in maintaining
living standards and provide secure and flexible environment.

3
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

INTRODUCTION

To enhance the lifestyle of people through the


provision of different services, smart home or automated home
comes into picture. It aims at providing leisure and ease of
work.
The goal of this project is to operate home
devices smartly through an android app using IoT(Internet Of
Things). IoT is the network of things or physical objects
which includes electronics, software, sensors, actuators and
network connectivity. All these things collect and transfer data
between themselves.
IoT has increased significantly in the last few
years since it has added a new dimension to the world of
information and communication technologies. For digitalizing
home appliance Air Conditioner IoT in home automation is the
best commercial solution these days. With the increasing use of
personal computing, media players, android mobile phones.
people have more knowledge about these technologies and are
more comfortable with its use. Thus home automation will be
easily accepted by the people.

4
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

SYSTEM MODEL

BASIC MODEL OF THE SYSTEM:


The block diagram depicts the total blue print of the
proposed project. The total essence and the functioning of the project is
represented in a single block diagram. The block diagram mainly
consists of 5 parts. They include
Power supply
Wifi module
Humidity and temperature sensor
Android application device

POWER SUPPLY
SERVER

TEMPARATU
RE
AC
&
Wifi Module SWITCH
HUMIDITY TEMPERATURE
ESP8266
SENSOR HUMIDITY

AC SWITCH

ANDROID
APP

5
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

INTERNET OF THINGS
Drawing representing the Internet of things

The Internet of things (IOT) is the inter-networking of physical


devices, vehicles (also referred to as "connected devices" and "smart
devices"), buildings, and other items
embedded with electronics, software, sensors, actuators, and network
connectivity that enable these objects to collect and exchange data. In
2013 the Global Standards Initiative on Internet of Things (IoT-GSI)
defined the IoT as "the infrastructure of the information society."The IoT
allows objects to be sensed or controlled remotely across existing
network infrastructure, creating opportunities for more direct integration
of the physical world into computer-based systems, and resulting in
improved efficiency, accuracy and economic benefit in addition to
reduced human intervention. When IoT is augmented with sensors and
actuators, the technology becomes an instance of the more general class
of cyber-physical systems, which also encompasses technologies such
as smart grids, smart homes, intelligent transportation and smart cities.
Each thing is uniquely identifiable through its embedded computing
system but is able to interoperate within the

6
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

existing Internet infrastructure. Experts estimate that the IoT will consist
of almost 50 billion objects by 2020.Typically, IoT is expected to offer
advanced connectivity of devices, systems, and services that goes
beyond machine-to-machine (M2M) communications and covers a
variety of protocols, domains, and applications. The interconnection of
these embedded devices (including smart objects), is expected to usher
in automation in nearly all fields, while also enabling advanced
applications like a smart grid,and expanding to areas such as smart
cities. Things," in the IoT sense, can refer to a wide variety of devices
such as heart monitoring implants, biochip transponders on farm
animals, electric clams in coastal waters,[16]automobiles with built-in
sensors, DNA analysis devices for environmental/food/pathogen
monitoring or field operation devices that assist firefighters in search
and rescueoperations. Legal scholars suggest to look at "Things" as an
"inextricable mixture of hardware, software, data and service. These
devices collect useful data with the help of various existing technologies
and then autonomously flow the data between other devices Current
market examples includehome automation (also known as smart home
devices) such as the control and automation of lighting, heating
(like smart thermostat), ventilation, air conditioning (HVAC) systems,
and appliances such as washer/dryers, robotic vacuums, air purifiers,
ovens or refrigerators/freezers that use Wi-Fi for remote monitoring. As
well as the expansion of Internet-connected automation into a plethora
of new application areas, IoT is also expected to generate large amounts
of data from diverse locations, with the consequent necessity for quick
aggregation of the data, and an increase in the need to index, store, and
process such data more effectively. IoT is one of the platforms of today's
Smart City, and Smart Energy Management Systems. The concept of the
Internet of things was invented by and term coined by Peter T. Lewis in
September 1985 in a speech he delivered at a U.S. Federal
7
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Communications Commission(FCC) supported session at


the Congressional Black Caucus 15th Legislative Weekend Conference.

CIRCUIT DIAGRAM

8
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

9
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

10
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

HARDWARE DESCRIPTION
ESP8266-01
Server-Client Communication using ESP8266 Serial WiFi
Module (ESP-01)

With the popularity of Wifi IOT devices, there is an


increasing demand for low-cost and easy-to-use WiFi modules. ESP8266
is a new player in this field: its tiny (25mm x 15mm), with simple pin
connections (standard 24 pin headers), using serial TX/RX to send and
receive Ethernet buffers, and similarly, using serial commands to query
and change configurations of the WiFi module. This is quite convenient
as it only requires two wires (TX/RX) to communicate between a micro-
controller and WiFi, but more importantly, it offloads WiFi-related tasks
to the module, allowing the microcontroller code to be very light-
weighted.
ESP8266 ESP-01 Serial WIFI Transceiver Module is a cheap
and easy way to connect any small microcontroller platform, like
Arduino, wirelessly to Internet. ESP8266 has powerful on-board
processing and storage capabilities that allow it to be integrated with the
11
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

sensors and other application specific devices through its GPIOs with
minimal development up-front and minimal loading during runtime. Its
high degree of on-chip integration allows for minimal external circuitry,
and the entire solution, including front-end module, is designed to
occupy minimal PCB area. ESP-01 WIFI Transceiver Module is
addressable over SPI and UART, making this an exceptionally easy
choice for anyone wanting to build an Internet of Things thing. You can
use AT commands to connect to WiFi networks and open TCP
connections without need to have TCP/IP stack running in your own
microcontroller: You can simply connect any microcontroller to this
module and start pushing data up to the Internet.

Features
Serial UART Interface
It run LWIP
802.11 bgn
WIFI Direct (P2P), SOFT-AP
Built-in TCP/IP
The AT commande is perfect, efficient, concise
Support three modes: AP, STA and AP+STA coexistence mode
Onboard PCB Antenna
Specifications
WIFI Direct (P2P), SOFT-AP

12
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Controlled via UART interface at 115200 baud with a simple set of AT


commands
Only 2 microcontroller pins needed for communication (RXD/TXD)
Support three modes: AP, STA and AP+STA coexistence mode the
TCP/IP protocol suit
Integrated TCP/IP protocol stack
Integrated TR switch, balun, LNA, power amplifier and matching
network
Integrated PLLs, regulators, DCXO and power management units
+19.5dBm output power in 802.11b mode
Power down leakage current of <10uA
Integrated low power 32-bit CPU could be used as application processor
SDIO 1.1/2.0, SPI, UART
STBC, 11 MIMO, 21 MIMO

A-MPDU & A-MSDU aggregation & 0.4ms guard interval


Wake up and transmit packets in < 2ms
Standby power consumption of < 1.0mW (DTIM3)
ESP-01 PCB Antenna , after matching the distance to achieve open
400Meters.

13
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Pin Description:-
ESP8266 is 3.3v device & cannot tolerate 5v levels. Connect
the CH_PD pin to 3.3V to activate the chip.ESP8266 Communication
with other WiFi modules: ESP8266 as a Client ESP 8266 works in 3.3V
TTL so we need a level converter to communicate with our PC. You can
use an FTDI converter for this purpose. Make sure that your FTDI is
working in 3.3V. Connect your ESP module with the FTDI Driver and
plug the FTDI to the USB port of your PC.

WIFI Module USB-TTL

Vcc 3.3v
Gnd Gnd
Tx Rx
Rx Tx
CH_PD connected to 3.3v to enable chip firmware boot.
RST connected to 3.3v through 3k3 resistor

For communication you must need another computer or a


phone which has WiFi access. Connect the computer or phone with our
ESP 8266 module through WiFi. You will have to configure the PC or
mobile as server, use terminal software to set the PC as server. In real
term software you can change it in the port settings.
Set the port as server and give a port number.
14
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Example: Server: 1234


Here 1234 is the port number. You can use the AT commands to set the
parameters of your ESP module. All AT commands must end with a
\r\n a carriage return & a New Line. Use any terminal software for
giving AT commands to the ESP module.
Initialize the ESP module by sending AT command, will get an OK
response.
Query the ESP 8266 as client or as a server, here it is client.
AT+CIPMUX?
0 = Client, 1 = Server
ESP8266 WIFI module has 3 modes of operation. AT+CWMODE?
returns the Mode of operation of the module. CWMODE returns an
integer designating the mode of operation either1, 2, or 3.
1 = Station mode (client).
2 = AP mode (host).
3 = AP + Station mode (Yes, ESP8266 has a dual mode!)
Note: To send a data from ESP module we must need to know, Type of
connection (TCP/UDP), IP address and port number to assigned with
command AT+CIPSTART. (First three sections of IP address will be
same last section only will have some change)
Lets take a break from networking class to see if your little 8266
module is able to communicate with your network.
For example,
Click on Start, Run, and type CMD and press enter.

15
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Type IPCONFIG and press enter.


Thus, IP Address of your module get identified
After sending the command AT+CIPSTART, connection get established
thus get response as OK Linked. Now communication is possible, from
the communicating PC we received a data in the format +IPD, size of
the data: data with OK response as shown below.
From ESP module you can send data after. Receiving >symbol. Send the
exact data with data length which is mentioned in the
AT+CIPSEND=<len> command. You will get a SEND OK after sending
the data as shown below.
ESP8266 Communication with other WiFi modules:
ESP8266 as a Server
The user can configure the ESP 8266 as server by following commands.
In order to configure the ESP as server you should enable multiple
connections to ESP(CIPMUX=1).
Then configure the ESP module as server by command
AT+CIPSERVER=<par>, <port>,we get OK as response. And use this
IP for communication from other PC.
Par : 1 open server, 0 close server
Port: port number
You will get the IP address by sending AT+CIFSR command. After
connection get established with the IP, communication is possible from
both sides. We may use AT+CIPSEND=<len> for sending a data. Note:
If CWMODE is 3 (Both) you will get two IP address. Choose the station
IP Address which is the first one.
16
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Now take another PC which has WiFi access connect it with our ESP
8266 module. Use terminal software to communicate with ESP 8266. In
real term you can connect the ESP module by setting the port as module
IP as shown below, where 1234 is the port number.
This method can be used to communicate only when two WiFi modules
are in range.

WiFi Module ESP 8266 TCP Client /Server


Now we will discuss about Internet of Things (IOT). So by
using IOT the ESP module can be accessed from anywhere. In order
access the ESP 8266 from anywhere, you should first connect it with an
Access Point. The ESP 8266 can be connected to an Access Point by
using following AT commands. The common commands for TCP client
and server are explained below lets go through it.
Initialize the ESP module by sending AT command, will get an OK
response.
Lists available APs with AT+CWLAP, after listing we get OK as
response.
After listing, Connect to AP with the command AT+CWJAP=ssid,pwd.
And thus Commands ESP8266 to connect a SSID with supplied
password. Get OK as response as shown below.

17
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

WiFi Module ESP 8266 TCP client


Configure one of the ESP 8266 module as server and other as
client. Client section is explained below.

Now start a connection as client. (Single connection mode) with


AT+CIPSTART=type, addr, port as shown below ,(First three sections of
IP address will be same last section only will have some change where
192.168.1.17 is the IP of the router).
Thus connection gets established receives a response as OK Linked
And then go for sending and receiving data as shown below.

Send the exact data with data length which is mentioned in the
AT+CIPSEND=<len>command. You will get a SEND OK after sending
the data. The data from the server is received in format as shown below

WiFi Module ESP 8266 TCP SERVER

Configure one of the ESP 8266 module as server and other as


client. Server section is explained below.
To communicate with a webpage, we need to start a server with ESP
module. You need to set multiple connections using command
AT+CIPMUX=1. This initiates the server for a Web server.

18
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Next we start the server at HTTP port 8888 using command,


AT+CIPSERVER=1, 8888
To close the server the command is AT+CIPSERVER=0 followed by a
Reset AT+RST (Depends the module)
To get the STATION IP address, send AT+CIFSR, the module returns the
Station IP address, 192.168.1.2. If the CWMODE is set to 3, youll get 2
IP address, one for AP & another for Station mode. We need the station
IP address for Client mode operation.
Now type the address 192.168.1.2. The browser sends a HTTP GET
request which is displayed on the terminal window where ESP module is
connected. You will get OK as response.
From within ESP window type AT+CIPSEND=0,5. ESP will wait till
you type 5 characters.
On terminal window the characters are received. You get these inside
ESP window +IPD, 0, 5: HELLO. 0 is the channel of communication &
5 is the number of characters received. Use the channel number which is
displayed as CONNECT while a request is received from the browser.

FTDI Basic:

19
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

This board is used to program the 3.3V or 5V wifi module or


other board with compatible programming connector. It is assembled
with a FTDI FT232RL USB to Serial converter chip.

RESISTORS :
A resistor is a two-terminal electronic component designed to
oppose an electric current by producing a voltage drop between its
terminals in proportion to the current, that is, in accordance with Ohm's
law:
V = IR
Resistors are used as part of electrical networks and
electronic circuits. They are extremely commonplace in most electronic
equipment. Practical resistors can be made of various compounds and
films, as well as resistance wire (wire made of a high-resistivity alloy,
such as nickel/chrome).The primary characteristics of resistors are their
20
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

resistance and the power they can dissipate. Other characteristics include
temperature coefficient, noise, and inductance. Less well-known is
critical resistance, the value below which power dissipation limits the
maximum permitted current flow, and above which the limit is applied
voltage. Critical resistance depends upon the materials constituting the
resistor as well as its physical dimensions; it's determined by design.
Resistors can be integrated into hybrid and printed circuits, as well as
integrated circuits. Size, and position of leads (or terminals) are relevant
to equipment designers; resistors must be physically large enough not to
overheat when dissipating their power.

A resistor is a two-terminal passive electronic component


which implements electrical resistance as a circuit element. When a
voltage V is applied across the terminals of a resistor, a current I will
flow through the resistor in direct proportion to that voltage. The
reciprocal of the constant of proportionality is known as the resistance
R, since, with a given voltage V, a larger value of R further "resists" the
21
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

flow of current I as given by Ohm's law: Resistors are common elements


of electrical networks and electronic circuits and are ubiquitous in most
electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high
resistivity alloy, such as nickel-chrome). Resistors are also implemented
within integrated circuits, particularly analog devices, and can also be
integrated into hybrid and printed circuits. The electrical functionality of
a resistor is specified by its resistance: common commercial resistors are
manufactured over a range of more than 9 orders of magnitude. When
specifying that resistance in an electronic design, the required precision
of the resistance may require attention to the manufacturing tolerance of
the chosen resistor, according to its specific application. The temperature
coefficient of the resistance may also be of concern in some precision
applications. Practical resistors are also specified as having a maximum
power rating which must exceed the anticipated power dissipation of
that resistor in a particular circuit: this is mainly of concern in power
electronics applications. Resistors with higher power ratings are
physically larger and may require heat sinking. In a high voltage circuit,
attention must sometimes be paid to the rated maximum working voltage
of the resistor. The series inductance of a practical resistor causes its
behavior to depart from ohms law; this specification can be important in
some high-frequency applications for smaller values of resistance. In a
low-noise amplifier or pre-amp the noise characteristics of a resistor
may be an issue. The unwanted inductance, excess noise, and
temperature coefficient are mainly dependent on the technology used in
manufacturing the resistor. They are not normally specified individually
for a particular family of resistors manufactured using a particular
technology. A family of discrete resistors is also characterized according
to its form factor, that is, the size of the device and position of its leads

22
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

(or terminals) which is relevant in the practical manufacturing of circuits


using them.
Units:
The ohm (symbol: ) is the SI unit of electrical resistance,
named after Georg Simon Ohm. An ohm is equivalent to a volt per
ampere. Since resistors are specified and manufactured over a very large
range of values, the derived units of milliohm (1 m = 103 ), kilohm
(1 k = 103 ), and megohm(1 M = 106 ) are also in common
usage. The reciprocal of resistance R is called conductance G = 1/R and
is measured in Siemens (SI unit), sometimes referred to as a mho. Thus a
Siemens is the reciprocal of an ohm: S = 1.Although the concept of
conductance is often used in circuit

CAPACITOR:
A capacitor or condenser is a passive electronic component consisting of
a pair of conductors separated by a dielectric. When a voltage potential
difference exists between the conductors, an electric field is present in
the dielectric. This field stores energy and produces a mechanical force
between the plates. The effect is greatest between wide, flat, parallel,
narrowly separated conductors. An ideal capacitor is characterized by a
single constant value, capacitance, which is measured in farads. This is
the ratio of the electric charge on each conductor to the potential
difference between them. In practice, the dielectric between the plates
passes a small amount of leakage current. The conductors and leads
introduce an equivalent series resistance and the dielectric has an electric
field strength limit resulting in a breakdown voltage. The properties of
capacitors in a circuit may determine the resonant frequency and quality
factor of a resonant circuit, power dissipation and operating frequency in
23
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

a digital logic circuit, energy capacity in a high-power system, and many


other important aspects.

A capacitor (formerly known as condenser) is a device for


storing electric charge. The forms of practical capacitors vary widely,
but all contain at least two conductors separated by a non-conductor.
Capacitors used as parts of electrical systems, for example, consist of
metal foils separated by a layer of insulating film. Capacitors are widely
used in electronic circuits for blocking direct current while allowing
alternating current to pass, in filter networks, for smoothing the output of
power supplies, in the resonant circuits that tune radios to particular
frequencies and for many other purposes. A capacitor is a passive
electronic component consisting of a pair of conductors separated by a
dielectric (insulator). When there is a potential difference(voltage) across
the conductors, a static electric field develops in the dielectric that
storeys and produces a mechanical force between the conductors. An
ideal capacitor is characterized by a single constant value, capacitance,
measured in farads. This is the ratio of the electric charge on each
conductor to the potential difference between them. The capacitance is
24
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

greatest when there is a narrow separation between large areas of


conductor, hence capacitor conductors are often called "plates", referring
to an early means of construction. In practice the dielectric between the
plates passes a small amount of leakage current and also has an electric
field strength limit, resulting in a
breakdown voltage, while the
conductors and leads introduce an
undesired inductance and
resistance. Theory of operation
Capacitance Charge separation in a
parallel-plate capacitor causes an
internal electric field. A dielectric
(orange) reduces the field and
increases the capacitance .Energy
storage Work must be done by an external influence to "move" charge
between the conductors in a capacitor. When the external influence is
removed the charge separation persists in the electric field and energy is
stored to be released when the charge is allowed to return to its
equilibrium position. The work done in establishing the electric field,
and hence the amount of energy stored.

Power supply:-

25
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

The power supply circuit built using filters, rectifiers, and then
voltage regulators.
Starting with an ac voltage, a steady doc voltage is obtained by
rectifying the ac voltage, then filtering to a doc level, and finally,
regulating to obtain a desired fixed doc voltage. The regulation is usually
obtained from an IC voltage regulator unit, which takes a doc voltage
and provides a somewhat lower do voltage, which remains the same
even if the input doc voltage varies, or the output load connected to the
doc voltage changes. The block diagram of power supply is shown in fig
below.

BLOCK DIAGRAM OF POWER SUPPLY


TRANSFORMER:-

26
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

The potential transformer will step down the power supply


voltage (0-230V)to(0-5V)level. Then the secondary of the potential
transformer will be connected to the precision rectifier, which is
constructed with the help of op-amp. The advantages of using precision
rectifier are it will give peak voltage output as DC, reset of the circuits
will gives only RMS output.

Bridge rectifier:-
Bridge rectifier is used to maintain the proper DC polarity at the
input to the circuit, irrespective of telephone line polarity. It comprises
of four diodes connected to from a bridge. It uses the entire AC wave
(both positive and negative sections). 1.4V is used up in the bridge
rectifier because each diode uses 0.7Vwhen conducting and there are
always two diodes conducting, as shown in fig below.

BRIDGE RECTIFIER

IC Voltage Regulators:-

27
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Voltage regulators comprise a class of widely used ICs. Regulator IC


units contain the circuitry for reference source, comparator amplifier,
control device, and overload protection all a single IC. Although the
internal construction of the IC is somewhat different from that described
for discrete voltage regulator circuit, the external operation is much the
same. IC units provide regulation of either a fixed positive voltage, a
fixed negative voltage, or an adjustable set voltage.
Three terminal Voltage Regulator:-
Fig shows the basic connection of a three-terminal voltage regulator
IC to a load. The fixed voltage regulator has an unregulated doc input
voltage is applied to one input terminal, a regulated output dc voltage
from a second terminal, with the third terminal connected to ground.

Fixed Voltage Regulator

28
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

ABOUT DHT11 SENSOR


The DHT11 sensor comes in a single row 4-pin package and operates
from 3.5 to 5.5V power supply. It can measure temperature from 0-50 C
with an accuracy of 2C and relative humidity ranging from 20-95%
with an accuracy of 5%. The sensor provides fully calibrated digital
outputs for the two measurements. It has got its own proprietary 1-wire
protocol, and therefore, the communication between the sensor and a
microcontroller is not possible through a direct interface with any of its
peripherals. The protocol must be implemented in the firmware of the
MCU with precise timing required by the sensor.

DHT11 sensor comes in a single row 4-pin package

29
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

The following timing diagrams describe the data transfer


protocol between a MCU and the DHT11 sensor. The MCU initiates data
transmission by issuing a Start signal. The MCU pin must be
configured as output for this purpose. The MCU first pulls the data line
low for at least 18 ms and then pulls it high for next 20-40 ?s before it
releases it. Next, the sensor responds to the MCU Start signal by
pulling the line low for 80 ?s followed by a logic high signal that also
lasts for 80 ?s. Remember that the MCU pin must be configured to input
after finishing the Start signal. Once detecting the response signal
from the sensor, the MCU should be ready to receive data from the
sensor. The sensor then sends 40 bits (5 bytes) of data continuously in
the data line. Note that while transmitting
bytes, the sensor sends the most significant bit first.

30
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

"Start" and "Response" signals


The 40-bit data from the sensor has the following structure.
Data (40-bit) = Integer Byte of RH + Decimal Byte of RH + Integer
Byte of Temp. + Decimal Byte of Temp. + Checksum Byte
For DHT11 sensor, the decimal bytes of temperature and
humidity measurements are always zero. Therefore, the first and third
bytes of received data actually give the numeric values of the measured
relative humidity (%) and temperature (C). The last byte is the
checksum byte which is used to make sure that the data transfer has
happened without any error. If all the five bytes are transferred
successfully then the checksum byte must be equal to the last 8 bits of
the sum of the first four bytes, i.e.,
Checksum = Last 8 bits of (Integer Byte of RH + Decimal Byte of RH +
Integer Byte of Temp. + Decimal Byte of Temp.)
Now lets talk about the most important thing, which is signaling for
transmitting 0 and 1. In order to send a bit of data, the sensor first
pulls the line low for 50 ?s. Then it raises the line to high for 26-28 ?s if
it has to send 0, or for 70 ?s if the bit to be transmitted is 1. So it is
the width of the positive pulse that carries information about 1 and 0.
31
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Start, Response and Data signals in sequence


At the end of the last transmitted bit, the sensor pulls the data line low
for 50 ?s and then releases it. The DHT11 sensor requires an external
pull-up resistor to be connected between its Vcc and the data line so that
under idle condition, the data line is always pulled high. After finishing
the data transmission and releasing the data line, the DHT11 sensor goes
to the low-power consumption mode until a new Start signal arrives
from the MCU.

BC548 Transistor:-

32
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

The BC548 is a general-purpose NPN bipolar junction


transistor. BC548 is general purpose silicon, NPN, bipolar junction
transistor. It is used for amplification and switching purposes. The
current gain may vary between 110 and 800. The maximum DC current
gain is 800.
The transistor
terminals require a fixed DC
voltage to operate in the desired
region of its characteristic
curves. This is known as the
biasing. For amplification
applications, the transistor is biased such that it is partly on for all input
conditions. The input signal at base is amplified and taken at the emitter.
BC548 is used in common emitter configuration for amplifiers. The
voltage divider is the commonly used biasing mode. For switching
applications, transistor is biased so that it remains fully on if there is a
signal at its base. In the absence of base signal, it gets completely off.
Breakdown voltage, collector-to-emitter with base open-circuit VCEO =
30 V Rated continuous collector current IC = 100mA (Fairchild's BC548
at one time had a higher rating).
33
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

Rated total power dissipation P total = 500 mw-625mw.


Transition frequency (gain-bandwidth product) ft = 150 MHz minimum
(300 MHz typical)

LED

Light emitting diode (LED) is a solid state device that converts electrical
energy into single color light. It is basically a specialized type of PN
junction diode that emits either visible light, infrared or laser light at

34
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

different wavelengths, made from a thin layer of heavily doped


semiconductor material.
LED produces cold generation light resulting in high efficiency. Unlike
LEDs, normal incandescent lamps and bulbs generate large amounts of
heat radiating away energy within the visible spectrum. Being a solid
state device, LEDs are more durable, small and provide much longer
lamp life than other normal light sources.
Construction of LED
The construction of LED is not similar to a normal signal diode. LED
consists of a PN junction surrounded by a hard, transparent plastic epoxy
resin hemispherical shaped body. It protects the LED from shock and
vibration. The LED junction does not emit much light, so the
construction of epoxy resin body helps in reflecting away the emitted
photons of light from the surrounding substrate base, thus focusing
upwards through the top.

However, some LEDs have cylindrical or rectangular shape construction


with a flat top or surface. The cathode and anode terminal of an LED is
normally identified by a notch, or by one lead shorter than the other.

LED Operation
A light emitting diode (LED) is a type of semiconductor diode that emits
light when a current flows from anode to cathode across the PN junction
of the device. Hence, an LED requires a direct current supply to forward
bias the junction with a positive voltage for normal operation. The
voltage to current relationship of LED is non-linear as shown in Figure
35
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

2, so the LED turns on at a lower voltage and will rapidly draw much
higher current as the voltage increases.

WORKING
The circuit mainly consists of wifi module humidity
and temperature sensor it senses the temperature and humidity in
your room by using this sensor. The wifi module is connect to
the home router and it sends data to internet or server.
The working of project is the the information of
humidity and temperature sent to the sever through wifi module
using praman iot application we can know the temperature and
humidity of room if you can see praman iot.
In Praman iot application you can login with your mail
id and check the temperature and humidity in your room and
you can on off the ac switch by using the touch switch.
In this project we use LED to the purpose of air
conditioner. When AC switch is the LED is on, when the AC
switch is off.

36
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

37
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

REFERENCE
WWW.GOOGLE.COM
WWW.WIKIPEDIAL.ORG
FRITZING.ORG
PRAMAN IOT

38
IOT BASED AIR CONDITIONER CONTROL USING HUMIDITY
TEMPERATURE & INFORMATION

EXPENDITURE
COMPONENTS 1000-00
TRAVELLING CHARGES 200-00
INTERNET COST 100-00
OTHERS 50-00

TOTAL 1350/-

39

You might also like