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.
D1 Mini
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 active | Current draw deep sleep | Peak |
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
HIGH
when thesetup()
part of the script starts andLOW
when entering deep sleep - Signal 1 goes
HIGH
when the WiFi connection has been established andLOW
entering 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
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
Code? The default mode of sleep for the Wemos D1 Mini is modem-sleep- how did you put it into deep-sleep?
Hi Steve, I am using:
And then connecting pin D0 to RST so it can wake up from deep sleep.
Hola Salvatore. Gracias!
Thank you so much for this useful article! I just wish I’d read it first, I would have avoided buying v1.
Now I have bought D1 mini v3 (a clone sold by a german company), this board in deep-sleep drain 0.13mA (measured today). It will drain more than your D1 mini, but however a good value for battery supply.
Quizá voy a volver pronto para leer tu novidad sobre v4. Gracias de nuevo por ahora.
I am glad this was useful!!! Thank you Giove.
0.13mA is still really good. If you play with the battery life calculator you will see that a 3000mAh battery (with a 20% discharge safety margin) would power your board for 770 days in deep sleep. So what really matters now is how often you wake up from deep sleep and for how long. That’s why I find ESP-NOW so interesting.
For the next article I ordered a few ESP32 boards, will see how they compare in terms of deep sleep consumption.
See you around.
did you try with wemos S3 mini? according to the datasheet it should go to around 60uA
I haven’t tried that one, but it is on my list. My first experience with ESP32 has been with a few different dev kits and they are TERRIBLE in terms of consumption. So I will try the S3 mini next.
But anything in the uA range, instead of mA, should be good enough unless you want to use tiny batteries. Like a CR2032 button battery, then of course every single uA matters.
Hi Salvatore, do you have any analysis on the wemos d1 v4? I’m starting a project, have both v3s and v4s around and am trying to decide which I wan’t to run with. Thanks for your research!
Hey Marius, actually I just got a couple D1 mini v4 this week!! What a coincidence.
I also bought two S2 mini (ESP32), hopefully both are good enough in terms of deep sleep current.
Super busy right now but I will try and do a quick test and show the results on mastodon or something that doesn’t require much time.
Very cool, thanks for the blazingly fast response!
Thanks for this updated article, it’s really helpful when looking to run a temperature sensor for a long time. My question is about the charts: what tool/platform did you use for theses?
Hey Peter,
I bought a Nordic PPK II (Power Profiler Kit): https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2
It is a somewhat expensive tool, around 100€, but quite cheap compared to an oscilloscope or similar. It can measure very small currents like the ones we are dealing with here in deep sleep mode of the ESP boards.
And the software is the one that Nordic provides, I think the graphs look good.
It is not a perfect tool, I had some issues with the software on AMD platform but the workaround is just using a USB hub. I can live with that.
Based on your article I moved from D1 mini to the mini-pro and deep sleep current draw went UP from 4mA to 8mA !! I htink this just shows the variability between different manufacturers of the Wemos boards. I might try the mini V3 now ….
My mini-pro even had a bad issue with supply – it wouldn’t work from the battery supply – to either 3.3V or 5V and then someone pointed out to me a not on the supplier website that stated this is a «feature» of the latest mini-pro boards!! I had to short out a diode to get it to work.
Oh wow that is really bad!! 8mA instead of 179µA during deep sleep. Was that on 3.3V? Or through 5V? All my measurements were on 3.3V to bypass the voltage regulator, as those are usually pretty inefficient.
You can maybe post a photo of the board to compare, and also for reference so that other people don’t buy that particular board in the future.
I tried a power consumption test with a Wemos D1 Mini Pro and was getting 0.79mA for power consumption during deep sleep. Where did your purchase your boards. I think I might have a clone.
Just to clarify, are you connecting directly to the 3.3V pin? Or are you powering the board with the USB/5Volts?
All the measurements on this post are for the 3.3V input, to avoid using the voltage regulator. So that could be a very obvious reason for any discrepancy.
Having said that, mines were probably clones, as I bought them in Aliexpress. Also this was a few years ago, the boards might have changed.
let me give that a shot. I was powering using the 5v pin