At present, the production mode of tobacco leaves has changed from the traditional scattered type to the intensive type and farm type, and the curing room has also developed from the traditional earthen kang to the large curing room. The "three-stage curing process" for the initial curing of tobacco leaves has been widely promoted in tobacco-producing areas, and most kang rooms have been equipped with hot air circulation devices. However, the dry and temperature measurements are still the traditional glass tube thermometers (fire meters), and the control of the air door or fire door is still manually passively controlled. This measurement method and control method have become a bottleneck problem restricting the improvement of tobacco leaf curing quality. Taking the wet bulb temperature (referred to as temperature) process requirements as an example, this article introduces a temperature control device with a single-chip microcomputer as the core, which basically realizes the automatic control of temperature during the flue-cured tobacco.
1 Temperature control process requirements.
(1) Technical requirements Effective measurement and control range: 20-80℃; Measurement accuracy: ±0.5℃; Control accuracy: ±1.0℃; Resolution: 0.1℃;
(2) Shift settings In order to adapt to the requirements of flue-cured tobacco technology and the specific conditions of tobacco leaves, the wet-bulb temperature is divided into nine shifts for selection. The temperature curve corresponding to each shift is shown in Figure 1.
(3) Actuator The damper is driven by an electric actuator, and its running time is 80s, i.e. 1.1°/s; power supply: 220V, 50Hz.
(4) Automatic control When the wet-bulb temperature exceeds the set value by 0.5℃, the air inlet door automatically opens for 5s; when the wet-bulb temperature is within the range of ±0.5℃, the air inlet door remains in the state. When the wet-bulb temperature is lower than the set value by 0.5℃, the air inlet door automatically closes for 5s.
(5) Alarm When the temperature is higher or lower than the set value by 1℃, the buzzer alarms.
2 System design
According to the above specific requirements, this system uses a single-chip microcomputer as a control unit and a thermal resistor as a sensor to complete the design of the device. Its working principle is as follows:
2.1 Hardware Design
2.1.1 Microprocessor Selection
This system uses AT89C51 as the CPU. AT89C51 is a low-power, high-performance 8b CMOS microcontroller with 4 kB flash programmable/erasable read-only memory on-chip. It is compatible with the MCS-51 microcontroller product series and is manufactured using high-density, non-volatile storage technology. The memory can be written/erased 1000 times. The pins of AT89C51 are the same as those of 8031. Therefore, it can meet the requirements without expansion.
2.1.2 Sensor Selection
According to the measurement accuracy and control accuracy requirements of this system, this device selects the thermal resistance sensor Cu50 as the temperature measuring element. Cu50 has a high temperature measurement range and a moderate price, which meets the technical requirements of the system.
2.1.3 Measurement Circuit
The measurement and control of temperature mainly depends on the temperature measurement accuracy. Therefore, in order to ensure the measurement accuracy, two measures are taken in the measurement circuit:
(1) The low drift and high precision OP07 is selected as the operational amplifier circuit.
(2) The measurement circuit is powered by a constant current source.
2.1.4 A/D Converter
The A/D converter uses the commonly used ADC0809 to meet the technical requirements. The chip has a resolution of 8 bits, a total unadjusted error of ±1LSB, an output level compatible with TTL levels, a single power supply of +5V, and an analog input range of 0 to 5V.
2.1.5 Output channel design
There are 3 output channels: 1 alarm circuit, 2 actuator drive circuits to control the forward and reverse rotation of the damper. In order to improve the anti-interference ability of the system, the drive circuit uses AC solid-state relays.
2.1.6 Human-machine channel design
(1) The temperature setting circuit uses a BCD code dial to set the temperature gear, and uses the lower 4 bits of the P1 port as the numerical input, which is easy to operate.
(2) The humidity display circuit uses a digital tube to display the humidity value. In order to no longer expand the parallel interface, the shift register function of the serial port is used to expand the 3b digital tube static display interface circuit. P1.7 is used as an output control. When P1.7=1, the serial port is allowed to output data to the shift register, otherwise, the display content remains unchanged.
(3) The alarm circuit uses a buzzer to alarm. [page]
The various units are combined to obtain a complete hardware system as shown in Figure 2.
2.2 Overall software design
2.2.1 Program structure design
The main program structure adopts a loop mode, and uses the timer T0 interrupt handler to control the start or stop of the electric actuator. The main program performs system initialization, including the initialization of the timer, I/O and interrupt system.
The following operations are performed in the loop: dial setting value detection, temperature detection, scale conversion, digital filtering, temperature display and control, and these operations are completed by the corresponding subroutine modules. The main program flow chart is shown in Figure 3.
2.2.2 Program module design
Several subroutines are used in the program. The following describes the design of the temperature detection and T0 interrupt processing control subroutines.
(1) Temperature detection program
The function of this program is to perform 7 consecutive A/D conversions, save the conversion results in the unit starting from 3BH, and then perform digital filtering to obtain the median value stored in the unit 33H. A/D conversion adopts the query method.
(2) T0 interrupt processing control subroutine
The high and low wet bulb temperature is controlled by the angle of the damper opening. Therefore, the function of this program is to compare the actual value of the detected temperature with the lower and upper limit of the set value to control the angle of the damper opening and the rate of temperature rise and fall. The upper limit setting value (stored in 3AH) and the lower limit setting value (stored in 38H) are ±0.5℃ of the gear setting temperature (stored in 39H). The operating status of the damper is detected and judged every 5 minutes. Each time the damper moves for 5s, it opens or closes 5.5°. Figure 4 is the flow chart of the T0 interrupt program.
3 Conclusion
According to the principle introduced in this article, a temperature control device has been made. At the same time, a manual/automatic conversion function has been added to the hardware, and anti-interference measures have been added to the software, making the device more reliable and stable, which has been proven by the Baofeng County Branch of Pingdingshan Tobacco Company.
Previous article:The self-adaptive implementation method of serial communication baud rate of single chip microcomputer
Next article: CRC check code program implementation in single chip microcomputer and its redundant code table calculation
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
- Cadence IC617 circuit ade simulation cannot display parameter vdsat
- C language modular programming
- About the use of ST's stepper motor driver chip L9942
- Smart bracelet for less than 10 yuan
- What is ISO 17025 and why is it important?
- Practice together in 2021 + review the gains and losses of 2020 work
- What to do if SYSTEM is not found in the AD status bar?
- Single analog signal input channel detects multiple signal major problems
- FPGA Design Tips
- Easy to understand and not esoteric: "Power Supply Design" - Fundamentals of Electronic Design