I recently bought a SIM900 based GSM modem for my project. It works fine when i use it with hyperterminal. However when i use it with arduino it is not working. What could be the problem? I have posted the code below. The circuit is supposed to do the following things:
Wait 25 seconds on start up and then lights up an LED.
Observe the SENSOR key. If it goes high a call is made to a fixed number, BEACON turns high and circuit gets locked in an infinite loop.
Observe the KEY key. If it goes low a call is placed to the fixed number.
Observed result:
After exactly 25 seconds LED turns on.
When SENSOR goes high BEACON goes high but no call is received.
When KEY goes high no call is received.
Basically everything except GSM modem is working when connected to the microcontroller. Please help me.
PS:
1.I built the arduino myself using ATmega8 and i have not added the TTL to USB converter. Hence it is not possible to observe the serial port of microcontroller in hyper terminal.
2.I use 16 Mhz crystal and 22pF decoupling capacitors.
3.I use an external programmer to burn my code into the ATmega8 in order to save Bootloader space.
If it works with the RS232 serial port on your PC and not the TTL serial port on your Arduino I would guess you need RS232 level shifters to talk to it. The MAX232 chip is one example of an RS232-to-TTL level shifter.
Since the USB port is working fine i am guessing that TTL lines also must be fine as the product uses a PL2303 IC to convert the TTL lines from the SIM900 to USB.
When we enter an AT command in Hyperterminal we press enter at the end right? Does the Serial.println() function convey the effect of pressing enter at the end of the string? Could that be a problem?
I was just writing because I'm having a similar problem with my GSM module. It's a different one, but it works with a terminal program and not my arduino, so I was wondering if you could tell me what your mistake ended up being (maybe i made the same one?)
Sure....I found out that the GSM modem and arduino did not share common ground :P. That is essential for proper communication. Try shorting the ground of your GSM modem and arduino. If that does not work try replacing the crystal(Assuming you built the arduino yourself). Baud rate errors could happen from a faulty crystal.
hello guys..can u guys share how to connect this gms sim900 shield to arduino uno.i dont really understand to configure this shield by the datasheet =( ..i just have simple project which is to send sms by pushing the button