Page 1 of 1

Wiring an old GPS to a NXT

Posted: 31 Jan 2011, 01:34
by h-g-t
Reading articles about GPS recently reminded me that I had a Pretec Compact Flash GPS unit sitting on the shelf.

I did a bit of research looking for current Windows drivers and came across an article from someone who had modified it by attaching a serial port (http://www.headfuzz.co.uk/gpsmain).

Reading the description I was struck by the thought that it might be possible to connect this to the NXT, either directly or through the I2C miniboard I have ordered. Reading the data should be very much like reading from a BT GPS (said he hopefully) so existing programs could be adapted.

When he opened it up he found :-

"I discovered the module was a SiRfStarI OEM unbranded module, and would only have power and serial lines on it. The device uses the NMEA protocol at 4800bps Using a meter, I worked out the configuration of the cables.
In summary: NMEA 4800bpx Serial 8N1 settings The wiring is thus: Pin 1: Serial RX Pin 2: Serial TX Pin 3: 3.3V Doesnt change? Pin 4: N/C Not connected Pin 5: GND Ground Line Pin 6: 3.3V Positive supply.
Using the scope, I worked out that it was running 3.3v serial line 4800bps 8N1 port settings. So what would be needed to turn this into a serial device?"

Is this possible or should I just forget it?

Re: Wiring an old GPS to a NXT

Posted: 31 Jan 2011, 02:52
by nxtreme
I think it's very possible! In fact, I ordered a GPS to do the exact same thing with! The one I bought uses the SiRFstarIII chip set instead, but it would interface the exact same way (except that it supposedly uses 5V instead of 3.3V). By cutting apart the linked GPS, I get a GPS and a USB to TTL converter. I've thought of two options to connect it to the NXT. Option one: use a MAX485 or similar chip to interface to the RS485 capabilities of sensor port four. Option two: use a microcontroller to act as a go-between, like a Picaxe 20x2 or a TI MSP430.

The TI MSP430 can be bought for $4.30 on Digikey or for $2.15 on the TI website with free shipping (if you use the right codes... :twisted:) and includes everything you'd need to get going, even the programmer. However, it would be harder to program than the Picaxe, especially as I've never programmed C or ASM ('nother thing on the to-do list).

I think that if the RS485 option would work, it'd be easiest to use and to program, especially as you'd only have to program the NXT. However, I can't guarantee it'd work...

Re: Wiring an old GPS to a NXT - update

Posted: 31 Jan 2011, 09:01
by h-g-t
Sounds good! I have ordered a 'MODULE ET-MINI PCF8574' from futurlec and am (still) looking forward to getting my bands on that.

I had hoped that I could connect the GBS through the 8574, since anything else would probably be more expensive than just getting a BT gps from ebay.

PS the writer says that the chip is has a serial output, which presumably means that it is sending out -v or +v for 1s and 0s. However, this is a cf device so does he have it wrong or is there an adapter circuit inside the 'cf' section which fits into the computer/ pda?

Re: Wiring an old GPS to a NXT

Posted: 31 Jan 2011, 10:28
by mattallen37
The 8574 is capable of doing IO on 8 pins, but the speed at which the NXT drives the I2C bus is much too slow to do UART at anything near 4800 bps. I think either of nxtreme's suggestions would be much more feasible.

Re: Wiring an old GPS to a NXT

Posted: 31 Jan 2011, 11:41
by h-g-t
Hmmm..... I think it would be better to stick it back on the shelf and get a BT GPS instead. Thanks for the assistance.

Re: Wiring an old GPS to a NXT

Posted: 31 Jan 2011, 17:36
by hassenplug
h-g-t wrote:Hmmm..... I think it would be better to stick it back on the shelf and get a BT GPS instead. Thanks for the assistance.
If you want to play with electronics, it may be fun to try what they've suggested. Personally, I'd ditch the old GPS, and buy a BT GPS.

Steve

Re: Wiring an old GPS to a NXT - update

Posted: 31 Jan 2011, 20:24
by nxtreme
h-g-t wrote:I had hoped that I could connect the GBS through the 8574, since anything else would probably be more expensive than just getting a BT gps from ebay.
Yes, unfortunately, it would be quite hard to connect a GPS to the 8574. Very hard in fact :). However, the MAX485 chip that I was talking about is only $5 US and about $2 for shipping. You would probably even be able to get one for free, product samples are nice :). I found the DS485 which is even cheaper, at $2.40 US. However, I do understand if you don't want to wire it up to your NXT. I will try as soon as I get my GPS and a DS485, shouldn't be more than three or four weeks. You might find this interesting.