0 words
Since the 1960s, digital signal processors (DSP) have developed rapidly along with computer and communication technology, and their application fields have become more and more extensive. In terms of temperature control, especially the temperature control of solid-state lasers, the temperature accuracy requirements are relatively strict due to the influence of its working environment and conditions. Previously, temperature control at home and abroad basically used temperature sensitive resistors to measure the temperature, and then used air cooling or water cooling to achieve the temperature control effect, which was not accurate enough and had a large volume. This paper designs a temperature measurement system based on DSP chip TMS320F2812 and digital temperature sensor DSl8B20. According to the measured temperature and the set parameters, the control quantity is calculated using the fuzzy PID algorithm. The control quantity is used to adjust the duty cycle of the PWM wave generated by the DSP event manager and act on the semiconductor refrigerator to achieve the temperature control effect, realizing a temperature control system with high control accuracy and small volume.
1. Hardware composition
1.1 DS18820 Functional Structure and Usage
DS18820 is a one-line digital temperature sensor produced by DALLAS, with a 3-pin T0-92 small package; the temperature measurement range is -55 ~ +125 ℃; it can be programmed to 9 ~ 12-bit A / D conversion accuracy, and the temperature measurement resolution can reach 0.0625 ℃; the CPU only needs one port line to communicate with many DS18B20, occupying fewer ports of the microprocessor, which can save a lot of leads and logic circuits. The above features make DS18B20 very suitable for long-distance multi-point temperature detection systems.
The pin arrangement of DS18B20 is shown in Figure 1. DQ is the digital signal input/output terminal; GND is the ground; VDD is the external power supply input terminal (grounded in parasitic power wiring mode). The temperature sensor in DS-18B20 can measure the temperature, providing it in the form of 16-bit sign-extended binary complement readings, expressed in the form of 0.0625℃/LSB, where S is the sign bit. For example, the digital output of +125℃ is 07DOH, the digital output of +25.0625℃ is 0191H, the digital output of -25.0625℃ is FF6FH, and the digital output of -55℃ is FC90H.
1.2 Introduction to DSP
The DSP used here is TMS320F2812, which is a
low-cost, high-performance 16-bit fixed-point DSP newly launched by
1.3 Introduction to semiconductor refrigerator
Semiconductor coolers are made based on the Peltier effect. They are made of two different metals to form a pair of thermocouples. When a direct current is applied to the thermocouple, heat absorption and heat release will occur at the thermocouple junction due to the different directions of the direct current. The structure of the cooler is shown in Figure 2.
An N-type and a P-type semiconductor particle are welded into a thermocouple with a metal connecting piece. When the DC current flows from the N pole to the P pole, the upper end absorbs heat, which is called the cold end, and the lower end releases heat, which is called the hot end. If the current direction is reversed, the hot and cold ends will switch to each other.
1.4 Hardware Connection
There are two main ways to connect DS18B20 to DSP: parasitic power supply and external power supply. This article adopts external power supply, where the DQ port of 18B20 is connected to the GPIOA0 port of F2812, and the specific connection is shown in Figure 3.
2 Temperature measurement
To perform temperature control, we must first measure the temperature value of the controlled target. In this system, the digital temperature sensor DS18B20 is combined with DSP, and the program is written using CCS. The development platform of this system is CCS 2.2. The preliminary installation and chip settings are omitted here. The program flow is shown in Figure 4.
The control of DS18B20 includes three timings: reset, write timing, and read timing.
Reset: The host bus sends a reset pulse at t0 (a low-level signal with a minimum duration of 480 μs), then releases the bus at t1 and enters the receiving state; the DS1820 waits for 15 to 60 μs after detecting the rising edge of the bus, and then sends a presence pulse at t2 (a low-level signal lasting 60 to 240 μs).
Write timing: The write timing of DS18B20 is divided into two processes: write 0 timing and write 1 timing. The requirements for write 0 timing and write 1 timing are different. When writing 0 timing, the bus must be pulled down for at least 60 μs to ensure that DS18B20 can correctly sample the "0" level on the I/O bus between 15 and 45 μs. When writing 1 timing, the single bus must be released within 15 μs after being pulled down. The duration of writing data should be greater than 60 μs and less than 120 μs, and the time interval between two write operations should be greater than 1 μs.
Read timing: The read timing of DS18B20 is also divided into two processes: read 0 timing and read 1 timing. The read timing of DS18B20 is that after DSP pulls the single bus low, the single bus must be released within 15 seconds to allow DS18B20 to transfer data to the single bus. DS18B20 needs at least 60μs to complete a read timing process.
It should be noted that when writing a program, whether it is resetting or reading and writing, you must pay attention to configuring the state of the GPIOA0 port (input or output). At the same time, the timing is very important. The delays in this article are summarized after many tests. Depending on the crystal oscillator of the DSP chip, the delay program will change, otherwise the DSl8B20 will not work properly.
3. Temperature Control
3.1 Pulse Width Modulation PWM Output
The event management module of TMS320F2812 can output 16 PWM signals in total. In this paper, only one PWM signal with adjustable duty cycle is needed, and the square wave signal is designed to be output from the PWM1 pin. In this paper, general timer 1 (T1) is selected as the time base; full comparison unit 1 saves the modulation value; the counting method adopts the continuous increase counting mode. The PWM duty cycle value is compared with the triangle wave data of T1, and the PWM signal is output to control the operation of the semiconductor cooling chip. The register settings are as follows (the high-speed peripheral clock is 22.5 MHz):
The PWM period designed in this paper is 1.825 ms, and the counter count range of TMS320F2812 is 0~5DC. Therefore, when the value loaded into the CMPR1 register is 0 or 5DCH, the output is always high or low. Now take writing 1500 to CMPR1 as an example, the output period of the PWM1 pin is a square wave of 1.825 ms.
3.2 Temperature control software design
According to the previous description, DS18B20 is used to read the temperature sampling value, and then the data is processed by the parameter self-tuning fuzzy-PID algorithm: according to the conditions of E and Ec, △KP, KI, KD are derived from the fuzzy control law and the fuzzy table, and the size of KP, KI, KD is calculated according to formula (1), and then the initial value of U and △U are calculated, and the control quantity U is calculated in real time by formula (2). Through parameter conversion, U is converted into PWM parameters, the value of EvaRegs.CMPRl is modified, and the duty cycle of PWM is changed, thereby controlling the cooling/heating power of TEC.
The program flow chart is shown in Figure 5.
3.3 Experimental results
After completing the above program writing, the simulator is first used to simulate temperature measurement. When the room temperature obtained by the standard thermometer is 31.2℃, the temperature value detected by the quick observation window in the CCS software is 31.1875℃. The experiment proves that when the outside temperature is 31℃ and the default setting (stable temperature is 25℃) is used, the temperature control system can stabilize the temperature of the controlled object at 25℃, the temperature stabilization time is less than 100s, and the accuracy can reach below 0.1℃, meeting the requirements of industrial control.
4 Conclusion
The temperature control system was developed by using the high-speed processing capability of DSP, combined with the accurate temperature reading capability of DS18B20, and CCS. The Fuzzy-PID algorithm is applied in this temperature control system. The design goal is to minimize the transition time and overshoot of the system under the same control accuracy conditions to improve the control effect. The composite control is adopted to enable the system to effectively suppress the influence of pure lag, and still achieve good control effect when the parameters change greatly and there is interference.
Previous article:Design of biped robot motion control system based on DSP
Next article:Speech Recognition Based on ADSP2181 and Its Fixed-point DSP Implementation
Recommended ReadingLatest update time:2024-11-16 20:57
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [National Technology N32G457 Review] 1. Data Preparation
- Participate in the RT-Thread Software Package Competition and win RoboMaster and other generous prizes!
- Looking to buy a TMS320F28379D development board
- What are the benefits of DSP program architecture?
- How is the development of purely domestic MCU? Pingtouge RISC-V chip development board review
- Blame others
- I have a question about the normalization calculation of multi-order low-pass filters. Thank you!
- Digital Signal Processing (DSP) Library for MSP430 Microcontrollers
- LM5117 WEBENCH 13.6V-17.6V to 5.00V@3A Design Solution
- CCS6.0 creates a DSPc2000 series project operation steps