D1mini keeps reseting when using SIM800L

hi guys, recently i've been trying to connect a SIM800l module to my project. i've experience lots of problems but solved most of them by surfing and learning from the forum posts. but this last problem, i can't solve :expressionless:

here is what i use:
1- Wemos D1 mini (will change to Arduino Pro mini)
2- SIM800l module (url)

Sim800l has 5 pins (Vcc, RST, RXD, TXD, GND). here is what my connection looks like :
Vcc -> D1 mini 3.3v --> External PSU (4v) ---> PC PSU (3.8v)
RST -> not connected
RXD -> D8
TXD -> D7
GND -> D1 mini GND

at first, i've connected Vcc to D1 mini 3.3v pin and module started running no problem, then i noticed when ever i tried to receive SMS, D1 mini would restart itself. this kept happening i couldn't find out the problem. then i learned that the voltage and cuurent SIM800l needs is a little higher that what d1 mini can provide (url) then i change to an external power supply with 4v (500mA) output. that didn't change anything, still restarts kept happening. then i used an old PC power supply unit with 3.8v output. but this time d1 mini keeps restarting even before recieving any SMS.

here is my code :

#include <SoftwareSerial.h>

#define gsmRX 13               // GSM RX -- D8
#define gsmTX 15               // GSM TX -- D7
#define gsmRESET 2             // GSM RST -- D4
SoftwareSerial cell(gsmRX,gsmTX);
int baud = 9600;

void setup() {
  Serial.begin(baud);
  Serial.println("Initialising...");
  cellconfig();
}

void loop() {
  updatecell();
}

void cellconfig(){
  cell.begin(baud);
  delay(1000);

  cell.println("ATI"); //Check whether it has registered in the network
  updatecell();

  cell.println("AT"); //Once the handshake test is successful, it will back to OK
  updatecell();
  
  cell.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
  updatecell();

  cell.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
  updatecell();

  cell.println("AT+CREG?"); //Check whether it has registered in the network
  updatecell();

  cell.println("AT+COPS?"); //Check whether it has registered in the network
  updatecell();


  cell.println("AT+CMGF=1"); // Configuring TEXT mode
  updatecell();
  
  cell.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
  updatecell();
}

void updatecell(){
  delay(500);
  while (Serial.available()){
    cell.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(cell.available()){
    Serial.write(cell.read());//Forward what Software Serial received to Serial Port
  }
}

could someone please tell what have i done wrong here?

thanks in advance.

1 Like