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.

BQ25700A: Not able to use pmic to charge battery

Part Number: BQ25700A
Other Parts Discussed in Thread: BQ25703A

Dear TI team, 

I have described in detail, the setup, the issue and responses to programming in this document

HARDWARE:

Bq25700a connected to Raspberry Pi with a power supply of about 9.66V.



SOFTWARE:

I’m using linux terminal with I2c interface commands like I2cset and I2cget to program the pmic.

Below are the commands issued and the responses with comments

  1. ChargeOption0: Programmed with 0x020e to enable charging





pi@raspberrypi:~ $ i2cget -y 1 0x09 0x12 w

0xe20e

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x12 0x020e w

Value 0x020e written, readback matched



  1. IIN_HOST value at 3.25mA

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x3f w

0x4100

  1. Min Voltage Set to 3.25 V

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x3e w

0x0e00

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x3e 0x0e00 w

Value 0x0e00 written, readback matched

  1. Input Voltage limit:   PROBLEM: Unable to set it to 16.3V

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x3d w

0x0000

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x3d 0x3000 w

Warning - data mismatch - wrote 0x3000, read back 0x0000

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x3d 0x2000 w

Warning - data mismatch - wrote 0x2000, read back 0x0000

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x3d 0x1000 w

Warning - data mismatch - wrote 0x1000, read back 0x0000

HELP REQUIRED HERE( to set input voltage limit)

  1. DPM current set at 3.25 mA

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x22 w

0x4100

  1. ChargeOption3:  UNUSED

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x32 w

0x0000

  1. MaxCharge voltage: Initially at 0V and later set to 4192mV for 1S

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x15 w

0x0000

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x15 0x1060 w

Value 0x1060 written, readback matched




  1. ADCoption Register set  to measure Reg26/Reg24/Reg25

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x35 w

0x2000

pi@raspberrypi:~ $ i2cset -y -r 1 0x09 0x35 0xE0F7 w

Value 0xe0f7 written, readback matched




  1. MaxChargeCurrent: Initially at 0mA and later set to 3.25 mA

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x20 w

0xa000

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x21 w

0x0000

Post execution:

VBUS voltage measurement

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x23 w

0x8000   // VBUS voltage is read as 11.6 V instead of 9.6V

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x23 w

0x8000

ChargeCurrent measurement

pi@raspberrypi:~ $ i2cget -y 1 0x09 0x24 w

0x0000 //CHARGE CURRENT BEING READ AS 0mA despite battery connected and charge current set. I also use multimeter manually to measure current to no avail.

  • Can you tell me if there are any programming steps I’m missing
  • If there are no programming errors why isn’t the pmic charging my battery.

