• Tidak ada hasil yang ditemukan

Design and fabrication of microcontroller based temperature control system for photoacoustic spectrometer

N/A
N/A
Protected

Academic year: 2024

Membagikan "Design and fabrication of microcontroller based temperature control system for photoacoustic spectrometer"

Copied!
6
0
0

Teks penuh

(1)

Design and fabrication of microcontroller based temperature control system for photoacoustic spectrometer

1Sapna, 2Immanuel J., 3P. Bhaskar and 4Bhagyajyoti

Department of Instrumentation Technology, Gulbarga University, Post Graduate Centre, Yergera – 584133, RAICHUR, Karnataka, India

Email: 1[email protected], 2[email protected], 3[email protected],

4[email protected]

Abstract— The design and fabrication of C8051F350 microcontroller based temperature control system for the photoacoustic spectrometer (PAS) is presented in this paper. PID controller is implemented to control the temperature of the photoacoustic cell. The algorithm is developed in embedded ‘C’ in KIEL µV4 integrated development environment. The linear ramp input is applied as reference to the controller to vary the temperature of the PA cell linearly. This type of controller is essential to study the characteristics of sample as function of temperature. From the experimental results it is observed that the temperature controller gives the best tracking response for the ramp input. As C8051F350 is basically designed for developing single chip instruments, only few components are used in the fabrication of proposed temperature control system.

Keywords—Microcontroller, temperature, control, spectrometer

I. INTRODUCTION

Temperature is one of the most widely measured and frequently controlled variables in the industry. This is because quite often the processing and manufacturing of the desired product is possible only if the temperature is accurately measured and maintained. Further, it forms an important governing parameter in thermodynamic, heat transfer and a number of chemical reactions/operations. In addition, it is a fundamental quantity in much the same way as mass, length and time.

The need for temperature control arises in various fields such as medical, biological, industrial and many times in basic scientific research and R&D laboratories. Many physical and chemical reactions are sensitive to temperature and consequently, temperature control is important in several industrial processes.

Temperature control also finds application in cryostats that are used to perform experiments at very low temperatures in the field of spectroscopy, X-ray diffractometry and optical microscopy.

Temperature control plays a key role in many industrial processes; in addition, precision and quality in control of temperature is desirable. Hence several investigators [1-

6] have designed and fabricated different types of temperature controllers. But the attempts to use SOC type microcontroller to control temperature are rather scarce in spite of several advantages that are associated with them. Temperature control is a process in which the temperature of an object is measured and the passage of heat energy into or out of the object is adjusted to achieve a desired temperature.

II. METHODOLOGY

The block diagram of microcontroller based temperature controller is shown in Fig 1. The Pt-100 is used to sense the temperature of the steel body, the sensed output is suitably modified with the help of a signal conditioner.

Signal conditioner produces an analog voltage output which is converted into digital data by on-chip A/D converter of the microcontroller. The microcontroller computes the error by subtracting the measured temperature from the desired temperature (set point).

Then the PID equations are solved by the microcontroller. The output of control program is a digital value which is fed to the actuator through on-chip D/A converter, the output of DAC is an analog voltage which is given to zero crossing detector. The zero crossing detector produces phase angle firing pulses to control power applied to the heater. The amount of heat, added to or removed from the strip heater, connected to the steel body, is decided by the DAC output which in turn controlled by the PID controller to maintain it at the desired temperature. The complete schematic diagram is shown in Fig.2. It consists of the following elements.

i. Temperature sensor ii. Constant current source iii. Instrumentation amplifier

iv. C8051F350 microcontroller board v. Zero crossing detector

vi. Comparator

(2)

vii. Opto-isolator (opto-diac) viii. Final control element (triac) A. Temperature sensor

The platinum resistance thermometer is used for the present study to overcome the significant limitations of

the conventional transducers such as non-linearity, low output, narrow range etc, Pt-100 operates on the principle of change in electrical resistance of platinum wire as a function of temperature [7-8] it is mechanically and electrically stable. One of the important features of Pt-100 is that the relation between temperature and resistance is linear, the drift error with ageing and usage are negligible.

Fig. 1 Block diagram of microcontroller based temperature Control system The relation between temperature and resistance of the

platinum wire is given by relation (1) RT = Ro (1+ AT+BT2)

≈ Ro (1+AT) (1)

Where all the second & higher order terms are negligibly small. The platinum resistance transducers are used for temperature measurement in the range of – 2200 C to 7500C and it has a temperature co-efficient of resistance as 0.0389 Ω / 0C.

