On the basis of the temperature controlling systems of DSP and digital temperature sensor

O Foreword

Since the sixties of the 20th century, digital signal processor (Digital Signal Processing, DSP) Get the development at full speed accompanying by computer and communication skill, the application is more and more extensive. In temperature control, especially the temperature control of the solid laser, is influenced by its work environment and condition, the accuracy requirement for the temperature is stricter, basically measure the temperature outside previous China by sensitive resistance of the temperature about temperature control, then reach the temperature control result with air-cooled or water-cooling way, precision is not enough and bulky. This text designs a temperature measurement system on the basis of DSP chip TMS320F2812 and digital temperature sensor DSl8B20, according to measuring the parameters of resulting temperature and settlement, and utilize the fuzzy PID algorithm to calculate the control quantity, duty ratio of utilizing this control quantity to regulate and produce PWM wave from DSP incident supervisor, and act on the semi-conductive freezer, in order to reach the temperature control result, realize high control accuracy, small temperature controlling system.

A system hardware makes up

1. 1 DSl8820 functional structrue and using

DSl8820 is a line type digital temperature sensor that DALLAS Company produces, pin T0-92 small volume 3 capsulates the form; The measurement limit of temperature is – 55 – +125 ; Programmable for 9- 12 the intersection of A/ D and conversion accuracy, it examines warm definition to be 0 reachable. 0625 ; CPU only needs the line of a port and communicates with a great deal of DSl8B20, there are less ports which takes up the microprocessor, can save a large number of lead wire and logical circuit. The above-mentioned characteristics make DSl8B20 very suitable to be used in remote multi-point temperature detection system.

The base pin of DSl8B20 is arranged. DQ is the digital signal input / Ausgang; GND, in order to earth; VDD, in order to connect the input end of electric power supply (earth in the parasitic power connection way) . The temperature sensor in DS-l8B20 can finish the measurement of the temperature, offers in 16 bit symbol reading forms of expanded complement of two’s, with O. 0625 / LSB form is expressed, among them S is the sign bit. For example the digital output of +125 is 07DOH, +25. The digital output of 0625 is 0191H, – 25. The digital output of 0625 is FF6FH, – the digital output of 55 is FC90H.

1. 2 DSP introduction

Here used DSP is TMS320F2812, it is the low-price which U.S.A. TI Company introduces newly, 16 high-performance fixed points DSP, design to control the application system specially, its primary frequency reachable 150 MHz, used Jingzhen is 45 MHz in this system, integrate the peripheral device interface on-chip, mainly play a controlling and calculating role.

1. Brief introduction of 3 semi-conductive freezers

The semi-conductive freezer stuck to the effect and made according to the handkerchief, are made up a pair of thermocouple by two kinds of different metal, directions injected because of the direct current after marching toward the DC current in thermocouple are different, will produce heat absorption and exothermic phenomenon at nodal point of thermocouple. Structure of the freezer.

It is right to weld the particles of a N-type and P-type semiconductor into a couple with the metal connection lug. When the DC current flows into P very much from the north pole, the top produces the heat absorption phenomenon, this end is called Leng Duan, lower end produce exothermic phenomenon, end this call hot end, conversely current direction, the cold hot end is changed each other.

1. 4 hardware connection

DSl8B20 mainly has two ways to connect with DSP: Depend on power way and external power supply mode for a living. This literary grace uses the external power supply mode, among them DQ mouth of 18B20 is connected with GPIOA0 mouth of F2812, connects specifically.

2 thermometry

Need to carry on temperature control, should measure the temperature value of the control goal first, in this system, uses the digital temperature sensor DSl8B20 to bind with DSP specifically, and utilize CCS writer, this systematic developing platform is CCS 2. 2,Previous installation and chip are set up and omitted here, the flow of program.

The control of DSl8B20 includes three kinds of sequence: Reset, write sequence, read sequence.

Reset: The HBUS sends a reset pulse at the point of t0 (it is the shortest it is a low level signal of 480 s) ,Then release the bus line and enter the accepting state at the point of t1; DS1820 waits for 15- 60 s after detecting the total collinear rising edge, then send out pulse (low level lasting 60- 240 s) at the point of t2 .

