#include <HardwareSerial.h>
HardwareSerial sim800(1); // UART1
#define RXD2 16 // ESP32 RX ← SIM800 TX
#define TXD2 17 // ESP32 TX → SIM800 RX
unsigned long lastCheck = 0;
void setup() {
Serial.begin(115200);
sim800.begin(9600, SERIAL_8N1, RXD2, TXD2);
Serial.println("SIM800 Communication Test Started");
}
void loop() {
// Auto send AT every 3 sec
if (millis() - lastCheck > 3000) {
Serial.println("Sending: AT");
sim800.println("AT");
lastCheck = millis();
}
// Read from SIM800 → Serial Monitor
while (sim800.available()) {
char c = sim800.read();
Serial.write(c);
}
// Send from Serial Monitor → SIM800
while (Serial.available()) {
char c = Serial.read();
sim800.write(c);
}
}
but i am not getting any response from the SIM800L module. I am using a dedicated 5V 2A external power supply for it and ESP32 is powered by USB, and have common GND. Why am I not receiving anything.
16:14:27.437 -> Sending: AT
16:14:30.442 -> Sending: AT
16:14:33.446 -> Sending: AT
16:14:36.420 -> Sending: AT
16:14:39.449 -> Sending: AT
16:14:42.461 -> Sending: AT
16:14:45.424 -> Sending: AT
16:14:48.435 -> Sending: AT
16:14:51.455 -> Sending: AT
// // SIM800L EVB ESP32 test using Serial2 (pins 16 Rx and 17 Tx)
// connect so
// SIM800 5V to ESP32 5V
// SIM800 GND to ESP32 GND
// SIM800 VDD to ESP32 3.3v
// SIM80 TXD to ESP32 pin 16 Rx
// SIM800 RXD to ESP32 pin 17 tx
// AT+CGMI returns the manufacturer's name
// AT+CGMM returns the MODEM model number
// AT+CGMR returns details of the software and model revision level
// AT+CGSN returns the MODEM's serial number
#include <Arduino.h>
// ESP32 example using HardwareSerial library to access Serial port 2 (pins 16 and 17)
// from https://programming.vip/docs/esp32-use-of-hardwareserial-library.html
#define SERIAL_BAUD 115200
HardwareSerial serial2(2);//Serial port 2
int distance = 0;
void setup() {
//Initialize serial port 0
Serial.begin(115200);
delay(3000);
//Initialize serial port 2
serial2.begin(SERIAL_BAUD, SERIAL_8N1);
Serial.println("\nSIM800 EVB to ESP32 Serial port 2 test");
}
void loop() {
while (serial2.available() > 0) {
uint8_t byteFromSerial = serial2.read();
Serial.write(byteFromSerial);
}
while (Serial.available() > 0) {
uint8_t byteFromSerial1 = Serial.read();
serial2.write(byteFromSerial1);
}
}
serial monitor output
at
OK
at+cgmi
SIMCOM_Ltd
OK
at+cgmm
SIMCOM_SIM800L
OK
at+cgmr
Revision:1418B05SIM800L24
OK
Is it necessary to connect the VDD pins to the ESP32’s 3.3V?
When I tried this for the first time, the ESP32’s internal regulator started getting hot. The ESP32 itself still works, but the SIM800L EVB module seems to have an issue now—its UART pins appear to be damaged. It no longer responds to AT commands or communicates, although the LED is still blinking normally.
I’ve purchased a new module, and I’d like to avoid damaging it. Could connecting the VDD pins to 3.3V have caused this problem? If so, what would be the correct way to power and connect the module?
5V is the main power supply for the board - connected to the ESP32 5V in post 6
VDD is the supply for the microcontroller interface logic (3.3V in the ESP32) - this is connected to the ESP32 3.3V (in the case of UNO which uses 5V logic I assume this would be connected to the UNO 5V - I have never tried this!)
however, there are SIM800 development boards which use different power connections, e.g. Using SIM800L with Arduino
if powering from an external 5V supply make sure you have common GND
can you give a link to the SIM800 board you are using?
Ok, instead of the previous issue, I’m facing a new one. Since this module doesn’t operate using USB power, it requires an external 5V 2A power supply. However, when I connect it to an external power supply and do not connect the 5V line to the ESP32 but with external power supply (only the 3.3V line is connected to VDD along with a common ground), the ESP32’s voltage regulator IC starts heating up.
The main problem is that I want to monitor the output on the serial monitor while simultaneously powering the module using an external power supply. But doing this causes the ESP32’s internal voltage regulator to heat up. I suspect this heating is due to the 3.3V pin connection and cause of damage of my previous module.
Can you suggest a solution so that I can both view the serial monitor and run the transmission at the same time without causing overheating?