COVER STORY
Figure 5. The output voltage divider has been modified for an output range of 3V to 4.6V (with R6 = 4K7 and R9 = 1K3).
Table 2. MAX17330 Registers Register Page
Lock 00h
01h – 04h 05h – 0Ah
0Bh
0Ch 0Dh
0Eh – 0Fh 10h – 17h 18h – 19h 1Ah – 1Bh 1Ch Lock 3 Lock 1 Lock 4 Lock 2 Modelgauge M5 EZ data block Reserved Lock 2 SHA Lock 2
Modelgauge M5 EZ data block (continued)
SHA memory
Modelgauge M5 EZ data block (continued)
Reserved SBS data block
Modelgauge M5 EZ non-volatile memory block
Life logging and
configuration non-volatile memory block
Configuration non-volatile memory block
• 16 channels 16 channels SBS 00h – 7Fh 6 channels
6 channels 6 channels
I2 I2 I2 C
C C
B0h – BFh
C0h – CFh D0h – DFh
6 channels I2 C 00h – 4Fh
Description
2-Wire Node Address
2-Wire Protocol 2-Wire External Address Range
•
Assert Config2.POR_CMD to restart firmware
See Table 7 (on page 17).
Next, we need to enable interrupts from the chargers: •
Set (
Config.Aen and
Config.Caen) = 1
See Table 8 (on page 17). Now the devices are initialised.
I2 C 80h – EFh
Logging Data and Interrupts We need to be able to read registers to log data and check if an interrupt has been generated on the ALERT GPIO lines. We can use this script: • • • • •
Set 500ms Timer
VMIN = min (VBATT_A, VBATT_B) Vsys_min = nVEmpty[15:7]
CrossCharge = False
If (VMIN<Vsys_min) ➔ CrossCharge = True Evaluate if the minimum battery voltage
Write I2CCmd = 0 × 0001 ➔ MAX17330_A address remains at
6Ch/16h ➔ MAX17330_B address set to ECh/96h
Once each device has its own unique address, the entire system can be controlled by a single microcontroller.
Here is the script for the microcontroller to complete I2
the system initialisation. • •
Load .INI file Assert ALRT_A and ALRT_B to keep the
Table 3. nPackCfg (1B5h) Register Format D15 0
D14 S_Hib D13 THCfg D12 D11 THType C configuration. This will be part of path between SYSP and BATTP open
• Read VBATT_A and VBATT_B •
• • •
Release ALRT_A and ALRT_B
Set nProtCfg.OvrdEn = 0 to use ALRT as Output
See Table 6 (on page 17).
Some registers in the non-volatile space require the firmware to be restarted for the change to take effect. Thus, the following step is required:
D10 D9 000 D8
D7 0
D6 ParEn D5 I2 CSid
VMAX = max (VBATT_A, VBATT_B) Set VOUT = VMAX + 50mV
exceeds the minimum operating voltage of the system •
If
FProtStat.IsDis = 0
Charging signal is detected •
Clear
Status.AllowChgB
Indicate charger presence to all batteries •
If (VBATT > VMIN + 400mV and !Cross Charge)
Determine which battery to block to avoid cross-charging
Config2.BlockDis = 1 else
Config2.BlockDis = 0 Allow discharging if the low battery is much D4 D3 D2 0001 D1 D0
16 FEBRUARY 2024 | ELECTRONICS FOR ENGINEERS
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