Write sequence: Is divided into and written O sequence and writes a sequence and two pieces of course as to writing sequence of DSl8B20. Write O sequence and write a sequential requirement is different, when writing 0 sequence, the bus line should be drawn at least 60 s low, guarantee DSl8B20 can be in 15- Sample ” O ” on I/ O bus line correctly between 45 s Level, when wanting to write a sequence, after the monobus is drawn low, must release the monobus within 15 s. The write data should be greater than 60 s and and less than 120 s in duration, time interval of write operation two times should be greater than 1 s.

Read sequence: As to to read sequence, divide into, read 0 sequence and read 1 sequence too DSl8B20. To it reads sequence to be to draw from DSP monobus low, must release the monobus within 15 s DSl8B20, in order to let DSl8B20 go to the monobus to have data transmission. DSl8B20 is finishing one and reading sequence course, needs 60 s to finish at least.

Whether need to pay attention to, no matter reset when the procedure writes, or read and write, should notice that disposes GPIOA0 that carries the oral state (input or export) ,Sequence is very important at the same time, the time delay in this text is summarized out after numerous test, on the basis of the Jingzhen of DSP chip, the time delay procedure will change, otherwise DSl8B20 will not work normally.

3 temperature control

3. A puls e-width modulation PWM is exported

The incident Administration Module of TMS320F2812 can output PWM signal of 16 routes altogether, only needs to output the adjustable PWM signal of a route of duty ratios in the article, and design and output this square wave signal from PWMl pin. Wen Zhong chooses the common timer 1(T1) As the time base; Keep the modulating value in the whole comparing element 1; The counter mode adopts and counts the mode again continuously. PWM takes the empty ratio compared with chopping sea data of T1, outputs one scene of jobs of PWM signal control semiconductor refrigeration. Every register is set up as follows (set clock as 22 outside at a high speed. 5 MHz) :

PWM cycle designed in the article is 1. 825 ms, it is 0- 5DC that the counter of TMS320F2812 counts the range. So as packing into the value of CMPRl register systematically when being 0 or 5DCH, it is the high level or low level to export permanently. Now in order that as the example to the CMPRl load 1 500, the output cycle of PWMl pin is 1. Rectangular wave of 825 ms.

3. 2 temperature control software design

Narrate according to the front, read the sampled value of the temperature with DSl8B20, and then deal with the data from Fuzzy-PID algorithm of setting through the parameter: According to the states of E and Ec, are derived out through the fuzzy table again by the fuzzy control law KP, KI, KD, according to formula (1) Unless unless by KP, KI, the KD one magnitude, it last initial value of U and then and U, by formula (2) Control quantity U of the real-time calculation. Through parameter switch, change U into PWM parameter, revise EvaRegs. The number value of CMPRl, changes the duty ratio of PWM, thus control the refrigeration of TEC / make thermal power.

Program flowchart.

3. 3 experimental results

After finishing the above-mentioned procedures’ writing, the use simulator carries on the simulation of thermometry at first, it is 31 at the resulting room temperature of the normal thermometer. At 2 , it is 31 to utilize observing the detected temperature value of the window in CCS software fast. 187 5 . Prove, it is 31 in external temperature through the experiment, adopt acquiescence to set up (stable temperature is 25 ) When, this temperature controlling system can make and is accused of the temperature stabilization of the object at 25 , the temperature is less than 100s, precision achievable O. Under 1 , has met requirements for industrial control.

4 concludes the speech

Utilize high-speed handling capacity of DSP, combines DSl8B20 perfect temperature and reads ability, and utilize CCS to develop the temperature controlling system. Have employed Fuzzy-PID algorithm in this temperature controlling system. The design object is: Under the same control accuracy condition, make systematic transition time and overshoot reduce as much as possible, control the result in order to improve. Adopt composite control, enable system to inhibit the pure influence that lags behind effectively, it is bigger for parametric variation when and there is interference, can still make better control result.

Tags:

Leave a Reply