Microprocessor based Temperature Controller
-
Upload
revanth-reddy -
Category
Education
-
view
11.488 -
download
7
description
Transcript of Microprocessor based Temperature Controller
![Page 1: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/1.jpg)
.
PROCESS CONTROL IN WET TANNERY The block diagram of the process can be interpreted as:
4
Get Input Signal from
Sensor
Signal Conditioning
Converting the signal to
digital form
Interfacing the signal with
8085 microprocesor
Programming the Microprocessor
Interfacing Circuit.
Load
![Page 2: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/2.jpg)
2
INPUT FROM SENSOR
For temperature sensing LM35 Temperature sensor is used.
The output voltage of this 3 pin temperature sensor is directly proportional to the ambient temperature and is given by the formula:
Vout = K x TWhere, K = 10mV/oC (Sensor Constant), T= Ambient Temperature. For a temperature range of 0-100oC, the
output voltage varies from 0-1V in steps of 10mV.
![Page 3: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/3.jpg)
3
For pH sensing, PHE-45P pH sensor is used.
The PHE-45P is an electrode type sensor, which develops a voltage(potential) directly proportional to the concentration of H+ ions.
For a pH range of 0-14, the output voltage of the sensor varies from -0.41V to +0.41V.
![Page 4: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/4.jpg)
4
The output voltage from the pH sensor follows Nernst equation of equilibrium reduction potential.
Where,
E = reduction potential(voltage generated)
R = Universal gas constant( R=8.314 J/K-mol)
T = absolute temperature(T = 298K)
F = Faraday constant(F = 96485.33C/mol)
z = number of ions involved in the reaction.
![Page 5: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/5.jpg)
5
On substituting the values of constants, we get:
E = 0.4142 – 0.059pH.Hence, for a pH of 7, the potential would be 0,
for a pH of 0 (pure acidic), E = 0.41V
for a pH of 14(pure alkaline), E = -0.41V.
![Page 6: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/6.jpg)
6
SIGNAL CONDITIONING
The signal conditioning is done so as to interface the sensor’s output with the Analog to digital converter.
The main aim of this module is to convert the output of sensors i.e., 0-1V from temperature sensor and -0.41V to +0.41V from pH sensor to 0-5V which is the acceptable working range for an analog to digital converter.
![Page 7: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/7.jpg)
7
For temperature sensor, we use a simple non inverting amplifier circuit, given below:
Voltage Gain(A) = 5v/v.
![Page 8: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/8.jpg)
8
For pH sensor, we use an adder circuit coupled with an inverting amplifier:
The output voltage is 0-5V.
![Page 9: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/9.jpg)
9
CONVERTING TO DIGITAL FORM
ADC0809 is used for analog to digital conversion. The analog signal which we get from the sensors is amplified to 0-5V and is given to the ADC 0809.
The analog input from the temperature sensor is given at IN0 port of ADC.
The input port selection is done through the input selection lines(ADD A, ADDB, ADD C) which are connected to the programmable peripheral interface.
![Page 10: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/10.jpg)
10
The conversion starts when SOC(Start of Conversion) is given HIGH from the microprocessor through 8255.
When the analog input is converted to digital form, the EOC(End of Conversion) port goes HIGH, informing the microprocessor that the conversion is done.
The clock to the ADC is given from the microprocessor clock output.
![Page 11: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/11.jpg)
11
ADC 0809 PIN CONNECTION
.
![Page 12: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/12.jpg)
12
INTERFACING WITH MICROPROCESSOR
The digital output from the ADC is interfaced with the microprocessor through a programmable peripheral interface (PPI 8255).
PPI 8255 is a 40 pin IC which consists of three 8-bit I/O ports, a 8-bit Bi-directional data transfer port and a control logic buffer.
The block diagram of 8255 is as follows:
![Page 13: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/13.jpg)
13
.
![Page 14: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/14.jpg)
14
• Data Bus Buffer: It is an 8 bit data buffer used to interface 8255 with 8085. It is connected to D0-D7 bits of 8255.
• Read/write control logic : It consists of inputs RD¯,WR¯,A0,A1,CS¯ .
• RD¯,WR¯ are used for reading and writing on to 8255 and are connected to MEMR¯,MEMW¯ of 8085 respectively.
• A0,A1 are Port select signals used to select the particular port .
• CS ¯ is used to select the 8255 device .
![Page 15: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/15.jpg)
15
A1 A0 Selected port
0 0 Port - A
0 1 Port –B
1 0 Port – C
1 1 Control Register
![Page 16: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/16.jpg)
16
The 8255 PPI is initialized as below:
Port A - Assigned as Input
Port B - Assigned as output
Port CL - Assigned as Input
Port CU - Assigned as output
![Page 17: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/17.jpg)
17
The Port A takes input from the digital output pins of ADC.
The Port B gives signal to SOC, ALE and Input Select of ADC.
The Port CL takes input from EOC.
The Port CU gives the control signal.
![Page 18: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/18.jpg)
18
Control Word:
The control word for the PPI is – 1 0 0 1 0 0 0 1 i.e., 91H.
![Page 19: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/19.jpg)
19
![Page 20: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/20.jpg)
20
MICROPROCESSOR 8085The features of INTEL 8085 are :
It is an 8 bit processor.
It is a single chip N-MOS device with 40 pins.
It has multiplexed address and data bus.(AD0-AD7).
It works on 5 Volt dc power supply.
The maximum clock frequency is 3 MHz while minimum frequency is 500kHz.
It provides 74 instructions with 5 different addressing modes.
It provides Acc ,one flag register ,6 general purpose registers and two special purpose registers(SP,PC).
![Page 21: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/21.jpg)
21
PIN LAYOUT.
![Page 22: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/22.jpg)
22
INTERNAL ARCHITECTURE:
![Page 23: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/23.jpg)
23
INSTRUCTION SET CLASSIFICATIONThe entire group of instructions can be classified
into five categories:
1. Data Transfer Operations. E.g. MOV, MVI, LDA,STA.
2. Arithmetic Operations. E.g. ADD, SUB, INR, DCR.
3. Logical Operations. E.g. ANA, ORA, XRA, CMP.
4. Branching Operations. E.g. JMP, CALL, RET, JZ.
5. Machine Control Operations. E.g. IN, OUT, PUSH, POP.
![Page 24: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/24.jpg)
24
.
.
PROGRAMMING LOGIC:
• Configure 8255 I/O ports• 8085 sends SOC command to ADC• 8085 waits for EOC signal from ADC• 8085 reads 8-bit temperature value
from port A• 8085 compares the value with set
point value• 8085 generates the control signal to
control load.
![Page 25: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/25.jpg)
25
.
.
FLOW CHART .
START
Initialize 8255
CALL CONVERSION
IsTemp
> SETPP
T
Turn heater off
![Page 26: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/26.jpg)
26
![Page 27: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/27.jpg)
27
PROGRAM:
MVI A, 91HOUT CR
BEGIN: CALL CONVERSATION
CPI 41HJC NEXTMVI A, 0EHOUT PCJMP BEGIN
NEXT: MVI A, 0FH
OUT PCJMP BEGIN
![Page 28: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/28.jpg)
28
CONVERSION SUBROUTINE:CONVERSION:
MVI A,00HOUT PB ; Send address to select IN0MVI A,08H ;Latch address by giving ALE HighOUT PB
BACK: MVI A,18H
OUT PB ; Make SOC HighMVI A,08HOUT PB ; Make SOC LowMVI A,00HOUT PB ; Make ALE Low
LOOP: IN PC
ANI 01HJZ LOOP ; Wait for EOCIN PARET ; Return value and store Accumulator
![Page 29: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/29.jpg)
29
INTERFACING CIRCUIT
![Page 30: Microprocessor based Temperature Controller](https://reader033.fdocuments.net/reader033/viewer/2022061301/54db3e354a7959ef358b4620/html5/thumbnails/30.jpg)
30
The load, in this case a heater, is a device which operates under 230V ac.
The control signal from the microprocessor through the peripheral interface is of 5V magnitude.
A solid state relay device is used to interface the control signal with the load.