NodeMCU-12E and ESP8266 - low current mods to use LiPo battery

I have a NodeMCU-12E with ESP8266 transmitting temp and humidity once per minute with deepSleep enabled on the ESP.

Quiescent current is ca. 10mA with a short blip to ca. 80mA on Tx, using a 3.7v LiPo with 1N4001 dropper to the board 3v3 pin.

I’d like to get the current right down between Tx, so:

  1. can I cut the power tracks to the CP2102 USB to UART bridge chip once board programmed and working?
  2. presumably I’d need to reconnect that if I wanted/needed to reprogram?
  3. will disabling the CP2012 affect wifi operation? (the whole purpose of the exercise is to Tx once per minute)
  4. do I need to remove the on-board 5v to 3v3 regulator IC? Surely if powering direct to 3v3 pins there is no ‘back draw’ through it?

Sorry if these are daft questions, but my first project and so finding my way…!

No, perfectly reasonable.

Walnut92:

  1. can I cut the power tracks to the CP2102 USB to UART bridge chip once board programmed and working?

I suppose so, but very messy. Better to use the ESP-12 on its own as basically, you require nothing else that is on the NodeMCU.

Walnut92:
2. presumably I'd need to reconnect that if I wanted/needed to reprogram?

Use just the ESP-12 and connect a programmer to it when necessary - the CP2012 or CH340 module with the two cross-connected transistors. Like this module:

Walnut92:
3. will disabling the CP2012 affect WiFi operation? (the whole purpose of the exercise is to Tx once per minute)

The USB interface chip has nothing to do with the operation of the ESP-12 other than allowing a PC to "talk" to it. But you should not leave devices un-powered but with data connections still in place.

Walnut92:
4. do I need to remove the on-board 5v to 3v3 regulator IC? Surely if powering direct to 3v3 pins there is no 'back draw' through it?

There may be a few mA leakage through the regulator - depends on which one. Better to - use the ESP-12 on its own! :grinning:

Note that for programming, the ESP does not require much current at 3.3 V and the programming adaptor will generally handle this, but in WiFi operation, you should have a 470 µF or better capacitor (but of course, only need 6 V rating) across the 3.3 V supply at the module.

Are you saying that you get 10ma during deep sleep? If so, you may not actually be in deep sleep. The current drawn by the ESP8266 should drop to under 1ma.

I think it is possible for current to flow backward through the regulator, but I think it's unlikely to be that much. I don't know how the CP2102 is powered on this board. If it is unpowered, its TX and RX pins will sink current to ground if those lines are driven high by the processor.

You may want to look at Andreas Spiess' Youtube video on the power drawn in various sleep states by the ESP8266:

I dare say the ESP-8266 does drop to uA when well-managed, but it’s the rest of the NodeMCU board that I think is sinking the 10mA…

I’m not sure how relevant this is to your circuit, but I have a Wemos D1 Mini project, and in deep sleep it draws 100µA. But that uses a deepSleep(0) command because wakeup occurs from a physical event instead of time-based. My understanding is that the timer oscillator is not running, so current would be less than in your situation. But the 100µA number does include the regulator and the CH430 USB adapter. This is a genuine Lolin/Wemos product, so the regulator is probably pretty good. The LIPO is connected to the 5V input, so the regulator is running all the time.

Your current would be a bit higher because you have one oscillator still running, and might be higher if current is flowing back through your regulator, or if the CP2102 doesn’t sleep as soundly as the CH340, but 10mA still seems awfully high to me if the ESP8266 is actually in deep sleep.

The Spiess video says you have to follow the deepSleep command by a delay(100) for sleep to become effective. I don’t need that with deepSleep(0), but it may be necessary if using timed wakeup. I don’t really understand what that’s all about, but it wouldn’t hurt to include it just in case.

ShermanP:
The Spiess video says you have to follow the deepSleep command by a delay(100) for sleep to become effective. I don't need that with deepSleep(0), but it may be necessary if using timed wakeup. I don't really understand what that's all about, but it wouldn't hurt to include it just in case.

That's interesting, will certainly try this too. Thanks.

It looks like I was wrong about the deep sleep current of the NodeMCU-12E. In another video, Spiess says this part does have a 10mA deep sleep current due to other parts on the board. I assume that's mainly the regulator. So it seems your options would be to somehow remove or disconnect the current-hungry items, use some other part like the D1 Mini which doesn't have the sleep current problem, or perhaps find a way to turn off power completely between readings, which would make the sleep current irrelevant.

