Problem with SparkFun LiPo Fuel Gauge (MAX17043)

Hi
I have a problem with the MAX17043 Module.
According following schematic circuit was connected and use from this example.
After flashing firmware, Photon is Stuck !!
My photon firmware : 0.4.7
What is the problem ?

I guess that gnd and vcc are connected not like your diagram.
Looking at my power gauge there are pull up resistors fitted ,I use the battery shield myself and have no problems with that.

Thanks, but when the first I connected VCC to VIN and GND to GND ,Photon burn out !!

Like I said , I have one , but not tried the fuel gauge myself yet , only the battery shield which uses the same chip.
But that is the way I would have wired it up , vcc to vin ( not the 3.3v pin ) and ground to ground.

Did you connect usb power and the fuel gaugle with battery at the same time ? .
If so that is why !!! , to charge the lipo you need a special charging circuit.

Yes, connect USB power (When the USB is connected, Not connected VCC to VIN and GND to GND), I just want to know the percentage of battery voltage.(A separate circuit for charging is available.)

My question :
PowerShield when not connected to the photon, We flashing photon firmware,
What will be the behavior of the photon? It is possible to test?

Not sure what you mean , but the photon on lipo should be the same as usb powered with the exception of vin voltage , which is now the lipo voltage and not 5 volts.
ALSO BUT , the gauge doesn’t have any cut off voltage so will kill your battery if it goes below 3.3 volts for too long.

Free plug to my project using the battery shield.
https://thingspeak.com/channels/54612

1 Like

Even if you didn’t want to power the Photon off the LiPo you’d at least need to have common ground for both devices.

1 Like

I’ve connected the following pins and flashing firmware with following example, After reboot Photon is Stuck !! RGB LED lights remain and not breathing. (my photon firmware : 0.4.7)

SDA > D0
SCL > D1
ALT > D3
GND > GND
VCC > VIN

//
// In this example the Particle device sends the volatge and SoC readings over serial
// every 1 second
//

#include "PowerShield/PowerShield.h"

PowerShield batteryMonitor;

void setup() {
    
    Serial.begin(9600); 
    // This essentially starts the I2C bus
    batteryMonitor.begin(); 
    // This sets up the fuel gauge
    batteryMonitor.quickStart();
    // Wait for it to settle down
    delay(500);

}

void loop() {
    
    // Read the volatge of the LiPo
    float cellVoltage = batteryMonitor.getVCell();
    // Read the State of Charge of the LiPo
    float stateOfCharge = batteryMonitor.getSoC();
    
    // Send the Voltage and SoC readings over serial
    Serial.println(cellVoltage);
    Serial.println(stateOfCharge);
    delay(1000);

}

Is it the blue D7 LED or the RGB LED?
If RGB, is it actually blue or rather cyan?

Question 1 : RGB LED not breathing and photon is stuck.
Question 2 : RGB LED is cyan.

@idreams, when you connect the board to your Photon, you CANNOT have the USB powering the Photon at the same time! The Photon’s reverse polarity diode for the USB will have 5V on its anode and 4.2v (or less) on its cathode creating a forward bias condition (Vusb > Vin > 0.5v) with current flowing through the diode possibly damaging it and the battery as well. Remember, your board is not a charger, just a monitor.

You will need use Serial1 or Particle.publish() if you want to see status messages from your code.

1 Like

Thanks @peekay123, I know this and USB powering Simultaneous not connected !! When USB powering connected, SparkFun LiPo Fuel Gauge VCC and GND not connected.
After flashing firmware with example, Photon reboot and Stuck !! RGB LED is cyan and not breathing, so I can not use Serial1.

@idreams, if you want to read the board then you MUST have GND connected but not Vcc. Otherwise, the pull-up resistors have no common GND reference. The Photon is getting stuck because of this.

2 Likes

@idreams, hence the comment earlier :wink:

2 Likes

Even when not connected VCC and use USB powering, The photon stuck again. I’ve connected only the following pins :

SDA > D0
SCL > D1
ALT > D3
GND > GND

Connections are correct? I am confused !!

@idreams, the current version of firmware on the Photon will get stuck if it can’t find an I2C device when the bus is initialized. This can happen when there are no pull-up resistors or the I2C device is not operating as expected. The upcoming version of firmware will prevent the lockup. Perhaps posting a picture of your actual setup (instead of a fritzing diagram) would help.

1 Like

Thanks @peekay123
Perhaps the sensor is damaged.See here
Tonight, I will test the sensor with the Raspberry Pi.

@idreams, I thought I was being careful buying stuff on eBay but this reminds me of how careful I need to be!

1 Like

Unfortunately I bought it from aliexpress.

@idreams, ouch!! I buy from there as well. So far so good but a good cautionary tale.

1 Like