What is the current draw of a Wemos D1 mini board in deep sleep? And while connected to WiFi?
These are good questions when you are trying to power an ESP8266 board, like the Wemos D1 mini from a battery. As you know the best way to optimize power consumption is to use the deep sleep mode but not all boards are the same, even when talking about Wemos D1 mini boards. In fact the differences are big.
Here I will compare three boards during a cycle of activation and back to deep sleep. The boards connect to WiFi and send an HTTP request to a local server, then go into deep sleep. You will see screenshots of the current draw over time during the wake up time and the deep sleep below.
And if you read until the end you will also see how using ESP-NOW instead of regular WiFi could make data transmissions much faster and less power hungry.
All boards are connected to 3.3 volts directly on VCC pin.
When active and connected to WiFi to send some data over HTTP the consumption goes up to 77.88mA on average, with spikes of 182mA. See bottom right numbers on the screenshot.
During deep sleep the current is 9.05mA. Bottom right of the screenshot.
D1 Mini Pro
When active and connected to WiFi to send some data over HTTP the consumption goes up to 72.49mA on average, with huge spikes of up to 455mA.
During deep sleep the current is 179µA (0.179mA).
D1 Mini v3
When active and connected to WiFi to send some data over HTTP the consumption goes up to 70.61mA on average, with spikes of up to 182mA.
During deep sleep the current is 84µA (0.084mA).
D1 Mini v4
As requested in the comments (thank you Marius) I’ve added the latest version of this board, the D1 mini v4, to the comparison.
NOTE: The test is slightly different cause for the previous boards I used to ping a local API that I no longer have. This means the duration of the «active phase» is not comparable as I am using a different API. Current draw should be 100% comparable, both active and during deep sleep.
When active and connected to WiFi to send some data over HTTP the consumption goes up to 71mA on average, with spikes of up to 458mA.
During deep sleep the current is 135µA (0.135mA).
Best Wemos D1 Mini Board
|Board||Active time||Current draw|
|Wemos D1 mini||9.6s||77.88mA||9.05mA||182mA|
|Wemos D1 mini pro||9.3s||72.49mA||179µA||455mA|
|Wemos D1 mini v3||9.2s||70.61mA||84µA||182mA|
|Wemos D1 mini v4||–||71.36mA||135µA||458mA|
Clearly the best board is the Wemos D1 Mini v3: lowest power consumption in deep sleep (84µA), also lowest average while active (70.61mA) and reasonable spikes of 182mA.
Second best either the v4 or the pro but both have huge spikes when connecting to WiFi (~450mA). One possible reason to pick the pro is if you need an external antenna for extra range. One reason to pick the v4 is the USB type C connector. If none of those matter to you I think the v3 is a better choice.
Avoid the Wemos D1 mini at all costs, terrible deep sleep current draw, 100x more than the D1 mini v3.
But depending on the application it is probably better to focus on spending less time active instead of focusing on the lowest possible deep sleep consumption. Have a look at this battery life calculator and play with the different parameters. You will see that spending 9 seconds active, at 70mA or more, is the biggest factor. In other words: a battery won’t last very long regardless of the deep sleep consumption if it has to connect to WiFi frequently.
The problem with WiFi
The problem with WiFi is that it takes a lot of time to establish a connection. You can see that all boards take over 9 seconds before they go back into deep sleep. If you look at the lines at the bottom of the charts you will see two signals:
- Signal 0 goes
setup()part of the script starts and
LOWwhen entering deep sleep
- Signal 1 goes
HIGHwhen the WiFi connection has been established and
LOWentering deep sleep
So you can clearly see that establishing the connection is the most expensive part by far. Sending the HTTP request and waiting for a response is less than 300ms of those 9+ seconds. Which means it doesn’t matter what you do over WiFi later, connecting is expensive and slow.
And this is why ESP-NOW exists.
ESP-NOW is a protocol developed by Espressif that uses low power 2.4Ghz WiFi.
It allows communication between ESP devices and is much faster and less energy intensive.
It is important to note that all ESP boards support this protocol, including the ESP8266 and ESP32 (and of course all Wemos boards too).
So let’s do an experiment using the D1 Mini v3, as it was clearly the winner, but instead of connecting to a WiFi network and sending data over HTTP we are using the ESP-NOW protocol to send some info to a receiver:
Look at that, from 9 seconds to just 340 milliseconds with ESP-NOW. Isn’t that awesome?
Of course it has its cons. Connecting to a WiFi allows you to send data anywhere, over HTTP, MQTT, to a local server, to the cloud… Using ESP-NOW all you can do is send data to another device that has to be in WiFi range and you need to know its MAC address beforehand.
So it is not a silver bullet but if you really care about sending data and going back into deep sleep as quickly and efficiently as possible, and you don’t mind having another ESP device acting as the receiver then this is a massive improvement over regular WiFi.
I hope this was helpful. Feel free to leave a comment if you have any doubts, suggestions or if you just want to say hi.
PS: ESP32 analysis coming soon.
This is an updated and more detailed version of a previous article: Wemos D1 Mini: power consumption on deep sleep