You are on page 1of 41

AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

CHAPTER ONE

1. INTRODUCTION

1.1Background

This project extends we control engineering student’s prior works in Automatic Air Conditioner
control system. This device developed in fulfillment of this project evolved from diagnostic
algorithms used in the protest program and hardware developed for the pc board advanced on
board diagnostic device.

1.2 Problem Statement

In this project, there are several problems when user uses the air conditioner. The problems they
have faced are:

o Air conditioner use lot of energy compare to other electrical item.


o The air conditioner also wastes the energy when there is no hot in the room when the
air conditioner is on.
o Lastly the problem they face is they need to pay more bills.

1.3 Objectives of project

1.3.1General objectives of project

 To design and develop a device that it can display the environment temperature value
on LCD screen.
 It can able to switch on/off air conditioner automatically based on environment
temperature.

1.3.2 Specific objectives of project


 Automated control versus manual control for an air conditioner

WSU, ECE FINAL PROJECT Page 1


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

 The device provides energy efficiency by not running the air conditioner when the
temperature is as desired. The device turns the air conditioner on only if the
temperature gets above the desired one (200C), and turns it off after the temperature
becomes lower than the desired one(200C) and viceversa.
 Economically efficient. (The customer can save money by not buying an expensive
air conditioner and overpaying for unnecessary features. Instead she/he can attach
our relatively inexpensive device to any inexpensive air conditioner unit.)

1.4 Scope of project

In order to achieve the objective of this project, there are several scope had been outlined.
The scope of this project includes using MikroC compiler to program PIC 16F874A
microcontroller, build simulation for design and implementation of automatic air conditioner
control unit system and then interface temperature sensor with PIC 16F74A. Last but not least, a
temperature value is obtained by using proteus8 simulator to observe the performance of the
system.

1.5 Methodology

In this project, microcontroller used as the controller to control temperature sensor at desired
input and controlled automatically.

1.5.1 System development methodology

In this section the basic procedural steps that are required and a set of methods followed in order
to realize our project are presented. The sequence we followed in order to complete this project
successfully includes: -

We have tried to gather information, data; document and research necessary


Analyze recorded data relate to our project,
List out hardware and software components we use,
Hardware assembling using proteus,

WSU, ECE FINAL PROJECT Page 2


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Developing software using C code programing,


Simulation testing and
Finally, the results of the project are simulated by using Proteus software.

The sequence we followed in order to complete this project will be portrayed in the flow chart
below.

Gathering Reading and List out hardware


Start information, data, analyzing and software
document and information’s and components we
research necessary interpreting to our use

Load Hardware
Compile the Software
compiled assembling
program on development
program to using
microC
protues proteus

Simulation test

Calibration

NO
YES

Result and analysis

End
Conclusion and recommendation

Figure: 1.1 methodology of our project

WSU, ECE FINAL PROJECT Page 3


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

1.5.2 Hardware requirements

Hardware and Software requirement for automatic air conditioner control system described
below.

Hardware requirements are:

Microcontroller
Temperature sensor
Liquid crystal display
Simple motor(fan)
Switch buttons
Transistor
Variable resistors
Power supply

1.5.3 Software requirements

Software requirements are:

I. MikroC Pro for PIC and


II. Proteus8 professional simulator

I. MikroC Pro for PIC

MikroC is a powerful, feature rich development tool for PIC micros. It is designed to provide the
easiest possible solution for developing applications for embedded systems, without com-
promising performance or control. PIC and C fit together well: PIC is the most popular 8-bit chip
in the world, used in a wide variety of applications, and C, prized for its efficiency, is the natural
choice for developing embedded systems. MikroC provides a successful match featuring highly
advanced IDE, ANSI compliant compiler, broad set of hardware libraries, comprehensive
documentation, and plenty of ready-to-run examples.
MikroC allows us to quickly develop and deploy complex applications:

WSU, ECE FINAL PROJECT Page 4


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

 Write our C source code using the highly advanced Code Editor
 Use the included mikroC libraries to dramatically speed up the development: data
acquisition, memory, displays, conversions, communications...
 Monitor our program structure, variables, and functions in the Code Explorer.
Generate commented, human-readable assembly, and standard HEX compatible
with all programmers.
 Inspect program flow and debug executable logic with the integrated Debugger.
Get detailed reports and graphs on code statistics, assembly listing, calling tree...
 We have provided plenty of examples for you to expand, develop, and use as
building bricks in your projects

III. Proteus8 professional simulator

Proteus is software for microprocessor simulation, schematic capture, and printed circuit board
(PCB) design. It is developed by Lab center Electronics. Proteus PCB design combines the ISIS
schematic capture and ARES PCB layout programs to provide a powerful, integrated and easy to
use suite of tools for professional PCB Design. All Proteus PCB design products include an
integrated shape based auto router and a basic SPICE simulation capability as standard. More
advanced routing modes are included in Proteus PCB Design Level 2 and higher whilst
simulation capabilities can be enhanced by purchasing the Advanced Simulation option and/or
micro-controller simulation capabilities.

1.6 significance of the project