B. Constant current source

The signal conditioning circuit is employed for converting resistance changes of the sensor into voltage changes. A constant current source has been designed using operational amplifier [9]. This will eliminate the lead-wire error of Pt-100. A stable voltage sources is constructed using LM329 that gives a constant voltage of 6.9V. This reference voltage is applied to the non- inverting input of op-amp. The Pt-100 acts as a feedback resistance and the resistance Rs determines the

amount of current flowing through Pt-100. Since the potential difference between input terminals of the operational amplifier is zero. Hence, the voltage at the inverting terminal is also equal to 6.9V. Therefore the current flowing through the resistance (Rs) is equal to 6.9/Rs. Since the input impedance of the amplifier is very high, the current flowing through Pt-100 is equal to

the current flowing through resistance Rs. Rs can be calculated by the equation (2)

R=V/I = 6.9V/100µA = 69.0k (2)

A 100kΩ multi-turn potentiometer is used as Rs and it is adjusted to the value 69.0kΩ which gives a constant current of 100µA.

C. Instrumentation amplifier

When the current passes through the temperature sensor Pt-100, it produces a differential voltage given by the following relation

∆V = 100A * (Resistance of pt-100)

The differential voltage output of temperature sensor is very small, hence it has to be amplified so that further processing of signal can be made possible this voltage is amplified through a differential amplifier AD620 of Analog Devices [10] make. The AD620 is a low cost, high accuracy instrumentation amplifier that requires only one external resistor to set gain of 1 to 10,000.

Furthermore AD620 features 8-lead DIP packaging it offers lower power (only 1.3mA max current) making it good fit for battery powered portable (or remote) applications .

D. C8051F350 microcontroller board

The microcontroller used for the present study is C8051F350TB from Cygnal Integrated products, Inc.,

ADCDAC

Instrumentation amplifier Comparator

Constant current source

Triac C8051F350

Microcontroller

PID Control Algorithm

Strip heater AC Source

Opto-diac

Pt-100

LCD Module A.C line voltage

Zero cross detector

Photoacoustic cell

Laser diode

Microphone

UART0

Personal Computer

(3)

Austin, USA. The photograph of C8051F350TB is shown in Fig 3.

The board has the following salient features:

 8-bit microcontroller

 24 or 16-bit ADC

 Two 8-bits current output DACs

 8KB Flash program memory

 Enhanced UART, SMBus and SPI serial ports.

E. Zero cross detector

An analog circuit that produces phase angle firing pulses is as shown in Fig 2. The transformer couples the line voltage to the control circuit and the full-wave bridge rectifier rectifies the sine wave. The signal at the output of bridge circuit is some positive voltage at all times except at the zero-crossing. Only at that time the voltage drops to zero. At all times, except zero-crossing, the positive voltage from the bridge rectifier turns Q1 ON, holding the base of Q2 just above ground Q2 is OFF. At each zero crossing, for a few tens of microseconds,

the voltage from the bridge falls to zero, and Q1 turns OFF. At that time the current through the 1kΩ resistor flows into the base of Q2 to turn it ON. It shorts the 0.33µF capacitor to discharging it. The purpose of the transformer, the bridgerectifier, and the two transistors is to discharge the capacitor quickly at every zero crossing.

Just after the zero crossing, the transistor across the capacitor turns OFF. The capacitor‟s charge then begins to ramp up. The inverting pin of the op-amp is held at virtual ground. So, the current flows from the output of that op-amp, right to left through the capacitor, then right to left through the rate potentiometer [11-12].

Thus, a ramp wave of frequency 100Hz is generated

Fig. 3 C8051F350TB microcontroller board Fig. 4.10 Complete Schematic of Temperature Control System

Constant current source

Zero cross detector

Opto-Diac Comparator

Instrumentation amplifier

Final control element

PID Controller C8051F0350 Microcontroller

UART0

1N4007 1N4007

220V/

50Hz

P S

1N4007 1N4007

SL100 +12V

LF356 +12V

-12V -12V 37.7K 10K

1K

2

3 6

7

4 2N2222

-

0.33µ F

1K

LM31 1

+12V 8

4 -12V

1 3

7

DACADC

+5 V 3 4 5 6 11 12

15 1

6 1 2

P0.0 P0.1 P0.2 P0.3 P1.0 P1.1

1 3 1 4

LCD Module D4D5D6D7RSENR/ ~WVCC CON GND

3

20 K 6 5 12 4

