Chat freely about anything...

User avatar
By donbrew
#95200 There is no need for the voltage divider going to A0, Just a 100K resistor works because the NodeMCU has an internal divider.

All of those statements about the ESP8266 not being able to handle more than 1 are based on the bare chip NOT the NodeMCU. The internal divider drops 3.3V to 1 volt add the 100K to it then it drops 5 volts to 1 volt. For a 3.3 Volt input no resistor is needed.

If you feed the NodeMCU 5 volt the internal regulator will supply 3.3 Volts to power sensors that need it.

The TP4056 with protection can charge a 4P battery pack. It does not need to be turned off like many people declare. I have 2 projects doing it today.
User avatar
By Sirquil
#95235 Another way to monitor battery:

SparkFun MAX1704x Fuel Gauge Arduino Library --
"The MAX17043/MAX17044 are ultra-compact, low-cost, host-side fuel-gauge systems for lithium-ion (Li+) batteries in handheld and portable equipment. The MAX17043 is configured to operate with a single lithium cell and the MAX17044 is configured for a dual-cell 2S pack.

The MAX17048/MAX17049 ICs are tiny, micropower current fuel gauges for lithium-ion (Li+) batteries in handheld and portable equipment. The MAX17048 operates with a single lithium cell and the MAX17049 with two lithium cells in series.

This Arduino library provides support for all four devices."

SparkFun MAX1704x Fuel Gauge Arduino Library

"LiPo batteries are a great way to power your projects. They're small, lightweight, and pack a pretty good punch for their size. Unfortunately, even the best batteries eventually run low on power and when they do it's often unexpected (and at the worst time). Don't be caught by surprise next time your board suddenly powers-down! The SparkFun LiPo Fuel Gauge connects your battery to your project and uses a sophisticated algorithm to detect relative state of charge and direct A/D measurement of battery voltage. In other words, it tells your microcontroller how much 'fuel' is left in the tank. The LiPo Fuel Gauge communicates with your project over I2C and an alert pin also tells you when the charge has dropped below a certain percentage." --from Sparkfun product page

Sparkfun product page

William