Nowadays our country even the whole world is experiencing hot weather because of our problem
regarding with ozone layer, we are experiencing global warming. Air conditioning is a great
helpful for us. Because we can feel coolness when we are inside a room which is air conditioned
especially when we are experiencing home hot weather most of us stay in a cold place. Air
conditioner refers the general process of altering air properties such as temperature to achieve a
desired condition. Air conditioning is a process which work is done; on more heat from low
temperature to high temperature and typically form one location to other. The design of an

WSU, ECE FINAL PROJECT Page 5


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

automatic air conditioner control system plays a paramount role in our daily life. A good change-
over switch should minimizes damages to lives and equipment since it has its own monitoring
system and It’s switching requires no human contact with the switch, thus eliminating human
error, reduces change- over time to a minimum, due to its fast response to temperature, maintains
high quality of service through its fast and prompt response. Moreover, the unit is portable, easy,
convenient and safe to install.

Air conditioner has the following significances:

1. There are lots of people in office then there would be in house


2. There are lots of machines generating heat as well (less likely to work ) so it is important
to have air conditioner
3. If there are large people in office it would be impossible to keep everyone cool then
which will keep everyone happy.

1.7 Limitation of project

The performance requirements must be satisfied to provide a complete end product: The device
should be insensitive to the temperature fluctuations of about ±2 ºC. The device is to have a wide
input voltage range of 220~230 V (ac). Physical isolation of digital and analog circuitry blocks,
i.e. the performance of the microcontroller should not be influenced by the analog side.

1.8 Organization (outline) of the project

It will explain how the project is organized and the flow of process in completing this project.
This thesis consists of five chapters. This chapter discuss about background of project, problem
of statement, objective of project, project scope. Also in this topic discussed the methodology of
the system; methodology for the involved components in this project, significance, limitation of
project and thesis organization.

WSU, ECE FINAL PROJECT Page 6


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Chapter 2 contains literature review on description of automatic air conditional control system. It
will explain about the concept of automatic air conditional control system and the application of
this system.

Chapter 3 is system design and description of the project which includes the block diagram
project, material description, flow chart and working principle of the project, circuit design,
software design and the hardware design.

Chapter 4 will be discussing about the result and simulation obtained in this project and a
discussion about the result.

Finally, the conclusions for this project are presented in chapter 5. This chapter also discusses
about the recommendation for the project of the future development.

WSU, ECE FINAL PROJECT Page 7


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

CHAPTER TWO

LITERATURE REVIEW

2.1 INTRODUCTION

An air conditioner is an appliance, system, or mechanism designed to extract hot from


an area using a ventilation cycle. In construction, a complete system of heating, ventilation, and
air conditioning is referred to as HVAC. Its purpose, in the home or in the car, is to provide
comfort during hot days and nights. Thermostats control the operation of HVAC systems,
turning on the heating or cooling systems to bring the building to the set temperature. Typically
the heating and cooling systems have separate control systems so that the temperature is only
controlled "one-way”. In winter, a building that is too hot will not be cooled by the thermostat.
Thermostats may also be incorporated into facility energy management systems in which the
power utility customer may control the overall energy expenditure. In addition, a growing
number of power utilities have made available a device which, when professionally installed,
will control or limit the power to an HVAC system during peak use times in order to avoid
necessitating the use of rolling blackouts. In a thermodynamically closed system, any energy
input into the system that is being maintained at a set temperature (which is a standard mode of
operation for modern air conditioners) requires that the energy removal rate from the air
conditioner increase. This increase has the effect that for each unit of energy input into the
system requires the air conditioner to remove that energy. In order to do that the air conditioner
must increase its consumption by the inverse of its efficiency times the input unit of energy. So
we can state here that Air conditional use more energy than other electrical equipment. For
residential homes, our country set minimum requirements for energy efficiency. In Ethiopia, the
efficiency of air conditioners is often (but not always) rated by the Seasonal Energy Efficiency
Ratio (SEER). The higher the SEER rating, the more energy efficient is the air conditioner. The
SEER rating is the BTU of cooling output during its normal annual usage divided by the total
electric energy input in watt-hours (W·h) during the same period. So when we use the air
conditioner, we need to pay more bills. The use of electric/compressive air conditioning puts a

WSU, ECE FINAL PROJECT Page 8


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

major demand on the nation's electrical power grid in warm weather, when most units are
operating under heavy load. During peak demand, additional power plants must often be brought
online, usually natural gas fired plants because of their rapid startup. So when the user uses the
air conditioner, some time they don’t realize that they have waste lot of energy every day. For
the user that uses the air conditioner, there is a certain way to save some energy. The savings can
be significant when set the thermostat at 1°C or higher (Cooling model) / 2°C or lower (Heating
model). For each degree that raises the thermostat setting, reduce seasonal cooling costs by 10%.
They also can use a ceiling fan or portable fan to supplement the air conditioning. A fan can
make feel a few degrees 3 cooler so can set the thermostat a few degrees higher and save on
cooling costs. User also must make sure the air conditioner is not blocked. A free flowing air
conditioner operates most efficiently. Filters should be checked every 2 weeks. Dirty filters may
reduce cooling and heating efficiency and when air conditioning is on, keep doors and windows
closed. Turn off kitchen or bathroom exhaust fans when the air conditioning is operating.

