At present, in the factory inspection of ordinary dry batteries, manufacturers mainly conduct quality inspections on the open circuit voltage, load voltage, and short circuit current of the battery. However, due to the destructive damage caused by the battery capacity, there is no special inspection equipment, and only sampling methods are used for inspection. According to the characteristics of the battery, its weight parameter can indicate its capacity parameter. Therefore, we designed and developed a mechatronic intelligent device battery four-parameter automatic detector based on AT89C52 single-chip microcomputer control, which detects the four basic parameters of the battery: open circuit voltage, load voltage, short circuit current and battery weight, and at the same time achieves the statistical function of sorting and counting the good and bad batteries.
1 System hardware structure design
As shown in Figure 1, this system is based on the AT89C52 microcontroller as the core to form a complex and complete system with multiple functions such as data acquisition, object control, result display, alarm device, keyboard operation, etc.
1.1 Microprocessor
This system uses the AT89C52 chip produced by Atmel as the microprocessor. AT89C52 is fully compatible with the MCS-51 series of single-chip microcomputers. It uses a static clock mode, which can greatly save power consumption. It contains Flash memory inside, which can easily modify the program during system development, and will not become a waste even if the programming is wrong. Moreover, during system operation, some data information can be effectively saved even if the power is suddenly cut off.
1.2 Data acquisition part
Data acquisition and A/D conversion are completed by MAX197. MAX197 is a high-performance 12-bit A/D converter produced by MAXIM, with 8-channel analog signal input, which can meet the requirements of using 1 A/D to measure multiple parameters in time. Two of the channels of MAX197 are the input of battery weight signals, which are obtained by the pressure sensor The original signal is input after operational amplification. The remaining 6 channels are the input of battery-related voltage and current parameter signals. The chip select signal /CS of MAX197 is connected to P2.7 of AT89C52, and the read and write control signals are connected to /WR and /RD of AT89C52 respectively. Pin HBEN is the 12-bit conversion result selection terminal, which is controlled by P1.6. When HBEN is high, the high 4 bits of the conversion result are read; when HBEN is low, the low 8 bits are read. Set the control word of MAX197 to 01000000B, then its working mode is normal working mode/internal clock; internal acquisition mode; analog input range is 0~5 V; use channel 0. Changing the last 3 bits of the control word (000~111) can select the 0th to 7th channels of MAX197 in turn. MAX197 interfaces with AT89C52 through the three-state parallel interface on the chip. Since the conversion time of MAX197 itself is short and fixed, a fixed delay method is used instead of the interrupt method in the design, which improves the data passing rate and program efficiency. Figure 2 shows the interface circuit between MAX197 and AT89C52.
1.3 Basic I/O section
The standard values of the four battery parameters are set by the dip switch, and the display is directly displayed when the power is turned on, which is intuitive and clear; and the set values can be easily changed to meet the measurement requirements of batteries of different grades. The display part uses MAX7219 to drive the LED digital tube. MAX7219 is a serial input and output, common cathode, 8-bit digital LED display driver produced by MAXIM. Only one external resistor is required to set the current of all LED segments, which simplifies the circuit design and improves the reliability of the system. Its interface with AT89C52 is completed through a convenient three-wire serial interface. Each digit can be addressed and updated without rewriting the entire display.
P3.0 of AT89C52 is connected to the serial data input terminal DIN of MAX7219. At the rising edge of CLK, the serial data is loaded from DIN into the internal 16-bit shift register. The data at the DOUT terminal at the falling edge of CLK is valid. This system uses 3 MAX7219 cascaded to drive 24 LED digital tubes, which respectively display the 4 parameter values of the battery and the statistical results of each graded measurement value. Figure 3 shows 3 MAX7219 cascaded to drive 24 LED digital tubes.
1.4 Object control part
The objects controlled by this system include stepper motors, solenoid valves, mechanical measuring push rods, electronic switches, etc. After the power-on self-test, the stepper motor drives the conveyor belt to transport the battery to the detection position. The single-chip microcomputer controls the measuring push rod to clamp the battery for measurement. The obtained data is processed and compared with the set standard value. If it meets the setting, it is considered a qualified product and is taken away by the conveyor belt; if it does not meet the setting, it is considered a defective product. The single-chip microcomputer controls the solenoid valve to open the compressed air to blow away the defective battery to achieve the purpose of sorting. When the battery is defective or there is no battery and the positive and negative poles of the battery are reversed, the buzzer sends an alarm signal. This system uses pneumatic solenoid valves to improve the working speed and service life of the equipment.
The software part of this system is designed in MCS-51 series assembly language, with modular program structure, consisting of several modules such as main program module, keyboard service module, data acquisition module, data processing module, output control module and display module. The main program module is concise and clear, with the core part of key reading and key interpretation, and then turns to the corresponding functional subroutines to complete different functions. This design makes the overall structure of the program compact, concise, easy to understand, and easy to design, debug, maintain and transplant.
2.1 Monitoring program
Since the subroutine calling conditions of this system are multi-factorial, not only related to external keyboard operation, electrical signals, etc., but also related to the current state of the system, the state analysis method is quoted in the monitoring program, and the one-key polysemy writing method is adopted. Analyze all possible states of the system when it is working, set a key polysemy, and in different states, the results of key interpretation are different, so turn to different subroutines. This system sets 5 function keys and 1 logic key, among which the display key is a polysemy key. In different states, it displays the set four standard parameters, the number of measured positive and defective batteries, and the statistical number of each battery classification. The logic key is a software key, which is defined as a 30 s delay. After the above display key is pressed, it starts. If it is not pressed again, it will return to the power-on display of the four set parameters after 30 s.
2.2 Data acquisition
In the original data acquisition, VMOS power field effect tubes are used as electronic switches. Software programming is used to control the opening and closing of the electronic switch, select the analog input channels of the A/D converter, and measure different parameters of the battery. VMOS tube is a vertical conductive MOS power field effect transistor, which has the advantages of both electron tubes and transistors. Its switching speed is extremely high, and there is no "thermal collapse" and "secondary breakdown", which is easy to use in series and parallel. In the measurement of battery short-circuit current, this system uses two VMOS tubes in parallel to achieve the effect of shunting because the discharge current is large.
2.3 Data processing
Due to the existence of various interferences on site, the sampled data has a certain error. Therefore, digital filtering is adopted for the original data. The open circuit voltage measurement in this system fluctuates around the reference value of 1.5 V according to its value characteristics. First, the singular value is removed, that is, the data in the obtained sampling value sequence that obviously deviates from the reference value is considered to be interference and filtered out; then the obtained data sequence is processed by the median value filtering method, that is, the remaining sequence is queued and the middle value is taken as the final filtering result. This digital filtering software algorithm has the effect of hardware, but does not require hardware investment, and the algorithm is flexible and diverse, and the effect is often better than the hardware filtering circuit. In the application, a variety of algorithms can be used in combination according to the actual situation of the measured parameters and the law of the obtained data to achieve a better filtering effect.
3 Conclusion
This system has a high degree of automation, which greatly improves production efficiency; the human-machine interface is friendly, easy to operate and access data. The use of a suitable new chip makes the overall structure of the system reliable and accurate. The additional quality statistics function can also provide producers with a basis for decision-making. In practical applications, very good results have been achieved.
References
[1]Zhang Yigang, et al. MCS51 Single Chip Microcomputer Application Technology[M]. Heilongjiang: Harbin Institute of Technology Press, 1997
[2]Hu Hancai. Principles of Single Chip Microcomputer and Its Interface Technology[M]. Beijing: Tsinghua University Press, 1996
[3]Xu Aijun. Principle and Design of Intelligent Measurement and Control Instruments[M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 1995
[4]Li Gang. Modern Instrument Circuits - Device Solutions for Circuit Design[M]. Beijing: Science and Technology Literature Press, 2000
Previous article:Design of password lock controlled by single chip microcomputer
Next article:Realizing Remote Data Transmission Using Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-16 20:23
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
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
- Motor drive video
- Complementary PWM generation and dead zone control module of c2000
- About nRF52xx ADC stability issues
- Guys, please help me, I've been stuck for 3 days and can't figure it out
- Zero Knowledge Open Source Sharing-Zero Knowledge ESP8266 Development Board Released
- Q&A: Questions about LDO
- Happy New Year!
- General Grounding Guidelines for Most Mixed-Signal Devices
- What are the thermal challenges of a Wi-Fi front end?
- FAQ Bluetooth transmission questions and answers