GPS via Arduino using GPS/GPRS/GSM Module V3.0 (SKU:TEL0051) Not working

userHead Account cancelled 2013-05-19 09:08:59 12359 Views8 Replies
Hi Folks

I recently bought a GPS/GPRS/GSM Module V3.0 (SKU:TEL005) ... TEL0051%29

Using it with a Arduino Duemilanove ATMEGA328

I can get the GPS via USB working
But the GPS via Arduino does not work as per instructions here ... uino_board

1) do you know if there is any issues with this shield working with the Arduino Duemilanove ?
2) Any suggestions on why it gets stuck? The output I get on my terminal is show below. Seems it is getting stuck waiting for input on the "Serial.available within the ID function  (see code extract below)

$GPGGA statement information:

char ID()//Match the ID commands
  char i=0;
  char value[6]={
    '$','G','P','G','G','A'    };//match the gps protocol
  char val[6]={
    '0','0','0','0','0','0'    };

    if(Serial.available())  <<<<<<******STUCK HERE


2014-03-28 13:51:41 Welcome Fara,

Are you indoors? What power supply are you using?

The GPS needs a little time outdoors in order to get data and a satellite fix.
userHeadPic Jose
2014-03-27 21:35:04 Hi everyone,

Please help me. I have problem with my gps. It didnt work! I manage to get the output at serial monitor, but then the rest after the UT, it didnt work. Im begging you all. Im new in using this toy. Is it my power supply or coding? I just copy and paste the coding in wiki and try it out.  :'(

userHeadPic farahidris
2013-05-27 06:41:36 Hi :)
I know it's a little tricky to understand, because I had a little "fight " with it too, but when you get it, it becomes clear....but not so easy to explain ;) -
First of all, I insist on the fact that, for the testing parts of the wiki, you must do what is told at the beginning of the examples ! In your case (you want to test the GPS part) :
Code: Select all
// # Steps:
// #        1. Turn the S1 switch to the Prog(right side)
// #        2. Turn the S2 switch to the Arduino side(left side) [color=red] // oups, I think I put it the other side (usb) !?[/color]
// #        3. Take off the GSM/GPS jumper caps from the Uart select
// #        4. Upload the sketch to the Arduino board
// #        5. Turn the S1 switch to the comm(left side)
// #        [b]6. Plug the jumper caps back to GPS side[/b]
// #        7. RST the board 
I'm not sure about the "//#  2." , but I think that I had it on the USB side when I tried the examples  ;)

Then if you launch the sketch, you'll see the messages on your terminal

Once you've checked the GPS part, you can try the example for the GSM part, but the point "6" above is "Plug the jumper back to the GSM side"

If you dont' want to interact with the module from the PC, the switches must be put like this :
- center the uart switch
- S2 on "arduino"
- S1 on "com"
In this case, the module obeys to the AT commands : you can't send it commands from the terminal, and the messages from GPS/GSM won't appear either.
But you can see the commands that your sketch sends : they'll arrive both on the terminal and the module !!

In fact, the module communicates withe the GSM part and the GPS part using the same serial pins, that is why the AT commands are importants :
digitalWrite(4, HIGH);
tells the module to communicate with the GSM part
! The GPS sends the messages, but th module just don't get them.
digitalWrite(4, LOW); 
tells the module to communicate with the GPS
part. Ih this case, the GSM messages are not seen.

