[SOLVED?] GSM Board and Arduino not working on External Power

I actually have this problem with my SD Card reader too. I have an external power supply, (A 5V, 2A tablet charger) to the SD CCar reader and my GSM Board. I can solve the problem with the SD Card by using a transistor to feed the charger voltage into the SD Card reader when the arduino is powered on. However, this does not work for the GSM Board. The GSM board wants to be connected to Arduino ground before it will turn on when powered via transistor. So I connect eh 5V directly to the board, and GND to GSM GND, and it will turn on. Great, right? Well, the problem arises when I want to use the board. Using the AT commands, I get an output of "ÿ". The baud rates work for both Serial objects so Serial isn't the problem. Then, I tried fixing this by connecting everything to the external power. Power the arduino, gsm and SD Card Reader all by the charger. (By external I mean non-computer USB) However, the GSM will then only send and SMS every so often, seemingly random at times. It will output to Serial that it sent, and light up the LED that it is sending, and consequently sent, but I will never get the message

TL;DR:

  • Arduino, GSM Board and SD Card do not communicate well, if at all, on separate power sources
  • GSM Board does not want to work on external power with transistor to control on/off with arduino
  • GSM, Arduino on same external power, GSM not always sending SMS though tells Arduino it did.

Arduino: Arduino Uno R3 GSM Board: SIM800L EVB V2.0 SD: MicroSD; Brand unknown. Came with a 3D printer Power Requirements: 5V, maximum 2A

The GSM board wants to be connected to Arduino ground before it will turn on when powered via resistor.

You should not power anything via a resistor apart from an LED. Certainly not an SD card or GSM board.

The baud rates work for both Serial objects so Serial isn't the problem.

You can not make that conclusion it does not make sense.

I get an output of "ÿ"

Looks like you are reading an empty buffer.

You description of what you have done is very difficult to follow. You need to post schematics of the different configurations, please do not use Fritzing.

You also need to post your code.

Please read this:- How to use this forum about how to post code here.

Grumpy_Mike:
You should not power anything via a resistor apart from an LED. Certainly not an SD card or GSM board.

You can not make that conclusion it does not make sense.
Looks like you are reading an empty buffer.

You description of what you have done is very difficult to follow. You need to post schematics of the different configurations, please do not use Fritzing.

You also need to post your code.

Please read this:-
How to use this forum about how to post code here.

Whoops, I meant transistor, I fixed that in the post. Also it is most definitely not a coding problem. This I know becuase the exact same code works when it is one on one with the GSM Board, and the GSM Board is connected to 5V Arduino. Also, I know the baud rate is the 9600 otherwise it wouldn’t work in the configuration I just mentioned. That one I did not include in the files.
Config1 - All connected to Arduino 5V supply, GSM Board restarts after network light flashing 7-9 times, and nothing can be sent to it.
Config1.5 -SD Card will fail to begin, GSM starts up, will not communicate with Arduino
Config2 - Reader and GSM on external power, through transistor when Arduino power is on. GSM will not turn on
Config3 - Same as config2, except External power ground and Arduino ground connected. Same result as Config 1
Config4 - Arduino 5V connected to external 5V, GND to GND, and everything connect except the GSM will respond to AT, but any AT+ commands return as AT+ERROR. Sending SMS is only working sporadically.

The following code is not for the SD card because I am not having trouble with that specifically. It is only to test the GSM Board. It works fine in Config5. This is how I know it isn’t code or baud.

#include <SoftwareSerial.h>

SoftwareSerial serialAT(5,6);

void setup()
{
    pinMode(A0, OUTPUT);
    Serial.begin(115200);
    delay(2000);
    serialAT.begin(9600);
    
    Serial.println("Done");

    Serial.println("Setup Complete!");
  Serial.println("Sending SMS...");
   digitalWrite(A0, HIGH);
  //Set SMS format to ASCII
  serialAT.write("AT+CMGF=1\r\n");
  delay(1000);
 
  //Send new SMS command and message number
  serialAT.write("AT+CMGS=\"xxxxxxxxxx\"\r\n");
  delay(1000);
   
  //Send SMS content
  serialAT.write("Hello");
  delay(1000);
   
  //Send Ctrl+Z / ESC to denote SMS message is complete
  serialAT.write((char)26);
   digitalWrite(A0, LOW);
  delay(1000);
     
  Serial.println("SMS Sent!");
}

