Post Go back to editing

Unable to establish I2C communication

Category: Hardware
Product Number: MAX17320G22+, MAX17320

Dear Team,

1) We have designed a battery management system using MAX17320G22+ as per the EVK for a Drone Sub-system. We tried to read some parameters like device name, manufacturer name etc. But we are unable to establish communication with the IC over I2C. we were using an external controller for the purpose. also we tried to run an I2C Scanner application from Raspberry Pi. Even that was not working.   

2) Also when batteries were connected to BMS, we are able to measure the voltage across the drain of charging MOSFET, but unable to measure any voltage across the PACK+ and PACK-, meaning that the charging MOSFET is turned ON when the BMS is connected to the cells, but the discharging MOSFET is not turning ON.  

Can someone help us find out where we went wrong?

Please help us resolve this issue ASAP.

Thank you.   

Parents
  • When the batteries are properly connected, then communication or a charge source connection at PCKP will wake the device up.  The REG2/REG3 pins are a good sign of life from the IC.  When the IC is powered up, this will have 1.8V/3.4V respectively.

    What battery voltage is measured at the BATT pin?  

    If the REG2/3 pins show the device is active, can you can all I2C addresses to confirm if any are responding?

    Have you tested your communication on the EVKIT hardware?

    Thanks

    Jason

  • We are using 3.7V x 4 Li-Po batteries and measuring 14.8V across BATTP and BATTN.

    Also we are able to measure 1.8V across REG2 and 3.4V across REG3 respectively.

    We don't have the EVK on hand, so we did  not test it on EVK but the schematic is designed referring the EVK schematic. 

  • It sounds like the MAX17320 is properly powered.  Can you measure the voltage at the CHG and DIS pins and the respective gates of the FETs?  Is the voltage at the CHG/DIS pin properly reaching the gate pin of the FET?

    Are you able to get any scope shots of the communication so we can see if that looks ok?

  • CHG Pin measures 16V and DIS Pin measures 2.4V both at IC Pins and FET Gate pins.

    We are able to establish communication only after connecting host controller ground to CSP but as per the EVK schematic host controllers ground should be connected to CSN (SYSN) 

    Isn't this violation to the EVK schematic? because now the host controller is directly connected to the battery ground(BATT-) and not to the PACK- as shown in the EVK schematic.

  • The Sense resistor should be the only difference between the BATT- and SYS- terminals.  Communication can typially occur with gnd at either terminal, but for proper current measurement, the proper connection on either side of the sense resistor is required.  I would recommend verifying the sense resistor is connected correctly and perhaps reflow the connection of the sense resistor.

    When you are able to communicate, are you able to read all of the registers correctly?

  • The BATT and PCKP register values when calculated are correct, but individual cell voltage and average voltages seems to be wrong.

    Regarding the ground,

    We have tested on 3 PCB's, all showing same behaviour and both grounds are showing continuity when checked.

  • If the cell voltages are incorrect, then the device may be opening the DIS fet to protect from UVP.

    What are the cell voltages reading?

    Does the ProtStatus register indicate there are any protection faults?

