No output from gps

i am using gps UP501

connection i am using is
http://www.adafruit.com/index.php?main_page=popup_image_additional&pID=660&pic=1&products_image_large_additional=images/large/ID660bb_LRG.jpg

i am using arduino ide 0021

Program

#include <NewSoftSerial.h>
#include <TinyGPS.h>

long lat,lon; // create variable for latitude and longitude object

NewSoftSerial gpsSerial(2, 3); // create gps sensor connection
TinyGPS gps; // create gps object

void setup(){
Serial.begin(9600); // connect serial
gpsSerial.begin(4800); // connect gps sensor
}

void loop(){
while(gpsSerial.available()){ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&lat,&lon); // get latitude and longitude
// display position
Serial.print("Position: ");
Serial.print("lat: “);Serial.print(lat);Serial.print(” ");// print latitude
Serial.print("lon: ");Serial.println(lon); // print longitude
}
}
}

problem is that i not getting any output in serial monitor.

How are you connected up?

"The only thing you'll need to watch for is that the module is designed to run at about 3.3V, and shouldn't be powered by 5.0V. If you're using an Arduino, simply connect the GPS power pin to the 3.3V pin. If you want to configure the module, you'll want to put a 10K resistor divider on the RX pin so you don't put 5V on the data pin. We include these resistors, as well as a 6 pin header you can solder to the module in order to plug it into a breadboard. "

"Output: NMEA 0183, 9600 baud default"

Arduino Rx to GPS Tx? Gnds connected?

yes i have connected exactly same as you suggested

check this http://www.adafruit.com/index.php?main_page=popup_image_additional&pID=660&pic=1&products_image_large_additional=images/large/ID660bb_LRG.jpg

Ok - what about the data rate? 4800 vs 9600

9600 for serial monitor 4800 for gps

“Output: NMEA 0183, 9600 baud default” <<<<

only i get this þ½{ÿ when i use 4800 baud rate .

and no output when i use 9600.

So you have a baud rate mismatch then. Try some other rates. 1200, 2400, 19200, 38400

ok i will try .

before you trying getting the tinygps program to work, write a very simple program that just copies all the data which the gps device sends out, to the serial monitor.

You will then know that the communication is working and the gps is doing "something".

You need to do this outside, or the gps device may never get a proper signal, or may take hours to do so.

hey i tried different baud rate,but nothing happened.

it would highly helpful ,if you can give me some links/programs about using tiny gps .

i have no prior experience with tinygps library.

[quote author=Puneet verma link=topic=152315.msg1143433#msg1143433 date=1362476050] hey i tried different baud rate,but nothing happened. [/quote]

If you haven't used GPS before, have you confirmed that you can actually get a GPS signal wherever it is you're doing these tests?

PeterH: If you haven't used GPS before, have you confirmed that you can actually get a GPS signal wherever it is you're doing these tests?

i am using my programs, to check gps ?

Is their any other way to check whether my gps is receiving signal or not ?

You could connect the output line to an ordinary input pin and see if it waggles with a simple program. Or connect a scope. Or connect something to the fix-status pin of the receiver.

AWOL:
You could connect the output line to an ordinary input pin and see if it waggles with a simple program.
Or connect a scope.
Or connect something to the fix-status pin of the receiver.

ok got your point , i will check it .

[quote author=Puneet verma link=topic=152315.msg1143815#msg1143815 date=1362498143] Is their any other way to check whether my gps is receiving signal or not ? [/quote]

I'm sure there are, but start from the basics: Is your receiver in line-of-sight with a large area of sky, without any tinted or reflective glass in the way?

You might also want to consider, whether your GPS device emits NMEA text strings, or some kind of "binary" data, or some other format.

I have the Adafruit Ultimate GPS breakout board https://www.adafruit.com/products/746 but it is essentially the same as what you have.
This sketch prints the output from the GPS to the Serial Monitor. Note that I use SoftwareSerial. I couldn’t get NewSoftSerial to compile.

#include <SoftwareSerial.h>

SoftwareSerial gpsSerial(2, 3); // create gps sensor connection

void setup(){
  Serial.begin(9600); // connect serial
  gpsSerial.begin(9600); // connect gps sensor
}

// Just loop forever reading from the GPS and writing it to the Serial Monitor
void loop(){
  while(gpsSerial.available()){
    Serial.write(gpsSerial.read());
  }
}

Pete

Depending on location and clear [u]visibility[/u] of the Skies "Position Lock" can take up to 5 minutes. IIRC there is a line in the "TinyGPS12.ino, when uncommented will dump the Raw NMEA data to your serial monitor... I've used it, convinced my GPS receiver was broken... It wasn't. It does however take about 5 minutes of CLEAR SKY not heavily cloudy... for the Ephemeris to created in the GPS device and I don't think your device will work without one. I got disgusted and went to bed... the GPS sketch was working when I awoke.

Bob

@Puneet verma Have you run the Adafruit sketch here: https://raw.github.com/adafruit/Adafruit-MTK3329-GPS-Module-Test-Sketch/master/Adafruit_MTK3329_GPS_Test.pde. It sets the GPS update rate and which sentences it will send. Perhaps if you haven't done this it won't do anything?

My GPS sends NMEA sentences even if it is not locked onto any satellites but I have already used the Adafruit sketch to set the update rate and select the sentences.

Pete