SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By whip
#193503
I have a Sparkfun battery shield hooked to my Sparkfun mini OLED which is hooked to my Particle Photon.

I'm using the SparkFunMAX17043 library to monitor the voltage and soc and am getting odd results.

I'm using a 200mAh 1S 3.7v 30C Li_polymer battery for testing and the Photon micro-b USB is plugged into my laptop.

I charged the battery with a stand alone charger and them plugged into my setup. During initial testing, I was printing out the voltage and soc to the OLED display, as temperature readings were being made with a sensor. I could see the voltage and soc gradually going down even though the photon was plugged into my laptop, and from what I understood, was suppose to charge the battery.

I turned off the temperature gathering, the oled, and trimmed down the code to only take voltage and soc readings and print them to the serial monitor; esentially exactly what the example code does for the SparkFunMAX17043. I expected to see the SOC move up as the battery was being charged but it never does. It will just sit at a given % for hours on end.

If I reset the photon, I'll get a different soc; perhaps going from say 28.4% to 22.6%. I can even unplug the battery entirely and the soc will print out like 156%.

What is going on? Did I get a dud of a board?
By whip
#193522
Got lots of feedback over at the community.particle.io forum. They seem to be very active there.

For the record, I switched to a new battery shield with a charged battery, and everything seems to be working now; discharging on battery alone, charging when plugged into laptop.