Maker Pro
Maker Pro

SIM908c GSM module with Arduino Mega without any shield

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
Hello,

I needed to work with GSM so I bought a SIM908c module. Also I bought a breakout board to connect with Arduino Mega. I am using the gsmlib library for this module.

My connections are as follows:

3.5V 1A power input + 100uF bypass capacitor => VBAT

3.5V 1A power input + 4.7uF bypass capacitor => VRTC

Power Adapter ground => GND

Arduino Mega pin 53 => PWRKEY

Arduino serial TX1 pin 18 => TXD

Arduino serial RX1 pin 19 => RXD

Power Adapter ground => DTR

Now I am using the library example of AT command named GSM_GPRSLibrary_AT. After uploading the sketch and observing the serial monitor the following responses show up:

GSM Shield testing.
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:ELSE
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:ELSE
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:ELSE
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:AUTO BAUD RATE
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:NO BR
Trying to force the baud-rate to 9600

1200
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

2400
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

4800
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

9600
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

19200
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

38400
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

57600
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

115200
ATT: OK
RIC: AT+IPR=9600
AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE

This kind of responses appears even if I don't give any power to VBAT and VRTC. I am definitely did something wrong but I can't figure it out. Please kindly help.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Try connecting the arduino's txd to the device's rxd and vice versa.
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
Try connecting the arduino's txd to the device's rxd and vice versa.
Thanks for your reply. I understand what you meant and I tried it before, it doesn't give any response. I read from somewhere (Probably datasheet) that for this module TXD is meant to connect with device's TX.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,745
Joined
Nov 17, 2011
Messages
13,745
The datasheet of the GSM module states on page 15:
TxD = O = output, therefore connect to RxD of the µC
RxD = I = input, therefore conenct to TxD of the µC
Also note that DTR shall be kept low by a pull-down resistor.
See also chapter "4.6 Serial Interface" on page 28 ff.
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
The datasheet of the GSM module states on page 15:
TxD = O = output, therefore connect to RxD of the µC
RxD = I = input, therefore conenct to TxD of the µC
Also note that DTR shall be kept low by a pull-down resistor.
See also chapter "4.6 Serial Interface" on page 28 ff.
I did try TxD to Arduino's RxD and vice versa. Currently it gives the same result. Also I connected DTR directly to GND of power supply. Do you suggest to add a resistor in series? Also, should I connect it to Arduino's GND instead of GND of power supply? Thanks.

NB: I am not using any GPS tx/rx or debug tx/rx. I kept them open. I only need GSM to work with.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Also, should I connect it to Arduino's GND instead of GND of power supply?

Are they not connected together? That may be your problem.
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
Are they not connected together? That may be your problem.
Really? well, Arduino is taking power from USB connected to PC. I tried powering the module from Arduino before but that didn't work either. I thought Arduino is not providing enough current to the module.
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
Are they not connected together? That may be your problem.
Ok, now I am taking input from Arduino without any external power supply. I am taking power from Arduino 5V pin. But using multimeter I measured at VBAT the voltage is 3.7V and at VRTC it's 4.2V. But still it's not working. Please also note that there could be any problem on the code and the Library may be?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, the first thing is that it requires 3.2 to 4.8V If you are powering this from the Arduino's power rail then it needs to be within this range. (as an addendum to this, VBatt can be as high as 5.5V, so USB is OK for this)

USB is from 4.5 to 5.5 V so it's likely to be outside the ratings for this device. (given the addendum, it is unlikely you have damaged it merely from the supply voltage)

If you're using an alternate supply for the module then you need to ensure they have common ground rails.

I'm not sure that the inputs are 5V tolerant. It would be wise to operate the arduino from a lower supply voltage as well. (An update to this, the inputs are limited to 3.1V, so they are most definitely not 5V tolerant). This can cause damage especially if you have tied any input to the 5V rail.

