Design of automatic detection system for four parameters of battery based on AT89C52

Publisher:WiseThinkerLatest update time:2011-10-22 Keywords:AT89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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

Keywords:AT89C52 Reference address:Design of automatic detection system for four parameters of battery based on AT89C52

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

Realization of Voice Recording and Playing System Based on AT89C52 Single Chip Microcomputer
1 Introduction Microcontrollers have been rapidly developed and widely promoted due to their high reliability, high cost performance, low voltage, low power consumption and other advantages. They are widely used in industrial control systems, data acquisition systems, intelligent instruments and
[Microcontroller]
Realization of Voice Recording and Playing System Based on AT89C52 Single Chip Microcomputer
Circuit design of short range wireless communication system based on AT89C52 microcontroller
  Short-distance wireless transmission has the advantages of strong anti-interference performance, high reliability, good security, few restrictions on geographical conditions, and flexible installation. It has broad application prospects in many fields. Low power consumption and miniaturization are the actual needs o
[Microcontroller]
Circuit design of short range wireless communication system based on AT89C52 microcontroller
A New Method to Precisely Control the Amplitude of DDS Output Signal
   As an advanced direct digital frequency synthesis technology, DDS technology uses digital control to generate multiple frequencies from a frequency reference source. It has the characteristics of high reliability, high integration, high frequency resolution, fast frequency change, and flexible control. It has been
[Microcontroller]
A New Method to Precisely Control the Amplitude of DDS Output Signal
Design of AT89C52 microcontroller to light up the digital tube
The circuit only drives one digital tube, which is a common cathode tube with the common end connected to ground. The segment tube is directly connected to the P2 port of the microcontroller. The microcontroller used is AT89C52. The circuit diagram is as follows: Through yesterday's explanation of the digital tube,
[Microcontroller]
Design of AT89C52 microcontroller to light up the digital tube
Liquid Level Detection System Based on AT89C52 Single Chip Microcomputer
  With the development of modern measurement technology, higher and higher requirements are put forward for the measurement system. In the automatic distillation measurement and control system, the accurate and timely detection of the first drop of liquid distilled from the condenser during the distillation process is
[Microcontroller]
Liquid Level Detection System Based on AT89C52 Single Chip Microcomputer
Design of control system for material preparation robot based on AT89C52
0 Introduction In order to meet the experimental training needs of mechatronics major, our school purchased a mechatronics automatic assembly teaching system in 2003. This system is a complete, flexible, modular and easily expandable teaching and training system, which includes a variety of mechanical and pneumatic t
[Microcontroller]
Design of control system for material preparation robot based on AT89C52
Design of Remote Temperature Monitoring System Based on AT89C52 Single Chip Microcomputer and TC35i
1 Introduction With the development of science and technology and the improvement of automation level, automatic temperature monitoring has become one of the important measures taken by all walks of life to ensure safe production and reduce losses. In certain occasions, due to the scattered and remote monitorin
[Microcontroller]
Design of Remote Temperature Monitoring System Based on AT89C52 Single Chip Microcomputer and TC35i
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号