Comments (5)
Can you provide more details?
- Are you using a break-out board such as the LiPo Fuel Gauge from SparkFun?
- Can you send a link to your node-mcu board so i can get more info on it?
- Are you using a LiPo charger as well? If yes, which one?
- If you can send details of your circuit (diagram or photos) that would be helpful.
from max1704x.
Thank you, that you are willing to have a look.
- Yes, i use the LiPo Fuel Gauge from Sparkfun
- 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
- Yes, i use one the TP4056 based charging circuits with protection - the nodemcu is powered by a mcp1700 ldo regulator
- 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.
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.
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.
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)
- Clone max1743 address 0x76 wrong readings HOT 7
- Aliexpress 0x32 Clone Support HOT 16
- Use Wire1 HOT 1
- Stopping charge HOT 8
- Fuel Gauge at 0x32 HOT 1
- I'm having issues regarding showing the battery percentage. HOT 5
- Battery never shows more than 90% charge HOT 7
- ESP32 WEMOS LOLIN32 lite HOT 5
- Esp8266 Compilation Error HOT 1
- [Discussion] Wake doesn't wake instantly?
- Why read sensor error,What do I do HOT 2
- Library should not initialize I2C subsystem itself HOT 2
- Inconsistent values HOT 6
- Add ESP32 support HOT 1
- Question. Is ok with max17040 or 17041? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from max1704x.