Application of X9241 in Battery Monitoring Unit

Publisher:CoboroLatest update time:2012-06-07 Source: 21ICKeywords:Battery Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In the development process of intelligent instruments, how to achieve online conversion of measurement range has always been a concern. The usual conversion method is to use a programmable gain amplifier or a multi-channel input, which will inevitably increase the complexity of the circuit and reduce reliability. Therefore, the digital potentiometer X9241 is used in the battery monitoring unit of this design to achieve online conversion of measurement range.

Digital Potentiometer X9241

X9241 Basic Functions

XICOR's X9241 integrates four non-volatile E2POTs. Each E2POT contains 63 resistor units, a sliding end count register (WCR) and four 8-bit data registers that can be read and written by the user. The content of the sliding end count register is used to control the position of the sliding end in the resistor array, and can perform bidirectional data transmission with the data register.

X9241 communication protocol

Working sequence

X9241 supports dual bus directional protocol, which stipulates that it is a transmitter when transmitting data to the bus and a receiver when receiving data from the bus. In this process, the device that controls the transmission is the host, and the device being controlled is the slave. In this solution, the functions of starting data transmission and providing clock are provided by the microcontroller, so X9241 is a slave device here.

A successful operation of X9241 must include the following steps:

Start condition: SDA jumps from high to low when SCL is high;

Response: Provide a handshake signal between the master and slave bus to indicate successful data reception. The microcontroller releases the SDA bus (sets SDA to 1) after sending 8 bits of data, and the X9241 pulls the SDA line low in the ninth clock cycle as a response to the successful reception of the first 8 bits of data.

Termination condition: When SCL is high, SDA changes from low to high. The specific working sequence is shown in Figure 1.

Figure 1 X9241 working sequence

X9241 and AT89C51 interface

Since the commonly used AT89C51 series processors do not have an I2C interface component, the interface with the X9241 is very inconvenient. Carefully analyzing the working sequence of Figure 1, the function of the I2C bus can be simulated through a general I/O bus and a timer, that is, the two lines of the P1 port are used as the SDA and SCL buses respectively, and the required clock is generated by timer 1. The specific circuit connection is shown in Figure 2.

Figure 2 X9241 and AT89C51 interface circuit

The following is an example of a three-byte instruction that writes a value to the sliding end count register to give a specific procedure:

SCL BIT P1.6
SDA BIT P1.7
MAIN:
……
MOV TMOD,#02H ; Set timing working mode 2,
timing
MOV TH0,#0E8H
MOV TL0,#0E8H
SETB EA ; Open interrupt
SETB ET0
SETB TR0 SETB SCL ; Start an operation
SETB SDA
CLR SDA
MOV A,#50H ; Select slave device
ACALL WRTA
MOV A,#0C0H ; Set write instruction format
ACALL WRTA
MOV A,#3FH ; Assign value to WCR
ACALL WRTA

JNB SCL, $ ; End this operation
SETB SDA
CLR SDA
WRTA: MOV R2,#08H
WRTA0: JB SCL, $ ; Wait for the rising edge of the clock signal
RLC A ; Send data to the digital potentiometer one by one
MOV SDA, C
JNB SCL, $
DJNZ R2, WRTA0
JB SCL, $ ; Wait for the digital potentiometer to receive the response
SETB SDA
JB SDA, $
JNB SCL, $
RET
INT: CPL P1.6 ; Invert and generate the required clock signal
RETI
……

Application of X9241 in Battery Monitoring Unit

Theoretically, the digital potentiometer can realize the conversion of any range. However, due to the limitation of the accuracy of the analog-to-digital converter and the high real-time requirements of the battery monitoring unit, selecting too many conversion points will result in half the effort with twice the results. Through experiments, it is found that only six ranges of 1:1, 1:2, 1:5, 1:10, 1:20, and 1:50 are needed to ensure that the input signal is near 2/3 of the range of the analog-to-digital converter. Therefore, the two-way data transmission function between the sliding end count register and the data register is cleverly used here to realize the online conversion of the above six ranges. The specific circuit for realizing online range conversion is shown in Figure 3. The specific implementation method is: the value stored in R0 of the two E2POTs is 01H. Since the sliding end count register will automatically load the value in R0 when the power is reset, the amplifier is a follower during initialization. When it is necessary to measure weak current, the value obtained by the initial acquisition is compared with the pre-set reference value, and the appropriate range is selected for amplification and re-acquisition.

Figure 3 Implementation circuit of online range conversion

Conclusion

The experimental results show that it is very convenient to use X9241 to realize online conversion of measurement range. The real-time online adjustment of six ranges simplifies the circuit design and ensures the accuracy of data acquisition. However, it is found in the experiment that sometimes oscillation occurs at the output end, causing output waveform distortion. The solution is to connect two resistors in series at the input and feedback ends of the amplifier to increase the attenuation channel to the input end.

Keywords:Battery Reference address:Application of X9241 in Battery Monitoring Unit

Previous article:Output overvoltage protection circuit
Next article:Advanced Lithium Battery Linear Charge Management Chip BQ2057 and Its Application

Recommended ReadingLatest update time:2024-11-16 17:37

Digital potentiometer X9241 and PIC microcontroller interface program
 X9241 Overview   X9241 is a digital potentiometer produced by XICOR that integrates 4 E2POT digital potentiometers on a single CMOS integrated circuit. It contains 4 resistor arrays, each array contains 63 resistor units, and there are tap points accessed by the sliding unit between each unit and between the two endp
[Microcontroller]
Digital potentiometer X9241 and PIC microcontroller interface program
Latest Power Management Articles
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号