0 Introduction
Temperature control has broad application prospects in industries and daily life. Many application fields require high-precision constant temperature control. Due to the nonlinearity, time lag and uncertainty of its control, traditional control cannot achieve good control effects. Fuzzy control is a rule-based control that directly adopts language-based control rules. The starting point is the control experience of field operators or the knowledge of relevant experts. It has strong robustness, and the influence of interference and parameter changes on the control effect is greatly reduced, so it is particularly suitable for precise control of 0-100℃ temperature.
The MSP430 series microcontroller is a 16-bit, ultra-low power hybrid microcontroller with a reduced instruction set. The MSP430F149 microcontroller uses a reduced instruction set (RISC), has a rich addressing mode (7 source operand addressing, 4 destination operand addressing), 27 concise core instructions and a large number of analog instructions, a large number of registers and on-chip data memory can participate in a variety of operations, and there are efficient table lookup processing instructions; it has a high processing speed, and the instruction cycle is 125 ns under 8MHz crystal drive. These features ensure that a highly efficient source program can be compiled. The MSP430F149 microcontroller has different combinations of some peripheral modules such as 10-bit/12-bit ADC, 16-bit Sigma-Delta A/D, direct addressing module (DMA), ports 1 to 6, basic timer (Basic Timer), etc. Among them, the watchdog can quickly reset the program when it is out of control; the analog comparator compares the analog voltage, and with the timer, an A/D converter can be designed. The system uses MSP430F149 single-chip microcomputer, which can save A/D and other hardware circuits, thus reducing its cost and greatly enhancing its reliability.
1 System Design
The system uses MSP430F149 microcontroller as the control core. The temperature measurement is completed by the platinum resistor constant current conditioning circuit. The output voltage of the conditioning circuit is sent to the microcontroller, and A/D conversion is realized inside the microcontroller. The sampled data is filtered and scaled. The temperature value is displayed by a 3-digit digital tube. The input temperature setting value is input by a 4-digit independent keyboard circuit. After the setting value is sent to the microcontroller, it is displayed by another 3-digit digital tube. The system design block diagram is shown in Figure 1.
2 Main hardware circuit design
2.1 Platinum resistance temperature measurement conditioning circuit
In this system, the actual temperature value is measured by the constant current working conditioning circuit of the platinum resistor. In order to overcome the nonlinear characteristics of the platinum resistor, a negative feedback nonlinear correction network is added to the signal conditioning circuit. As shown in Figure 2, the platinum resistor uses RT100 with a nominal value of 100Ω as the temperature sensor. A1, A2 and A3 use the low temperature drift op amp OP07. Since there is current flowing through the platinum resistor sensor, when the temperature is 0℃, there is a voltage drop on the platinum resistor sensor. This voltage is the bias voltage of the platinum resistor sensor and is part of the output voltage of op amp A1, so that the output of the constant current working conditioning circuit is not actually 0, so it is necessary to zero this bias voltage. R3 in the figure is the zero adjustment resistor. The op amp A3 and resistors R1, R4 and R6 in the figure constitute a negative feedback nonlinear correction network. R5 is used to adjust the gain of op amp A2.
2.2 Temperature Control Circuit
The system heating wire and fan both adopt the circuit shown in Figure 3. The circuit uses a DC electromagnetic relay driven by a transistor. When P5.4 of the microcontroller is at a low level, the relay RL1 is energized, and when P5.4 is at a high level, the relay RL1 is released. This control logic can prevent the relay from energizing during power-on reset or microcontroller controlled reset. The relay is driven by a transistor 2N222A, which can provide the required drive current.
3. Fuzzy control rule table and software flow chart
3.1 Establishing fuzzy control rule table
The temperature error E and the temperature error change rate Ec are used as the input variables of the fuzzy controller, and the temperature control quantity U is used as the output variable of the fuzzy controller. The basic domains of the temperature error E, the temperature error change rate Ec and the temperature control quantity U (unit: ℃) in the system are [-5, +5], [-2, +2] and [0, 1] respectively. The language value of the input language variable is 7, and the output control quantity is used to control the relay drive circuit. The duty cycle fuzzy control quantity is set to five single-point fuzzy quantities of 0, 1/4, 1/2, 3/4, and 1 and a single-point fuzzy quantity for controlling the fan blowing. The language value of the output language variable is 6. When U=0, the P3.5 port of the single-chip computer is set to a low level to make the fan control circuit work; when U=1, the heating wire control circuit works, and the relay is fully turned off in 1 cycle; when U=2, the heating wire control circuit works, and the relay is turned on in 1/4 cycle and turned off in 3/4 cycle; when U=5, the heating wire control circuit works, and the relay is fully turned on in 1 cycle. This control system uses trigonometric functions, ascending semi-trapezoidal functions and descending semi-trapezoidal functions as the membership functions of the input language value, and uses pulse functions as the membership functions of the output language value. The fuzzy control rules are shown in Table 1.
Reasoning from fuzzy rules can derive the input-output relationship of the fuzzy controller language rules, which is a nonlinear relationship surface. When the deviation is large, the change of the control quantity should try to reduce the deviation quickly; when the deviation is small, in addition to eliminating the deviation, the stability of the system should also be considered to prevent the system from overshooting or even causing system oscillation.
3.2 Software Flowchart
The main program software flow is shown in Figure 4.
Temperature collection and display, keyboard processing, etc. are implemented as relatively independent functional modules during programming, and are called according to the set process during the operation of the autonomous program. After completing the corresponding tasks, they return to the main program.
4 Simulation Analysis
Add the compiled HEX file to the Proteus simulation software, and use the analysis chart analysis system to analyze the duty cycle of the heater control signal and the fan control signal output port. When the input voltage is 2.7 V, the system output shows that the actual temperature is 54°C, and the system set temperature is 55°C. At this time, P5.4 outputs a heater control signal with a duty cycle of 2:1; and when the actual temperature of the system is greater than the set temperature, the system outputs an appropriate fan control signal to dissipate heat at a constant power, indicating that the design requirements are met.
5 Conclusion
This system uses the low-power MSP430 series microcontroller as the control core. The entire control circuit is relatively simple. The program is designed using fuzzy control algorithm. The set temperature value and the measured temperature value are displayed in real time. The control accuracy can reach ±0.5℃, which has wide practicability in actual production and life.
Previous article:Liquid level detection circuit
Next article:Common Problems and Maintenance of Electronic Scale Sensors
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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
- Do you know about Allegro's latest solution for vehicle electrification and emission control 48V system?
- 【CH579M-R1】+ Bluetooth function key preliminary test
- Angle estimation problem of micro-core sliding film observer SMO
- BPM shortwave receiver module
- DAC8552 of MSP430F5529 microcontroller
- Several important questions about Zigbee
- Where can I change the component description in the AD printed circuit board BOM?
- CY8CKIT-149 PSoC 4100S PLUS PROTOTYPING KIT Resources
- [ESP32-Audio-Kit Audio Development Board] - 1: Blink (esp-idf)
- Award-winning live broadcast: Application of Infineon gate driver chips and corresponding solutions of Avnet are now open for registration...