ESPCam deep sleep GPIO pins are powered?

I have an ESPCam, and want to use deep sleep, taking one picture of a meter once per day at midnight. I need to run an external LED because I seem to have broken the LED on mine when I soldered on a new header.

I noticed that the external LED on GPIO14 is lit up when the espcam is in deep sleep. i then put the espcam into deep sleep and measured the voltage on all of the espcam pins. To my surprise, almost all pins have 3.3v, and some have 1.0 or under. So it appears that on the espcam, the GPIO pins are mostly pulled high during deep sleep? That is not great for a deep sleep if you have anything connected to the GPIO pins. This is resulting in the external white LED that I added being turned on when the espcam is in deep sleep. The only pin that was pulled low in deep sleep was GPIO 12, so I am going to look to see if I can use that instead.

Has anyone else noticed this? Is it something that can be fixed in ESPHome, or is this specifically part of the dev board itself? It is not a branded board, just one of the espcam boards that you can get on ebay, aliexpress, amazon, etc.

Thanks for any info or advice.

I don’t know all the answers to this but you can try switching off gpio14 on_shutdown to at least get the desired LED state.

It’s also worth reviewing any special pin behaviours here (I assume it is an esp32?)

A link to the product and your config may help others provide more detailed help.

Thank you for the reply. I will give the on_shutdown a try later, but I suspect it will not actually shut it down for the deep sleep. It does not matter if the light is on or off, dim or bright, gpio14, and most of the other GPIO are pulled high once deep sleep is initiated on this espcam dev board.

I did change the LED to GPIO12, and changed to that pin in my YAML. That does exactly what I want, as GPIO12 has 0 volts on deep sleep. I think this is 100% on the dev board itself.

Re the product, it is just an espcam, purchased off aliexpress. It has no brand. They all look identical, regardless of the seller. But, it does make me wonder if there are different manufacturers of these esp32 cameras, and if there are different dev boards with different features, or are all espcam boards working with most GPIO pulled high when in deep sleep. It does seem like a poor design decision for battery saving.

I don’t yet understand the esp32 deep sleep fully. It seems that it completely turns off the esp32, and only the board itself has power. It appears that on this espcam dev board, removing power from the esp32 makes most of the GPIO go closed circuit. Maybe there is a way for the esp32 to instruct the board itself on what it should do when the esp32 is off? Maybe the on_shutdown can achieve this? I will give it a try.

This is the documentation for the espcam pinout.