11 2

3

-

- + +

2

+12V

1k/1W 1k

MOC301 1

1k/1 W 0.1µ

/400V 220VAC

PA CELL Strip Heater BTA0

6 MT2

MT1 G

- 3

+ 5 5 k

AD620 6

+12V

-12V 7

4 1

8

1k

LM329 +12V

7

4 -12V +12V

Pt10069.1K 2 3 1n

8 + LM308 - - PID

Controller C8051F0350 Microcontroller

UART0

PC

(4)

F. Comparator

The zero cross detector output (100Hz ramp generator) is given to one of the two inputs of comparator and another input is from on-chip DAC of C8051F350 microcontroller. The comparator compares the DAC0 output voltage with ramp wave. When the ramp voltage is slightly greater than DAC0 output voltage, then there will be a change of state at the output of the comparator.

This produces the pulse width modulated output to control the triac. A dedicated comparator LM311 from national semiconductor is used in the present application [13].

G. Opto-isolator

To isolate the AC power from DC powered boards, an opto-isolator MOC3011, of Motorola make is used. The MOC3011 contains LED and an opto-diac. The opto- diac conducts in both the directions of AC cycle and it triggers triac in both positive and negative cycle of AC signal in accordance with PWM signal.

H. Final control element

The final control element is nothing but an actuator which controls the power or energy supplied to the system to bring the physical parameter to the desired level. In the present study, a triac (BTA06) is used as final control element. Triac can conduct in both directions and is normally used in AC phase control. It can be considered as two SCRs connected in anti- parallel with a common gate connection. Since, triac is a bidirectional device its terminals cannot be designed as anode and cathode hence designated as MT1 and MT2.

If terminal MT2 is positive with respect to terminal MT1, the triac can be turned ON by applying a positive gate signal between gate G and terminal MT1. It is not necessary to have both polarities of gate signal and triac be turned ON with either a positive or negative gate signal. Here, the triac acts as a switch. When it is OFF, no power is allowed to pass through it to the load. When it goes ON, the load receives line voltage. This is quite adequate for simple ON or OFF operations. But to provide proportional control of power to the load, phase angle firing control technique has been employed. The firing angle is decided by the output of PID controller.

With the help of zero cross detector and comparator the power applied to the heater is linearly controlled through triac.

III. WORKING OF THE SYSTEM

Fig. 4(a) & (b) shows the photographs of microcontroller based temperature control system. The temperature of the steel body is measured by using Pt- 100 temperature sensor. Pt-100 produces change in resistance with change in temperature. This change in resistance is converted into change in voltage by using constant current source. The voltage corresponds to

temperature is converted in to digital data by the on-chip ADC of C8051F350 microcontroller. The digital data is converted in to actual temperature by using the relation temp = (2.657*temp1+5.01)-271.0. The present temperature of the photoacoustic cell is displayed on the LCD module. The microcontroller compares the actual temperature with the set value and error is calculated.

Then error is applied to the PID control algorithm. The control algorithm is implemented by writing embedded

„C‟ program. The control action from the PID controller is applied to the triac. The triac is driven by

Fig.4(a) Photograph of temperature controller.

Fig. 4(b) Photograph of the temperature controller:

Inside view Inside view

using PWM signal generated by phase angle firing technique which controls the temperature of the PA cell to the desired temperature. The set point is varied linearly (ramp type with a slope of 0.30C/min) and the temperature of the PA cell is recorded as function of time.

IV. RESULT

The PID controller is implemented to control the temperature of the photoacoustic (PA) cell. The temperature of the PA cell is linearly varied by applying ramp as the reference input to the controller.

Temperature is varied from initial room temperature

(5)

32°C to final temperature of 250.0 °C with a slope of 0.30C/min. The ramp input response of the controller is shown in the Fig. 5. It is quite evident from the graph that, the controller exhibit good response with linear characteristics.

0 50 100 150 200 250 300

0 50 100 150 200

Temperature in Deg

Time in Sec

Ramp Input PID Response

Fig. 5. PID controller response for ramp input

V. SOFTWARE FEATURES :-

Fig. 6 Flowchart of temperature control system N

o

Yes End

Yes Update PID parameters

vn_1 = vn;

en_2 = en_1;

en_1 = en

Increase the set point by 10C Apply output of PID to the on-chip

DAC circuit

No Is

maximum temperature

attained?

Is set point attained ?

A

B

B

Start

Initialize on-chip peripherals viz., ADC0, DAC0, UART0, Oscillator, ports and LCD

