Page 1 of 1

Fuel Gauge to go with ESP32

Posted: Sat Sep 21, 2019 7:56 am
by Zeni241
Has any body any experience of using fuel gauge,like MAX17044, MAX17048 or any other, with ESP-IDF?
Or using ADC reading is the only choice to get LiPo battery condition?

Re: Fuel Gauge to go with ESP32

Posted: Thu Oct 10, 2019 3:37 am
by ESP_Dazz
Zeni241 wrote: Has any body any experience of using fuel gauge,like MAX17044, MAX17048 or any other, with ESP-IDF?
Or using ADC reading is the only choice to get LiPo battery condition?
Both MAX17044 and MAX17048 have I2C interfaces. It shouldn't be hard to whip up some code to read the two chips using ESP-IDF I2C driver. Take a look at the esp-iot-solutions repo as it contains a bunch of examples on talking to different sensors over I2C.

Using the ESP32's internal ADC is also an option (which requires less hardware and probably saves costs). But the downside to using the internal ADC is having to deal with calibrating the ADC and your circuit to get an accurate reading of the battery voltage.

Re: Fuel Gauge to go with ESP32

Posted: Thu Oct 10, 2019 11:59 am
by Zeni241
Great. Thank you Dazz. Also the link esp-iot-solutions repo is great. :D

Re: Fuel Gauge to go with ESP32

Posted: Fri Oct 11, 2019 2:58 pm
by phatpaul
Wow, I left the battery world for a couple years and now there are fuel-gauges that don't need to measure current!? I'm betting there's some sophisticated algorithms and DSP going on in there. https://www.maximintegrated.com/en/prod ... 17048.html

I don't advise trying to roll-your-own battery fuel-gauge - it's very difficult to get it right (I know from experience).