MAX17320X

Hi any one knows how to read the voltage and current from this fuel gauge and if so how can i present it in percentage?
I looked at the data sheet i think I should address via I2C to the registers 0xDA and 0xDB for voltage and
registers 0x1D and 0x1E for current

Hi Roee,

The answers are a little more nuanced than your question implies.

Regarding voltage, the MAX17320, as found on page 93 of the datasheet, it can tell you the voltage of the battery pack excluding the pack protector (0x0DAh), and voltage between the Pack+ and GND (0x0DBh). The voltages are expressed as 16-bit values with each lsb representing 0.3125mV.

Current readings are covered on page 94. The most recent current measurement is at (0x01Ch), updated every 351.5ms. The average current (configurable from 0.7s to 6.4hrs) is read at (0x01Dh). The current value is derived from voltage readings over a ±51.2mV range between CSN and CSP pins (1.5625μV per lsb). It is stored as a 16-bit two’s complement value and left up to the user to calculate, based on the value of the sense resistor used.

It doesn’t make sense to give a percentage value for voltage and current, as there is no frame of reference from which to derive a percentage (What is 100% of voltage or current?). What does make sense to present as a percentage is the “state-of-charge”, which represents how “full” the battery pack is, or more accurately, what percentage charge is in the pack relative to its “full” capacity. As described on page 102, the RepSOC register (0x010h) is the filtered version of the state-of-charge percentage of the battery pack, and is the value you generally want to read.

Here are a couple of other documents you should become familiar with to create the most optimal design with the MAX17320:

UG-7177: MAX17320 Battery Pack Implementation Guide
UG-7161: MAX17320 Software Implementation Guide

This and more information can be found here.

To help accelerate your development time, you might also consider ordering one of the respective evaluation kits for the MAX17320 family.

Hi @Roee
I am using MAX17320 for my thesis project and have some difficulties reading from a register. I have made my own PCB (not using the evaluation kit) connected to a microcontroller STM32F105 and doing the software in STMCubeIDE using the HAL library.
For example, when I read from the register devName (0x21) with slave address (0x6C) I get a different value than 0x4209.
I wonder if you have initialized your IC and it is working for you could you please tell me how you manage this?
When I write to a register and then read it back from the register I do not get the same value as I was written to it.
Appreciate if you could give some advise to solve this.