Best power saving mode - Much Deeper Deep Sleep ESP8266

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hi there, I'm Mike today we're gonna have a look at the esp8266 and the power-down mode When you're running the esp8266 On batteries is a very good idea to make the device sleep as much as possible to save power Deep sleep is the most powerful of all the sleep modes. In deep sleep mode it only consumes about 20 microampere But we're going to make the device hibernate at only 2 to 3 microampere That's 10% of the power consumption of the deep sleep mode I'm going to show you how to achieve this and also tell you why many makers fail to do it First off have a look at this ESP-01 We're going to demonstrate the same with an ESP-12F later in the video as well The sketch starts by turning on the LED for 2.5 seconds and then it goes in the deep sleep mode In this mode it only consumes around 20 microampere, just as described in the data sheets But look what happens when we remove the 10 K pull-up resistor Now it only consumes about 3 microampere That's close to about 1/10 of the power consumption We're going to refer to this mode as power-down mode We read about this in a forum post a few years ago, see the link in the description But we also found many makers trying it and not being able to recreate the power down mode And we wanna share what might be stopping many If we have a look at the minimal diagram on how to wire the esp8266 You clearly see that it must pull the CH_PD pin high CH_PD stands for Chip Power Down. A lot of modules labels it EN or CH_EN for Chip Enable We're just going to call it the enable pin to make it easier It is true that we need to pull this pin high for the ESP to operate but many of the newer esp8266 Modules have a pull-up resistor under the hood or the metal shield at least This is contradictory to what we see in the diagram and as a consequence We see many makers are not aware of this and still adds their own 10 K resistor Have a look at these esp8266 modules We have the ESP 12E 12F 12N and 12S as well as the 07S We also have the ESP-01 and ESP-01S If we use a multimeter We can see that the ESP-07S has a pull-up resistor or 12 K when we measure the enable pin and VCC The ESP-12S has the same pull-up resistor and also the ESP-01S The ES-01 on the other hand has no pull-up resistor Nor does the ESP-12E 12F or 12N So on these modules you need to add your own pull-up resistor according to the minimal diagram But on the modules ending with an S. There's no need to add it as it's built in There might be additional modules that have this pull-up resistor. So use your multimeter to check Here I oped the shield of an ESP-12S and here we can see the pull-up resistor On ESP-01S the resistor is located here That means that if you've been following the recommended wiring and added your own pull-up resistor with ESP-12S And then tried to remove the resistor to power down the module - it has no effect! Although you removed one pull-up resistor, there's still one there pulling the pin high, keeping the ESP enabled Additionally, it might not only be the modules that have been stopping you, but also the breakup boards have a pull-up resistor The ESP-01S. You can simply remove the resistor It's not recommended to remove the shield of the ESP-12S to remove the resistor, then it's much better to simply buy a different version But on the breakout boards on the other hand, you can just simply desolder it So let's have a look again at the ESP-01S Here we have removed the resistor It's currently in powered down mode so let's wake it up by adding the pull-up resistor then it turns on the LED for two and a half seconds and Then goes in the ordinary deep sleep We have to select microamps to see the deep sleep current It deep sleeps at 19 microampere But when we now put it in power down mode by removing the resistor, it only consumes three microampere Let's wake it up again. First, we have to set the multimeter back to milliamps to avoid overload (OL) Then we reconnect the pull-up resistor to wake it up The LED comes on again and the ESP goes into deep sleep at 19 microampere And again in power-down mode it only consumes three micro amps Let's do the same with an ESP-12F We removed the resistor on the breakout board and added our own on the breadboard Is the same sketch so the LED comes on for two and a half seconds Then it goes into deep sleep mode at only 18 microampere when we remove the pull-up resistor It goes into power-down mode at only 3 microampere, the same as the ESP-01S Here we demonstrate the same just without a multimeter This is perfect for battery-operated projects that spend much more time off than on and that need an external input to wake up Now you can truly run your IOT projects on a coin cell battery For tiny IOT projects we still love using the good old ESP-01 as long as we only need a few pins but for a lot of sensors that's enough An ESP-01 with a coin cell battery gives us a tiny footprint for our IOT devices But there's still one very important thing left If we have a sensor or a button triggering the enable pin that turns on the ESP We need to avoid that ESP shuts down before it's done doing what it's supposed to do Let's say you want to build a mailbox notifier there connects a button or a reed switch to the door of your mailbox Every time the door is open you want to send yourself a notification So we need to add a bit of circuitry to make sure the ESP do not shut down Until the notification is sent Although the door might be closed This is almost the same schematics that is posted in a forum post so Please see the link in the description as well first connect ground of the ESP to ground then connect me VCC to 3.3 volts and pull the reset pin high with a 10k resistor to avoid accidental reboots Let's connect a switch in between 3.3 volts and the enable pin in case you want to use a sensor that Outputs a low signal when it's not sensing anything make sure you connect a diode as well. So don't force the pin low later on If the button is pressed the enable pin is high and the ESP powers on But to avoid the ESP accidentally going into boot mode on start up we need to pull GPIO 2 and GPIO 0 high Connect a 1k resistor to the button as well We're gonna do the same for GPIO 0 but connected to the other side of the diode When the button is pressed enable pin GPIO2, and GPIO 0 are all pulled high Now there's just one final resistor we need to connect To avoid the enable pin will be left floating when it's not pulled high, add a 10k resistor to ground In your sketch. Make sure you tell GPIO zero to go high first thing when ESP is turned on Once you're done processing your code set the pin low to put the ESP in power-down mode This way when you press the button you start up the ESP then GPIO 0 is continuing to pull the enable pin high so the ESP stays on also when you release the button When your code then sets GPIO 0 low, it'll enter power-down mode There's only one more thing to consider What if the mailbox is full and the door can't be closed? As a failsafe after your set GPIO 0 to low tell the ESP to go into normal deep sleep mode If there's no problems the ESP will then go into power-down mode when it sets GPIO 0 low But if the external input is still keeping the module on it will as a backup go into deep sleep and that's the full circuit I'm gonna show you a blooper and a big no-no when using a hot air rework station Have a look at the breadboard. I was gonna remove the pull-up resistor but the breadboard is melting. I was in a hurry filming Luckily Chris, my brother is on vacation and will hopefully not notice He's still mocking me for when I cut the silicone mats and melted the cutting board Within 30 seconds of each other a few months ago
Info
Channel: DIY TECH BROS
Views: 50,341
Rating: undefined out of 5
Keywords: deep sleep, internet of things, eps8266 deep sleep, esp-01 deep sleep, esp-12e deep sleep, esp-12f deep sleep, esp8266 ch_pd, esp8266 coin cell battery, esp8266 sleep battery, esp best sleep mode, low power, deeper deep sleep, esp8266 deep sleep interrupt, esp8266 sleep mode, esp8266 sleep mode arduino ide, power down esp8266, esp-01, esp-01s, esp-12e, esp-12f, esp-12n, esp-12s, esp12 mod, esp-07s, best deep sleep esp8266, sleep mode, arduino, diy, electronics, hobby
Id: n_A_8Y4xNx8
Channel Id: undefined
Length: 10min 29sec (629 seconds)
Published: Sun Aug 18 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.