0

I have a SIM800L module connected to Arduino Mega's Serial3. SIM800L is powered by 4.2V power supply and I have put a voltage divider between Arduino's TX3 and SIM800L's RX so that the voltage in the line stays about 2V. The TX line of the module is directly connected to Arduino's RX3.

The problem is that when I try to communicate with the module it responds fine but after some AT commands the module starts panicking and start sending random garbage. The code I'm using is a simple Serial to Serial code :

#include<SoftwareSerial.h>

#define mySerial Serial3
//SoftwareSerial mySerial(10, 11);


void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  mySerial.begin(38400);

}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

Output : enter image description here [This is with serial monitor set to 115200 baud rate]

enter image description here [The garbage values with serial monitor set to 9600 baud rate]

The solutions I have tried so far are :

  1. Put a 220uF cap between SIM800L's VCC and GND. (a 470uF tantalum cap is already included on the module but still to be safe)

  2. Tried various baud rates from 9600 to 115200 (the baud rate setting on the module is set to auto baud rate) but only 38400 works reliably.

  3. Tried to pull the RX3 line up on Arduino with a 100k resistor so that it doesn't float.

  4. Tried to put up to 5s delay between AT commands given to the module but it still goes into panic.

The thing I noticed is that if we enter some wrong command like ATD74xxxxxxxx (which calls a phone number) instead of with proper ending like ATD74xxxxxxxx; the module does the same thing which is spitting garbage values.

Can anybody help me with what is wrong with the module?

migrated from electronics.stackexchange.com Nov 13 '17 at 6:08

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Crystal on Arduino might be misbehaving – MaNyYaCk Nov 13 '17 at 5:55
  • Why are you limiting the Tx of the Arduino to 2V, I though the SIM800L used 3.7-4.2V? – Code Gorilla Nov 13 '17 at 15:19
  • As per this the Rx level of the module is less than 2.8V which I confirmed too (ran it with high voltage levels and it gave errors on AT commands). I don't know the exact reason why is it so but it does behave nice on lower voltage levels and wacky on higher levels. – Rutwij M Nov 13 '17 at 17:19
0

I believe GSM modules needs about 2A current for few operations. One of them is calling. Are you providing proer current?

  • I'm supplying it with a 3A buck converter which in turns is supplied by a 12V 10A bench power supply. Also there's plenty of capacitance on the VCC to compensate for surges so I don't think the power supply is an issue. – Rutwij M Nov 14 '17 at 5:58
  • It also doesn't depend on the operation. I just created a loop in which I send "ATI" command to get the module info and it runs for may be 5-10 times and then the error loop begins. I have also tried another SIM800L module of the same kind and it behaves the same so it's not a problem with that particular module. Another thing I tried is to use a similar module with SIM900A and it works fine(with 5V supply instead of 4.2V). I also tried to call the number from another phone and the module rings just fine so receiving calls is not a problem. – Rutwij M Nov 14 '17 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.