New SIM800 library aimed at HTTP communication & GSM location

sahniana:
using LM7805 connected to diode 1N4007, i managed to power up this module. but as you can say, i can't access anything related to SIM, such as AT+CNUM command, it will restart the module, i think it related to power shortage.

7805 is grossly unsuitable for SIM800. SIM800 requires peak current of upto 2A while most 7805 in market these days provide a measly 300-400mA (as compared to theoretical 1A)..
you should try supplying power through a switching regulator like 2576 or LM2596.
Else, buy a SIM800 with onboard voltage regulator. SIM800 is a great GSM Modem and has been used to replace SIM900A by SIMCOM. if you are in India, I can suggest couple of places to buy GSM Online.

Hi guys! How are you connecting the reset pin to the Arduino? I'm using the same module, and I'm afraid to connect the reset of the module to a digital pin of the arduino to control it by software, because of the differences of the voltage. Should I put resistors in between this connection to lower the voltage?

Also is it normal, when I send the command AT+CPOWD to power off, it turns on after some seconds?
Is there a way to turn on the module with AT commands?

I have one SIM800 connected to arduino nano, running for days sending data every hour. I'm using D7 for RESET with no problem. SIM800 is 5V tolerant, no need for level shifting.

One thing about power: first i tested the module with a external power supply regulated to 4.95V with a diode to down voltage to 4.25V. Then i replaced the power supply for a pack of batteries (5.08V), after that i got strange behavior, sometimes SIM800 didn´t send any messages. I figured that at 5.08V, the voltage on the SIM800 was 4.35V that leeds to OVERVOLTAGE warnings. If you use diodes to down voltage, ensure that it stays around 4.2V. Better is to use a LDO or some external power very stable.

About the power on/off question, i use a optocoupler connected to a arduino pin, that way i can use it like a swith to turn on/off the SIM800 module. You can also use a FET transistor to do the same.

  • What the pins to use? How to connect a SIM800L to Arduino?
  • Is this way compatible with Arduino Uno?

Thanks in advance.

Just connect RX/TX from SIM800 to RX/TX arduino (pins 0 and 1), RESET to D7.
Use a 4V external power supply to power SIM800 and don't forget to connect both GROUNDs (power supply and arduino GROUNDs).

Check this page:
http://arduinodev.com/arduino-library-for-gprshttp-communication-with-sim800

geologic:
Just connect RX/TX from SIM800 to RX/TX arduino (pins 0 and 1), RESET to D7.
Use a 4V external power supply to power SIM800 and don't forget to connect both GROUNDs (power supply and arduino GROUNDs).

Thank you, geologic. And can you help me with this changes in SIM800.h?

// change this to the serial UART which SIM800 is attached to
#define SIM_SERIAL Serial1

What must I write in place of "Serial1", or I don't?
Thanks.

If you use arduino uno (or nano), it has only one serial, so it should be:

#define SIM_SERIAL Serial

geologic:
I have one SIM800 connected to arduino nano, running for days sending data every hour. I'm using D7 for RESET with no problem. SIM800 is 5V tolerant, no need for level shifting.

One thing about power: first i tested the module with a external power supply regulated to 4.95V with a diode to down voltage to 4.25V. Then i replaced the power supply for a pack of batteries (5.08V), after that i got strange behavior, sometimes SIM800 didn´t send any messages. I figured that at 5.08V, the voltage on the SIM800 was 4.35V that leeds to OVERVOLTAGE warnings. If you use diodes to down voltage, ensure that it stays around 4.2V. Better is to use a LDO or some external power very stable.

About the power on/off question, i use a optocoupler connected to a arduino pin, that way i can use it like a swith to turn on/off the SIM800 module. You can also use a FET transistor to do the same.

Thank you, Geologic! It was the exactly answer I was expecting! =]

I use Arduino Uno
Connected USB only, nothing else.

In SIM800.h I've changed to:

#define SIM_SERIAL Serial

So, Compiled OK, but I get this text in Serial:

"�Hj���������������������������������"

But I'd get such as these strings:
"SIM800 TEST"
"Requesting "
"Connect error"

In termianal I use 9600 speed, but it was tested on every alowed speed setting in terminal.

Can you test in such way in your board?

Thank you in advance.

abbat81:
I use Arduino Uno
Connected USB only, nothing else.

You cannot use USB to power SIM800, it draws to much current. Use a separated power supply to power SIM800 and common ground to arduino and SIM800.

Can anyone please help me in downloading sim800 library? I have downloaded .ZIP file from GitHub - stanleyhuangyc/Freematics: Official source code repository for Freematics named "Freematics-master.zip" but when I am trying to add it to Arduino IDLE it shows "specified folder/zip file does not contain a valid library".

Did you unzip it first? You just need SIM80.cpp and SIM800.h files in your "libraries" folder under your arduino folder.

geologic:
SIM800 is 5V tolerant, no need for level shifting.

Don't think so, the serial port characteristic of the spec says 2.8 V max:
see p. 31 http://www.seeedstudio.com/wiki/images/4/46/SIM800L_Hardware_Design_V1.00.pdf

And I see on the PCB no additional resistors / diodes ... what lowers the voltage, so you should do this.

Wou're right, there is no level shift circuit in PCB... But mine is working for more than a month connected to 5V MCU... Let's see for how long.

For testing, i guess it is safe to wire tx/rx directly. If using in real world, better add some level shifting circuit.

Hi, can You please tell me how to set up user name and password for APN?
I have tried adding

SIM_SERIAL.print("AT+CSTT="apnname","user","pwd"");

to library in setup function, but it not working.

what changes did you make on the library code? You have to replace this part by your code:

SIM_SERIAL.print("AT+SAPBR=3,1,\"APN\",\"");
  SIM_SERIAL.print(apn);
  SIM_SERIAL.println('\"');
  if (!sendCommand(0))
    return 4;

I'm still using another GSM shield with the standard GSM library. I would like to move to SIM800L.

In my current code, I am making an HTTP POST request: I connect to an IP address, then I write the request as text to the connection, including the JSON object, that I want to send to the server residing at that IP, and finally I close the connection.

I didn't see such option with this library. I can only send parameters to the server using URL query arguments. This is indeed an option for me (I'll just change the server code to expect a GET request and read all parameters from the URL), but still - does anyone know of a library for the SIM800(L) that can write to an open HTTP connection?

Hello,

I am also using this library.
why do we run "AT+CREG?" 30 times in the setup function ?
I have "Error code:1" at the end.

Means "success" is false, so "mode" is not 1 and not 5, why ?

Thank you.

Sorry, but the Github link is broken. Can you post the link to the library? Thanks in advance.

You can use this SIM800 Library. It works efficiently - BareBoneSim800 Arduino Library and works with any know SIM800 modules. Idea for IoT applications and sending sms.