Ethiopia, like many other developing countries with hot climates, has been experiencing
dramatic growth in the number and use of room air conditioners. As the economy recovers and
income level rise, more consumers will seek air conditioning. Since there is potential of
substantial energy saving in the domestic room air conditioning sector, the establishment of
energy efficiency standard for room air conditioner has been giving priority.

This paper is to investigate the potential of air conditioning load management by


solving the temperature sensitivity of load demand for various customer classes. The increase of
system power demand for each 10 C temperature rise is then derived by integrating the load
change of all customer classes to verify the accuracy of the simulation. It is found that the
proposed methodology does provide an effective tool for the utility company to identify the
customer classes with good potential for air conditioner load management.

WSU, ECE FINAL PROJECT Page 9


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

CHAPTER THREE

3. SYSTEM DESIGN AND DESCRIPTION OF THE PROJECT

3.1BLOCK DIAGRAM

Figure: 3.1 block diagram of the project

WSU, ECE FINAL PROJECT Page 10


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.2 MATERIAL DESCRIPTION

3.2.1 MICROCONTROLLER

The PIC microcontroller is a family of microcontrollers manufactured by the Microchip


Technology Inc. Currently the PIC is one of the most popular microcontrollers used in education,
and in commercial and industrial applications. The family consists of over 140 devices, ranging
from simple 4-pin dual in-line devices with 0.5 K memories, to 80-pin complex devices with 32
K memory. Even though the family consists of a large number of devices, all the devices have
the same basic structure, offering the following fundamental features:

 Reduced instruction set (RISC) with only 35 instructions


 Bidirectional digital I/O ports
 RAM data memory
 Rewritable flash, or one-time programmable program memory
 On-chip timer with pre-scalar
 Watchdog timer
 Power-on reset
 External crystal operation
 25 mA current source/sink capability
 Power-saving sleep mode.

More complex devices offer the following additional features:

 analog input channels


 analog comparators
 serial USART
 nonvolatile EEPROM memory
 additional on-chip timers; external and internal (timer) interrupts
 PWM output
 CAN bus interface
 I2C bus interface
 LCD interface.

WSU, ECE FINAL PROJECT Page 11


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Microcontrollers are designed for embedded applications, in contrast to the microprocessors used
in personal computers or other general purpose applications. Microcontrollers are used in
automatically controlled products and devices, such as automobile engine control systems,
implantable medical devices, remote controls, office machines, appliances, power tools, toys and
other embedded systems. By reducing the size and cost compared to a design that uses a separate
microprocessor, memory, and input/output devices, microcontrollers make it economical to
digitally control even more devices and processes. Mixed signal microcontrollers are common,
integrating analog components needed to control non-digital electronic systems. The micro
controller we used is called PIC16F874A.

PIC16F874A

The PIC16F874A belongs to the mid-range family of the PIC microcontroller devices. The
program memory contains 1K words, which translates to 1024 instructions, since each 14-bit
program memory word is the same width as each device instruction. The data memory (RAM)
contains 68 bytes. Data EEPROM is 64 bytes. There are also 13 I/O pins that are user-configured
on a pin-to-pin basis.

Table: 3.1 pic 16F874A pin description

WSU, ECE FINAL PROJECT Page 12


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Figure: 3.2 PIC 16F874A

Input/output Ports of PIC 16F874A

PIC 16F874A series normally has five input/output ports. They are used for the input/output
interfacing with other devices/circuits. Most of these port pins are multiplexed for handling
alternate function for peripheral features on the devices. All ports in a PIC chip are bi-
directional. When the peripheral action is enabled in a pin, it may not be used as its general
input/output functions. The PIC 16F874A chip basically has 5 input/output ports. The five
input/output ports and its functions are given below.

PORT A and the TRIS A Registers: PORT A is a 6-bit wide bi-directional port, the direction
of this port is controlled by TRIS A data direction register. Setting a TRIS A (=1) makes
corresponding PORT A pin as an input, clearing the TRIS A (=0) making the corresponding
PORT A pin as an output Pin RA4 is multiplexed with the Timer0 module clock input to become
the RA4/T0CKI pin and functioning either input/output operation or Timer 0 clock functioning

WSU, ECE FINAL PROJECT Page 13


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

module. The RA4/T0CKI pin is a Schmitt Trigger input and an open drain output. All other
PORT A pins has TTL input levels and full CMOS output drivers. Other PORT pins in this
microcontroller multiplexed with analog inputs and the analog VREF input for both the A/D
converters and the comparators. The operation of each pin is selected by clearing/setting the
appropriate control bits in the ADCON1 and/or CMCON registers. The TRIS A register controls
the direction of the PORT pins even when they are being used as analog inputs. The user must
ensure the bits in the TRISA register are maintained set when using them as analog inputs.

PORT B and the TRIS Registers: PORT B is also an 8 bit bi-directional PORT. Its direction
controlled and maintained by TRIS B data direction register. Setting the TRIS B into logic
1‘makes the corresponding PORT B pin as an input. Clearing the TRIS B bit make PORT B as
an output. Three pins of PORT B are multiplexed with the In-Circuit Debugger and Low-Voltage
Programming function: RB3/PGM, RB6/PGC and RB7/PGD for performing its alternate
functions.