There's a thread on the EEVblog forum about using a small controller or an RTC module to switch power on periodically:

https://www.eevblog.com/forum/projects/cheap-ultra-low-power-rtc-to-periodically-wake-microcontroller-from-power-down/

But I think the best option might be to use a genuine Lolin D1 Mini instead of the NodeMCU. Lolin has a store on Aliexpress, and the genuine parts aren't very much more expensive than clones found elsewhere. But in my experience they take a while to arrive.

https://lolin.aliexpress.com

ShermanP:
But I think the best option might be to use a genuine Lolin D1 Mini instead of the NodeMCU.

Oh come on!

I have simply pointed out in #1 that if you do not want the current consumption of the regulator or the CP2102 or CH340, then do not use them.

Just go and get the basic ESP-12, perhaps one of the adapter boards (without the regulator) to make it convenient to use ,


Attach the capacitor recommended by Andreas and use a module - such as I cited - when you need to program it.

ShermanP:
I'm not sure how relevant this is to your circuit, but I have a Wemos D1 Mini project, and in deep sleep it draws 100µA. But that uses a deepSleep(0) command because wakeup occurs from a physical event instead of time-based. My understanding is that the timer oscillator is not running, so current would be less than in your situation. But the 100µA number does include the regulator and the CH430 USB adapter. This is a genuine Lolin/Wemos product, so the regulator is probably pretty good. The LIPO is connected to the 5V input, so the regulator is running all the time.

Your current would be a bit higher because you have one oscillator still running, and might be higher if current is flowing back through your regulator, or if the CP2102 doesn't sleep as soundly as the CH340, but 10mA still seems awfully high to me if the ESP8266 is actually in deep sleep.

The Spiess video says you have to follow the deepSleep command by a delay(100) for sleep to become effective. I don't need that with deepSleep(0), but it may be necessary if using timed wakeup. I don't really understand what that's all about, but it wouldn't hurt to include it just in case.

So, have moved to a D1 Mini board - not that I gave up with the nodeMCU, but D1 is smaller, cheaper and effectively the 'right' board for what I'm doing.

This has a quiescent current draw in my application, including powering the DHT22 of 0.4mA. Allowing for a once-per-minute Tx at ca. 100mA, I'm getting an average draw of about 1mA. This is powering from a 3v7 1S LiPo, via a 1N4001. I've added an electrolytic, to help support the Tx draw as the battery drains.

Curiously the addition of the delay(100) post the ESP.deepSleep(60e6) command seems to STOP the board going into deepSleep.

Also, although not 100% conclusive, the DHT22 appeared not to operate reliably off of the 3v3 board pin, and I recall reading something suggesting that it can be borderline at 3v3. So, that is now powered from the LiPo 'pre-1N4001' and has worked without glitch.

With the Wemos, you may be better off using its regulator instead of the diode to drop the voltage. It’s a low-dropout regulator, so will drop only about 0.2~0.3V when the battery is low, but can also deal correctly with the ~4.2V when the battery is fully charged. Your diode may be dropping as much as 0.7V, and will drop that at all times, so using the regulator might extend battery life. Let us know what you find.

Swap out that dht22 for an sht21 or similar. These are true 3.3V devices and have a very low standby current. If you switch them to “one-shot” mode they automatically go into deep sleep after each reading.

Have a look at my sensors here.

I agree with PaulRB about using the D1 Mini’s regulator instead of the diode. It is pretty efficient, and will give you 3.3V down to a battery voltage of 3.5V or so. And while this may not be possible, I wonder if the current draw using the regulator might actually be less than back-feeding 3.3V into the unpowered regulator.

Are you able to measure what portion of the total 0.4mA idle current is going to the DHT22 (and therefore how much is being used by the Mini)?

ShermanP:
I agree with PaulRB about using the D1 Mini's regulator instead of the diode. It is pretty efficient, and will give you 3.3V down to a battery voltage of 3.5V or so. And while this may not be possible, I wonder if the current draw using the regulator might actually be less than back-feeding 3.3V into the unpowered regulator.

Are you able to measure what portion of the total 0.4mA idle current is going to the DHT22 (and therefore how much is being used by the Mini)?

Good idea, and trying this. Overall current draw remains 0.3mA. The DHT22 is 0.03mA.

PaulRB - the low current draw was only dropping 0.4v across the diode, but agree that given regulator is low drop we seem to be in better place with that in play, and DHT22 straight off of the battery.