1. Introduction At present, in order to meet the requirements of mobility and portability, portable devices are usually powered by batteries. When using batteries, the current status of the battery is of concern to users. For example, MP3 players, mobile phones, and laptops all display the current status of the battery in real time. For this reason, when designing the instruments involved in this article, the intelligent battery monitoring system was fully considered. The battery monitoring system implemented in this article consists of the DS2438 intelligent battery monitoring chip, 51 single-chip microcomputer, and LCD display module, among which the core function is completed by the DS2438 intelligent battery monitoring chip. This article introduces the hardware implementation and software design of this system, as well as the characteristics of the DS2438 chip and related control software programs. 2. System Hardware Implementation
The hardware design of this system strives to be simple, with the goal of minimizing the occupancy of the microcontroller instruction cycle so that the microcontroller can complete more other functions. The hardware implementation block diagram of the system is shown in Figure 1.
The DS2438 chip is a new generation of intelligent battery monitoring chip launched by DALLAS. It has the advantages of powerful functions, small size, and simple hardware wiring.
The storage space of DS2438 has 8 pages, 8 bytes per page, a total of 64 bytes, and each page has a corresponding high-speed temporary storage page. Therefore, the memory includes two parts: RAM high-speed temporary storage and SRAM/EEPROM (power-off protection), and these two parts are mirror images. The high-speed temporary storage ensures that the data can be consistent when using one-line communication (when writing data to DS2438, it is first written to the high-speed temporary storage. Only when the data is confirmed can the temporary storage page data be written to the corresponding power-off protection space using the temporary storage copy command). When the microcontroller reads/writes data to DS2438, it can only operate on the high-speed temporary storage. The storage space includes some special function registers and user-usable storage units. The following is an explanation of the special registers in the storage space that are related to the actual system we designed.
There are two types of DS2438 operation commands. One type is storage function commands, including read/write temporary page, copy temporary page, read SRAM/EEPROM page, temperature conversion, voltage conversion and other commands. The main function of this type of command is to collect and store data. The other type is ROM function commands, including four operations such as read, compare, skip and search for the RAM serial number of DS2438. Users can use this type of command to arbitrarily access multiple DS2438 chips connected on a bus. [page]
In order to meet the real-time monitoring requirements, the system microcontroller uses a timed interrupt to access the DS2438 to collect battery parameters. First, set the microcontroller's counter to the timed mode, turn on the counter, and the timing length can be flexibly set as needed. Then the microcontroller runs other programs and waits for the arrival of the timed interrupt. After the timed interrupt occurs, the interrupt service program is entered, the control operation program of the DS2438 is called, data is collected, and the collected data is processed and displayed. Finally, the timed interrupt is reinitialized and returned. Figure 3 is the overall flow chart of the system, and Figure 4 is the interrupt service program flow chart.
To determine what power supply mode the instrument is in during use, the value of the current register introduced earlier can be used to make a judgment.
Since the DS2438 has an A/D converter and a digital temperature sensor inside, to obtain the voltage and temperature of the battery, the microcontroller only needs to send a control command to the DS2438 to collect the voltage and temperature, and then wait for it to complete the collection and automatically store the voltage and temperature measurement values in the corresponding registers, and then the microcontroller can read the contents of the registers. When reading the register value, if the data line between the microcontroller and the DS2438 is at a low level, it means that the DS2438 is performing voltage and temperature conversion, and the data cannot be read at this time. Only when the data line is at a high level can the data be read correctly.
The remaining battery power is important information that users need when using the instrument. It can be obtained by using the value of the current integral accumulation (ICA) register. The value of the ICA register is changed by the DS2438 after automatically measuring the battery current at a fixed time. There is no need to control it. The microcontroller only needs to read the value of the ICA register and then substitute the read value into formula (2) to get the remaining battery power. The flowchart of the remaining power monitoring is shown in Figure 6.
The intelligent battery monitoring system based on the DS2438 chip introduced in this article is a part of a portable instrument. Practical use has proved that this system is reliable, powerful, easy to operate, and can work with other functions. With the widespread application of various portable electronic products, real-time battery monitoring has become an indispensable function. Therefore, the battery monitoring system introduced in this article has strong practicality.
|
Previous article:Application of Hard Disk Storage on Single Chip Microcomputer
Next article:Debugging Power Factor Correction Circuits Using Digital Phosphor Oscilloscopes
Recommended ReadingLatest update time:2024-11-16 21:00
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
- Power supply learning sharing
- Notes and lessons about IAR installation
- [Open Source] Bluetooth module BT401 full set of information based on Bluetooth headset chip development ultra-low cost
- Configuration example of ModbusTCP to Profinet gateway connecting to tightening shaft drive
- What books should Linux newbies read?
- C6000 embedded assembly C and assembly comparison and function description
- MicroPython 1.17 released
- EEWORLD University Hall----Live Replay: ADI's Vital Signs Monitoring Solutions in Wearable Products
- FPGA implementation of SPI42 interface.pdf
- Human-machine ring material——Good to see——【Quality knowledge】