temperature control & display
-
Upload
manoj-kollam -
Category
Documents
-
view
224 -
download
0
Transcript of temperature control & display
-
7/30/2019 temperature control & display
1/45
TEMPRATURETEMPRATURECONTROLLER ANDCONTROLLER AND
DISPLAYDISPLAY
-
7/30/2019 temperature control & display
2/45
1. Introduction
2. Circuit Diagram
3. Circuit Description
4. Component List
5. Data sheets
6. Reference
-
7/30/2019 temperature control & display
3/45
A simple introduction about the temperature controllercircuit.
This circuit project is mainly used used for temperatureindicator, temperature controller
And in controlling device depend on temperature.
Controlling devices like air heater, factory, industrial,
application.
In temperature controller circuit there are two part consistof
o ADC 0804 interface with at89s52.o LCD interface with at89s52.
The hardware circuit of temperature controller withcontroller to need the programming.
There are two possibilities FSO programming
assembly language programming
c language
Here we use the assembly language programming usingkeil (Vision4 IDE) software.
This programming usually load in the at89s52 controller
ic.
At89s52 is a family of 8051.
The programming for 8051.this system is calledembedded system.
The main principle of this project to indicate temperature,analog to digital, to control the temperature & interfacing.
-
7/30/2019 temperature control & display
4/45
-
7/30/2019 temperature control & display
5/45
Working :-Working :-
How to interface ADC0804 using 8051 microcontroller(AT89C52)
ADC0804 is one of the most commonly used analog todigital converter IC. In many applications it is requiredto convert the output of the sensor, which is analoguein nature to a digital form. The data in digital formatcan then be utilized for further processing by the digitalprocessors. Typical applications include soundprocessing, temperature processing etc. This circuitdemonstrates the principle and operation of interfacinga simple ADC 0804 using 8051 microcontroller
(AT89C52). ADC0804 is connected as shown in the circuit diagram.
Here the input is taken from a preset, which givesdifferent analog signals to the ADC. The output pins ofthe ADC are connected to LEDs. The control pins of theADC are connected to the microcontroller AT89C52.
ADC0804 is a single channel analog to digital convertori.e., it can take only one analog signal. An ADC has n bitresolution (binary form) where n can be 8,10,12,16 or
even 24 bits. ADC 0804 has 8 bit resolution. The higherresolution ADC gives smaller step size. Step size issmallest change that can be measured by an ADC. Foran ADC with resolution of 8 bits, the step size is19.53mV (5V/255).
The time taken by the ADC to convert analog data intodigital form is dependent on the frequency of clocksource. ADC0804 can be given clock from externalsource. It also has an internal clock.
However the conversion time cannot be morethan110us. To use the internal clock a capacitor andresistor is connected to pin 19 and 4 as shown in thecircuit diagram. The frequency is given by the relationf= 1/ (1.1RC). The circuit uses a resistance of 10k and acapacitor of 150pF to generate clock for ADC0804. Vin,which is the input pin, is connected to a preset toprovide analog input.
Pin Description
http://engineersgarage.com/content/ic-adc0804http://engineersgarage.com/content/ic-adc0804http://engineersgarage.com/content/ledhttp://engineersgarage.com/content/microcontroller-at89c51http://engineersgarage.com/content/ic-adc0804http://engineersgarage.com/content/ic-adc0804http://engineersgarage.com/content/ledhttp://engineersgarage.com/content/microcontroller-at89c51 -
7/30/2019 temperature control & display
6/45
1. CS, Chip Select: This is an active low pin and used
to activate the ADC0804.
2. RD, Read: This is an input pin and active low. Afterconverting the analog data, the ADC stores the resultin an internal register. This pin is used to get the dataout of the ADC 0804 chip. When CS=0 & high to lowpulse is given to this pin, the digital output is shownon the pins D0-D7.
3. WR, Write: This is an input pin and active low. Thisis used to instruct the ADC to start the conversionprocess. If CS=0 and WR makes a low to hightransition, the ADC starts the conversion process.
4. CLK IN, Clock IN: This is an input pin connected toan external clock source.
5. INTR, Interrupt: This is an active low output pin.This pin goes low when the conversion is over.
6. Vin+ : Analog Input .
7. Vin- : Analog Input. Connected to ground.
8. AGND: Analog Ground.
9. Vref/2: This pin is used to set the referencevoltage. If this is not connected the default reference
voltage is 5V. In some application it is required to reducethe step size. This can be done by using this pin.
10. DGND: Digital Ground.
11-18. Output Data Bits (D7-D0).
19. CLKR: Clock Reset.
20. Vcc: Positive Supply
-
7/30/2019 temperature control & display
7/45
Controlling functions :-
-
7/30/2019 temperature control & display
8/45
The lcd display two temperature 1)current temperature2)set point temperature
The set point increment & decrement using switch.
When we set the sp( set point ) less than the currenttemperature , then trigger the pulse to base of transistorby controller.
The collector current flow in coil. so the LED will be ON.
In ON condition of relay the common terminal is
connected with NO of relay.
Finally , the buzzer will be ON.
When sp is more than current temperature. in thiscondition led & relay & buzzer will be off.
sfr P0=0x80;sfr P1=0x80;sfr P1=0x90;sfr P2=0xA0;
-
7/30/2019 temperature control & display
9/45
sfr P3=0xB0;
sbit relay = P1^0;Sbit inc = P1^1;sbit dec = P1^2;
#define adcdata P3
sbit intr = P2^2; //5sbit rd = P2^0; //2sbit wr = P2^1; //3
sbit rs = P2^5;sbit rw = P2^6;sbit en = P2^7;unsigned char line[4] = {0x80,0xC0,0x90,0xD0};#define DBUS P0#define BLINKLCD 0x09#define ONCURSOR 0x0A#define ONLCD 0x0C#define CLEARLCD 0x01#define HOMELCD 0x02
#define ENTRYMODE 0x06#define FUNCSET 0x38void wrlcd_cmd(unsigned char cmd );void wrlcd_data(unsigned char Data );void delay(unsigned int count);void wrmsg(char LineNo,char endloc, unsigned char msg[]);void getdata();
static unsigned char sp=0;
code unsigned char scr5[2] [16] = {" Temp: "," SP: "};
code unsigned char scr1[2] [16] = {" JAY Patel "," BSPP 2nd SHIFT "};
void main(){
unsigned char i;unsigned char x,d1,d2,d3,val,a=0;;
P3=0xff;P0=0x00;
-
7/30/2019 temperature control & display
10/45
P2=0x0f;relay=0;
wrlcd_cmd(FUNCSET); //set data length,no ofdisp,2-line display
wrlcd_cmd(ONLCD); //display and cursor onwrlcd_cmd(ENTRYMODE);//inc. DDram address,wrlcd_cmd(CLEARLCD); //Clear display
for(i=0;i
-
7/30/2019 temperature control & display
11/45
wrlcd_data(d3+0x30);delay(10);wrlcd_data(d2+0x30);
wrlcd_data(d1+0x30);delay(10);
a=(d3*100)+(d2*10)+d1;
wrlcd_data('C');
wrlcd_cmd(line[1]+9);wrlcd_data((sp/10)+0x30);wrlcd_data((sp%10)+0x30);
if(inc==0){while(inc==0);sp++;}if( (dec==0) && sp>0 )
while(dec==0);sp--;}
if(a>sp)relay=1;elserelay=0;delay(25000);
}
}
void wrlcd_cmd(unsigned char cmd )
{DBUS = cmd;delay(10);rs = 0; //select cmd reg
-
7/30/2019 temperature control & display
12/45
delay(10);rw = 0; //write modedelay(10);en = 1;delay(300);en = 0;delay(20);
}void wrlcd_data(unsigned char Data ){
DBUS = Data;delay(10);rs = 1; //select data regdelay(10);rw = 0;delay(10);en = 1;delay(300);en = 0;delay(10);rs = 0;delay(20);
}
void wrmsg(char LineNo,char endloc, unsigned char msg[]){
unsigned char i;wrlcd_cmd(LineNo);for(i =0;i0)dly--;}
-
7/30/2019 temperature control & display
13/45
1. Resistor 1k, 10k, 8.2k, 10k pot
2. Capacitor - 155pf, 33pf, 10uf
3. DC power supply
4. LED
5. Switch
6. Transistor
7. Buzzer
8. Relay
9. Crystal
10. AT89S52
11. ADC 0804
12. 7805
13.Sensor- LM 35
14. Display
15. Socket
-
7/30/2019 temperature control & display
14/45
RESISTOR:-
Axial- lead resistors on tape. Thetape is removed during assembly
before the leads are formed andthe part is inserted into the board.
Three carbon composition resistorsin a 1960s valve (vacuum tube)radio. A resistor is a two-terminalelectronic component thatproduces a voltage across itsterminals that is proportional to theelectric current through it in
accordance with Ohm's law:
V = IRResistors are elements of electricalnetworks and electronic circuits
-
7/30/2019 temperature control & display
15/45
and are ubiquitous in most electronic equipment. Practicalresistors can be made of various compounds and films, as wellas resistance wire (wire made of a high-resistivity alloy, such asnickel/chrome).
The primary characteristics of a resistor are the resistance, thetolerance, maximum working voltage and the power rating.Other characteristics include temperature coefficient, noise,and inductance. Less well-known is critical resistance, the valuebelow which power dissipation limits the maximum permittedcurrent flow, and above which the limit is applied voltage.Critical resistance depends upon the materials constituting theresistor as well as its physical dimensions; it's determined bydesign. Resistors can be integrated into hybrid and printedcircuits, as well as integrated circuits. Size, and position ofleads (or terminals) are relevant to equipment designers;resistors must be physically large enough not to overheat whendissipating their power.
Resistor Color Coding
-
7/30/2019 temperature control & display
16/45
10k VariableResistor:-
Variable resistors consist of a resistance track withconnections at both ends and a wiper which moves along thetrack as you turn the spindle. The track may be made fromcarbon, cermets (ceramic and metal mixture) or a coil of wire(for low resistances). The track is usually rotary but straighttrack versions, usually called sliders, are also available.
Variable resistors may be used as a rheostat with twoconnections (the wiper and just one end of the track) or as apotentiometer with all three connections in use. Miniature
versions called presets are made for setting up circuits whichwill not require further adjustment.Variable resistors are often called potentiometers in
books and catalogues. They are specified by their maximumresistance, linear or logarithmic track, and their physical size
-
7/30/2019 temperature control & display
17/45
CAPACITOR:-
Electronic symbol:-
Type: - Passive A capacitor or condenser is a passive electronic
component consisting of a pair of conductors separated by adielectric. When a voltage potential difference exists betweenthe conductors, an electric field is present in the dielectric. Thisfield stores energy and produces a mechanical force betweenthe plates. The effect is greatest between wide, flat, parallel,narrowly separated conductors.
The conductors and leads introduce an equivalentseries resistance and the dielectric has an electric fieldstrength limit resulting in a breakdown voltage.Capacitors are widely used in electronic circuits to block theflow of direct current while allowing alternating current to pass,to filter out interference, to smooth the output of powersupplies, and for many other purposes. They are used inresonant circuits in radio frequency equipment to selectparticular frequencies from a signal with many frequencies.
Ceramic Capacitor:-Ceramic capacitors are constructed with materials such astitanium acid barium used as the dielectric. They can be usedin high frequency applications. Typically, they are used incircuits which bypass high frequency signals to ground.
These capacitors have the shape of a disk. Their capacitance iscomparatively small.
The capacitor on the left is a 100pF capacitor with a diameterof about 3 mm.The capacitor on the right side is printed with
103, so 10 x 10
3
pF becomes 0.01 F. The diameter of the diskis about 6 mm.Ceramic capacitors have no polarity Ceramic capacitors shouldnot be used for analog circuits, Because distort the signal.
-
7/30/2019 temperature control & display
18/45
LED :-Features: -
Water Clear Lens850nm WavelengthForward Voltage - 1.7V
A light-emitting diode (LED) is an electronic light source.
LEDs are used as indicator lamps in many kinds
ofelectronics and increasingly for lighting. LEDs work by the
effect ofelectroluminescence, discovered by accident in 1907.
The LED was introduced as a practical electronic component in
1962. All early devices emitted low-intensity red light, but
modern LEDs are available across
the visible, ultraviolet and infra red wavelengths, with very high
brightness.
LEDs are based on the semiconductor diode. When the diode is
forward biased.
LEDs present many advantages over traditional light sources
including lower energy consumption, longer lifetime, improved
robustness, smaller size and faster switching. However, they
are relatively expensive and require more
precise current and heat management than traditional light
sources.
Applications of LEDs are diverse. They are used as low-energyindicators but also for replacements for traditional light sources
in general lighting, automotive lighting and traffic signals. The
compact size of LEDs has allowed new text and video displays
and sensors to be developed, while their high switching rates
are useful in communications technology.
TRANSISTOR:-
http://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Lightinghttp://en.wikipedia.org/wiki/Electroluminescencehttp://en.wikipedia.org/wiki/Visible_spectrumhttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/wiki/Infra_redhttp://en.wikipedia.org/wiki/Semiconductor_diodehttp://en.wikipedia.org/wiki/Led#Advantageshttp://en.wikipedia.org/wiki/Energy_consumptionhttp://en.wikipedia.org/wiki/Service_lifehttp://en.wikipedia.org/wiki/Constant_currenthttp://en.wikipedia.org/wiki/Thermal_management_of_electronic_devices_and_systemshttp://en.wikipedia.org/wiki/Automotive_lightinghttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Lightinghttp://en.wikipedia.org/wiki/Electroluminescencehttp://en.wikipedia.org/wiki/Visible_spectrumhttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/wiki/Infra_redhttp://en.wikipedia.org/wiki/Semiconductor_diodehttp://en.wikipedia.org/wiki/Led#Advantageshttp://en.wikipedia.org/wiki/Energy_consumptionhttp://en.wikipedia.org/wiki/Service_lifehttp://en.wikipedia.org/wiki/Constant_currenthttp://en.wikipedia.org/wiki/Thermal_management_of_electronic_devices_and_systemshttp://en.wikipedia.org/wiki/Automotive_lighting -
7/30/2019 temperature control & display
19/45
-
7/30/2019 temperature control & display
20/45
-
7/30/2019 temperature control & display
21/45RELAY:-
-
7/30/2019 temperature control & display
22/45
A relay is an electrical switch that opens and closes
under the control ofanother electrical circuit. In the original
form, the switch is operated by an electromagnet to open or
close one or many sets of contacts. It was invented by Joseph
Henry in 1835. Because a relay is able to control an output
circuit of higher power than the input circuit, it can be
considered
to be, in a broad sense, a form of an electrical amplifier.
Fig . 4 .26 Suga r cube relay
Despite the speed of technological developments,
some products prove so popular that their key parameters
and design features remain virtually unchanged for years.
One such product is the sugar cube relay, shown in the
figure above, which has proved useful to many designers
who needed to switch up to 10A, whilst using relatively little
PCB area
Since relays are switches, the terminology applied to
switches is also applied to relays. A relay will switch one or
more poles, each of whose contacts can be thrown by
energizing the coil in one of three ways:
1 Normally open (NO) contacts connect the circuit when
-
7/30/2019 temperature control & display
23/45
the relay is activate d; the circuit is disconnected when the
relay is inactive. It is also called a FORM A contact or
make contact.
2.N o rmally - c lo s ed (N C) contacts disconnect the circuit
when the relay is activated ; the circuit is connected when
relay is inactive. It is also called FORM B contact or
break contact
3.Cha n g e - o ver or dou b le -th r ow contacts control two
circuits ; one normally open contact and one normally closed contact with a common terminal. It is also called a
Form C transfer contact.
"C" denotes the common terminal in SPDT and DPDT types
SPST - S in g le P ole S in g le T hr o w : These have two
terminals which can be connected or disconnected.
Including two for the coil, such a relay has four
terminals in total. It is ambiguous whether the pole is
normally open or normally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the
ambiguity.
-
7/30/2019 temperature control & display
24/45
SPDT - S in g le P ole D ou b le T hr o w : A common
terminal connects to either oftwo others. Including
two for the coil, such a relay has five terminals in
total.
DPST - D ou b le P ole S in g le T hr o w : These have two
pairs of terminals. Equivalent to two SPST switches or
relays actuated by a single coil. Including two for the
coil, such a relay has six terminals in total. It is
ambiguous whether the poles are normally open,
normally closed, or one ofeach.
DP D T - D ou b le P ole D ou b le T hrow:These have tworows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a
single coil. Such a relay has eight terminals, including
the coil.
QPDT - Q uadr up le P o l e D o uble T h r ow : Often
referred to as Quad Pole DoubleThrow, or 4PDT. These
have four rows of change-over terminals. Equivalent to
four SPDT switches or relays actuated by a single coil,
or two DPDT relays. In total, fourteen terminals
including the coil.
-
7/30/2019 temperature control & display
25/45
-
7/30/2019 temperature control & display
26/45
AT89S52 :-
-
7/30/2019 temperature control & display
27/45
-
7/30/2019 temperature control & display
28/45
-
7/30/2019 temperature control & display
29/45
-
7/30/2019 temperature control & display
30/45
-
7/30/2019 temperature control & display
31/45SENSOR-LM35:-
-
7/30/2019 temperature control & display
32/45
-
7/30/2019 temperature control & display
33/45
-
7/30/2019 temperature control & display
34/45
-
7/30/2019 temperature control & display
35/45
-
7/30/2019 temperature control & display
36/45
-
7/30/2019 temperature control & display
37/45
IC-7805:-
-
7/30/2019 temperature control & display
38/45
-
7/30/2019 temperature control & display
39/45
-
7/30/2019 temperature control & display
40/45
LCD:-
-
7/30/2019 temperature control & display
41/45
LIQU ID CRY S TAL DISPLAY
A liquid crystal display (LCD) is a thin, flat display device
made up of any number of color or monochrome pixels
arrayed in front of a light source or reflector. Each pixel
consists of a column of liquid crystal molecules suspended
between two transparent electrodes, and two polarizing
filters, the axes of polarity of which are perpendicular to
each other. Without the liquid crystals between them, light
passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter
to allow it to pass through the other.
Many microcontroller devices use 'smart LCD' displays to
output visual information. LCD displays designed around
Hitachi's LCD HD44780 module, are inexpensive, easy to
use, and it is even possible to produce a readout using the
8x80 pixels of the display. They have a standard ASCII set of
characters and mathematical symbols.
For an 8-bit data bus, the display requires a +5V supply
plus 11 I/O lines. For a 4-bit data bus it only requires the
supply lines plus seven extra lines. When the LCD display is
not enabled, data lines are tri-state and they do not interfere
with the operation ofthe microcontroller.
Data can be placed at any location on the LCD. For 162LCD, the address locations
are:
First line 80 81 82 83 84 85 86 through8F
Second line C0 C1 C2 C3 C4 C5 C6
through CF
SIGNALS TO THE LCD
-
7/30/2019 temperature control & display
42/45
The LCD also requires 3 control lines from themicrocontroller:
1) E n a b le (E)
This line allows access to the display through R/Wand RS lines. When this line is low, the LCD is disabled
and ignores signals from R/W and RS. When (E) line is
high, the LCD checks the state of the two control lines
and responds accordingly.
2) Read/Write (R/W)
This line determines the direction of data betweenthe LCD and microcontroller.
When it is low, data is written to the LCD. When it is high,data is read from the
LCD.
3) R e gister s e le ct (RS)
With the help of this line, the LCD interprets the type of
data on data lines. When it is low, an instruction is being
written to the LCD. When it is high, a character is being
written to the LCD.
Logic s t atus on c o n t r o l lines:
E - 0 Access to LCD
disabled
- 1 Access to LCD enabled
R/W - 0 Writing datato LCD
- 1 Reading datafrom LCD
RS - 0 Instruction
- 1Characte
r
-
7/30/2019 temperature control & display
43/45
W r i t i n g a n d r e ad ing the d a t a f r om theL C D:
Writing data to the LCD is done in several steps:
1) Set R/W bit to low2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading):
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
P IN DESCRIPTION
Most LCDs with 1 controller has 14 Pins and LCDs with 2controller has 16 Pins
(two pins are extra in both for back-light LED connections).
-
7/30/2019 temperature control & display
44/45
-
7/30/2019 temperature control & display
45/45
1. http://www.westfloridacomponents.com
2. http://www.futurlec.com
3. http://www.pdf-search-engine.com/
4. http://www.westfloridacomponents.com
5. http:// www.google.com
6. http://www.datasheetscatalog.com
Books:-1. Electronic devices and circuits-2 (R.P Ajwaliya)2. Mazidee
http://www.pdf-search-engine.com/http://www.westfloridacomponents.com/http://www.pdf-search-engine.com/http://www.westfloridacomponents.com/