Giter Site home page Giter Site logo

Comments (5)

porrey avatar porrey commented on September 17, 2024

Can you provide more details?

  1. Are you using a break-out board such as the LiPo Fuel Gauge from SparkFun?
  2. Can you send a link to your node-mcu board so i can get more info on it?
  3. Are you using a LiPo charger as well? If yes, which one?
  4. If you can send details of your circuit (diagram or photos) that would be helpful.

from max1704x.

MoJo2600 avatar MoJo2600 commented on September 17, 2024

Thank you, that you are willing to have a look.

  1. Yes, i use the LiPo Fuel Gauge from Sparkfun
  2. The NodeMCU i'm currently using is a ESP-12F in detail it is this soil moisture sensor i try to modify to use lipos instead of batteries (https://wiki.aprbrother.com/en/ESP_Soil_Moisture_Sensor.html) but i observed same behavior with an Sparkfun ESP8266 thing
  3. Yes, i use one the TP4056 based charging circuits with protection - the nodemcu is powered by a mcp1700 ldo regulator
  4. Yes i can create a picture when i'm at home. But the circuit is very straight forward. The charging circuit and the LiPo fuel gauge are connected in parallel to the battery. Battery out of the TP4056 is connected to the mcp1700. The connection to the nodemcu is only SDA/SCL and GND.

Without the LiPo Fuel Gauge connected, the current reading goes down to about 0.02 mA when the ESP is going to deep sleep. When I connect the Fuel Gauge, the current stays at 0.9 mA. When i disconnect the battery lead from the fuel gauge, the reading drops to 0.05 mA and stays there even if i reconnect.

I think there is some side effect between mcu / charger and FuelGauge but i have no idea what it could be.

Thank you!

from max1704x.

MoJo2600 avatar MoJo2600 commented on September 17, 2024

I tracked it down to be somehow related to the i2c bus. I removed the charging circuit and only left the ldo, nodemcu and the fuel gauge in place. When the nodemcu goes to deep sleep, i still have the 0.9 mA power draw. If i now disconnect the i2c lines, nothing happens. But if i do not connect the i2c lines in the first place, the current reading drops to the 0.05 mA that i would expect.

So i think there is something happening when the device is actually used. I tried to putt the fuel gauge to sleep, no effect, i tried to pull sda and scl high, before deep sleep, no change, i tried to pull sda and scl low before deep sleep, no change.

It is hard to tell, if this 0.9 mA power draw is there when the nodemcu is running or not, because of the fluctuating power consumption. Maybe it is a issue related to the deep sleep of the nodemcu. Maybe there is some data line, which is sinking current.

I really have no idea what could be the culprit.

from max1704x.

porrey avatar porrey commented on September 17, 2024

Do you have a plain/ordinary Arduino such as an Uno or another non-MCU device to try? Also, are you sure it is going into deep sleep mode? Perhaps one of the connections is causing it to fail to go into deep sleep mode.

I'll keep digging but nothing comes to mind right now.

from max1704x.

MoJo2600 avatar MoJo2600 commented on September 17, 2024

Ok, i think i figured it out. Maybe you're interessted in the result. The Lipo Fuel Gauge has pull up resistors on the i2c bus, directly connected to the battery input. As my NodeMCU ESP8266 is running on 3.3 V and the battery is delivering up to 4.1 V there was a small voltage potential that draws some current. I cut the trace between the battery and the VCC of the MAX chip and connected it to the 3.3 V of the NodeMCU. This dropped the current draw from 0.9 ma to 0.75 mA. Better but not satisfying.
I diged a little deeper and read, that i2c should only have one set of pull-up resistors on the SDA and SCL line. The ESP8266 seems to use the internal pull-up resistors on the SDA and SCL line. I disabled them and success, the current draw dropped from 0.75 mA to 0.08 mA and stays there.
I disabled the internal pull up resistors with this few lines of code

// Skip fuelgauge.begin(), as it calls Wire.begin(), which we call
// fuelgauge.begin()
Wire.begin();
digitalWrite(SDA, 0);
digitalWrite(SCL, 0);

from max1704x.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.