Extreme Power-Save Mode: ESP8266 powered ON after External Interrupt

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2018
  • Have you ever wondered how to turn on ESP8266 using external interrupt? Build a battery powered amazon dash button or a lipo powered door bell using ESP8266 without putting the device in deep sleep? Here is your answer.
    This project is built using ideas at www.esp8266.com/viewtopic.php?...
    Arduino Code: github.com/debsahu/ESP_Extern...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 82

  • @jeffbornes3986
    @jeffbornes3986 4 ปีที่แล้ว +2

    Great info... keep up the good work. I got my ESP8266 to only draw 1.3 micro amps at "rest" WOW!
    Thanks

  • @WereCatf
    @WereCatf 6 ปีที่แล้ว

    That's a very clean and simple circuit to achieve this, not bad at all.

  • @BoundedAnimal
    @BoundedAnimal 4 ปีที่แล้ว

    Hey, thanks for this video, you knowledge is incredible. Could you please link to all parts used in this I'm struggling to find some of the parts. Also do you have a picture of the final soldered product? Thank you.

  • @zacsonskaria
    @zacsonskaria 6 ปีที่แล้ว +1

    Excellent tutorial. With this how long can it run on battery? (Assuming 5 to 10 wakeup in a day)

  • @Autotrope
    @Autotrope 3 ปีที่แล้ว +1

    I think I understand. It looks like you only need the diode and the toggle of gpio0 if you want the esp to remain active after your trigger goes low again. Otherwise if you can rely on the trigger to stay high for the entire time you are communicating, you can just pull-up gpio to high and not use it, and simply trigger ch_pd.
    Note that the esp-01s has ch_pd pulled high with onboard resistor. You'd need to un-solder that for the s model.

  • @erichertsens
    @erichertsens 7 หลายเดือนก่อน

    Thanks, very nice explanation, from the Dominican Republic

  • @bexroot634
    @bexroot634 3 ปีที่แล้ว

    Hey, thanks for this video, you knowledge is incredible

  • @dmitrygarmatyuk3831
    @dmitrygarmatyuk3831 6 ปีที่แล้ว

    is there any link on the exact board from the video? or similar cheap and prepared?

  • @jayare7750
    @jayare7750 5 ปีที่แล้ว

    I am kind of looking for something like this, but is there a way to make it into a door sensor that can wake up for just enough time to transmit data when a loop is opened and shutdown then do the same after its closed?

  • @adrianpunzano1675
    @adrianpunzano1675 3 ปีที่แล้ว

    Sólo me he logueado para darte las gracias, este video ha sido la respuesta a meses de preguntas frustradas. Me ayudó mucho, gracias. Un saludo.

  • @vks002
    @vks002 6 ปีที่แล้ว

    Hey Debashish, thank you so much for this circuit. I made it and it works fine. The only thing I noticed is that the bare bone ESP12E takes around 1.9 mA when CH_PD is pulled LOW while you mention that the current is around 3-4uA. Can you suggest what may be the reason behind it?

    • @vks002
      @vks002 6 ปีที่แล้ว

      I am at present not using any voltage regulator, I do plan to use 7333A though in the final version. I am at present driving the ESP via the power supply of the UNO and measuring the current going into the ESP.

    • @vks002
      @vks002 6 ปีที่แล้ว

      Thanks for clarifying, you're right. For some reason my ESP was drawing current, I reassembled the entire circuit and it behaves well now. The current draw is 2uA with CH_PD LOW. Thanks!!

  • @lucasbrenna2
    @lucasbrenna2 3 ปีที่แล้ว

    Hi, is it possible to use this sketch with the implementation of a wifi manager with captive portal? In which way is it possible to config same parameters, fore example the wifi ssid, wifi password, ip address and the mqtt credentials?
    I think that will be a very useful device for the IOT.

  • @dmitrygarmatyuk3831
    @dmitrygarmatyuk3831 6 ปีที่แล้ว +4

    Thank you. I like your solution. Could you kindly explain the wiring crosses:
    1) Green&Red line cross - connects or not?
    2) Blue&Red line cross - no connection, right?
    3) Blue&Green line (where diod) - connected, right?

    • @dmitrygarmatyuk3831
      @dmitrygarmatyuk3831 6 ปีที่แล้ว

      3.3V signal should be strong enough (>100mA) to start up the module? Or it's just control signal (

    • @dmitrygarmatyuk3831
      @dmitrygarmatyuk3831 6 ปีที่แล้ว

      Ok. I'm trying to repeat the project on nodecemu v2, made all connections, but task works once. How many Volts we should have on gpio0? Less than 3.3V due to diod voltage drop, right? I have 2,06V.

  • @hazzncrazy
    @hazzncrazy 5 ปีที่แล้ว

    hi there, im wondering if its possible to use 3 buttons with each one having independent task... example... 1 button sends an http request... another sends a diferent http request... by what i understand its resetting everytime it turns on and one task can be done.. am i wrong?
    or can you use this schematic with more than one button doing more than one task.

  • @clifforddicarlo9178
    @clifforddicarlo9178 ปีที่แล้ว

    How much energy (micro amps) does the periodic pulse generator consume? Is the pulse generator a simple "555" type timer?

  • @RAMBOTHECURIOUSGUY
    @RAMBOTHECURIOUSGUY 3 ปีที่แล้ว

    Hi can I use sw 420 closed vibration sensor with this ?

  • @dmitrygarmatyuk3831
    @dmitrygarmatyuk3831 6 ปีที่แล้ว

    Topic - to turn esp on upon external interrupt. What is the main difference ? 1)turn on from deepsleep 2) turn on from power off mode(some kind of relay on vcc). Why not use second variant?

  • @zerodegrekelvin2
    @zerodegrekelvin2 3 ปีที่แล้ว

    Good walkthru!! Thx.

  • @MrNams
    @MrNams 2 ปีที่แล้ว

    Can't we use D0 as input,i used and found that,initially it was high as i made it input pull up, when i made it low by momentary switch, it remained low? It took lot of time to find this bug.
    Please explain about this.

    • @MrNams
      @MrNams 2 ปีที่แล้ว

      @@debsahu7801 Yes NodeMCU

    • @MrNams
      @MrNams 2 ปีที่แล้ว

      @@debsahu7801 Yes but in setup i already configured pins for intention i wanted to, issue with GPIO016 is once we give it low,it continues to low

  • @dmitrygarmatyuk3831
    @dmitrygarmatyuk3831 6 ปีที่แล้ว

    Could you kindly advice how do you program the board? Seeking for solution to connect it via Nodemcu (or Uno/or Witty) which already has 3,3V and usb for PC.

    • @photon-1
      @photon-1 5 ปีที่แล้ว

      www.aliexpress.com/item/ESP-12F-burning-fixture-development-board-ESP8266-without-ESP-12F-module/32812849093.html

    • @photon-1
      @photon-1 5 ปีที่แล้ว

      @@debsahu7801 Agree. I have both. But if you want just "plug-and-play" this is the solution. IMHO.

  • @winchesterlyon
    @winchesterlyon 5 ปีที่แล้ว

    Hi.. Great video.. Thank you so much for making it.. Can this work with a ESP-01S? If so, what would be different?

    • @winchesterlyon
      @winchesterlyon 5 ปีที่แล้ว

      I have a project what I've had already purchased the esp-01s for. I'm also using batteries and will need to save energy as much as possible. I found a way to cut down the energy consumption by making turn off instead of just deep sleep. The shut-off process is quite similar to the deep-sleep process, except that, while deep-sleep still consumes 7mA during the processes, the shut-off consumes nothing. The example of this method is shown in this video: th-cam.com/video/pPd362tRx5o/w-d-xo.html.
      For deep-sleep to work I need GPIO16 to connect to Rst, but for shut-off, I need 2 GOIP pins and I think 14 and 16 should work fine for it. Those two pins are the easiest to get to on the ESP8266EX chip so I'm planning on doing those.
      I have to do this for 23 ESP-01S and don't have enough time left to purchase the esp-12 to replace them. So, now I'm just looking for the easiest way to get this done.
      I noticed that you spoke of two ways to add the extra GPIOs, but you only showed one way. I think you said the way you showed was the harder way. Am I mistaken on this?

    • @winchesterlyon
      @winchesterlyon 5 ปีที่แล้ว

      What diode did you use?

    • @easynow6599
      @easynow6599 4 ปีที่แล้ว

      ​@@debsahu7801 i want to do the wake up on external interrupt to a esp01 because i want to have it really small.. i already managed to connect to a sensor with i2c..
      so, how can i use PCF8574 to have access to other pins that i need for the interrupt?
      from the description i can understand that you connect PCF8574 with i2c to esp01 and in this way you can access the GPIO12 to put the interrupt?

    • @easynow6599
      @easynow6599 4 ปีที่แล้ว

      @@debsahu7801 thank you!

    • @mikeharmon8733
      @mikeharmon8733 4 ปีที่แล้ว

      @@debsahu7801 On ESP-01S, you also have Tx and Rx, which are GPIO-1 and GPIO-3 respectively.
      You could easily read 1 or 2 sensors, 3 if you disable the Blue LED.
      Am I misunderstanding?

  • @kitingboarding
    @kitingboarding 4 ปีที่แล้ว

    This is great and really useful. I have the system working nicely with a button to give the 3.3v. But when I connect a PIR sensor that outputs 3.3v it won't trigger the esp8266 to switch on. On the scope the on peak is really noisy so I added a diode and it cleans it up but still won't trigger the esp to turn on and drop the voltage below 3.0v. Tested with AM312 mini PIR, HC-SR505 PIR and HC-SR501 PIR. Give the same result. What am I diong wrong?

    • @kitingboarding
      @kitingboarding 4 ปีที่แล้ว

      @@debsahu7801 Thank you for the super fast response. The 10k resistor reduces the width of the choppyness of the PIR high signal but still won't go above 3v and trigger esp on. If I add a diode in series it cleans up nicely but the voltage then drops to 2.7. the voltage coming from the PIR is a good 3.3 when tested on it's own as do the others I have and tested. I'm not sure what to do. I will try and amplify the signal with 2n2222... ?

  • @guidolongoni
    @guidolongoni 5 ปีที่แล้ว

    Hi, I did some testing because I struggle to find clear detailed information about internal GPIO electrical specifications. It seems that the "CH_PD" enable pin has a pullup resistor of 12 KOhm. Maybe it's just the board (I used the ESP01 one by Ai-thinkers), but with this configuration, if I connect CH_PD to GND, I see a constant current flow from the pin to GND of 290 μA. Much higher than deep sleep current. Does this mean that keeping the ESP off by using the CH_PD pin is not a power saving effective solution? Thank you very much.

    • @guidolongoni
      @guidolongoni 5 ปีที่แล้ว

      Ok, no problem. Thank you for the superfast response! If I discover something new about this I'll let you know in the comments.

    • @guidolongoni
      @guidolongoni 5 ปีที่แล้ว

      I dug further into it and now I'm pretty confident that the pullup resistor is placed right on the ESP01S board.

    • @friedrich1277
      @friedrich1277 4 ปีที่แล้ว

      Guido I have the same problem with my ESP 01S board. Do you find a solution? Maybe removing the CH_PDs pull up resistor?

  • @Bianchi77
    @Bianchi77 ปีที่แล้ว

    Nice info, thanks for sharing it :)

  • @iotguy2423
    @iotguy2423 5 ปีที่แล้ว

    Debashish well explained,can you make a video on flashing esp 12E

    • @iotguy2423
      @iotguy2423 5 ปีที่แล้ว

      @@debsahu7801 ESP8266-12E CH VCC ->FTDI VCC, RX -> FTDI TX, TX ->FTDI RX, GIPO 15 GND -> FTDI GND When I hold GPIO0 to GND the LED turns on continues blue and cannot flash

    • @iotguy2423
      @iotguy2423 5 ปีที่แล้ว

      @@debsahu7801 thanks

  • @sadevkalubowila21
    @sadevkalubowila21 4 ปีที่แล้ว

    Debashish Sahu.. Can you please explain how to set ip,gateway and subnet? I'm a beginner of those things. If you can explain with a example , it will really helpful. And can you tell whats the difference of ethClient and WiFiClient? I'm asking all about coding part.

  • @HardcoreMusik
    @HardcoreMusik 4 ปีที่แล้ว +1

    Hello. Do you measure the current and compare deepsleep with your CH_EN trick ? If CH_EN was pulled down with an resistor to GND and i disconnect 3,3V from CH_EN the ESP-07 not fully switched off ! A simple test sketch with LED on will show that the LED lights a little bit ! No connection to a gpio or other components where used. If the CH_EN is not connected to GND with resistor and i pull of the 3,3v from CH_EN the ESP will switch off. Currecnt in deepsleep is 0,015mA with this CH_EN trick with resistor 0,020mA and without resistor 0,002mA (i think)
    But you can not leave the resistor, GPIO also connected to GND if they set to LOW ? If i tested it with an GPIO only it was the sam. The LED is not fully of.

  • @lucasbrenna2
    @lucasbrenna2 4 ปีที่แล้ว +1

    Hi, very good.
    I am trying to use a wemos d1 v.3.0.
    I can modify the circuit?

    • @lucasbrenna2
      @lucasbrenna2 4 ปีที่แล้ว

      @@debsahu7801 thanks for the answer.
      What about the esp 01s?

  • @lelandclayton5462
    @lelandclayton5462 3 ปีที่แล้ว

    Any reason why to use a 1000uF and not something lower?

  • @victorsantos2354
    @victorsantos2354 4 ปีที่แล้ว

    is it possible to connect multiple buttons for multiple signals... each sending a diferent message to mqtt
    thx

    • @victorsantos2354
      @victorsantos2354 4 ปีที่แล้ว

      @@debsahu7801 hi Debashish, would it be possible if you could help me out with a similar layout but using the d1mini with 3 buttons sending an http request? thx mate.

  • @christofferschmidt2995
    @christofferschmidt2995 5 ปีที่แล้ว +2

    If you have problems with the circuit not turning off, try adding a 10k pulldown resistor to GPIO12 --> ground. Had an issue with letting GPIO12 floating after the signal has endded. Hope it helps someone with the same problem. Did it for me.

    • @christofferschmidt2995
      @christofferschmidt2995 5 ปีที่แล้ว

      @@debsahu7801 No I mean from GPIO12. As letting it float might make the chip stay online. Because the chip keeps thinking it is HIGH. However if pulling it to ground, this stops from happening. Did if for me on a ESP12F with a limit switch attached instead of a PIR. Edited comment above.

    • @christofferschmidt2995
      @christofferschmidt2995 5 ปีที่แล้ว

      @@debsahu7801 imgur.com/a/NzzCTZv uploaded a img of what i did. Hope it makes sense.

    • @christofferschmidt2995
      @christofferschmidt2995 5 ปีที่แล้ว

      @@debsahu7801 Thanks alot. You have been a great help.

    • @IOANNISLEFTHERIS
      @IOANNISLEFTHERIS 2 ปีที่แล้ว

      @@christofferschmidt2995 Thanks for the help!

    • @UnKn0wn_Id3n717Y
      @UnKn0wn_Id3n717Y ปีที่แล้ว

      Thx for the comment. I don't know why so a common problem is not in this video.

  • @darkovulin1114
    @darkovulin1114 4 ปีที่แล้ว

    Great

  • @DesignitBuilditRepairit
    @DesignitBuilditRepairit 6 ปีที่แล้ว

    Is there any way or anybody you can tell me how I can add this to homeassistant to show up in the dashboard the configurator file

  • @campanariodiademaadbsetor2607
    @campanariodiademaadbsetor2607 5 ปีที่แล้ว

    Excelente aula mas você não terminou..mas parabéns por iss9 te dou 10.000 likes

  • @yawarsaeed6499
    @yawarsaeed6499 5 ปีที่แล้ว

    Good project.
    Sir, can you please confirm, do I need to set up local mqtt broker for this .
    Please reply, how to get this done.
    Thanks

  • @DesignitBuilditRepairit
    @DesignitBuilditRepairit 6 ปีที่แล้ว

    Is there a way to send a message back to home assistant after the signal has dropped saying it is cleared again

    • @DesignitBuilditRepairit
      @DesignitBuilditRepairit 6 ปีที่แล้ว

      drive.google.com/open?id=1SE20i0ZCu1bYyM_Y532ppEoquFF51DBO

    • @DesignitBuilditRepairit
      @DesignitBuilditRepairit 6 ปีที่แล้ว

      and thanks for the help i would email you but no email listed and tried hangout too

  • @simonray4713
    @simonray4713 ปีที่แล้ว

    Can I use 220uf 25v instead of 1000uf in your diagram?

    • @debsahu7801
      @debsahu7801  ปีที่แล้ว +1

      Sure, see if you experience brownouts.

  • @bravemadoun6729
    @bravemadoun6729 4 ปีที่แล้ว

    Please, how can I use the ESP8266 ESP-12E with Arduino Mega? thank you so much

  • @Ed19601
    @Ed19601 6 ปีที่แล้ว

    Interesting but the usefulness is limited as you are depending on an external signal. That's fine if you use a pir, but not really possible if say you want to read a DHTxx sensor

    • @Ed19601
      @Ed19601 6 ปีที่แล้ว

      Debashish Sahu Yes. Don't get me wrong it is a great solution for the right project. Apart from what you mentioned say a 'you got mail' indicator on yr letterbox comes to mind or any other application where a switch is monitored

    • @ehink2716
      @ehink2716 5 ปีที่แล้ว

      Debashish Sahu can this be used with a motion sensor or a temp sensor or power meter

    • @weirjwerijrweurhuewhr588
      @weirjwerijrweurhuewhr588 4 ปีที่แล้ว

      Can't you just do a periodic wake up using an external RTC?

  • @songshu576
    @songshu576 ปีที่แล้ว

    I'm confused, why is there still a current of 3ma after EN is pulled down?

    • @debsahu7801
      @debsahu7801  ปีที่แล้ว

      Usual draws are resistors and LEDs. Solder the LED out of ESP8266.

    • @songshu576
      @songshu576 ปีที่แล้ว

      @@debsahu7801 Thank you for your reply, I will try.

  • @lionux6506
    @lionux6506 หลายเดือนก่อน

    👍🏻

  • @chriskolann2397
    @chriskolann2397 6 ปีที่แล้ว

    Please take into consideration that ESP8266 takes about 80 mA of current only when the WiFi circuits on the chip are turned on and they are in the idle state. In the active state consumed current may increase considerably. ESP8266 takes typical 215 mA when transmitting data and this still not the possible maximum value which may be even 300 mA. Take a look at www.esp8266.com/wiki/doku.php?id=esp8266_power_usage

    • @chriskolann2397
      @chriskolann2397 6 ปีที่แล้ว

      Sure, but the used regulator HT7333-A might not provide enough current for transmitting data in the worst case scenario.

    • @chriskolann2397
      @chriskolann2397 6 ปีที่แล้ว

      Thanks, for clarifying. By the way, you may use ESP8266 also without the voltage regulator. Most modules will work stable with the voltage as low as 2.2 V. When used with two lithium AA batteries with the initial voltage of about 3.4 V you might achieve one year of work until the voltage drops below 2.2 V.

  • @venkateshgovindaiah5826
    @venkateshgovindaiah5826 2 ปีที่แล้ว

    I know this video is more than 2 years old. I have couple questions here but let me start with question #1) Where in your code are you putting the module into deep sleep? I just don't see it . Simply shutting down Wifi module does not offer you max power save.

    • @venkateshgovindaiah5826
      @venkateshgovindaiah5826 2 ปีที่แล้ว

      @@debsahu7801 first off, thumbs up for an awesome video tutorial, I know it takes a lot of effort to make one. Sendondly, appreciate the fact that you respond to questions so promptly. Kudos my friend. Regarding the above statement by me some time back, what I meant is, I don't see ESP.deepSleep(0) code anywhere. All I see is, @ line #80, you are setting GPIO 0 to LOW when the signal at pirPin = 0 (GPIO 12) . When the 3.3v (@ signal end) is off GPIO 0 is pulled LOW and this will pull EN/CHPD LOW with it. Why are you setting GPIO 0 = LOW explicitly. Can you share a working demo? Please educate me here if I am misunderstanding. Thanks in advance :-)

  • @nemat770
    @nemat770 11 หลายเดือนก่อน

    ok

  • @shrikantnikam2426
    @shrikantnikam2426 4 ปีที่แล้ว

    Copy and paste of Andrew species