Reply Children
  • This is what we read from the IC. The displayed values are not byte-swapped, while checking 16bit data, byte-swapping is needed.

    We tried to set the DISs bit of HProtCfg2 register to turn on the DIS FET, but write operation didn't reflect when read back.

    Isn't the DIS FET should be ON by default?

  • ProtStatus shows the TooColdC bit and the UVP bits are set.  If UVP is set, then discharging is disabled and DIS pin will be low.

    Your Cell voltages are showing only Cell 2 is being read correctly 0xB871 = 3.688V, but all the other cells are reading 0.  If any cell voltage is below the UVP threshold, then the UVP bit will be set and the DIS fet will be opened to prevent any additional discharge.  I'd start by verifying your cell voltage connections and getting those readings to be reflected properly by the IC.

  • We checked the individual cell voltages and at the pin level too, the voltages are same on both sides and all are above 3.3V. But the values in registers are not updated. 

    Also we tried to  some modify register values and even they are not getting updated, as shown.

      

    I'm attaching the scope screenshot for writing operation of hProtCfg2 register for your reference.

  • Write protection is enabled by default and must be disabled before you are able to write any register

    hProtCfg2 should be read only.  Writing this register should not change the state of the DIS pin.

    if nPackCfg=0x0500 then it is configured for 2 cell.  

    Have you configured the NVM with all of your desired settings or does it still contain the default values?

  • Thank you for supporting. Now, we are able to write into the registers.

    Also, all cell readings are getting updated now, after changing the NCELLS value in nPackCfg Register was set to 4 from its default value 2.

    But now we are stuck in reading manufacture name, device name etc, from SBS read block registers. As per the datasheet the value has to be in  ASCII Format. but we are getting some data which cannot be converted to ASCII Format. For Reading from SBS block, I'm using 6Ch as the device address and I had set nNVCfg0.enSBS Bit also. Can you please point me out what I'm missing?

  • The SBS registers are all read on the 0x16 Slave address.

    Also, all of these values must be initialized when you initialize the NVM, otherwise, they will have the default to 0x000

  • Thank you so much for supporting, all these problems are sorted out with your support.

    We have brought two USB-I2C adaptor from two different make, one from Waveshare and another from www.amazon.in/.../B0BLKDX6LF.

    We are trying to establish communication between model gauge configuration wizard application downloaded from ADI page and our custom board using these adaptors, but the application is showing NO USB ADAPTOR.

    So, can you please suggest a way to establish communication between the application and our BMS Board???

  • Thank you so much for the support. We have sorted out all these.

    We are using two USB-I2C adaptor one from Waveshare and another from Spiffysky. We tried these to establish communication between model gauge Configuration Wizard and our custom board. But the application shows NO USB ADAPTOR. It seems that the Application is not detecting the converter itself. But  the device is recognised in the device manager.

    Can you please suggest a way to establish communication between the Application and our custom board using any of these converters.

       

    Spiffysky USB-I2C adaptor

    Waveshare usb to I2C converter

      

    Application Window

    Device Manager

    Connection Setup

  • I'm glad we have been able to overcome all of your initial issues.

    The EVKIT GUI is designed to interact with the FTDI chip that we have on our EVKIT board.  I can't provide any insight into using any other USB to I2C adapters.  The best method for you to use the EVKIT GUI would be to order our EVKIT hardware and connect it to your PC.  The EVKIT hardware then has some test points and a header that you can use to connect over to your system.  

  • I have a couple of questions regarding the MAX17230 that I'd like your assistance with:
    1. I'm encountering difficulties reading the Current Register value accurately. Despite using a 1mOhm Sense Resistor, the converted readings from the BMS chip don't match the actual current values. For instance, the chip reads around -30 with no load, and with a 50 Ohm load, the AvgCurrent Register value is approximately 225, which calculates to 351mA – significantly different from the expected 258mA based on the 12.9V battery voltage. I have attached the configuration settings file and a screenshot of the observed measurements for your reference. Could you please review my calculations and let me know if there are any errors?
    2. Additionally, the DIS FET shuts down after a period when the pack is loaded with 50 or 100 Ohms. To re-enable the DIS FET, I have to reconnect the battery and then the charger for a few moments.
    I want to emphasize that the chip is accurately measuring the battery and pack voltages.
    0x180 = 0x0000		//nXTable0 Register
    0x181 = 0x0000		//nXTable1 Register
    0x182 = 0x0000		//nXTable2 Register
    0x183 = 0x0000		//nXTable3 Register
    0x184 = 0x0000		//nXTable4 Register
    0x185 = 0x0000		//nXTable5 Register
    0x186 = 0x0000		//nXTable6 Register
    0x187 = 0x0000		//nXTable7 Register
    0x188 = 0x0000		//nXTable8 Register
    0x189 = 0x0000		//nXTable9 Register
    0x18A = 0x0000		//nXTable10 Register
    0x18B = 0x0000		//nXTable11 Register
    0x18C = 0xFF00		//nVAlrtTh Register
    0x18D = 0x7F80		//nTAlrtTh Register
    0x18E = 0x7E80		//nIAlrtTh Register
    0x18F = 0xFF00		//nSAlrtTh Register
    0x190 = 0x0000		//nOCVTable0 Register
    0x191 = 0x0000		//nOCVTable1 Register
    0x192 = 0x0000		//nOCVTable2 Register
    0x193 = 0x0000		//nOCVTable3 Register
    0x194 = 0x0000		//nOCVTable4 Register
    0x195 = 0x0000		//nOCVTable5 Register
    0x196 = 0x0000		//nOCVTable6 Register
    0x197 = 0x0000		//nOCVTable7 Register
    0x198 = 0x0000		//nOCVTable8 Register
    0x199 = 0x0000		//nOCVTable9 Register
    0x19A = 0x0000		//nOCVTable10 Register
    0x19B = 0x0000		//nOCVTable11 Register
    0x19C = 0x00E2		//nIChgTerm Register
    0x19D = 0x0000		//nFilterCfg Register
    0x19E = 0x0000		//nVEmpty Register
    0x19F = 0x0000		//nLearnCfg Register
    0x1A0 = 0x1050		//nQRTable00 Register
    0x1A1 = 0x8002		//nQRTable10 Register
    0x1A2 = 0x078C		//nQRTable20 Register
    0x1A3 = 0x0880		//nQRTable30 Register
    0x1A4 = 0x0000		//nCycles Register
    0x1A5 = 0x00E8		//nFullCapNom Register
    0x1A6 = 0x08CC		//nRComp0 Register
    0x1A7 = 0x223E		//nTempCo Register
    0x1A8 = 0x0000		//nBattStatus Register
    0x1A9 = 0x00C8		//nFullCapRep Register
    0x1AA = 0x0000		//ndQTot Register
    0x1AB = 0x0000		//nMaxMinCurr Register
    0x1AC = 0x0000		//nMaxMinVolt Register
    0x1AD = 0x0000		//nMaxMinTemp Register
    0x1AE = 0x0000		//nFaultLog Register
    0x1AF = 0x0000		//nTimerH Register
    0x1B0 = 0xA294		//nCONFIG Register
    0x1B1 = 0x0204		//nRippleCfg Register
    0x1B2 = 0x0000		//nMiscCFG Register
    0x1B3 = 0x00C8		//nDesignCap Register
    0x1B4 = 0x0008		//nSBSCFG Register
    0x1B5 = 0x0012		//nPACKCFG Register
    0x1B6 = 0x083B		//nRelaxCFG Register
    0x1B7 = 0x2241		//nConvgCFG Register
    0x1B8 = 0x0A80		//nNVCFG0 Register
    0x1B9 = 0x018A		//nNVCFG1 Register
    0x1BA = 0xBE2D		//nNVCFG2 Register
    0x1BB = 0x0909		//nHibCFG Register
    0x1BC = 0x0000		//nROMID0 Register
    0x1BD = 0x0000		//nROMID1 Register
    0x1BE = 0x0000		//nROMID2 Register
    0x1BF = 0x0000		//nROMID3 Register
    0x1C0 = 0x0000		//nChgCtrl1 Register
    0x1C1 = 0x0000		//nPReserved1 Register
    0x1C2 = 0x2061		//nChgCfg0 Register
    0x1C3 = 0x00E1		//nChgCtrl0 Register
    0x1C4 = 0x0000		//nRGain Register
    0x1C5 = 0x0000		//nPackResistance Register
    0x1C6 = 0x0000		//nFullSOCThr Register
    0x1C7 = 0x0000		//nTTFCFG Register
    0x1C8 = 0x4000		//nCGAIN Register
    0x1C9 = 0x0000		//nCGTempCo Register
    0x1CA = 0x71BE		//nThermCfg Register
    0x1CB = 0x0000		//nChgCfg1 Register
    0x1CC = 0x0000		//nManfctrName Register
    0x1CD = 0x0000		//nManfctrName1 Register
    0x1CE = 0x0000		//nManfctrName2 Register
    0x1CF = 0x0064		//nRSense Register
    0x1D0 = 0x508C		//nUVPrtTh Register
    0x1D1 = 0x3700		//nTPrtTh1 Register
    0x1D2 = 0x5528		//nTPrtTh3 Register
    0x1D3 = 0x4BB5		//nIPrtTh1 Register
    0x1D4 = 0x0000		//nBALTh Register
    0x1D5 = 0x2D0A		//nTPrtTh2 Register
    0x1D6 = 0x7A58		//nProtMiscTh Register
    0x1D7 = 0x0900		//nProtCfg Register
    0x1D8 = 0x644B		//nJEITAC Register
    0x1D9 = 0x0059		//nJEITAV Register
    0x1DA = 0xB754		//nOVPrtTh Register
    0x1DB = 0xC884		//nStepChg Register
    0x1DC = 0xAB3D		//nDelayCfg Register
    0x1DD = 0x0EAF		//nODSCTh Register
    0x1DE = 0x4355		//nODSCCfg Register
    0x1DF = 0xA081		//nProtCfg2 Register
    0x1E0 = 0x0000		//nDPLimit Register
    0x1E1 = 0x0000		//nScOcvLim Register
    0x1E2 = 0x0000		//nAgeFcCfg Register
    0x1E3 = 0xA5B9		//nDesignVoltage Register
    0x1E4 = 0x0000		//nVGain Register
    0x1E5 = 0x0000		//nRFastVShdn Register
    0x1E6 = 0x0000		//nManfctrDate Register
    0x1E7 = 0x0000		//nFirstUsed Register
    0x1E8 = 0x0000		//nSerialNumber0 Register
    0x1E9 = 0x0000		//nSerialNumber1 Register
    0x1EA = 0x0000		//nSerialNumber2 Register
    0x1EB = 0x0000		//nDeviceName0 Register
    0x1EC = 0x0000		//nDeviceName1 Register
    0x1ED = 0x0000		//nDeviceName2 Register
    0x1EE = 0x0000		//nDeviceName3 Register
    0x1EF = 0x0000		//nDeviceName4 Register