This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ40Z50-R1: BQ40Z50 -R1 interface with Aardvark I2C analyzer

Part Number: BQ40Z50-R1

Hi

I am using this BQ40Z50-R1 for measuring battery features , I am using aardvark I2c , Spi analyzer to check the transaction for communication with sensor ,but we dont know correct transaction for communication with sensor please help us to provide steps of correct transaction for communication with BQ40Z50-R1 through aardvark analyzer.

and we need some example transaction for some features.

  • Hello Divyanshu,

    I suggest you try searching for aardvark examples. We do not provide examples for aardvarks on ti.com

  • Hi kang

    please can you give us some example transaction for reading the voltage, current and temperature through i2c.

  • Hello Divyanshu,

    Unfortunately, I don't have any example that is based on the aardvark i2c host.

    Here is a python example that might be helpful to you.  I would suggest you read the  BQ40Z50-R1 TRM to know more details about how to communicate with the gauge.

    import time
    import smbus
    
    DEVICE_BUS  = 1
    DEVICE_ADDR = 0x0b
    
    bus = smbus.SMBus(DEVICE_BUS)
            
    voltage = bus.read_word_data(DEVICE_ADDR, 0x09)
        
    time.sleep(0.05)
    
    temperature_K = bus.read_word_data(DEVICE_ADDR, 0x08)
    temperature_C = temperature_K * 1.0 / 10.0 - 273.15
    
    output = "%dmV,%0.3fC" % (voltage, temperature_C)
                
    print output

    Andy