cancel
Showing results for 
Search instead for 
Did you mean: 

Read current of Li-ion battery from fuel gauge(bq40z50r2) in stm32cubeIDE.

Mohan1
Associate III

Hello,

I am trying to get data of battery in stm32cubeIDE,I have taken voltage and temperature of battery successfully but when i was trying to get current of battery, it shows value like 65535 or 65473....like a garbage value.I am reading current in milli ampere.I also checked value on bqstudio as shown below image and it is (-1103mA),negative sign because it is discharging current.0690X00000BumPPQAZ.jpg

But when i send the register address of current in this same bqstudio,it shows garbage value FBB2 i.e.64434 same as showing in stm32cubeIDE. I have connected load of 5ohm and battery voltage is 3.5v .Please give me any suggestion.0690X00000BumRpQAJ.jpg

11 REPLIES 11
Piranha
Chief II

Current has a direction. Obviously the sign indicates direction of the current.

Mohan1
Associate III

@Piranha​ Thanks sir.