Interfacing SIM900 with Arduino UNO, without a shield

Hello,

I am going to create a project and I need to interface SIM900 with arduino uno (for prototyping) and then with a standalone microprocessor (atmega328 maybe). I don't want/have money to buy a GSM shield, so I thought that I could create the needed circuit with the SIM900 GSM module. I am a noob and I need some help. I read the sim900 manual and for a minimal setup I need:
connect RX/TX to arduino
connect the SIM (pinnout is shown in the manual)
connect the antenna
power it with external (rechargable, or non rechargable with a diode) battery

My main problem is the antenna schematic. I can't fully understand the manual. I am going to buy this pack, how will I hook the antenna to the sim900?

Looks like you solder the "Hirose U.FL-R-SMT Connector" to your circuit board. The trace between the SIM900 and the antenna connector is supposed to be 50 Ohm impedance controlled. For a recommended schematic and circuit-board layout you should look at document "SIM900-TE":

http://426bb82d2999c9147474-eae010336623170ce70309697bb6e591.r89.cf3.rackcdn.com/UK_STG_SIM900_1AN.pdf

Are you sure it's not worth the $45 to get the shield? :slight_smile:

pin 60 is the antenna signal. You'll have either to :

  • put a female plug on your PCB, in which you'll put the antenna little plug
  • cut the cable of the antenna and solder it on the pcb :cold_sweat:

Do you already have all the tools you'll need to solder the sim900 ? I wouldn't try to do it with my iron :grin:
If you are a noob..... maybe you could think about it a little more :

1 -

  • how much for the sim900 + sim card holder + .... ?
  • the antenna : 22 $ (OK, you can find cheaper ones, I guess)
  • chances that you destroy the sim900 are real

2- GSM shield + antenna + sim holder ready to use : about 50 $

:wink:

It looks looks the 1-off price for the SIM900 is about $30, + the cost of the connector, PCB etc, if the shield is $45 this is a total no-brainer, get the shield and lose the grief of trying to impedance match the aerial traces.

That said I'm not sure just how important the impedance matching is, you may just get by with a wire but if you don't you're $30 down and still have to buy the shield.


Rob

Thank you all for your replies!
so, there is no need for capacitors and resistors between the sim900 and the antenna, just some space (50 ohm) between the sim900 and the antenna connector.
I'm a noob, but I have a very good soldering iron. I must learn to use it some day :stuck_out_tongue:
Well 25$ vs 45$ (+antenna) is something. Even if I brake the sim900 (I pray not to do so) I can buy a new for ~19$ (ebay). So it will be either 20$ cheaper than the shield or about the same money. And my soldering skills will get better :D. Also, after prototyping on the arduino, I will create a standalone pcb, where a shield is not a solution...

The 2 resistors and caps in the antenna signal path are for tuning the antenna, so they may or may not be used. I've recently done a board using this module and I included 0R resistors and no caps but there is provision for them. The board has not been debugged yet so I can't say yet one way or the other if they are required, but they are easy to add if you have provided for them.


Rob

Can I use a resistor (0 or 50ohm) instead of the 50ohm controlled impedance wire?

If you are using the correct antenna and cable, it will provide the 50 ohm impedance. I would use Graynomad's advice and zero ohm it to start.

Ok, thank you!

Now that I think about it, tuning an antenna requires an inductor and capacitor, doesn't it? No resistor at all. Maybe my memory has failed. I am old now.

I have no idea :stuck_out_tongue:
That's why I asked the question

That was just thinking out loud. You should be fine with a zero ohm resistor as long as the antenna is designed for the frequency you are using.

A good tech, or even an experienced Ham operator, will tune an antenna to reduce the SWR on the transmission line.

Well, it turns out that I do not need either resistors or cable impedance, as the antenna does that for me.
As a report: Soldering was not that hard with some liquid flux
I have hooked up the VBAT on arduino's 5V (SIM's pin 56), GND to GND (SIM's pin 52), TXD (SIM's pin 9) to ardu pin 2 and RXD (SIM's pin 10) to ardu pin 3.
I try to send some voltage monitoring command to the SIM900, but I can't get it work.
My code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup()  
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);


  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println('A');
  //mySerial.println("AT+IPR=9600");
  //mySerial.println("AT");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.println(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

I receive when I open the serial monitor:

7
0

And nothing happens. Even if I send a valid command, nothing happens.

Is 5v ok on the SIM900, I thought they were spec'd at 4v1.

Also there are 16 GND pins and 3 VBAT pins, VRTC and various other pins for the SIM card etc, are they connected.


Rob

I thought it would have some tolerance and I gave it 5. Yes, it's designed for 4V1. Should I use a resistor? if yes, how many ohms?
I also thought that I just had to connect only one of the GND and VBAT. Should I connect all of them? If not which?
Seems like my questions are noobish enough to not be covered in the manual or I just can't read :stuck_out_tongue:

Thank you for your quick reply Graynomad. You're very helpful!

Edit: Seems like I can't read, as all the optional pins are marked with "If these pins are unused, keep open." and GND and VBAT are not one of them.
Edit 2: I read that maximum input current is 10mA, so a 500 Ohm resistor will do the job, won't it?

ttouch:
I thought it would have some tolerance and I gave it 5. Yes, it's designed for 4V1. Should I use a resistor? if yes, how many ohms?

Edit 2: I read that maximum input current is 10mA, so a 500 Ohm resistor will do the job, won't it?

You can't use a resistor to regulate voltage. A 500 ohm resistor will limit a 5V source to no more than 10 mA but it could go much lower depending on the actual load. You should use a voltage regulator.

Can you help me with the voltage regulator? Which one should I buy?
(More pieces to buy = more time needed for the project... :frowning: )

BTW: Thank all of you for your patience and helpfulness!

VBAT is spec'd at 3v2 to 4v8, 5v is pretty close and maybe ok but not in spec.

I read that maximum input current is 10mA, so a 500 Ohm resistor will do the job, won't it?

Using a resistor as a "regulator" is always a bad idea, even if the current is constant which in this case it isn't because the SIM900 will pull about 2A when transmitting.

2A is a lot but (I assume) only for short periods which will help. Normally one would use a 3v3 regulator off the Arduino's 5v but the Arduino can't supply that much either, so you really have to come up with a power supply from somewhere. Roll your own or maybe get a wall wart.

Another way might be to get a DC/DC converter from eBay, something like this

http://www.ebay.com.au/itm/Step-up-Step-down-2-in-1-DC-DC-Converter-Regulator-/120873478470?pt=AU_B_I_Electrical_Test_Equipment&hash=item1c249ee946

I don't normally recommend eBay stuff and no way I'd use it in a commercial design but they are probably just fine for what you are doing.

What does the GSM shield do? That would be a good reference design.


Rob

Wow, 2A is too much and arduino will not be able to handle it...
I will go for a transformer (for prototyping) which will give me the voltage I need and be able to cope with such current.
Later, I will use a lithium battery, so it won't be a problem

The project am trying to do is a phone. A simple phone. I think that if I make the SIM900 work, everything else (hardware) will be easy (just a screen, some buttons and an atmega microprocessor standalone).
Then, the software part is pretty difficult (I need non-blocking code), but at least I'm not a noob with programming and C

What does the GSM shield do? That would be a good reference design.

previous shield revisions had a separated power supply, but new rev. use Vin and a DC-DC bulk converter TD1410, a big capacitor , and also a soft-start circuit.

Wow, 2A is too much and arduino will not be able to handle it...

right, but actually, I've never measured such a current. I think the very short time when it sinks that current allows the capacitor to source it.