Interfacing with USB device

Hi all,

I would like to connect my GPS receiver to my Arduino (Decimilia).

The point is that this GPS (an iBlue747 : http://www.transystem.com.tw/p-gps-iblue747.htm) has an UBS interface. I can easily read the EMEA datas sent by this device on the USB port on Windows with an HyperTerminal.

But I haven't find any USB library for the Arduino nor the way to connect an USB port to the board.

Any advice, or point to start from?

Thanks.
Vincent.

GPS's use a serial to usb chip just like the small one next to the USB plug on the Arduino.
Unfortunately you cant just plug two of them together and the Arduino cannot pretend to be a computer.
The USB spec is rather complicated for the receiving side.

Your best bet is to open up the GPS, find where the USB data goes and solder a small wire to the chip.
That wire can then go straight to the RX pin on your Arduino (ignoring voltages - 3.3v should work). Basically bypassing USB.

You'll need to google the USB chip's name to see which pin you need to hijack.
Alternatively you could try all of them until you get data.

I intend to do something similar with my bluetooth GPS eventually

Hi Cheater,

Thanks for your quick reply.

I don't want to go to deeply in the hardware, that's the reason why I bought an Arduino instead of directly work with a microcontroller :wink:

Do you think it could be possible to connect the GPS to the Arduino through an USB to serial adapter ? And then read the serial port ... pretty unproductive, I agree.

Vincent.

The problem is that USB is a two sided protocol. One device has to be the host and the other has to be the slave.
Unfortunately both the Arduino and your GPS are slaves.
USB to serial adaptors are also slaves. They need to be plugged in to a host to work.

Turning the Arduino in to a host is incredibly difficult.
You need to know the USB spec extremely well and then hand code a implementation for the Arduino.

If your GPS had a serial interface instead of USB then it would be fairly easy because serial doesnt care where the data goes to.
Thats why I suggested that you tap in to the serial stream in the GPS.

Yes, that's what I saw after some searches on the USB protocol. It seems to be quite complex. I think that's the reason why there is no USB library ::slight_smile:
I am going to take a look at the inside of my GPS logger as you suggest.

...

Thats why I suggested that you tap in to the serial stream in the GPS.

All right.
I managed to open the device, and fortunately, the inside is very clean and the board has 7 holes labeled "download, GND, RTS, CTS, TXD, RXD, BVDD". I think that I am going to warm up the soldering iron this week-end ...

Hahaha. You dont get it better than that. :slight_smile:

In theory just tap in to the TXD line and you should get a nice NEMA stream

and then what?

how do you retrieve the info from the gps?

( i know im commin from no where, but im curious lol )

NMEA is a serial stream with all the data you need to know - time, lat, long etc.

Well I've opened my bluetooth GPS and you cant get simpler than this.
Its just a pcb with a bluetooth module and a gps module soldered on with the support circuitry and battery charger.

It even includes nice solder points for the power and TX pins.
Need to pull out the multimeter to find out which one is which but it'll be simple. No labels. :frowning:

how do you retrieve the info from the gps?

The NEMA protocol is great. You just open the serial connection and the data streams in.
You dont need to use your TX line at all.

The protocol is also simple and human readable (to some extent) which makes it easy to write a parser.

The protocol is also simple and human readable (to some extent) which makes it easy to write a parser.

a simple nmea parser is posted here: http://www.arduino.cc/playground/Tutorials/GPS