Design of the hottest distributed battery intellig

  • Detail

Distributed battery intelligent node design

Abstract: This paper discusses the implementation of battery intelligent monitoring system based on CAN bus, including the software and hardware structure of intelligent monitoring module, the application of independent can controller SJA1000, digital single bus temperature detection unit, and gives a feasible scheme of serial battery voltage detection

key words: single chip microcomputer; Can bus; SJA1000; Ds18s20


general power supply equipment can only measure the overall output voltage and current of the battery pack, but cannot measure a single battery. The failure of the battery pack is often a vicious cycle starting from the failure of a single battery, especially for the battery pack that has been used for a long time but does not exceed the service life, it is difficult to find problems simply relying on the daily maintenance of maintenance personnel. Therefore, it is very important to monitor the operating parameters of a single battery and find problems in time

the damage of a single battery first shows that the terminal voltage is satisfactory, which is too high when charging and rapidly drops when discharging, the battery temperature rises, the load capacity decreases and other abnormal phenomena. The faulty battery can be found in time by measuring the terminal voltage, body temperature and other parameters of the battery

the early battery monitoring adopts the centralized monitoring method, or the distributed measurement method of decentralized acquisition and centralized monitoring based on RS-232 (or RS-485) bus. These methods can only adopt the master-slave system structure to collect data by polling. This is because RS-232 and RS-485 buses are only a pure physical interface and do not have the ability of active coordination. Can bus is a local standard for multi host control, which has the characteristics of network protocol in physical layer and data link layer, multi master nodes, lossless arbitration, high reliability and good expansion performance. A distributed battery monitoring system based on CAN bus is given below

system composition

the system is composed of upper computer, RS-232-CAN interface and intelligent node, as shown in Figure 1

Figure 1 function diagram of distributed battery monitoring system

the upper computer is composed of ordinary microcomputer, which receives the monitoring data of each node. But at present, most of them do not have a large-scale industrialized production or a few plastic vertical battery banks with small production scope and relatively narrow use, Process the collected battery data (such as recording the history of the battery, the time of collecting data, etc.) and output it in the form of tables or graphics, so as to manage the operation status of the whole system

rs-232-can interface is the interface between CAN bus and upper computer, which completes the data conversion between CAN bus data and RS-232 interface, caches the data information from the intelligent node, and alarms the alarm signal to notify the maintenance personnel for processing

the intelligent node is an intelligent monitoring module, which can measure the voltage, body temperature and ambient temperature of a single battery terminal in the battery pack (total voltage 48V, single voltage 12V or 2V). If it exceeds the working range, it will give an alarm, store the monitoring data and report the monitoring data regularly. The over limit alarm signal is reported in time and can be polled by the upper computer. The following only gives a detailed design scheme for the intelligent node

hardware composition

the intelligent monitoring node takes 89C52 as the controller, and the peripheral modules include can interface module, temperature measurement module, voltage measurement module, alarm module, node address selection and optional memory module, as shown in Figure 2. In order to make full use of the interface resources of 89C52, all modules except the can interface module adopt serial interface devices, which reduces the circuit volume and reduces the hardware cost of the circuit

Figure 2 structure diagram of intelligent monitoring node

can interface module

can bus protocol and its characteristics are shown in references. At present, there are many chips with CAN protocol function. In this design, SJA1000 independent can controller chip and 82C250 can interface driver chip of Philip company are selected. To enhance the anti-interference ability of the node, tx0 and rx0 of SJA1000 are connected to 82C250 through high-speed optocoupler 6n137. The circuit is shown in Figure 3

Figure 3 Schematic diagram of can interface module

voltage measurement module

when the battery is composed of four 12V batteries in series, its terminal voltage is much higher than the allowable input voltage of ADC, so the voltage acquisition circuit should be specially designed: the voltage at the terminals of each battery connected in series should be introduced into the voltage dividing circuit through the analog switch for voltage dividing processing, and then sent to the differential input end of ADC after impedance transformation by the voltage follower, The converted voltage digital quantity is output to the PI port of the single chip microcomputer

