Before I rip out what remains of my hair over this, I figured I'd seek assistance.
I'm trying set up a gps logger with an Arduino Duemilanove and a Garmin eTrex. It's a basic setup based off of the instructions at:
[This is my first post, it won't let me post links.... sigh]
Instructions are at the Arduino Playground - GPS....
However, all I'm seeing in the serial monitor is gibberish. I feel like I'm missing something fairly fundamental. It looks like what you'd get if the baud rate was inaccurately set. However, both the GPS and the serial monitor are set to 4800 baud.
(1) Are you sure of the baud rate? You seem to be ok since you set both at 4800 baud.
(2) Does the etrex spit out 5volt TTL or RS232 +/- 12 volts?
Comment: RS232 tends to be inverted as compared to TTL. It is common for breadboard GPS modules to be TTL whereas most handheld GPS systems have rs232 signals.
Do you have access to a serial converter? If not, could you wire up a max232 chip?
The max232 chip and its clones sell for less than $2.
The max232 needs a few small capacitors to work.
The max233 needs no extra components but is more expensive.
As an interesting test, use a binary function to invert every bit. Just thinking out loud here... iData = Data xor 255 // 255 = 11111111
and then print out iData.
If that gives good data display, use a resistor to knock down the RS232 voltage to something close to 5volts so you do not kill an input pin.
Thanks much for your input. For question 1, the answer is yes. When sending out NMEA data from the GPS, it defaults to 4800 baud, which happily seems to be the default for the Arduino software serial monitor, as well. Trying just plain text from the GPS allows me to use different baud rates, thus the test at 9600. No joy either way.
To answer question two, I have to show my lack of knowledge. The eTrex uses the RS232 standard, but nothing I've looked at would suggest it spitting out 12v. In fact, one of the sets of instructions (http://spatialguru.com/hardware/arduino/gps_ossim) shows a direct connection from the GPS to the Arduino board's RX pin.
The eTrex uses the RS232 standard, but nothing I've looked at would suggest it spitting out 12v.
Ah, if it says it uses the RS232 standard, that's telling you it uses inverted ~12V singaling.
one of the sets of instructions shows a direct connection from the GPS to the Arduino board's RX pin.
If you'll notice he's "inverting" the signal by swapping the GND and data pins. This works because either a) the eTrex uses a 0V-5V level rs232 (is that the E spec?) instead of the common -10V/+10V, or b) he's just lucky he hasn't fried something by overdriving the pin.
Here's a rule to save yourself trouble and not fry your Arduino input pins: if a serial device has a DB9 connector, you need a level converter circuit like the MAX232 example mentioned earlier to connect it to the arduino. This gets appropriate voltages, signal levels, and gets you some ESD protection as a bonus.
Just a suggestion to everyone.... The local surplus store is selling old Microsoft Streets and Trips for $20 (Canadian, $16USD) which includes the GPS. The GPS is a small unit with an adapter plug. The plug is a TTL to USB converter which means the GPS is spitting out TTL serial. Perfect match for microcontroller use.
This works because either a) the eTrex uses a 0V-5V level rs232 (is that the E spec?) instead of the common -10V/+10V, or b) he's just lucky he hasn't fried something by overdriving the pin.
Could be both? A quick check with a multimeter suggests it's outputting around 2.5V. I'll order the MAX232 and put together the conversion. While waiting for that to arrive I'll work on other parts of the project.
Mark, I've seen the Microsoft GPS on ebay a number of times, usually around the price you mention. I believe it's called the Pharos 360, or somethin' like that. It or something like it may be a possibility if I can't get what I'm trying to work. Pretty much the only reason I want to utilize the eTrex is so I can use it, and its capability, on the trip all of this is going to go on.