PORT C and the TRIS C Registers: PORT C is an 8-bit wide, bidirectional PORT which
controlled and maintained by TRIS C data direction register. Setting a TRIS C bit (= 1) will
make the corresponding PORT C pin an input (i.e., put the corresponding output driver in a
High-Impedance mode). Clearing a TRIS C bit (= 0) will make the corresponding PORT C pin
an output PORT C is also multiplexed with several peripheral functions. PORT C pins have
Schmitt Trigger input buffers. When enabling peripheral functions, more care should be taken in
defining TRIS bits for each PORT C pin as compared to other. Some peripherals override the
TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an
input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify write
instructions (BSF, BCF, and XORWF) with TRISC as the destination, should be avoided. The
user should refer to the corresponding peripheral section for the correct TRIS bit settings.

PORT D and TRIS D Registers: PORT D is an 8-bit PORT with bi-directional nature. This
port also with Schmitt Trigger input buffers, each pin in this PORT D individually configurable
as either input or output. PORT D can be configured as an 8-bit wide microprocessor PORT
(functioning as Parallel Slave PORT) by setting control bit, PSPMODE ((TRISE<4>). In this
mode, the input buffers are TTL.

WSU, ECE FINAL PROJECT Page 14


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

PORT E and TRIS E Registers: PORT E has only three pins (RE0/RD/AN5, RE1/WR/AN6
and RE2/CS/AN7) which are individually configurable as inputs or outputs. These pins
controllable by using its corresponding data direction register TRIS E. These pins also have
Schmitt Trigger input buffers. The PORT E pins become the I/O control inputs for the
microprocessor PORT when bit PSPMODE is set. In this mode, the user must make certain that
the TRIS E bits are set and that the pins are configured as digital inputs. Also, ensure that
ADCON1 is configured for digital I/O. In this mode, the input buffers are TTL. TRISE register
which also controls the Parallel Slave PORT operation. PORT E pins are multiplexed with
analog inputs. When selected for analog input, these pins will read as 0‘s. TRIS E controls the
direction of the RE pins, even when they are being used as analog inputs. The user must make
sure to keep the pins configured as inputs when using them as analog inputs.

Figure: 3.3 PIC16F874A pin configuration

WSU, ECE FINAL PROJECT Page 15


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.2.2 LCD Display

The temperature sensor senses the room temperature and it is displayed on the LCD Display.
LCD-Liquid Crystal Display is an electronic device for displaying text or Characters. We are
using 14 pin LCD. 16*2 represents 16 characters and 2 line display. LCD’s are economical and
easily programmable and can easily display special and custom characters.

Figure: 3.4 outlook pin LCD display

PIN No Pin Description


Pin 1 This is VSS i.e. ground pin
Pin2 This is VDD i.e. power supply pin
Pin3 This is VEE i.e. short pin
Pin4 This is RS i.e. Register selection
Pin5 This is R/W i.e. read/write pin
Pin6 This is E i.e. enable pin
Pin7 to pin14 All pins are responsible for data transfer (D0, D1, D2,…D6, D7)
Table: 3.2 LCD LM016L pin description

WSU, ECE FINAL PROJECT Page 16


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Pin schematic configuration of LCD LM016L

Figure: 3.5 Pin schematic configuration of LCD LM016L

WSU, ECE FINAL PROJECT Page 17


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Interface PIC16F874A with LCD

// LCD module connections


sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;

Figure: 3.6 interfacing of pic16f874A with LCD LMO16L

WSU, ECE FINAL PROJECT Page 18


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.2.3 Air Conditioner

An air conditioner is an appliance, system, or mechanism designed to extract temperature from


an area using a refrigeration (ventilation) cycle. In construction, a complete system ventilation
and air conditioning is referred. Its purpose, in the home is to provide comfort during hot days
and nights. There are certain problems happen when user uses the air conditioner. The
conventional air conditional uses more energy, need to pay more bills and waste the energy. This
project mainly concern to use PIC to control NPN power transistor further drive air conditional.
This situation happen when the sensor detected certain temperature and the movement. The value
of environment temperature will display on a LCD screen. When sensor did not detect the
movement and environment temperature is below the setting point so the air conditioner will off
automatically.

Figure: 3.7 air conditioner control units

WSU, ECE FINAL PROJECT Page 19


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.2.4 Push button

A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for
controlling some aspect of a machine or a process. Buttons are typically made out of hard
material, usually plastic or metal. The surface is usually flat or shaped to accommodate the
human finger or hand, so as to be easily depressed or pushed. Buttons are most often biased
switches, though even many un-biased buttons (due to their physical nature) require a spring to
return to their un-pushed state. Different people use different terms for the "pushing" of the
button, such as press, depress, mash, and punch.

Figure: 3.8 push button

WSU, ECE FINAL PROJECT Page 20


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Pic detects input switch

Is input switch is pressed?

PIC activated

PIC sends switch status

Figure: 3.9 Flow chart showing PIC and pushbutton communication

3.2.5 Power supply

Most digital logic circuits and processors need a +5 volt power supply. To use these parts we
need to build a regulated +5 volt source. Usually we start with an unregulated power supply
ranging from 9 volts to 24 volts DC. To make a +5 volt power supply, we use a 7805 voltage
regulator IC (Integrated Circuit). The power supply can cause the sensor to heat, leading to an
error in the measurement. There can be several sources of error during the measurement of
temperature. Some important possible errors are described below. Sensor self-heating: RTDs,
thermistors and integrated circuit sensors require an external power supply for their operation.

WSU, ECE FINAL PROJECT Page 21


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

The effect of self-heating depends on the size of the sensor and the amount of power dissipated
by the sensor. Self-heating can be avoided by using the lowest possible external power, or by
considering the heating effect in the measurement.

Temperature

Sensor

Power
supply

PIC16F874A

Figure: 3.10 Power supply unit

Supply Regulation Circuit

The A.C. power supply to the circuit has to be regulated to a reasonable amount for the
workability and durability of the circuit component. The power supply regulation process is
accomplished by following the four stages listed below:

 Transformer
 Rectification
 Filtering
 Voltage regulation

Transformer: The a.c. supply gives out 220V or 230V and the supply is stepped down by the
transformer to a reasonable amount of 12V which is needed for the operation of the circuit. A d.c
voltage of 12V is needed for the operation of the motor.

WSU, ECE FINAL PROJECT Page 22


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Rectification: There is the need for the conversion of the a.c. voltage to d.c. voltage. Diodes
help in this conversion process. However, in the conversion process the voltage drop across the
diode which is greater than 1V is added to the already stepped down 12V and making the total
voltage in the rectification to be 13V or greater.

Filtering: The capacitor removes or filters the ripples generated and produced alongside the
rectification process.

Voltage Regulation: Voltage regulators are devices that produce constant d.c. voltage regardless
of the variation in the input load. A d.c. voltage of 5V is needed for the operation of the PIC.
Two voltage regulators are used in this stage. These are:

i. LM7812 voltage regulator


ii. LM7805 voltage regulator

Mimic configuration: The minimum PIC configuration depends on the type of microcontroller
used. Normally, the operation of a PIC microcontroller requires a power supply, reset circuit and
oscillator. The power supply is usually +5 Vdc and can be obtained from the mains supply by
using a step down transformer, a rectifier circuit and a power regulator chip, such as the
LM78L05. Although PIC microcontrollers have built-in power-on reset circuits, it is useful in
many applications to have external reset circuits. When the microcontroller is reset, all of its
special function registers are put into a known state and execution of the user program starts
from address 0 of the program memory. Reset is normally achieved by connecting a 4.7 K pull-
up Resistor from the master clear (MCLR) input to the supply voltage.

Sensors used in computer control: Sensors are an important part of closed-loop systems and
they provide information about the actual output of a plant. A sensor is a device that outputs a
signal which is related to the measurement of (i.e. is a function of) a physical quantity such as
temperature. Sensors can be classified as analog or digital. Analog sensors are more widely
available, and their outputs are analog voltages. For example, the output of an analog
temperature sensor may be a voltage proportional to the measured temperature. Analog sensors
can only be connected to a computer by using an A/D converter. Digital sensors are not very

WSU, ECE FINAL PROJECT Page 23


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

common and they have logic level outputs which can directly be connected to a computer input
port. The choice of a sensor for a particular application depends on many factors such as the cost,
reliability, required accuracy, resolution, range and linearity of the sensor. Some important
factors are described below.

Range: The range of a sensor specifies the upper and lower limits of the measured variable for
which a measurement can be made. For example, if the range of integrated temperature sensor is
specified as −40 ◦C to +125◦C then the sensor should only be used to measure temperatures
within that range. Resolution: The resolution of a sensor is specified as the largest change in
measured value that will not result in a change in the sensor’s output, i.e. the measured value can
change by the amount quoted by the resolution before this change can be detected by the sensor.
In general, the smaller this amount the better the sensor is, and sensors with a wide range have
less resolution. For example, a temperature sensor with a resolution of 0.001 K is better than a
sensor with a resolution of 0.1 K.

Repeatability: The repeatability of a sensor is the variation of output values that can be expected
when the sensor measures the same physical quantity several times. For example, if the voltage
across a resistor is measured at the same time several times we may get slightly different results.

Linearity: An ideal sensor is expected to have a linear transfer function, i.e. the sensor output is
expected to be exactly proportional to the measured value. However, in practice all sensors
exhibit some amount of nonlinearity depending upon the manufacturing tolerances and the
measurement conditions.

3.2.6 Temperature Sensors

Temperature is one of the fundamental physical variables in most chemical and process control
applications. Accurate and reliable measurement of the temperature is important in nearly all
process control applications. Temperature sensors can be analog or digital. Some of the most
commonly used analog temperature sensors are: thermocouples, resistance temperature detectors
(RTDs) and thermistors. Digital sensors are in the form of integrated circuits. The choice of a
sensor depends on the accuracy, the temperature range, speed of response, thermal coupling, the
environment (chemical, electrical, or physical) and the cost. As shown in Table below,

WSU, ECE FINAL PROJECT Page 24


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

thermocouples are best suited to very low and very high temperature measurements. The typical
measuring range is from −270 ◦C to +2600 ◦C. In addition, thermocouples are low-cost, very
robust, and they can be used in chemical environments. The typical accuracy of a thermocouple
is ±1 ◦C. Thermocouples do not require external power for operation. RTDs are used in medium-
range temperature measurements, ranging from −200 ◦C to +600 ◦C. They can be used in most
chemical environments but they are not as robust as thermocouples. The typical accuracy of
RTDs is ±0.2 ◦C. They require external power for operation. Thermistors are used in low- to
medium-temperature applications, ranging from −50 ◦C to about +200 ◦C. They are not as robust
as thermocouples or RTDs and they cannot easily be used in chemical environments.
Thermistors are also low-cost devices, they require external power for operation, and they have
an accuracy of ±0.2 ◦C. Integrated circuit temperature sensors are used in low-temperature
applications, ranging from −40 ◦C to +125 ◦C. These devices can be either analog or digital, and
their coupling with the environment is not very good. The accuracy of integrated circuit sensors
is around ±1 ◦C. integrated temperature sensors differ from other sensors in some important
ways: They are relatively small. Their outputs are highly linear. Their temperature range is
limited. Their cost is very low. Some models include advanced features, such as thermostat
functions, built-in A/D converters and so on. An external power supply is required to operate
them. This is our selection for temperature sensor type.

Sensor Temp.Range Accuracy( 0c) cost


Themocouple -270 to +2600 1 Low
RTD -200 to +600 0.2 Medium
Thermister -50 to +200 0.2 Low
Integrated cicuit -40 to +125 1 Low
table: 3.3 temperature sensors

3.2.7 TEMPERATURE SENSOR (LM35)

The LM35 series are precision integrated-circuit temperature sensors, with an output voltage
linearly proportional to the Centigrade temperature. Thus the LM35 has an advantage over linear
temperature sensors calibrated in ° Kelvin, as the user is not required to subtract a large constant

WSU, ECE FINAL PROJECT Page 25


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

voltage from the output to obtain convenient Centigrade scaling. The LM35 does not require any
external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and
±¾°C over a full −55°C to+150°C temperature range.

Figure: 3.11 LM35 temperature sensor on protues (full −55°C to+150°C temperature range)

Low cost is assured by trimming and calibration at the wafer level. The low output impedance,
linear output, and precise inherent calibration of the LM35 make interfacing to readout or control
circuitry especially easy. The device is used with single power supplies, or with plus and minus
supplies. As the LM35 draws only 60mA from the supply, it has very low self-heating of less
than 0.1°C in still air. The LM35 is rated to operate over a -55°C to +150°C temperature range.

WSU, ECE FINAL PROJECT Page 26


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Figure: 3.12 outlook of temperature sensor

FEATURES

Calibrated Directly in ° Celsius (Centigrade)


Linear + 10 mV/°C Scale Factor
0.5°C Ensured Accuracy (at +25°C)
Rated for Full −55°C to +150°C Range
Suitable for Remote Applications
Low Cost Due to Wafer-Level Trimming
Operates from 4 to 20V
Less than 60μA Current Drain
Low Self-Heating, 0.08°C in Still Air
Nonlinearity Only ±¼°C Typical
Low Impedance Output, 0.1 Ω for 1 mA Load

WSU, ECE FINAL PROJECT Page 27


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Figure: 3.13 Basic Centigrade Temperature Sensor (+2°C to +150°C

3.2.8 Power Transistor (BC547NPN)

This Power Transistor is semiconductor device used to amplify and switch on/off electronic
signals and electrical power. PIC16f874A cannot directly activate the DC brushless fan because
it has not enough current. Since the current of I/O pin from PIC16F874A is limited to drive a DC
Brushless Fan (0.12A). So Power Transistor (BC547NPN) is required for giving current to DC
Brushless Fan sufficiently. The maximum collector current(Ic) of BC547NPN is 1.5A, which
means the DC Brushless Fan greater than 1.5A cannot be driven. Then NPN power transistor
(BC547NPN) is required for controlling the DC brushless fan with sufficient current. So that DC
brushless fan indirectly controlled by PIC16F874A. It is composed of semiconductor material
usually with at list three terminals for connection ton an external circuit. A voltage or current
applied to one pair of the transistor’s terminals changes the current via another pair of terminals.
Because the controlled (output) power come can be higher than the controlling (input) power, a
transistor can amplify a signal. Power semiconductor device is a semiconductor device used as a
switch or rectifier in power electronics; a switch mode power supply is an example. Such devices
are also called a power device or, when used in an integrated circuit a power IC. A power
Semiconductor device is usually used in “communication mode” (i.e., it is either on or off), and
therefore has a design optimized for such usage; it should usually not be used in linear operation.

WSU, ECE FINAL PROJECT Page 28


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Figure: BC547 NPN transistor from protues

This project will used PIC16F874A to control power transistor (BC547NPN) further drive DC
brushless fan when the certain temperature was detected. The value of temperature always
displayed on a LCD screen.

Figure: 3.15 simplified power transistor

WSU, ECE FINAL PROJECT Page 29


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.3 Flow chart

Start

Input data from LM35


sensor

LCD display

NO
YES

Microcontroller ON Temp>500C
Microcontroller off
OR

Temp<200C
Transistor ON
Transistor off

Fan ON Fan off

END

Figure: 3.16 flow chart of the project

WSU, ECE FINAL PROJECT Page 30


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

3.4 Working principle

In this project we use PIC16F874A, Port A is used for Input Connections with LM35 sensor,
Port B is used for LCD output as Output Port and Port C is used for connecting the Fan as a
output port. PIC16F874A will read the analog voltage (using ADC) from temperature sensor
(LM35) as input and display it on LCD display. PIC16f874A has been used to control the LCD
directly for previous Programs. But in this project, PIC16f874A cannot directly activate the DC
brushless fan because it has not enough current. Since the current of I/O pin from PIC16F874A
is limited to drive a DC Brushless Fan (0.12A). So Power Transistor (BC547NPN) is required
for giving current to DC Brushless Fan sufficiently. The maximum collector current(Ic) of
BC547NPN is 1.5A, which means the DC Brushless Fan greater than 1.5A cannot be driven.
Then NPN power transistor (BC547NPN) is required for controlling the DC brushless fan with
sufficient current. So that DC brushless fan indirectly controlled by PIC16F874A. This Fan will
be activated when temperature reaches 200c temperature value. As the LM35 sensor is accurate
from 25C, the Fan will start rotating from 25C to 50C. The other inputs to our PIC16F874A
microcontroller are pushbuttons. One I/O pin is needed for one push button as input for
PIC16f874A microcontroller. The I/O pin should be pull up to 5V using hands and this
configuration will result an active-low input. When the button is being pressed, reading of I/O
pin will be in logic 1, while when the button is not pressed, reading of that I/O pin will be logic
0.

WSU, ECE FINAL PROJECT Page 31


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Figure: 3.17 General circuit diagram of the project

WSU, ECE FINAL PROJECT Page 32


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

CHAPTER FOUR

4. SIMULATION AND RESULT

4.1 INTRODUCTION

Typically the heating and cooling systems have separate control systems so that the temperature
is only controlled "one-way”. The power utility customer may control the overall energy
expenditure. This Fan will be activated when temperature reaches 250c temperature value. As the
LM35 sensor is accurate from 250C, then the Fan will start rotating from 250C to 500C.

Figure: 4.1 circuit diagram at 250C desired temperature

WSU, ECE FINAL PROJECT Page 33


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

If the ambient temperature rises above the desired temperature (250C), a high signal (digital
value 1) will be sent to a digital to analog converter. This will signal the switch to turn the air
conditioner ON. Conversely, once the ambient temperature goes below the desired temperature
(250C) a low signal (digital value 0) again will be sent indicating to turn OFF the air conditioner.

Figure: 4.2 circuit diagram at temperature value of 500c

If the ambient temperature rises below the desired temperature (500C), a high signal (digital
value 1) will be sent to a digital to analog converter. This will signal the switch to turn the air

WSU, ECE FINAL PROJECT Page 34


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

conditioner ON. Conversely, once the ambient temperature goes above the desired temperature
(500C) a low signal (digital value 0) again will be sent indicating to turn OFF the air conditioner.

Our automatic air-conditioner control is required for maintaining comfort and saving energy.
The power for this block will be provided from the power converter block. The microcontroller
will receive an input signal from LM35 temperature sensor which will determine the ambient
temperature of the room. The sensor output signal will be compared to a push button input, the
desired temperature push button in by the user. The default reading on the push button will be the
ambient temperature the display of which is outputted to an LCD. When a user presses the push
on the push button, the desired temperature shall be displayed on the LCD The micro-controller
will also need to have a built in function that would provide tolerance for the temperature sensor
output. This function is necessary to prevent the air conditioner from turning on and off due to
some minor temperature fluctuations. It can able to switch on/off air conditioner automatically
based on environment temperature.

4.2 COST ANALYSIS

Tools Price ($) /device ET BIRR Quantity


Pic 16f877A 3.95 82.95 1

LCD 3.79 79.59 1

TEMPERATURE SENSOR 3.73 78.33 1


Air Conditioner 300 4300 1
Push button 0.9 37.8 2
Transistor 1.49 31.29 1

Total 4609.96 7

Table: 4.2 cost analysis

WSU, ECE FINAL PROJECT Page 35


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

CHAPTER FIVE

CONCLUSIONS AND RECOMMENDATION

5.1Conclusion
PIC16F874A will read the analog voltage (using ADC) from temperature sensor (LM35) as input
and display it on LCD (LM016L) as output. When the PIC16F874A digital output is high (1)
then the transistor (BC547NPN) will activate the air conditioner (ON) and the digital output is
low (0) air conditioner is OFF. The push button sends the message into micro controller then
convert to ADC and display on LCD. The sensor determine the proper temperature and the
microcontroller will insure that unstable fluctuations do not occur, i.e. an air conditioner does not
constantly turn on and off due to minor fluctuations to ambient temperature. We need to
implement a wide tolerance range for the temperature readings (a possible ±2 ºC range) to insure
against such operation of the air conditioning device. During the testing of the device at
temperature extremes it will be necessary to provide a sufficient way of raising and lowering the
temperature of the environment on temperature sensor (LM35).
Air conditioner control units are sources of power consumption and sources of noise in
the system are our very important considerations. The fan is also one more mechanical
component in the system not an ideal solution from a reliability standpoint.

To answer these actions of challenges’; we designed an automatic air conditioner control


system which plays a more important (paramount) role in our daily life. Therefore our automatic
air conditioner control system can have these advantages:

 Reduces the power consumes,


 Reduces the noise fan emits and
 Increases fans reliability and lifetime.
 Moreover, the system is portable, easy, convenient and safe to install.

WSU, ECE FINAL PROJECT Page 36


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

5.2 Recommendations

We recommended that electric utilities or users to use this technology as a demand side
management strategy for reducing energy consumption because of Electrical home appliances go
electronic rapidly these days. It will play an important role for performing the control of air
conditioners in future. Therefore our automatic air-conditioner control is required for
maintaining comfort and saving energy.

Inputting Temperature, humidity, clothes, activity, wind velocity, and radiation heat to a
room air-conditioner as control commands are not practical due to sensory difference of each
individual. Since humidity, wind velocity and radiation heat are considered comparatively less
variant in a room, these factors have been excluded from the investigation of our project. In
Ethiopia the comfortable temperature slightly differs with seasons or depending on the outside
temperature as follows: (21-27) 0C in summer and (19- 25) °C in winter. Therefore, the
comfortable temperature range is rather selected.

The performance requirements must be satisfied to provide a complete end product: The
device should be insensitive to the temperature fluctuations of about ±2 ºC. The device is to have
input voltage range of 220~230 V (ac). Physical isolation of digital and analog circuitry blocks,
i.e. the performance of the micro-controller should not be influenced by the analog side.

WSU, ECE FINAL PROJECT Page 37


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

References

1. Escoffier, C.; Bouncier, J.; Leland, P.; Jeanie Yu, "Towards a Home Application Server,"
Consumer Communications and Networking Conference 2008 CCNC 2008 5th IEEE
vol., No. pp.321-325, 10-12 Jan. 2008.
2. http://depts.washington.edu/dmgftp/publications/html/smarthouse98-mdg.html
3. LM35 Precision Centigrade Temperature Sensors, National Semiconductor Corp.,
December 1994
4. Mishap Data Sheets, PIC16F877a/40-Pin 16-BitCMOS Flash Micro controllers,
www.microchip.com
5. Patricio, G.; Gomes, L., "Smart house monitoring and actuating system development
using automatic code generation," Industrial Informatics, 2009. INDIN2009. 7th IEEE
International Conference on, vol., no., pp.256-261, 23-26 June 2009
6. NSelman, A.; Alafandi, M.; Moeller, “Integration of Wireless Fieldbus and Wired Field
bus for Health Monitoring”; R.;Consumer Electronics, 2009. ICCE '09 Digest of
Technical P après International Conference on 10-14 Jan. 2009 Page(s):1 - 2
7. Van Nguyen, T.; Jin Gook Kim; Deokjai Chou, "ISS: The Interactive Smart home
Simulator," Advanced Communication Technology, 2009. ICACT 2009.11th
International Conference on , vol.03, no., pp.1828- 1833, 15-18 Feb. 2009

WSU, ECE FINAL PROJECT Page 38


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

APPENDICES

// LCD module connections

sbit LCD_RS at RB0_bit;

sbit LCD_EN at RB1_bit;

sbit LCD_D4 at RB2_bit;

sbit LCD_D5 at RB3_bit;

sbit LCD_D6 at RB4_bit;

sbit LCD_D7 at RB5_bit;

sbit LCD_RS_Direction at TRISB0_bit;

sbit LCD_EN_Direction at TRISB1_bit;

sbit LCD_D4_Direction at TRISB2_bit;

sbit LCD_D5_Direction at TRISB3_bit;

sbit LCD_D6_Direction at TRISB4_bit;

sbit LCD_D7_Direction at TRISB5_bit;

// End LCD module connections

unsigned int pv_temp,sp_temp;

char txt1[] = "TEMPRATURE Value";

char txt[10];

char xt[10];

void main()

TRISD=1;

TRISB=0; // set portb as output

TRISA = 0xFF; // PORTA is input

WSU, ECE FINAL PROJECT Page 39


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

TRISC = 0; // PORTC is output

portC=0;

portD=0;

ADCON1.F4 = 1 ; // Voltage reference is brought to the RA3 pin.

Lcd_Init(); // Initialize LCD

Lcd_Cmd(_LCD_CLEAR); // Clear display

Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off

Lcd_Out(1,1,txt1);

sp_temp = 20;

do

if (portd.RD0 == 1)

sp_temp++;

delay_ms(200);

If (sp_temp > 50) sp_temp = 50;

if (portd.RD1 == 1)

sp_temp--;

delay_ms(200);

if (sp_temp < 20) sp_temp = 20;

pv_temp = ADC_Read(2);

IntToStr(pv_temp,txt);

WSU, ECE FINAL PROJECT Page 40


AUTOMATIC AIR CONDITIONER CONTROL SYSTEM 2016

Lcd_Out(2,2,txt);

Lcd_Out(2,1,"pv=");

IntToStr(sp_temp,xt);

Lcd_Out(2,11,xt);

Lcd_Out(2,10,"sp=");

if(pv_temp>sp_temp)

portC.RC0=1;

else

portC.RC0=0;

} while(1);

Lcd_Out(2,10,"sp=");

if(pv_temp>sp_temp)

portC.RC0=1;

else

portC.RC0=0;

while(1);

WSU, ECE FINAL PROJECT Page 41

You might also like