Thank You for your help.






  • Hi, Dutt,

    First, I commend you on your effort on controlling BQ25700A using Raspberry Pi. This will open a huge window for enthusiastic DIYer on IOT applications. 

    However, this RPi platform is an uncharted area and has many bugs and obstacles. I encourage you keep exploring. 

    Regarding the input voltage register setting, it is only allowed to set to a voltage level lower than your input 9.66V, otherwise, VINDPM fault will be triggered. Not sure why VBUS, ICHG measurement is different. Suggest you taking more measurement with different Vin and ICHG. 

    You can refer to BQ25700A user guide. Make sure the watchdog timer is disabled, otherwise, the charging will timeout every 175 seconds. 

    www.ti.com/.../BQ25700AEVM-732

  • Hi Zhou,

    I am still unable to set write to InputVoltage Register (I2C address = 0B/0Ah), despite me setting it to 0x2000 which is 8.912V that is lesser than input supply which is at 9.62 V. 

    I am now testing the firmware code from tindie for bq25703a

    For reference here is the link to the product: www.tindie.com/.../

    Python Script: github.com/.../BQ25703A_Python.git

    After setting charge current to 3.584 mA I am still not noticing any discharge current.

    Here are the I2C analyser results:

    write to 0x6B ack data: 0x2E 

    read to 0x6B ack data: 0x40

    write to 0x6B ack data: 0x2F 

    read to 0x6B ack data: 0x78

    write to 0x6B ack data: 0x3A 0x57 

    write to 0x6B ack data: 0x01 0x26 

    write to 0x6B ack data: 0x00 0x0E 

    write to 0x6B ack data: 0x20 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x3B 0x60 

    write to 0x6B ack data: 0x3B 

    read to 0x6B ack data: 0x60

    write to 0x6B ack data: 0x2C 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x2D 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x29 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x2B 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x27 

    read to 0x6B ack data: 0x63

    write to 0x6B ack data: 0x3B 0x60 

    write to 0x6B ack data: 0x3B 

    read to 0x6B ack data: 0x60

    write to 0x6B ack data: 0x2C 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x2D 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x29 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x2B 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x27 

    read to 0x6B ack data: 0x63

    write to 0x6B ack data: 0x3B 0x60 

    write to 0x6B ack data: 0x3B 

    read to 0x6B ack data: 0x60

    write to 0x6B ack data: 0x2C 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x2D 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x29 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x2B 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x27 

    read to 0x6B ack data: 0x63

    write to 0x6B ack data: 0x3B 0x60 

    write to 0x6B ack data: 0x3B 

    read to 0x6B ack data: 0x60

    write to 0x6B ack data: 0x2C 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x2D 

    read to 0x6B ack data: 0x09

    write to 0x6B ack data: 0x29 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x2B 

    read to 0x6B ack data: 0x00

    write to 0x6B ack data: 0x27 

    read to 0x6B ack data: 0x63

    write to 0x6B ack data: 0x0D 0x04 

    write to 0x6B ack data: 0x04 0x60 0x10 

    write to 0x6B ack data: 0x02 0x80 0x00

  • You don't need to set input voltage register to get charger started. Secondly, charge current and charge voltage registers are the minimum setup needed, assume you have an adequate source and battery.  Our charge current minimum step is 64mA. 

  • Hi Zhao, 

    As suggested by you, I've performed the basic setup required and set voltage and current to 4.2V and 128mA. But Register 28 to measure Discharge Current still reads 0mA. 

    I have attached the analyser report of this test for your reference.

    write to 0x6B ack data: 0x04
    read to 0x6B ack data: 0x60 0x10  // Max Voltage is at 4.2V
    write to 0x6B ack data: 0x02
    read to 0x6B ack data: 0x80 0x00  // Current at 128 mA
    write to 0x6B ack data: 0x3A 0xFF 0xE0
    write to 0x6B ack data: 0x3A      // ADC initiated
    read to 0x6B ack data: 0xFF 0xE0 //ADCoption readback
    write to 0x6B ack data: 0x28
    read to 0x6B ack data: 0x00 0x00 //  Discharge current from pmic is read as zero indicating no battery charge
    write to 0x6B ack data: 0x26
    read to 0x6B ack data: 0xFF 0x63  // System voltage being shown equal to 9.531V

    Hope this clears the problem I'm facing. 

    Looking forward to hearing your solution

  • currently on vacation, back on 5/31.

  • Hi Zhou,

    I've been able to get the pmic to charge my battery. I achieved this by driving ILim_HiZ to 4.01V and the pmic immediately went into FastCharge mode. The new problem I now have is with the ADC that doesn't seem to reflect the change in IDCHG. Even after I inititiate the ADCOption by writing in 0xeoff , I don't see any change in ADCIBAT even though I tested on multimeter that discharge is happening ie Multimeter reads 125mA after I set ChargeCurrent to 128mA.I am still able to read ADCVBUS/PSYS and ADCVBAT/VSYS but just not ADCIBAT. Is there something I'm missing?

    Can you help me debug this ADC issue.

  • Hi, Guru,

    Glad to see the previous issue resolved. Could you submit the new question in another thread?

    Regards,

    Tiger