Hi, im using an arduino mega and a 17043 fuel gauge to measure how much charge i have left on a 18650 cell.
The thing is, i dont think im getting the right reading from the sensor, it measures 3.60V but says i have 2% battery left.
Im using the library and example code from porrey.
Have you tried without the display? Most probably you run out of memory and the code misbehaves.
The state of charge is not a direct function of the battery voltage, so measuring the voltage and saying that the chip's state of charge output is wrong might be overhasty
Yes, the first thing i did when i saw this weird reading was to test the sensor by it self using the example code provided by the library. The reasults i got were the same, i measured the cell with a multimeter and got 3.60V, then i connected the MAX17043 to the battery and got 3.59V 2% charge left. I only had the sensor connected to the Mega and the Mega connect to my pc, i was using the serial monitor to interact with the MAX17043.
To "solve" the problem, should i ignore the percentage that the sensor gives and create my own function from the voltage reading ?
I don't use that sensor, but why do you think the answer is wrong? What should it be instead?
The capacity of Li batteries varies dramatically with type, manufacturer, age and discharge current, so why should the library example work for your particular cell?
So you are saying that even though my multimeter the cell is at 3.6v, and the MAX17043 says the cell is at 3.59v, it doesnt matter because, acording to the same sensor and the example code i only have 2% charge left ?
Responding to your question, assuming 0% charge at 3.3v and 100% charge at 4.2v, at 3.6v the MAX17043 should report the cell to be at 56%. Im using the cell to power an arduino mega and a couple of sensors, no more than 300mA total.