COVER STORY Figure 3. Enable step charging.
Table 1. Conversion Output Voltage Based on Register 0x21 for the MAX20743
0x21 Register Value 0x014E 0x0150 0x0158 0x015C 0x0162 0x0166 0x016E 0x0172 0x0178 0x017C 0x0182 0x0188 0x018E 0x0192 0x019E 0x01A4 0x01A9 0x01AE 0x01B4 0x01BA 0x01BF 0x01C4 0x01CB 0x01D1 0x01D6 0x01DC 0x01E2 0x01E8 0x01ED 0x01F3 0x01F8 0x01FE 0x0204
Voltage 3V
3.05V 3.1V
3.15V 3.2V
3.25V 3.3V
3.35V 3.4V
3.45V 3.5V
3.55V 3.6V
3.65V 3.7V
3.75V 3.8V
3.85V 3.9V
3.95V 4V
4.05V 4.1V
4.15V 4.2V
4.25V 4.3V
4.35V 4.4V
4.45V 4.5V
4.55V 4.6V
Figure 4. An expected step charging profile based on step charging configuration in Figure 3. FEBRUARY 2024 | ELECTRONICS FOR ENGINEERS 15
where x is the voltage we want to apply at the output. While this approach will have a slight error, it is a good way to estimate the desired value of the register from the voltage.
available and can be downloaded from the MAX17330 product page under the Tools and Simulations tab. It can be used to generate initialisation files (.INI) for the MAX17330 using the Configuration Wizard (select from the Device tab). The INI file contains the register initialisation information for the device in a register address/register value format. This is the file used by the microcontroller to configure the MAX17330 register by register. The MAX17330EVKIT data sheet details the different steps required to generate the initialisation file. The configuration, shown in Figure 2, is used to begin parallel charging. Next, step charging is enabled (see Figure 3). Figure 4 shows the expected step charging profile based on the step charging configuration found in Figure 3. The MAX20734 buck converter is used to increase the voltage applied to the two MAX17330EVKITs when needed. The MAX20734 buck converter changes the output voltage according to the value of the internal register at address 0x21. The buck converter can be controlled via I2
C; a class in Python has been
written to do so. Finally, as shown in Figure 5, the MAX20743EVKIT output voltage divider is modified for an output range from 3V to 4.6V (using the values R6 = 4K7 and R9 = 1K3). From Table 1, we can extract the curve:
Powering Up and Initialisation When the MAX17330 is first connected to a battery, default register value settings force the IC into a shutdown state. To wake the device, press the PKWK button. This will short the temporary protection MOSFETs and wake up both MAX17330EVKITs in this way. Next, the Raspberry Pi needs to communicate via I2 Carefully initialise the I2
C with all three devices. C hardware to avoid
device address conflicts. By default, the two MAX17330EVKITs use the same I2
first step is to change the address of one of the two fuel gauges.
The MAX17330 has both volatile and non- volatile registers, with non-volatile registers identified with the “n” prefix. This also results in a pair of node addresses, 6Ch (volatile registers) and 16h (NV registers).
There are two ways to change device node addresses on the MAX17330: •
Set the nPackCfg NV register using the I2
•
The I2CCmd register allows dynamic changes to the I2 (on page 16).
C bus. See Table 4
For ease of use, we use the second way to change the address so that the same INI file can be used to initialise both devices. Generating settings that can be shared by the two devices simplifies the configuration of the devices and eliminates the potential for user error when the address must be entered manually.
Since the two MAX17330 devices share the same I2
C bus, this procedure requires that the ALRT signal of one device has to be set low while the other one is set high. Table 4, from the MAX17330 data sheet, shows how the I2CCmd register can dynamically change the address of the device based on the ALERT GPIO pin value. In this case, the GoToSID and INcSID fields are used to change the I2 • •
C address:
Set ALRT_A logic low Set ALRT_B logic high
CSid field. This change can be set using the Configuration Wizard. See Table 3 (on page 16).
C address. The
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44 |
Page 45 |
Page 46 |
Page 47 |
Page 48 |
Page 49 |
Page 50 |
Page 51 |
Page 52 |
Page 53 |
Page 54