Electronic expansion valve is an expansion valve controlled by electronic circuits. It is a key component in variable frequency air conditioning and refrigeration equipment. Since the electronic expansion valve can quickly adjust the valve opening according to the instructions of the CPU, quickly control the flow of refrigerant, and reduce the temperature difference between rooms, it can not only enhance the comfort of air conditioning, but also maximize energy saving.
The DPF series electronic expansion valve consists of a main valve and a stator coil. The driving component of the electronic expansion valve is a pulse stepper motor. There are many forms of actuators for electronic expansion valves, but there are few test machines specifically used to test the performance of expansion valves. Therefore, it is very meaningful to develop a suitable test machine to test some important performance and parameters of the DPF series electronic expansion valve, such as testing the life of the valve by cyclic opening and closing of the valve, and conducting flow coefficient, flow and valve opening experiments through the valve opening, etc.
1 System Hardware Design
The DPF electronic expansion valve tester is mainly controlled by keyboard operation. The main function keys of the system are divided into two categories: setting display keys and control keys. Setting display keys are mainly used to set and display tester parameters, and control keys are mainly used to control various performance tests of the valve.
The whole system adopts modular design. The system hardware circuit mainly consists of single chip microcomputer, keyboard, display, A/D sampling circuit, stepper motor drive circuit, etc. Its hardware circuit block diagram is shown in Figure 1.
Since the program is relatively large and has many intermediate variables, we use the AT89C52 microcontroller from ATMEL. It has 8KB of flash program storage space and 256 bytes of RAM. Because the test machine needs to protect the commonly used parameters, an EEPROM is connected to the microcontroller. In order to reduce the impact of the digital circuit on the analog drive circuit and the sampling circuit, an optocoupler is added between them for isolation.
In order to achieve the accuracy of the sampled voltage of 0.1%, this system uses the A/D acquisition chip MAX186 with internal sample holder and 12-bit serial output. In order to accurately control the conversion and transmission of data, the control pulse is sent through an I/O port using software. In this system, the interface between MAX186 and the microcontroller has four lines: conversion signal line (ADCS), clock line (CLOCK), data input line (MISO), and data output line (MOSI). The software uses the P1.6 and P1.7 ports of the microcontroller to simulate the ADCS and CLOCK timing, outputs the corresponding control word to MAX186 through the P1.4 port, obtains 12-bit voltage sampling data from P1.5, and stores it in the corresponding data storage area. Since the driving voltage of the stepper motor is generally 12V, and the maximum measurement value of MAX186 is 4.096V, the input voltage must also be reduced; in order to improve the load capacity, a voltage follower is also added in the middle. [page]
The working principle of the test machine is as follows: the single-chip computer controls the light position through 154, outputs the current segment code value through the B port of 8255 to refresh the display regularly, and scans the keyboard regularly through the C port of 8255. When a key is pressed, such as the "position 1" key, the CPU scans the state of the C port of 8255 and delays to remove the key jitter, confirming that the "position 1" key is pressed, so the system enters the "position 1" subroutine in the "control" module. The system calls the single-step rotation subroutine cyclically according to the number of pulses required for the expansion valve to turn to "position 1" and the current number of pulses. In the single-step rotation subroutine, the software writes the motor control byte to 8255, and inputs the stepper motor drive circuit through the A port of 8255, through the isolation of the optical coupler, and controls the forward and reverse rotation of the stepper motor by controlling the opening and closing of the power switch transistor, thereby realizing the opening and closing of the expansion valve. At the same time, the system changes the current "real-time pulse" value and displays it through the LED. In this way, the current valve opening can be known through the full pulse number and the "real-time pulse" value. During the rotation of the motor, the collected driving phase voltage value is sent to the single chip microcomputer through the sampling circuit and displayed in real time through the LED.
2 Software Design
In this program design, the event flags and time-sharing control methods are used to handle events. For example, in the T0 interrupt subroutine, the LED dynamic scan is performed every 1ms, and the keyboard is scanned every 60ms. When a "control" key value is obtained through the EX0 external interrupt subroutine, a corresponding flag is set in the main program. When entering the next T0 interrupt, in addition to processing the LED dynamic scan event, the T0 interrupt subroutine also controls the stepper motor drive pulse width; if the time slice at this time is 60ms, the keyboard scan event is also processed. In addition, in order to improve the real-time response of the event, we hand over the time-consuming part of the interrupt subroutine to the main program (the main program puts the processing results into the corresponding buffer). When the interrupt subroutine processes the corresponding event, it only needs to read the data from the buffer and put the data into the corresponding data area. For example, in this system, the parameter values displayed by the LED need to be changed frequently through the keyboard. Then the system needs to make corresponding changes to the internal data stored in binary form corresponding to the parameters, and convert it into the corresponding seven-segment code and display it on the LED. At this time, the time-consuming data conversion process can be handed over to the main program. The main program puts the corresponding seven-segment code into a buffer. When entering the T0 interrupt subroutine to refresh the LED content, it only needs to write the data in the buffer to the corresponding port of 8255. Using this processing method, the system can handle various events in real time and in an orderly manner.
The whole software is designed by structured programming method. The program is divided into three modules: main program module, EX0 interrupt service subroutine module, T0 interrupt service subroutine module.
The main program module is divided into three subroutines according to its function: initialization subroutine, display setting subroutine, and control subroutine. Since the operation of the test machine is controlled by keyboard interrupts, the corresponding subroutine is entered by querying the key value in the main program. Its flow chart is shown in Figure 2. In the initialization subroutine, the system resources of AT89C52, such as timers and registers, are initialized, and the parameters stored in EEPROM are written to the corresponding RAM, 8255, parameter registers, etc.
In the setting display subroutine, the setting parameters are mainly displayed or changed according to the read key values and saved to the corresponding EEPROM and RAM.
In the control subroutine, the motor is driven to perform corresponding actions, such as cyclic rotation or reset, according to the key values read in and the set parameters. At the same time, the corresponding phase voltage is collected and the voltage value is stored in the corresponding buffer area.
3 Conclusion
At present, the test machine has been successfully used in the electronic expansion valve test system of a certain air-conditioning and refrigeration enterprise. After several months of operation, the situation is good and meets the customer's requirements.
References
[1] Weng Wenbing, Wang Jinzhu. Experimental study on refrigerant flow characteristics of electronic expansion valve[J]. Fluid Machinery. 1998, 26(10): 58~61.
[2] Zhong Hua, Chen Zhijiu. Identification of dynamic characteristics of electronic expansion valve[J]. Journal of Shanghai Jiaotong University, 1999, 33(8): 942~944.
[3] He Limin. Design of MCS51 series single chip microcomputer application system[M]. Beijing: Beijing University of Aeronautics and Astronautics Press,
Previous article:Research on Magnetic Ruler Digitalization Technology Based on Single Chip Microcomputer and TDC
Next article:Design and implementation of frequency hopping controller based on 87C51FB single chip microcomputer
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
- One picture to understand the chip series: Huawei Kirin super popular science - RF
- Research and development of supercapacitor urban public transportation electric vehicles
- [Raspberry Pi Pico Review] Serial communication function and its test
- How to choose the appropriate main circuit topology for power supply?
- The diameter of the four holes on the EK140 base plate
- This circuit is called a "lawn mower"
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- How to monitor battery voltage with Arduino
- Image Algorithm Transplantation to DSP and Its Optimization Steps
- To advance in technology to a certain level, you just need to read more datasheets!