The amended information comes from page 44 (section 6.1 - absolute maximum ratings). The recommended values are 3.2 to 4.8V
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
OK, the first thing is that it requires 3.2 to 4.8V If you are powering this from the Arduino's power rail then it needs to be within this range. (as an addendum to this, VBatt can be as high as 5.5V, so USB is OK for this)

USB is from 4.5 to 5.5 V so it's likely to be outside the ratings for this device. (given the addendum, it is unlikely you have damaged it merely from the supply voltage)

If you're using an alternate supply for the module then you need to ensure they have common ground rails.

I'm not sure that the inputs are 5V tolerant. It would be wise to operate the arduino from a lower supply voltage as well. (An update to this, the inputs are limited to 3.1V, so they are most definitely not 5V tolerant). This can cause damage especially if you have tied any input to the 5V rail.

The amended information comes from page 44 (section 6.1 - absolute maximum ratings). The recommended values are 3.2 to 4.8V
I know, the recommended voltage range for the module is from 3.2V to 4.8V. I took 5V from Arduino to power the module and the arduino is taking power from laptop's USB. And I am sure the Arduino isn't ruined, it's fine. At the very beginning, I was powering the module from Arduino 3.3V, the response was same. Then I also used 5V, the response was same. Most probably the module isn't ruined yet as I am still having debug responses from the Library example code. Also if you see the 4.1 Power Supply section from the datasheet, it is advised to provide 2A current for the module. But from USB, the arduino can draw around 250-300mA current. So, I hope it didn't ruin the module even if I gave 5V from the Arduino. Moreover, the arduino 5V isn't exactly 5 volts, it gives 4.9 volts, and the absolute maximum for the module is 5.5V as you said.

Now, as it is mentioned in 4.1 Power Supply section, I decided to use a 2A power supply. I stepped down the voltage using diodes in series to make sure the voltage stays in the 3.2 to 4.7 voltage range but current stays around 1.7 amps. So, either way, I am pretty sure the module is not burnt out, as it is also giving responses as before.

But, now as I see section 6.7 VRTC characteristics, I figured I gave more than 3.1V, around 3.9 to 4.5V to VRTC, and current was probably around 1A with external power supply but with arduino it is 305mA. Do you think this isn't right? should I make the current 2uA and the voltage to 3.1V for VRTC?

BTW, steve, I am very thankful that you are spending your valuable time and effort to my problem. I've been winding up with this for quite a long time now.
 

Nafis

Dec 3, 2014
7
Joined
Dec 3, 2014
Messages
7
I know, the recommended voltage range for the module is from 3.2V to 4.8V. I took 5V from Arduino to power the module and the arduino is taking power from laptop's USB. And I am sure the Arduino isn't ruined, it's fine. At the very beginning, I was powering the module from Arduino 3.3V, the response was same. Then I also used 5V, the response was same. Most probably the module isn't ruined yet as I am still having debug responses from the Library example code. Also if you see the 4.1 Power Supply section from the datasheet, it is advised to provide 2A current for the module. But from USB, the arduino can draw around 250-300mA current. So, I hope it didn't ruin the module even if I gave 5V from the Arduino. Moreover, the arduino 5V isn't exactly 5 volts, it gives 4.9 volts, and the absolute maximum for the module is 5.5V as you said.

Now, as it is mentioned in 4.1 Power Supply section, I decided to use a 2A power supply. I stepped down the voltage using diodes in series to make sure the voltage stays in the 3.2 to 4.7 voltage range but current stays around 1.7 amps. So, either way, I am pretty sure the module is not burnt out, as it is also giving responses as before.

But, now as I see section 6.7 VRTC characteristics, I figured I gave more than 3.1V, around 3.9 to 4.5V to VRTC, and current was probably around 1A with external power supply but with arduino it is 305mA. Do you think this isn't right? should I make the current 2uA and the voltage to 3.1V for VRTC?

BTW, steve, I am very thankful that you are spending your valuable time and effort to my problem. I've been winding up with this for quite a long time now.
OK, now I gave 2.9V and 1.9uA to VRTC by dividing the voltage with two resistors. Still, the same thing shows up.
 
Top