Can the ESP8266-01 be put on sleep mode while connected to arduino uno?

This is my first post here so I'm not sure if this is the correct place to put this question, so here it goes.

I'm working on a project using arduino uno and an ESP8266-01 module connected to the arduino (VCC and CH_PD to 3.3V, RXD to D1 with voltage divider inbetween [1k and 2.2k resistors], TXD to D0, and GND to arduino's GND). I've been looking for a way to put the ESP in deep-sleep mode (which I know also requires me to solder the ESP's Reset pin to its own extremely-tiny GPIO 16 pin), but all the code I've seen uses the ESP.deepSleep() method from the ESP8266WiFi.h library which, as far as I know, requires me to set the Board setting in the Arduino IDE to "Generic ESP8266 Module", leaving me unable to upload the code to the arduino.

My question is, is there any code that lets me put the ESP in sleep mode through the arduino? Or is it impossible?

I've also tried to connect the VCC and CH_PD pins to one of the arduino's digital pins (with the 1k and 2.2k resistors voltage divider in between) to be able to turn it on and off through code, and other combinations like both pins to two different digital pins, or the VCC in the 3.3V and the CH_PD to a digital pin, or the CH_PD to the 3.3V and the VCC to a digital pin, but the ESP either doesn't work correctly (my phone doesn't detect the wifi signal) or it doesn't even turn on at all. Any suggestions if the deep-sleep mode is unavailable?


OK, few points here:

  • If you have an ESP8266, why oh why would you want an Arduino? The ESP is far more powerful in itself and it is a painful matter indeed to interchange commands between Arduino and ESP. Clearly if you want plenty of I/O, there are other ESP modules which provide them. The WeMOS D1 Mini is a particularly useful variant with a modest number of I/O. If you want more, use port expanders.
  • Why would you want to put the ESP to sleep without the Arduino also sleeping?
  • You did not mention which Arduino; presumably a Nano or perhaps Pro Mini? UNOs are not useful for most "real world" projects; too weird a form factor! :roll_eyes:
  • Connecting ESP Vcc to an Arduino pin makes no sense for a start. It is the power supply pin! You must connect it to a 3.3 V power supply with a decent impulse capability. If the Arduino variant has an actual 3.3 V regulator, it may be a usable source, perhaps with the addition of a 1 mF capacitor. For testing at least; as before pointed out, it makes little sense to use both microcontrollers.
  • Yes, rather than deep sleep, you can use CH_PD to simply power down the ESP until you need it. That is a perfect way to do battery-powered devices (two 1.5 V alkaline batteries of some sort).