void loop()
{
   if(serialAT.available())
   {
      Serial.write(serialAT.readString().c_str());
   }
  
    if(Serial.available())
    {    
      serialAT.write(Serial.read());
    }
}

OK, here are your diagrams:
f70067cbbb4536d5f9aa6714d136579b08baf914.pngd5586ab19c7bd43b21c54d27484bc0c13dde7580.pngd0c57f0a58a053cf26fcddcf7ce66743f32f61a6.png6123311f1cce459e01a38bd0540eadf51ddd1ba3.png513afed40af0f3e93a327d3fc3e3c7ba9aad4fa6.png804d7ab4ba00cd24d3193c7948cd9a38e63f9a80.png

Paul__B: OK, here are your diagrams:

Yes?

Well to be honest I can’t make much of them.

However when you switch the 5V like that you will only get 4.3V to the device. This is because that switch is a voltage follower and there is a 0.7V drop between the voltage on the base and that one on the emitter. Not sure if that is giving you the problem.

Grumpy_Mike:
However when you switch the 5V like that you will only get 4.3V to the device. This is because that switch is a voltage follower and there is a 0.7V drop between the voltage on the base and that one on the emitter. Not sure if that is giving you the problem.

I actually found another solution, which is to provide the arduino 12V 1plus amps via the barrel jack. This solves the issue of power. However, it doesn’t solve my GSM board issue of sending sporadic messages. Having everything on the same 5V in from the wall charger works the same as the barrel jack so I know power doesn’t cause this issue. My other option could be to use a relay if I were to be so inclined to use a switch… But it doesn’t seem necessary. The GSM board will send out a message about every 50-70 seconds. Not a perfect minute. Sometimes over a minute, sometimes less then a minute. But the new code I have it cycling every ten seconds to send an SMS. The variation may be from my sendSMS() function but it shouldn’t be that big of a difference. Especially because it should be sending about every10-15 seconds.

#include <SoftwareSerial.h>

SoftwareSerial serialAT(5,6);

void setup()
{
    pinMode(A0, OUTPUT);
    Serial.begin(115200);
    serialAT.begin(9600);
    
    Serial.println("Done");
    while(true)
    {
        serialAT.write("AT\r\n");
        while(serialAT.available()<=0)
        {
        }
        String temp0;
        while(true)
        {
            char t;
            t = serialAT.read();
            if(t == '\r')
            {
                serialAT.read();
                break;
            }
        }
        while(true)
        {
            char t;
            t = serialAT.read();
            if(t == '\r')
            {
                serialAT.read();
                break;
            }
            else
            {
                temp0 += t;
            }
        }
        Serial.print("Setup output: ");
        Serial.println(temp0.c_str());
        if(temp0 == "OK")
        {
            break;
        }
    }
    Serial.println("Setup Complete!");
    delay(2000);
    Serial.println("Sending SMS...");
    sendSMS();
}

void loop()
{
   while(serialAT.available()>0)
   {
      Serial.write(serialAT.read());
   }
   Serial.println(" ");
  
    if(Serial.available())
    {    
      String temp = Serial.readString();
      if(temp == "sendsms\n\r" || temp == "sendsms\r\n")
      {
          sendSMS();
      }
      else
      {
          serialAT.write(temp.c_str());
          Serial.print("FRom you: ");
          Serial.println(temp.c_str());
      }
      
    }
    delay(10000);
    sendSMS();
}

