UART Communication between ESP32 and SIM800L EVB v2 module

Below is my connection

TX -> GPIO 16 (RX)
RX -> GPIO 17 (TX)
VCC -> 5V 
GND -> GND

and my code is

#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

From here: GitHub - SharmaAshmit/ESP32-SIM800L: This project demonstrates how to use the ESP32 with the SIM800L GSM/GPRS module to send sensor data (temperature & humidity) to Firebase Realtime Database using AT commands via serial communication. · GitHub

This:

Important: SIM800L requires a stable 4V power supply. Do not power it directly from ESP32 5V pin.

And this:

ESP32 Pin SIM800L Pin
GPIO 26 TX
GPIO 27 RX
GND GND
4V Power VCC

I am using this module : SIM800L V2 5V GPRS GSM Module - Quad-Band with Antenna – QuartzComponents


I couldn't find the official datasheet of this board but i found this : https://ultra-lab.net/wp-content/uploads/2022/02/Ficha-tecnica-de-SIM800L-V2.0.pdf

Note : I am powering it via external source 5V 2A.

but still not getting any response of AT commands.

Bigger is not always better. Is it 5v tolerant?

Read the PDF you posted for power requirement.

try

// // 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

setup

for testing AT commands I used the ESP32 5V supply
when transmitting use an external 2amp supply

This is not the version 1, it has
EVB (Evaluation Board) = a bigger board version with:

  • Voltage regulator (can take 5V input)
  • SIM card holder
  • Antenna connector

So please check and what will be the exact wiring with ESP32, is connecting 3.3V with VCC mandatory?

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?

the SIM800L board show in post 6 has the following connections

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?

This is what I am using :
https://robu.in/product/sim800l-v2-0-5v-wireless-gsm-gprs-module-quad-band?gad_campaignid=17413441824&gad_source=1&gbraid=0AAAAADvLFWcrhznwXWcrOLPKUjGJiHZSr&gclid=CjwKCAjwtcHPBhADEiwAWo3sJlUCnyHeoQuvDhtwdDqeuuq9OMhBASzDFvJ1R1bfmOCLuvA12KLOUxoCnd8QAvD_BwE

looks identical to the one I used in post 6
power ESP32 5V to SIM800 board 5V
and ESP32 3.3V to Sim800 board VCC
connect both GNDs and the Tx and Rx

my SIM800 used 115200baud

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?

not sure what is going on
you should be able to connect

  1. the ESP32 to USB to power the ESP32 and for programming and serial monitor
  2. SIM800 VCC to ESP32 3.3V for interface logic power
  3. SIM800 5V to external 5V supply for modem power

e.g. ESP32 3.3V to SIM800 VCC and external Mega 5V to SIM800 5V

serial monitor output

at

OK
at+cgmi

SIMCOM_Ltd

OK
at+cgmr

Revision:1418B05SIM800L24

OK