How to give the right power supply (volts + current) for SIM800L (gsm) ?

Hei guys,

I’m relatively new to arduino, and I salute all the arduino geeks (like me) reading this.
I bought a a GSM module so that I can send/receive messages using a SIM card.
I got the SIM800L module, which looks like this:

Problem: I can’t get the right voltage and current (amps) value.
The module needs 3.6-4.2V and 2A in order to work right.

I have an AC adapter which has an output of 12V and 2A.

I’m using a regulator, to match the right voltage value for the module, which is ~3.7V. If I do this though, the current will decrease as well, to 1.2-1.3A, which will make the module not work properly, because the current is not 2A anymore, even though I got to the right voltage.

I’m using this test code:

#include <SoftwareSerial.h>
 
//SIM800 TX is connected to Arduino D8
#define SIM800_TX_PIN 11
 
//SIM800 RX is connected to Arduino D7
#define SIM800_RX_PIN 10
 
//Create software serial object to communicate with SIM800
SoftwareSerial serialSIM800(SIM800_TX_PIN,SIM800_RX_PIN);
 
void setup() {
  //Begin serial comunication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  while(!Serial);
   
  //Being serial communication witj Arduino and SIM800
  serialSIM800.begin(9600);
  delay(1000);
   
  Serial.println("Setup Complete!");
}
 
void loop() {
  //Read SIM800 output (if available) and print it in Arduino IDE Serial Monitor
  if(serialSIM800.available()){
    Serial.write(serialSIM800.read());
  }
  //Read Arduino IDE Serial Monitor inputs (if available) and send them to SIM800
  if(Serial.available()){    
    serialSIM800.write(Serial.read());
  }
}

This is what I’m getting back (from typing AT in the Serial console):

Setup Complete!
ÿ ÿATATAT
Call Ready

SMS Ready
ATAT
Setup Complete!
ÿCall Ready

SMS Ready
ATATAT

Sometimes I get a reply, saying that it’s SMS and Call ready, but usually I get nothing back. Sometimes I get ÿ.

I got a warning as well, from the library, warning about the power, being too low. I got this just once.

Now, I know for sure that the problem is with the power supply.
From some searching I got around this: http://stackoverflow.com/questions/19456034/arduino-gsm-sim900-returns-ÿ-char
Guy had same problem, getting ÿ back, and problem was current, 2A was needed.

Here is my setup:

What can I do ?
Any suggestions are appreciated.

Try to use a switch mode buck converter, for sure can give out more power than linear regulators, and put a 470 uF cap at the 3,7 V side, I guess that the 2 amps is just peak power, and a capacitor can help in this cases.

Cheers, Ale.

I don't have any buck converter at me now, will have to ask my "local arduino guy". I have some capacitors around, and 470uF probably too, but I never ever used one. Should I wire one pin to 3.7V and on ground ? Thanks

ilguargua: Try to use a switch mode buck converter, for sure can give out more power than linear regulators, and put a 470 uF cap at the 3,7 V side, I guess that the 2 amps is just peak power, and a capacitor can help in this cases.

Cheers, Ale.

Yes, take care of polarity of course. It should work better with your regulator too, try to add one on the 12V side too.

Cheers, Ale.

I'll give it a try tomorrow morning. From what I've read on wikipedia, looks like a capacitor just keeps power, like a battery. Difference is that the capacitor can release all it's power instantly, while the battery can't.

Could you explain how the cap would help in my case ? Like, what is it really doing ? Would help me to understand things better.

ilguargua: Yes, take care of polarity of course. It should work better with your regulator too, try to add one on the 12V side too.

Cheers, Ale.

As I say before, the 2 amps are needed in a peak, really short time, your understanding of capacitor is quite right, they can give the power needed, but they least not long. AFAIK power used by GSM device vary also with signal intensity, so if you have a good coverage from your operator power needed will be less.

(BTW Belgio - Italia 0-1 ! Forza Italia!)

Cheers, Ale.