I hope (but I'm not sure) it helps a little ;)

To summarize :
- If you want to try and interact with the module from your PC, then, copy/paste the examples of the wiki, and don't forget the switches manipulations described at the beginning of each sketch.
- If you want it to run by itself, you don't play with the switches and put them as I told above. Don't forget that the module communicates with one part or the other one depending of the pin 3 and pin 4 values . It's up to you to put the module in GPS or GSM mode (and give it 2 seconds) before sending/receiving messages to/from the part you want. And keep in mind that, in this last configuration, if you run the terminal, you'll see only the messages that your sketch sends.

Don't hesitate if you need precisions, even MP is OK - I had some headaches too at the beginning, but now, mine is doing exactly what I want it to do  :)


PS : As Jose told you before, if you want to use the GSM part, an external power supply is needed !! It won't work with the USB supply alone - Then if you want to see the GSM messages on your PC, you need to connect both the usb cable and an external power supply (9V 500mA is enough it takes about 250mA when it starts, but no more)
userHeadPic alnath
2013-05-27 02:18:44 Well.. I have aquired the same shield. Having some troubles making it work. Read the entire wiki, didnt think i would have some headaches. Anyways. Ive been trying the same code, and I was thinkin,

when we send the comand to the module to turn on gps,
Code: Select all
 digitalWrite(3,LOW);//Enable GSM mode
  digitalWrite(4,HIGH);//Disable GPS mode
  delay(5000);//GPS ready
  //turn on GPS power supply
  //reset GPS in autonomy mode
  digitalWrite(4,LOW);//Enable GPS mode
  digitalWrite(3,HIGH);//Disable GSM mode
  Serial.println("$GPGGA statement information: ");
we are using serial comunication, wich makes me think ''Am I sending this to the module or to the serial monitor on my pc?'' Im wondering if this code reaches the shield, or i am just sending a string that does not reach the shield, therefore thats why I have no response from it.

if this is like some other GPS modules, in wich you turn on, and shield automatically sends serial information, no need to use those at comands.

Does this shield use tx/rx (pin 0 and 1) to comunicate? if so, i had some expiriences in wich when connected to PC instead of power supply, when arduino uses ''Serial.print/println'' the comands goes to the serial monitor and wont reach the shield, thats why im wondering if thats the the reason that makes this code not to work like expected.

I wish someone can prove me wrong and send some help please.
userHeadPic N4rf
2013-05-22 17:09:31 Hi,

Thanks Alnath! Not just that, also the delays and quite a few other functions might run into issues. It is essential to paste code and hardware information, otherwise we just guess.. Which is a pointless waste of time. If you manage to send enough details, chances are, you will get answers.  ;)
userHeadPic Jose
2013-05-22 16:57:38 Hello :)

Jose is right, it's necessary tu put the whole code. Because here, we have to guess.... if you put the lines :
Code: Select all
          digitalWrite(4,LOW);//Enable GPS mode
          digitalWrite(3,HIGH);//Disable GSM mode
          delay(1500); //stabilisaton mode GPS
these lines are needed for the GPS to send messages to the module .

then, when you want to communicate with the GSM part, you put :
Code: Select all
digitalWrite(3,LOW);//Enable the GSM mode
digitalWrite(4,HIGH);//Disable the GPS mode 
wich allow you to read/send messages to the GSM part .

You also need to check that the switches are OK :
- center the uart switch
- S2 on "arduino"
- S1 on "com"

userHeadPic alnath
2013-05-20 17:03:40 Hi everyone,

I'm having the exact same problem. My GSM and GPRS are working correctly because I can make phone calls, send sms messages, and comunicate via HTTP, but I still have problems with the GPS. I'm able to connect to the GPS but it sends me "Unknown location" or blanks on the values. I tried moving the module outside but sill nothing happens.

Jose, I sure LearningRobot was very specific on what code he is using. He is using the example of the wiki.

LearningRobot, I'm not sure why but the code started working (at least sort of)when i activated the Internet service of my Sim card. And also, try to restar the module an switching between the GPS and the GSM with the Uart select switch. I'm sure is nothing to do with the code because mine is looping ok, but still is sending me Blanks and 0s.

if you can make it work please let me know.

2013-05-20 13:07:25 Hi LearningRobot,

I'm not exactly sure what your code is doing. If you can paste the whole code it would be more helpful.
Make sure you are outside where GPS don't have any problem connecting, and that the battery has enough power. (USB powering alone is not enough).

userHeadPic Jose