adc adopts adc0838 of national semiconductor. The device is a programmable, single ended 8-channel/differential 4-channel, 8-bit serial ADC input to kongliuan, President of Henan University of science and technology, and its data input and output ports can be shared by time sharing

the analog switch adopts max4613 of Maxim. It is a four way single pole single throw ttl/cmos compatible analog switch, which can supply power at one end (9~40v) or at two ends (± 4.5~ ± 20V). The connection with the experimental force error under the effective reduction of the battery pack under small load adopts the "floating ground" mode: each max4613 controls the gating of two batteries, and the positive and negative electrodes of the two batteries are taken from the power supply and ground respectively. Since the control polarity of S1, S4, S2 and S3 of max4613 is opposite, the decoding circuit cannot be used, and the four i/o port lines of the single chip microcomputer are driven separately after being isolated by the optocoupler, so as to ensure that only one battery voltage is connected to the voltage divider of the later stage at the same time. In addition, its control terminal adopts CMOS level (VL connected to v+)

the voltage dividing circuit adopts three identical resistors, and the voltage after voltage dividing is about 4V. Because the same voltage divider is used, the error between circuits caused by the difference of voltage divider is avoided. At the same time, the analog converter adopts differential input, which reduces common mode interference and avoids the problem of voltage incompatibility caused by "floating ground"

if 2V batteries are sampled, six CD4052 analog switches can be used to control the gating of each battery. Each CD4052 controls four batteries. Two i/o port lines drive two address selection terminals after being isolated by an optocoupler, and the other three i/o port lines control the enabling terminals (INH) of six CD4052 after being decoded by 74LS138

temperature measurement module

the temperature measurement module adopts the ds18s20 series single bus digital thermometer launched by Dallas company in the United States. Only one wire is needed to connect the single chip microcomputer and ds18s20, as shown in Figure 4. Each i/o port cable can be connected to multiple ds18s20 at the same time

Figure 4 Schematic diagram of DS1820 and MCU connection

software implementation

software design adopts modular programming, and the system software is mainly divided into main program, data acquisition (voltage, temperature) processing program and communication program

the main program is the system control program, which realizes the initialization of the system (including system self-test, reading the address of this node, battery voltage type of battery pack, sending the address of this node to the upper computer, receiving the reference voltage value and temperature value of this node sent by the upper computer) and the overall scheduling of each module software

data acquisition and processing program includes voltage acquisition and temperature acquisition. Because the temperature conversion time of ds18s20 is long (750ms), temperature conversion, voltage acquisition and temperature acquisition are carried out first for each acquisition. Temperature conversion and voltage acquisition are carried out synchronously. After each round of collection, the data should be processed to judge whether it exceeds the limit value. If it is normal, judge whether it has been collected for 5 times. If not, collect it again. This is because the data transformation is slow. If it is normal, it is not necessary to report the data every time to reduce the amount of data on the CAN bus; If it reaches 5 times or the data exceeds the limit, the data will be packaged and uploaded to enter the can communication stage

the can communication program is responsible for sending the collected data to the CAN controller, and then the CAN controller is responsible for sending the data to the CAN bus. The main subroutines are: can initialization, can sending, can receiving, ADC subroutine, DS1820 reset, start, Rom search, read and write, etc. Among them, can initialization, sending and receiving subroutines, DS1820 reset, startup, Rom search, read and write, etc. can be seen in the following references, and ADC conversion subroutines are shown in this publication


the distributed battery intelligent monitoring system has a high degree of intelligence, accurate measurement, and can find the early faults of the battery pack in time. Its intelligent monitoring node can be used as a part of decentralized collection and centralized monitoring of multiple groups of batteries in a station, or as an auxiliary part of switching power supply. The can interface can be replaced by RS-232 interface to connect with the control host of the existing switching power supply to improve the performance of the existing power supply. (end)

Copyright © 2011 JIN SHI