Gotcha. In other words, I guess the cap keeps some current and when needed by the module in peak, it's released. I know, it's 0-1 ! Not that much of a football guy, but I do like pizza :D haha

ilguargua: As I say before, the 2 amps are needed in a peak, really short time, your understanding of capacitor is quite right, they can give the power needed, but they least not long. AFAIK power used by GSM device vary also with signal intensity, so if you have a good coverage from your operator power needed will be less.

(BTW Belgio - Italia 0-1 ! Forza Italia!)

Cheers, Ale.

Looks like I didn't had the caps of that size after all. I got them today though, 2 caps of 470uF, and few bigger ones. Thing is, I don't know how to wire them. In series or in parallel ? I made here a scheme: |500x369 You said that I should wire them at the other side too (the 12V side). I forgot to add that in the diagram, but anyway, same concept applies on that side. Thanks!

Parallel, the second diagram. A couple of questions : what chip is used on regulator? Does it supply the gsm module only or also the Arduino?

Cheers, Ale.

What's written on the chip (I think) is W103 and 13, 13 is written upside down. I power arduino with a different power supply, using the USB port from computer, for now.

Thanks, icebox

ilguargua: Parallel, the second diagram. A couple of questions : what chip is used on regulator? Does it supply the gsm module only or also the Arduino?

Cheers, Ale.

Hum, never heard before... I guess is an LM317 or similar, anyway, almost of the linear regulator doesn't like to be "backfeeded", having the output voltage > than input voltage. If you use caps on output this can happen, even tought for a short time. To avoid damage better if you feet a diode across in and out, cathode to the in and anode to the out, this create a safe discharge path for the cap.

Cheers, Ale.

It's LM317T actually, was reading from the wrong component. I will have to do more research about this, before I wire them up, don't wanna blow anything.

ilguargua: Hum, never heard before... I guess is an LM317 or similar, anyway, almost of the linear regulator doesn't like to be "backfeeded", having the output voltage > than input voltage. If you use caps on output this can happen, even tought for a short time. To avoid damage better if you feet a diode across in and out, cathode to the in and anode to the out, this create a safe discharge path for the cap.

Cheers, Ale.

Just follow the datasheet suggestion, page 10 of the linked document.

Ciao, Ale.

Hei,
What if I use something like this: http://www.okazii.ro/sursa-in-comutatie-dc-dc-lm2596-step-down-1-23v-30-v-a176060083?icid=CS7.P.VZ.04.15&ibid=pp_activ

ilguargua:
Just follow the datasheet suggestion, page 10 of the linked document.

Ciao, Ale.

Yes, that should work, is the one that I pointed out in reply #1. It has already a cap on the output, so maybe doesn't need anything else.

Ciao, Ale.

ilguargua: If you use caps on output this can happen, even tought for a short time. To avoid damage ............

Sorry but that is wrong. You need a capacitor on the input and output of a linear regulator. No damage when you turn off because the input capacitor discharges at the same rate as the output one. The voltage drops down in the correct way.

A capacitor is needed on a battery to reduce the output impedance, it is not simply a matter of keeping the voltage up, although it does that as well.

Yes, you need a capacitor on both input and output, but who say that the discharge rate would be the same? What I was suggesting it's no my idea, but is clearly indicated in the datasheet, see reply #12.

Ciao, Ale.

ilguargua: Yes, you need a capacitor on both input and output, but who say that the discharge rate would be the same?

Physics says that. The capacitor on the input discharges into the regulator and hence the output circuit. It is a series circuit.

What I was suggesting it's no my idea, but is clearly indicated in the datasheet

You mean NOT your idea? Unless you are from Scotland. Yes it is you are misunderstanding the data sheet. What in the data sheet leads to to this conclusion?

Ok, my bad, I'm not able to explain.

Ciao, Ale.

Simply use 7805 to generate 5V and then use diode 1N4007 in series with positive terminal. It will drop 0.7V. then we get 4.3v for GSM module.