void sendSMS()
{
     digitalWrite(A0, HIGH);
  //Set SMS format to ASCII
  serialAT.write("AT+CMGF=1\r\n");
  delay(1000);
 
  //Send new SMS command and message number
  serialAT.write("AT+CMGS=\"xxxxxxxxxx\"\r\n");
  delay(1000);
   
  //Send SMS content
  serialAT.write("Hello");
  delay(1000);
   
  //Send Ctrl+Z / ESC to denote SMS message is complete
  serialAT.write((char)26);
   digitalWrite(A0, LOW);
  delay(1000);
     
  Serial.println("SMS Sent!");
}

elDEv: I actually found another solution, which is to provide the Arduino 12V 1plus amps via the barrel jack.

You're kidding! :roll_eyes:

Paul__B: You're kidding! :roll_eyes:

Still doesn't solve my GSM board problem.

Providing 12 V to the "barrel jack" is basically useless! The on-board regulator can barely pump out 100 mA or so before overheating and - if you are lucky - shutting down.

Paul__B: Providing 12 V to the "barrel jack" is basically useless! The on-board regulator can barely pump out 100 mA or so before overheating and - if you are lucky - shutting down.

Well I haven't exactly gotten a better alternative from anyone, have I?

Did you read the "how to post" sticky.

How are we able to help you if we don't know which Arduino you have, which SD card, and which GSM board. Did you work out the power requirements for each of them. The transistor is another mystery. GSM board powered by an emitter follower? The diagrams are nothing more than block diagrams. Leo..

Wawa: How are we able to help you if we don't know which Arduino you have, which SD card, and which GSM board.

Updated my post to include this. My bad I thoughr I included it. Got too rushed and frustrated with the problem.

Wawa: The transistor is another mystery. GSM board powered by an emitter follower?

I did it because I was trying to find a solution. It has been made clear that is not a solution.

Wawa: The diagrams are nothing more than block diagrams.

I was asked for them so I answered.

Never used this SIM800L module, but this is what I see just by looking at the circuit board:

The 5V/4V pin is the power pin for the module, and it needs a 5volt supply capable of delivering 2Amp during transmit.
The SIM chip is designed for a Lipo battery (<= 4.2volt), and the board designer has solved it by using two diodes in series between the 5V/4V pin and the SIM chip, to drop 5volt to <= 4.2volt.
Next to the 5V pin is the ground pin for that 5volt supply.

The VDD pin is pull up power for the onboard TX/RX level shifters (the SIM800L is likely 3.3volt logic).
It should be connected to the supply of the Arduino you’re using (in this case the 5volt pin of the Uno).

“SD: MicroSD; Brand unknown. Came with a 3D printer”
Not good enough. Get an SD card reader with known specs.
You could post an image.
Leo…

Wawa: Never used this SIM800L module, but this is what I see just by looking at the circuit board:

The 5V/4V pin is the power pin for the module, and it needs a 5volt supply capable of delivering 2Amp during transmit.

That's why I figured my 5V 2A charger would work to power the board.

Wawa: "SD: MicroSD; Brand unknown. Came with a 3D printer" Not good enough. Get an SD card reader with known specs.

Oooh I thought you meant the card, not the reader, my bad.

It is a cheap reader, $.72 Though it isn't my concern at the moment https://www.gearbest.com/other-accessories/pp_218078.html?wid=1433363¤cy=USD&vip=4444366&gclid=EAIaIQobChMIxdaW5Nz_2wIVS25-Ch1A3gGyEAQYAyABEgIsO_D_BwE

Okay update, it is NOT a carrier issue. It is most definitely software or hardware.

trottle checktwo.PNG

no_trhttole.PNG

I may have solved my problem, but I am unsure. Now it is a programming issue so that'll be fun. Easier to troubleshoot at least. My solution is to run the GSM board on the 5V, 2A charger separate, and the rest from the Arduino power supply. Then the VDD pin from the Arduino 5V for the Serial connection. Now to programming to figure out the best way to do two software serial, SPI, and hardware serial... Thank you to all those who helped!

to do two software serial

You can have two instances of the libiary but you can only have one instance at a time receiving data.