ESP32-S3 A7670E (Waveshare) – Modem stops responding to AT commands after Deep Sleep

Hi everyone,

I'm currently stuck with a communication issue on a Waveshare ESP32-S3 A7670E kit.

The setup: Every 5 minutes, the ESP32 takes a picture and uploads it to AWS in chunks. The process works perfectly for the first cycle. After the upload, the system is supposed to enter sleep mode and wake up 5 minutes later to repeat the task.

The problem: Upon waking up, the A7670E modem no longer responds to any AT commands sent by the ESP32. It’s as if the serial communication is dead. However, if I connect the modem to a PC via Tera Term, it responds perfectly. The only way to restore communication between the ESP32 and the modem is a hard power cycle (unplugging the board).

What I'm looking for:

  1. Is there a way to programmatically "cut" the power to the modem (0A consumption) to simulate a physical unplugging?
  2. Are there specific pins or AT commands to properly reset the modem or the UART interface after the ESP32 wakes up?

Thanks for your help!

When you post your code in code tags someone will point out your error.

As a quick check, do you know there are various levels of sleep, and when returning from those levels various parts (mostly radios) that need to be re-initialized?

I can see both potential hardware and software issues. Please post an annotated schematic showing exactly how you built the project, and make sure all power sources are included. Also include links to the datasheets for any external hardware.

What happens to the PWRKEY, DTR, and related pins in your design? The problem may be related to how sleep is enabled. AT+CSCLK=1 or 2 enables sleep behavior, and some modes depend on the DTR pin state. If DTR is left floating or set incorrectly, the modem may never wake properly.

Hello,

I have a Waveshare ESP32-S3 A7670E board and I am working on a project that sends data over 4G once every hour.

I noticed that the 4G modem consumes a lot of power. Currently, I am unable to put it into sleep mode using the following code:

modem_uart_hal_send_at_command("AT+CSCLK=1", 1000);
digitalWrite(GPIO_MODEM_UART_DTR, HIGH);
gpio_hold_en((gpio_num_t)GPIO_MODEM_UART_DTR);

gpio_deep_sleep_hold_en();

I would like to know if you have any suggestions for putting the modem into deep sleep, or if you have a schematic/datasheet of the board’s power circuit so I can study possible ways to completely power off the modem between transmissions.

The modem currently consumes around 90% of the total energy, while I only need to use it once every 1–2 hours.

I moved your topic to a more appropriate forum category @biltheo.

The Nano Family > Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, when creating a topic please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

Hello,

I am following the instructions from official FAQ waveshare ESP32-S3 A7670E 4G regarding software power management for the onboard modem using GPIO 33.

My current hardware configuration is:

  • DIP Switch 4G: OFF
  • Power Source: VBAT (Regulated 4.0V / 3A supply)

I am using the code provided in the FAQ to toggle the power rail:

C++const int pin = 33;
void setup() {
pinMode(pin, OUTPUT);
Serial.begin(115200);
}
void loop() {
digitalWrite(pin, HIGH);
delay(10000);
digitalWrite(pin, LOW);
delay(10000);
}

The issue: > While the simple toggle works, the system crashes and reboots in a loop as soon as I add any UART communication or AT command sequence. The ESP32 returns a rst:0x8 (TG1WDT_SYS_RST) error.

It seems that activating the power rail via GPIO 33 causes a significant voltage drop (Brownout) during the modem's network attachment phase, which triggers the Watchdog Timer reset.

Questions:

  1. Is there a specific power-up sequence recommended to stabilize the voltage before starting UART communication?
  2. Should I add a decoupling capacitor on the VBAT/GND pins to handle the inrush current from the A7670E module?
  3. Does this specific hardware revision require GPIO 33 to be HIGH even if we only want to use the PWRKEY (GPIO 4)?

Thank you for your assistance.

Best regards

Your problem does not seem to related with the Cloud IoT and therefore has been moved to a more suitable category on the forum.

Does it brown-out without using the pin?

Pin 33 seems to be a special pin... SPI clock, with a resistor. Maybe the crash is due to another device programmed to use pin 33?

Schematic was in the Waveshare Resources for this device.

Looks like pin 33 is used for resetting the A7670 (so it looks like a brownout)