module

Compute the error (Error = set point-measured value) Read the voltage from the Pt-100 through on-

chip A/D converter of C8051F0350 microcontroller

Initialize variables and PID constants (Kp = 4600.0, Ki = 80.0, Kd = 2.0;

vn, en, vn_1 = 0.0, en_1 = 0.0,en_2 = 0.0, uk1=0.0)

Apply error to the PID algorithm (vn = vn_1 + Kp*(en - en_1)+ Ki*en +

Kd*(en - 2*en_1 + en_2);

Set the maximum temperature (set point) and rate of increase of temperature to study the

sample characteristics as a function of temperature

B

A

(6)

VI. CONCLUSION

The C8051F350 microcontroller based temperature control system for the photoacoustic studies is designed and fabricated. The presently designed temperature control system is suitable for photoacoustic studies hence the temperature control system is employed to study photoacoustic spectrometer.

REFERENCES

[1] L.S. Smith, Conf. on Computer Control of Real- Time Processes, USA, 1990.

[2] B.N. Chatterji, “PID Contollers,” Students‟J.

IETE, vol.35, nos.3 & 4, pp. 169-175, 1994.

[3] R. Yusof, S. Omattu, and M. Khalid, in Proc. of the 3rd IEEE conf. on Control Applications, vol.

2, pp.1181-1186, USA, 1994.

[4] W. Daca, and B. Wilkowska, in Proc. of the 2nd Int. Symp. on Methods and Models in Automation and Robotics, vol. 2, pp. 837-840, Poland, 1995.

[5] S. Kaliyugavaradan, in Proc. of the IECON‟97 23rd Int. Conf. on Industrial Electronics Control and Instrumentation, vol. 1, pp. 155-158, 1997.

[6] Dun Wang, Zhiniu Huang, Guobang Chen, Jianyao Zheng, Jiangping Yu, Yayu Li, Min

Shen, Hongyan Chen, Ruiliang Xu, Guang Wen Cui & Ruimin Liu, in Proc. of the 6th Int.Cryogenic Engineering Conf., vol. 1, pp. 77- 80, UK,1997.

[7] J. Michael Jacob, Industrial Control Electronics – Applications and Design, PH, England Cliffs,1988.

[8] Christopher T. Kilian, Modern Control Technology – Components and Systems, West Publishing Co., 1996.

[9] P. Bhaskar, “Design and Development of Computer Based Instrumentation System for Photoacoustic Studies”, Ph.D. Thesis, SKU, Anantapur, AP, India, 2000.

[10] www.analog.com/en/spciality-

amplifiers/Instrumentation- amplifier/ad620 /products/product.html

[11] Michael Jacob J. “Industrial Control Electronics- Applications and Design”, Prentice Hall, England Cliffs, 1988.

[12] Bhagyajyothi, “Studies on Development of Advanced version Lock-in Amplifier”, Ph.D.

Thesis, GUG, Raichur, KA, India, 2014 [13] www.ti.com/product/lm311-n.



Referensi

Dokumen terkait

After complete researching about all the components used in this project, the PIC microcontroller start-up kit, barometric pressure sensor, capacitive sensor and compass

All the components that have been used in the creating of Early Warning System for Flood Hazard are as follow and the diagram block of the system as given in figure 1: Microcontroller

Rourkela Page 5  Selection of hardware devices microcontroller, D/A, Power Amplifier, Pump, Sensor  Testing and interfacing the hardware devices  Development of controller for

To measure the TENG device output voltage signal simultaneously with amplifier output and detection result, a 2.2 MΩ resistor was applied to the input pad of the test board.. In this

32 ULAB JOURNAL OF SCIENCE AND ENGINEERING Figure 1: Block diagram of the developed system Figure 2: Complete circuit diagram of the developed system 2.3 Summing amplifier The

ix APPENDICES 55 APPENDIX A SOURCE CODE FOR 8051P89V51RD2BN MICROCONTROLLER PROGRAMMING 55 APPENDIX B SOURCE CODE OF VISUAL BASIC 60 APPENDIX C FULL SCHEMATICS OF TRANSMITTER

In addition to the LCD display, the voltage value given by the MQ-2 sensor to the Arduino UNO microcontroller can make the Arduino UNO microcontroller able to turn on one exhaust fan in

From the research and testing of the heart rate monitoring device, it can be concluded as follows: 1 This BPM monitoring tool uses several devices, namely Arduino as a microcontroller,