I have used the MAX17043 quite successfully with other systems. Sparkfun has a “fuel gauge” based on it. I think the problem you are having are caused by issues with the Photon’s I2C firmware, and according to other posts, a fix for which is currently being tested.
One thing I don’t like about this Battery Shield is it is delivering battery voltage to the VIN pin on the photon when not connected to USB or optional power jack. Ideally it should also have a boost power section to deliver 5V to VIN instead, with a LDO set around 3.2V or so to shutdown before damaging the battery or causing brownout of the Photon.
Could someone look into this again? I’m using the sparkfun battery shield with the updated firmware (0.4.4 updated automatically through flashing on particle build) and I’m still seeing the same number here for SOC - 255.99609375.
@gelicia I have found marginal improvement with 0.4.4 in that if I remove the battery from the connector, and plug it back in, it will read correctly until I connect it to USB again. Obviously this is not a long term solution as I need this to work through charges in a sealed container, but it’s getting…better? Ish?
I only ever get the 255 number, even after getting that variable right after plugging in the battery. Could someone who was working on the I2C stuff look into this? @peekay123 ?
I am still having the issue, is there a way to tell from what version of the firmware a photon is running if you don’t trust ? Since I had no change after updating, I’m wondering if maybe my firmware wasn’t updated.
I also have two of these boards now and they both do the same thing.
For what it’s worth I am occasionally seeing this issue with 0.4.5 although it works much of the time. When it happens, hitting the reset button does not fix it, and after the photon has rebooted the other I2C devices are not able to communicate properly. Only after disconnecting power from the entire system for a while (~30 sec) and powering up again does I2C start working normally again. It almost seems as if the MAX17043 is locking up the lines for some reason (though I have not measured) and the power off is needed since the chip has an RC filter on its power input.
When I followed the instructions, I got that I was running system firmware version: 0.4.4
When I uploaded this last time, instead of selecting Latest (0.4.5) I selected 0.4.5. That seems to have done the trick. It flashed magenta for a while, but when it came back up I was getting legit values for SOC.
I’ll be seeing if my reliability has problems like others are reporting, but I am set for now! Thank you!
I have been out of town, but when I got back and did a web IDE reflash, it’s been giving me correct info, even as I plug and unplug it from USB. I would like to get more than a few hours of data to say conclusively that it’s stable, but it definitely seems to be more stable.
The reflash seems to have broken my IFTTT recipe that wrote this monitor info to a Google Spreadsheet, though…
IFTTT seemed to have lost its authentication to Particle randomly (all recipes failed,) so that was an easy fix. Curious as to what triggers that, but I bet it is on their end.
Thus far, battery reading seems solid with current firmware. I have another issue I’ll start a separate topic for.
@gelicia Any further issues from you? If not I think we can close this.
I’m not having the same problem exactly, but I am getting weird values for my SOC. I am just publishing the value to a Google spreadsheet but the raw values currently are 1,079,406,592.00. It goes up while charging and down when unplugged so I believe it is working, but just not sure why the large number. I am using a photon with the newest firmware. Anyone have a thought?
I am having this problem now, and I am using firmware version 0.6.0…
Does anyone have any suggestions? I’m thinking of flashing using version 0.4.5 but I don’t think that will be a long term solution, assuming it even works.
I experienced this problem as well. Batt voltage consistently showed 5 v (no drop over time, even at night) and SOC indicated 255. All other data (temp, humidity) was crazy as heck (this was part of a weather underground station that I built). I tried unplugging everything, esp the battery, and reassembled. No luck. However, I remembered that I switched the Photon on this configuration out a few days ago after I screwed up some code on the original board.* Once I switched back to the original Photon, everything worked again. I thought that, perhaps, the boards were different versions (PHOTONH vs. PHOTONNOH), but they were both PHOTONH. I couldn’t find any other revision numbers…
*I programmed in a deep sleep for several minutes during each cycle without sufficient delays built in. The problem? I couldn’t flash the darn thing OTA to update code. After trying to install Particle CLI on Mac (a disaster), I installed it on an old, old laptop and completely flashed the photon. No amount of soft reset, etc., would work.