Introduction: Using the Sim900/sim900A Mini Module With Arduino UNO
There are lots of websites that talk about using a GSM shield with an Arduino, in addition to the Arduino IDE itself. There are also several GSM libraries out there, or you can use AT commands to roll your own. I couldn't find any that talk about using the mini development module so I thought it may be useful to publish this 'ible. At this stage I have no library preferences and no particular desire to go it alone.
Please note, while I have investigated my module, there seem to be many versions of the mini module and I will leave it to you to experiment and work out the details of your version for yourself - its quite easy. Also note that the same module PC board supports either the Sim900 or the Sim900A chip and they are used similarly, so I will assume a Sim900.
Some details...
My mini module is version 3.4 and the front and back is shown in the photos. Electrodragon.com publishes a schematic for their module, and it differs slightly from my module. The differences are:
- The Electrodragon module is version 3.6
- It has 3.3V to 5V and visa versa level translators onboard for the serial interface. Mine does not.
- My module is missing R2 on the back, and it links the empty "Restart" pin to the "Powkey" input on the Sim 900 chip. The Electrodragon module schematic refers to the "Restart" pin as J12 but is drawn incorrectly, it actually connects to the base of the transistor, not to VCC as shown. R2 (R6 on theirs) is a 4k7 surface mount resistor and you will need to install it if you want to use the Restart input to power the mini module up or down. You will also need to remove the 4k7 resistor (R25) on the top side of the mini module as it connects the transistor base to the positive supply. This is done so that the mini module will always turn on automatically when power is applied, and if its present you can't turn the module on or off under software control.
- There are a few other components shown on the schematic but are not installed on my module but they are not important to using it.
Step 1: Hardware....
Power supply
You cannot power the module from the Arduino, as it is incapable of supplying the necessary peak currents. The Sim900 draws about 2A every so often. It's not necessary to build a 2A supply, as a large storage capacitor on the power supply output will supply the current. I am using a small switch mode buck power supply to step down from an external 12V DC source to 3.3V, with a 0.1F 5V super capacitor on its output and that works a treat. I believe that a 1000uF low esr cap will also work, but I've not tried it. The photo shows the power supply with a 0.1F cap underneath.
Serial port
The Sim900 communicates at TTL levels limited by its power supply voltage. The hardware reference manual says TXD and RXD (serial transmit and receive respectively for the Sim900) max output and input voltage respectively is the same as the power supply...3.3V in my case.
The Arduino UNO, when using the SoftwareSerial library, transmits data on its digital IO pins at their voltage levels. When the Uno is supplied at 5V the maximum output voltage is 4.2V, and is 2.3V when supplied by 3V.
At first I put a voltage divider into the transmit signal path, but found it was not necessary, and it works to transmit and receive serial data between the module and the Uno.
Wiring it up
You will need to work out which digital pins are used by your preferred library provider for their compatible GSM shield. In my case I will use digital pins 2 & 3 and SoftwareSerial on the UNO. Some also use another digital pin to control switching power on and off for the GSM shield. Connect the UNO TX SoftwareSerial pin to the mini module RX pin and similarly for the Uno RX pin. Remember to connect common grounds between the UNO and the power supplies and the mini module.
Do NOT use the RS232 outputs on the side of the PC board, as it outputs some +-7V and can damage your Arduino. The TTL level serial output pins must be used (near the antenna connection). Also please check the ground pins on the connector as some people have reported that the pinout of their module is different to that shown in the photos of my mini module.
Step 2: Software....
Library
The Arduino IDE includes a library for their GSM shield using the Quectel M10 GSM chip, and Surprise! it is almost identical to the Sim900A chip! Since it's easy, well documented, and has nice tools, I'm choosing to use this library to play with. The shield uses pins D2 (RX) and D3 (TX) for serial comms, and pin D7 to power the M10 up and down. You don't have to use D7 as the mini module will turn itself on in standard configuration. Wiring to these pins allows me to use the mini module as if it was the Quectel shield. If you want to use some other pins, hop into the GSM library GSM3IO.h and change them as you want.
Details of the library are explained on the Arduino GSM shield website
And I found this handy Youtube video...
That's it!
Ok, recapping, we are using the Arduino GSM library with D2 as serial receive and D3 as serial transmit, power is applied to the mini module at 3.3V and has a large cap to supply the current peaks. An unlocked GSM SIM card is installed in the mini module and the net-light led is flashing slowly. A common ground is connected to the module and UNO. Ok, connect up the UNO to your PC and load the "test modem" sketch in the tools folder of the examples included with the library.
It should print the IMEI number of your mini modem on the serial monitor! Yah! Success! Next project is to hook up a GPS module and swap SMS's with it.
Have fun!
23 Comments
4 years ago on Step 2
please; help me
using arduino mega and sim900a for receive message code
Reply 4 years ago
Hello, what is it you want to know? I must caution that I worked on this a long time ago and I have forgotten quite a bit!
4 years ago
plese; help me
arduino mega simn900a using receive message code
5 years ago
sir... can help me doing cording for my project sir..?
5 years ago
Good tutorial!
Im trying to figure out the soul of the very same looking model of SIM900A, did you happen to find any operation manual or detailed datasheet about it?
Many thanks in advance!
Reply 5 years ago
Hi JuhoP3, the manufacturers manuals for the Sim900/A is adaquate. Google it and most will be revealed. I think I put a variety of links in either this Instructable or in my other one about the same module and using it in Australia. Just search my instructables.
5 years ago
Sir... a little help on how to connect, [GSM MODULE SIM 900A] interfacing [ARDUINO UNO] a little confusing because my GSMSIM900A MODULE Pins are only VCC, GND, EN, 232R, 232T, GND, RXD, TXD. what should i supply for it? or how to connect pls need help...
6 years ago
Hi , i need help , i have the same shield and i don't understand if ground pin must be connect for use arduino.
there are 6 pins:
SIMR | SIMT
R | T
GND | GND
I connect SIMR at arduinoTx and SIMT at arduinoRx without GND connection.
the network led continue to blink every second, help please i would use this module
Reply 6 years ago
hi Radamirez, you need a common ground so all the signals have a common voltage reference. The 2 grounds are connected on the module so you only need 1 wire from the module to the Arduino. Hope that helps!
Reply 6 years ago
Thanks a lot for your reply, i connect GND and GND gsm at arduino GND.
But for the power i use 5v 2a , i need a module conversion dc dc as your.
Can i use module MT3608? in: 2Vdc - 24Vdc / out: 3Vdc a 28Vdc max2A
Will it work ?
Reply 6 years ago
hi Radamirez, I don't know if your power supply will work as I don't know the unit. What you want is a supply that can push >2A for a few mS, and is less powerful for the rest of the time. A large filter cap will do the job. Otherwise a heavy duty supply is required with good transient response. Using the Arduino as a 3V power source will not work. Hope that helps!
Reply 5 years ago
I use 3 battery stilo AA 1,2V 2,4 A but it doesn't work, now status led and net led continue to blinking together. I must take the artenova Gsm shield
6 years ago
Hello
i am a new bee.
i am using Pin 8 & 9 (of arduino DUO) for serial communication with SIM900A instead of standard Tx,Rx Pins.
i am unable to read response of AT=CBC.
following is the code
void V_Bat(){
int lcc;
mySerial.println("AT+CBC");
mySerial.println((char)26);
delay(1000);
if (mySerial.available()>0)
{
msg=mySerial.read();
Serial.print(msg);
}
it returns nothing
msg declared as charector
thanks
Reply 6 years ago
hi KashifK2, sorry for the late reply - not sure what happened. I hope you have fixed it by now as I don't have any good news, other than to suggest you make sure you have loaded software serial code to make the serial port work.
I have a vague recollection that the module requires hardware serial, but I'm not sure anymore. As 2G has been discontinued in Australia I can't use this module so I've not done anything with it for the last 2 years.
7 years ago
I could not understand , please tell me which one connection is used to interface Ardiuno either RS232 port (which have 3 pins Rx,Tx,Gnd) or Rs232 TTL.Please check my GSM module either it has TTL or not? Link for GSM image.
http://www.evselectro.com/gadgets-and-gifts-sim-900d-1905?keyword=gsm&category_id=0
Please reply me.
Reply 7 years ago
hi hidep, that module has ttl rs232 and normal rs232. TTL is next to the antenna. As I mentioned before the Arduino does not have a normal rs232. You must use TTL rs232.
Reply 7 years ago
please guide how to use TTL rs232? or do you have other test code for checking GSM module is working properly or not?
Reply 7 years ago
Have a look at this Instructable.... Maybe that will help?
https://www.instructables.com/id/Using-a-SIM900A-GS...
Sorry that's the best I can do.
Reply 7 years ago
now it's work.. thank you so much for your help. Now arise on more question> is ground of TTL pin should be common with the power supply of GSM module (power jack 5v)?? in other words i just have to connect TTL ground pin with the Arduino ground pin or not? please reply me.. if you don't understand what i ask>then reply me "AGAIN"... but Give me some response. i will be waiting for your response.
Reply 7 years ago
hiya, excellent, glad to have helped. Please make sure the arduino ground and the module ground are common. The TTL ground is already connected to the module ground so nothing to do there. The ground provides a common reference point for all other voltages.