The automatic measurement and control system with high-performance single-chip C8051F020 as the core control chip can automatically measure temperature, automatically output linear current at the temperature measurement point, automatically collect load pressure, etc., and calculate, display and print test data. Its reliability, accuracy and efficiency are greatly improved.
1 System design
When the system enters the temperature zero drift test state, it is controlled by the embedded microcomputer. The temperature rise signal drives the 11 kW-class heating tubes in the oil tank to quickly heat up through the photoelectric isolation control solid relay group. When it reaches a certain temperature measurement point, the analog triangle wave periodic signal after D/A conversion is automatically output and added to the winding of the servo valve to drive the servo valve to work, so that the pressure values of the two load chambers of the valve change differentially with the control current. The pressure change acts on the pressure transmitter, and the A/D continuously samples and compares. When the difference is the smallest (two minimum values appear in one cycle), the computer calculates the corresponding current zero bias value added to the servo valve. When the cycle reaches the highest temperature, the heater is automatically turned off, and the solenoid valve is controlled to open the water cooling radiator to cool down, and then the above test process is repeated until the temperature drops back to the starting temperature point, and the test ends. During this period, the computer displays and prints the temperature of the current temperature point and the required data in real time. The control system block diagram is shown in Figure 1.
2 Hardware Composition
C8051F020 is a fully integrated mixed signal system-level MCU chip (SoC), which integrates almost all analog and digital peripherals and other functional components required to form a single-chip data acquisition or control system. These peripherals or functional components include: analog multiplexer, ADC, programmable gain amplifier, DAC, voltage comparator, voltage reference, temperature sensor, timer, internal oscillator, RAM, Flash memory, watchdog, etc. It processes instructions in a "pipeline" structure, with high operating efficiency, and most of them only need 1 or 2 system clocks. This greatly simplifies the hardware design, and it is very convenient to expand the corresponding conditioning circuit on its periphery to form the entire hardware system. In the D/A conversion channel circuit, the internal voltage reference VREF from F020 is buffered and amplified by U1 and used as the reference voltage of the negative terminal of U2. The positive terminal of U3 is connected to the DA single-stage output of F020, and becomes a 0~±5V output signal after being processed by a first-order low-pass filter and buffer amplification. Due to the existence of the offset circuit, a -5mA instantaneous current will be generated before the chip D/A port is initialized or reset, which will have an adverse impact on the servo valve. To avoid this, an I/O is used to control an OM-RON high-response relay (about 1 ms) after photoelectric isolation, and the connection with the servo valve is connected and disconnected according to the instruction, as shown in Figure 2.
In the A/D acquisition channel circuit, the analog input signal is output after passing through a first-order low-pass filter and buffering inversion. As shown in Figure 3, there are three identical circuits that are switched by internal analog switches.
8-bit LED display, 5 soft keyboard inputs, using a dedicated CH452 digital tube display driver and keyboard scan control chip, its peripheral circuit is extremely simple, the interface speed is fast, the performance is stable, and it uses a 4-wire serial interface with the C8051F020 controller. It mainly uses its hardware to realize most of its functions, and programming is relatively simple, as shown in Figure 4.
The temperature control is composed of photoelectric isolation circuit, G3NA-220B solid relay and water valve relay, which are used to control the heating pipe or water cooling radiator of the oil tank to increase and decrease the temperature. The whole circuit adopts a variety of anti-interference measures, among which WS series three-port V/V voltage input and V/I current output isolation terminals are added to the input and output. The output signal of the temperature and pressure transmitter is 0~5 V. The current output is 0~±5 mA, with constant current characteristics, and the accuracy is 0.2% within the range of valve winding impedance variation.
The power supply adopts a modular integrated linear power supply with small ripple and good EMI. An embedded micro printer is used to print simple Chinese characters and data.
3 Data collection and processing
The D/A analog output of the system is Vo = 5 × (D-2 048) / 2 048, and the D value range is 0 to 4 096, that is, 0 to ±5 V output, which is converted into 0 to ±5 mA control current through V/I isolation. The accuracy of the isolation device is better than 0.3%. D/A analog conversion current resolution = analog current value / D = 5/2 048 ≈ 2.441 4μA
Due to the existence of valve hysteresis, the frequency of the triangular wave current signal added to the servo valve control winding is required to be low, and its period T=20 s. The digital values that make up the periodic triangular waveform are placed in 4 096 buffers in the DA. When the DA automatic conversion is started, it is controlled by the T3 timer and interrupted once every 20/4 096=0.004 882 s to send out the waveform value in the buffer. Since a 22.118 4 MHz crystal oscillator is used as the clock source, the processing speed of C8051F020 is very fast, and it is more than enough to complete the acquisition and related filtering processing calculation in the 4.88 ms time of the program interrupt. The system simultaneously collects 1 oil temperature, 1 room temperature, and 2 pressure signals with a sampling frequency of 20 kHz. After continuous cycle acquisition, the maximum and minimum values are removed and the digital average filtering method is used to filter the collected signals.
The heating and cooling cycle of the servo valve temperature zero drift test varies with the external climate and is about one hour. Because the test time at the temperature point is relatively short, that is, the actual temperature change at this point does not change much during the test time of about 20 seconds, the temperature control adopted for each temperature point is relatively simple. According to the measured external temperature and oil temperature, the program is slightly controlled before reaching a certain temperature test point, so that the control accuracy is not greater than ±2°C within 20 seconds.
4 System Software Design
This software is programmed using C51. C51 is a C language specifically used for 51 series single-chip microcomputer programming. It inherits most of the characteristics of the standard C language, but at the same time it is expanded on the specific hardware structure of the 51 series. It has the same advantages as the C language in terms of function, structure, readability, and maintainability, and the generated target code is very efficient. With the help of the integrated development environment (IDE) Keil μVision3-C51, the source program modules are initially created, edited, and connected on the PC, and then simulation debugging and emulation are completed by setting breakpoints, etc., and program errors are found and modified according to various information on the Keil μVision3 interface. Finally, the entire application system hardware that has been implemented is connected to external related signals and devices according to the design requirements, and then the generated HEX target program is downloaded to the Flash memory of the chip through the serial port adapter EC3 and the standard JTAG interface configured by C8051F020, and it is directly debugged and modified in real time on the chip in a non-intrusive manner, without occupying on-chip resources, and at full speed online until the design requirements are met.
In order to facilitate design and maintenance, a top-down and step-by-step structured module design method is adopted. All subroutines with independent functions are set as subroutine modules, and related functions are implemented by corresponding functional subroutines. The main program flow is shown in Figures 5 and 6.
① The main program mainly completes the C8051F020 system initialization, sets the system clock, adjusts the key processing and display program, and sets the ADC and DAC, etc., and calls the corresponding subroutine according to the function selected by the key.
②The calibration program is used to calibrate the system test accuracy. According to the calibration requirements, the program compares the input and output signals with the standard signals through the display on the internal LED.
③The LED display subroutine and printing subroutine mainly complete the display and printing of the input model and number, as well as the display and printing of the temperature value, zero bias current, zero drift value after data processing, and the input voltage and output current results during calibration.
④The temperature zero drift test program completes the control of heating and cooling temperature measurement. The zero drift test program is called once at each test temperature point for display and real-time printing.
⑤ The zero bias test program is the core program of this system. After calling this program, the timer continuously outputs the digital triangle waveform value of the DAC buffer at the set frequency, and starts the ADC to perform data acquisition, digital filtering, comparison, calculation, scale conversion and display, etc.
⑥The calculation formula of zero bias current is as follows:
Pressure difference Vp=VP1-VP2 Zero bias I[i]=(I1+I2)/2
Zero drift IP = (Imax-Imin) Percentage per = Ip/Ie×100%
Vp1 and Vp2 are the pressure values of the two load chambers respectively; I1 is the zero-point current value when the pressure difference is the smallest when the current changes from positive to negative, and I1<0 is a negative value; I2 is the zero-point current value when the pressure difference is the smallest when the current changes from negative to positive, and I2>0 is a positive value; Imax and Imin are the maximum and minimum values in the corresponding temperature zero bias array I[i]; Ie is the rated current value.
5 Conclusion
The design of the instrument is relatively simple. It has a friendly human-machine interface, is easy to operate, and has a high cost-effectiveness. Actual field applications show that the entire system runs smoothly, has reliable performance, and improves test accuracy and production efficiency. It has been successfully applied to the measurement and control of the servo valve high temperature test at Nanjing Electromechanical Hydraulic Center. With a little improvement, it can be extended to the measurement and control system of the entire servo valve performance test.
Previous article:Design of intelligent integrated instrument based on low power consumption single chip microcomputer
Next article:Temperature and humidity analysis remote control door and window opening system based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 19:31
- Popular Resources
- Popular amplifiers
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
- O-RAN development trends, reference architecture, and interoperability testing
- Qorvo PAC series highly integrated motor control chips and applications
- Five skills required for RF test engineers
- 【GD32L233C-START Review】Display driver for color OLED screen
- Would you choose the popular outdoor power supply?
- Solution to severe static heating of wireless network card
- China's latest classification catalogue of medical devices (No. 104, 2017)
- What is the function of the cross connection of the five tubes in the middle of this comparator?
- Understanding of TIMERA timing interrupt of MSP430F149
- What is the difference between pyb.delay and time.sleep?