In the project "Correlation Analysis of Temperature/Humidity Factors and Yunyan Baking Quality", we need an environment where the temperature and humidity change in different time periods. For this purpose, we designed a temperature and humidity time period control system with PIC microcontroller as the core, installed it in a climate chamber, replaced its original control system and used the box and most of the actuators to build a temperature and humidity time period change environment. This system can divide the entire control process into multiple (up to 12) time periods, and set different temperatures and humidity for each time period. The temperature range is room temperature ~ 90oC, and the humidity range is 20~90%RH. However, since it is a dual variable, wide range change system, the variable change range is large, and there are coincidences between variables, which is much more complicated than in the past, so some new problems have been encountered.
Design of temperature control algorithm and simulation test
Since temperature is a long-delay inertial object, after analysis and comparison, the incremental PID control algorithm is used to control the temperature. The sampling period T = 20s is taken, and the control parameters are adjusted by the transient response method to obtain the control equation:
△Ui = 0.69△ei - 0.04ei + 3.1(△ei - △ei-1) (1)
In the formula, △UI: the difference between the current and last control values; ei: the current measurement value; △ei: the difference between the current and last measurement values.
In order to determine the regulation effect of formula (1), we conducted a simulation test: the temperature control is divided into two periods. The temperature is set to 30oC in the first period and the running time is 30 minutes. The temperature is set to 45oC in the second period. In the experiment, the temperature value is recorded every 10s, and then the corresponding values of time-temperature are marked on the coordinate paper and connected into a temperature curve, as shown in Figure 1. Obviously, there are obvious overshoot and wide oscillation phenomena during the temperature transition (the measured amplitude is up to 7 oC). After analysis, it was found that overshoot and oscillation were caused by the hysteresis characteristics of the heater temperature, the saturation effect of the control algorithm and the improper selection of the sampling period. After repeated research, the following correction measures were finally taken: at the beginning of the transition period, the control quantity U was
output according to the maximum value Umax; the sampling period was revised to 10s; when the temperature >40 oC, it was determined to enter the 45 oC insulation stage. Accordingly, formula (1) was modified as follows:
△Ui = 0.35△ei - 0.023ei + 1.57(△ei - △ei-1) (2)
The temperature curves before and after correction are shown in Figure 1. It can be seen that the overshoot and oscillation phenomena have been basically suppressed. The simulation results show that: in the insulation stage, the temperature control accuracy is stable within ±1 oC, and the deviation mainly comes from the transition period from the natural heating stage to the insulation stage.
Figure 1 Transition period temperature curve (the segment with 'Х' is the curve segment after correction)
Humidity measurement design
At present, there are two main humidity measurement methods based on single-chip microcomputers: one is to use the dry-bulb method, and the other is to use a humidity sensor.
Dry-bulb hygrometry test and conclusion
We first tested the dry-bulb method. The principle of dry-bulb hygrometry is: use a thermistor sensor to detect the air temperature (dry-bulb temperature), and use another identical sensor to detect the temperature of the veil soaked in distilled water (wet-bulb temperature). According to the detected temperature difference, the following formula is used for calculation [6]: Relative humidity = {[humidity saturated water vapor pressure-AP (dry-bulb temperature-wet-bulb temperature)]/dry-bulb saturated water vapor pressure}*100%
(A: constant, related to wind speed; P: atmospheric force.)
The calculation of saturated water vapor pressure is the key. We use LOWE polynomial to approximate the saturated water vapor pressure:
E = C0 + C1T + C2T2 + ┄ + C6T6
(E: saturated water vapor pressure of pure horizontal liquid surface (dry bulb or wet bulb); T: temperature (dry bulb or wet bulb); C0_C6: constant.)
In the experiment, the results of the comparison with the high-precision dual polymer humidity measuring instrument developed by Beijing Great Wall Aerospace Measurement and Control Technology Research Institute are: in the humidity range of 20~90%, when the temperature is low, the comparison deviation is small, and the deviation increases with the increase of temperature. At about 70oC, it has reached 8%. The experiment shows that the dry-wet-bulb hygrometry method is not suitable for high temperature occasions. This conclusion raises objections to the statements in some research papers. Because the ideal calculation formula under high temperature environment is difficult to derive for a while, we finally gave up this hygrometry scheme, but proposed a new research topic.
Polymer film capacitive sensor humidity measurement design The
most commonly used humidity sensors are the following: ceramic humidity sensor, polymer humidity sensor, condensation humidity sensor and capacitive humidity sensor. Among them, capacitive humidity sensor has good linearity, fast response and reliable operation, which is the main trend of humidity sensor development. In particular, the newly launched polymer film humidity sensitive capacitor is the leader in this type of product. In the design of the system, we selected the MSR1 polymer film humidity sensitive capacitor of Qiqihar Keda Sensitive Instrument Factory.
Figure 1 Temperature curve during transition period (the segment with “Х” is the curve segment after correction)
Figure 2 Hardware system composition
Figure 3 Interrupt service program block diagram
After the humidity sensor is converted from wet to electric by the operational amplifier circuit, it enters the microcontroller through the A/D converter. First, according to the characteristic curve and the actual calibration value, a corresponding table of A/D conversion value and humidity value at a specific temperature (20oC) is established at an interval of 1%. Because it is an environment with a large temperature change, in order to ensure the measurement accuracy, the temperature must be compensated. To this end, the above measurement and data processing process is repeated at temperatures of 30oC, 40oC, 50oC, 60oC, 70oC, 80oC, and 90oC to form 8 corresponding tables of A/D conversion value and humidity value, and then linear interpolation is used to finally obtain the temperature compensation value every 1oC. All tables and data are written into EPROM, and the humidity value is obtained by looking up the table during measurement. In the above design, the software advantages of the computer are fully utilized, so that the humidity measurement error does not exceed ±2% within the allowable temperature change range. Due to the rapid change of humidity and small inertia, a direct adaptive control algorithm is used to control humidity.
In the design process of humidity measurement above, different types of capacitive sensors produced by several manufacturers were tested, which deepened their understanding. It is necessary to make some explanations for reference when peers develop similar products: ① Each sensor is given two calibration data (such as 0% output voltage value and 50% output voltage value). Since the sensor has good linearity, the output characteristic curve corresponding to the temperature of 25 oC can be drawn based on these two points, and no calibration is required. The manufacturer also gave a temperature compensation calculation formula: true output voltage value = sensor output voltage value/(a+bT) (a and b are determined data, T is the ambient temperature, when T is equal to 25 oC, a+bT=1). Therefore, according to this formula, the output characteristic curve at different temperatures can be obtained. Many manufacturers claim that the adaptability range of the sensor is -10 oC~90oC and 20~90% full humidity and full temperature area. In fact, we have found through experiments that with the increase of temperature and humidity, the error of the characteristic curve obtained above is getting bigger and bigger, especially in the high temperature and high humidity area with temperature>80oC and humidity>80%, the error will reach an unacceptable level. Therefore, the characteristic curve of the high temperature and high humidity area should be obtained through actual calibration rather than through the method given by the manufacturer. ② In the microscopic environment where the sensor is placed, the wind speed should be kept constant, otherwise it will cause measurement instability. If necessary, simulated wind can be added.
Hardware system composition
The system control core uses the PIC16C72 single-chip microcomputer. Since the chip has its own EPROM and A/D circuit, and the 22 I/O ports have strong load capacity (can directly drive LEDs), this hardware circuit only requires a few peripheral components. The hardware system composition is shown in Figure 2. The five-way execution modules respectively realize the control of each parameter, among which the temperature rise is continuous control. The pulse width modulated pulse output by the single-chip microcomputer is isolated and driven by the photoelectric thyristor to control the heating power of the electric heater. Since the temperature rise control is the most used control in the working process, its high precision and high stability improve the control performance of the entire system. Humidity control is switch control. Ultrasonic electric humidifier is used for humidification, and dehumidification fan is used for dehumidification.
Figure 2 Hardware system composition
In addition to the main program, the software design
also includes interrupt service, measurement, keyboard, display, control algorithm, A/D conversion, temperature compensation and table lookup function modules. Since the system control process is implemented by the interrupt service program, this article gives the interrupt service program flow chart (see Figure 3), from which we can see the idea and overview of the entire program design.
Conclusion
This system has been successfully developed and put into operation for more than one year. The results show that the system is stable and reliable and has good effects. In addition, although this system is developed for scientific research, it is also suitable for baking and drying of agricultural and sideline products, production and processing of food, artificial climate chambers and other application fields.
Figure 3 Interrupt service program flowchart.
Previous article:Implementation of 4-level intelligent dimmable electronic ballast circuit
Next article:Design and application of low-power wireless digital transmission module
- Popular Resources
- Popular amplifiers
- MCU Principles and Interface Technology C51 Programming (Edited by Zhang Yigang)
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Example interpretation of 51 single chip microcomputer complete learning and application
- Example interpretation of 51 single chip microcomputer complete learning and application
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
- I would like to ask about an EXCEL curve fitting formula. I cannot get the value of Y by substituting the values of X (0, 150, 300). The value of Y is not correct.
- EEWORLD University ---- Sensors and Testing Technology
- The first question after the New Year is how dare I use this IGBT driving current.
- Bluetooth module interfaces
- Five factors to consider when designing a fixed wireless access (FWA) system
- Weak Bluetooth signal strength and excessive static power consumption of the product
- Analysis of the circuit diagram of infrared pair tube. Can someone please help me analyze it?
- Practical information! The most comprehensive Linux application development case sharing, including key codes! (Part 2)
- Application design of active RFID tag based on MSP430F2012 and nRF24L01
- CC3200LaunchPad modified infrared thermometer