Arduino UNO as serial interface adaptor to GPS module

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Apparently Arduino Nano (and Uno) can be used as an interface module between u-center GNSS software and u-block based GPS modules, like Beitian. In order to use the Arduino in this role one supposedly just has to continuously pull the Reset pin to GND. OK, so the USB jack in this case goes to the computer running u-center. But what about wiring the GPS module to the Arduino? Where are the TX and RX pins of the GPS module supposed to be connected on the Arduino? What interface?

Dessine-moi un mouton

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not just use a normal USB-to-UART adaptor ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AndreyT wrote:
But what about wiring the GPS module to the Arduino? Where are the TX and RX pins of the GPS module supposed to be connected on the Arduino? What interface?

You do realize the Arduino project is open source, so all of the schematics are available on line for free, just google arduino uno schematic or arduino nano schematic to answer all your questions.

AndreyT wrote:
In order to use the Arduino in this role one supposedly just has to continuously pull the Reset pin to GND.

awneil wrote:
Why not just use a normal USB-to-UART adaptor ?

Indeed!  Why not.

 

 

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
Why not just use a normal USB-to-UART adaptor ?

 

Because:

 

1. I don't know what adaptor I need: USB-to-... what? This is why I'm asking this question in the first place.

2. I don't have "a normal USB-to-UART adaptor" lying around

3. One does not need a USB-to-UART adaptor when one has and Arduino lying around. Arduino as "normal" an adaptor as any other adaptor.

 

Choose any one reason or all three.

 

ki0bk wrote:
You do realize the Arduino project is open source, so all of the schematics are available on line for free, just google arduino uno schematic or arduino nano schematic to answer all your questions.

 

Please, read questions first - before answering. It is perfectly clear from my question that I had no idea what interface to look for. What good is the schematic in this situation?

 

Once I figured out what interface I needed I immediately realized what pins I should connect to (no need to look through the schematic): RX(0) and TX(1) on the Arduino. Kinda weird that I have to connect TX to TX and RX to RX, but apparently that's how these pins are labeled on the Arduino.

 

Dessine-moi un mouton

Last Edited: Wed. Mar 3, 2021 - 09:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kinda weird that I have to connect TX to TX and RX to RX,

Agreed.

 

Additionally, does the Arduino's USB to TTL bridge chip require a specific baud rate for its data input on the logic level side?

 

If so, what is the baud rate for the NMEA, (or propriatry), data output from the GPS module?

 

Additionally, is the GPS module's output 3V or 5V logic level data?

There are many GPS modules available, and you will likely need to look at the specific model's data sheet, or just put an O'scope on it.

 

If you get stuck with your current approach, an option would be to just read the GPS data string into one of the Arduino's micro's USART ports, and ship the data out the USB connected USART.

Note that ideally one would use a ring buffered, interrupt driven USART interface for the incoming GPS data string.

 

The outgoing baud rate, obviously, has to be greater than the incoming data buad rate, or the buffer will overflow...

 

JC 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AndreyT wrote:
It is perfectly clear from my question that I had no idea what interface to look for

Not really.

 

If that's the question, why not just ask that - the UNO is irrelevant for that.

 

You'd need to give full details of the specific GNSS device you're talking about.

 

Surely, it's documentation must say what interface(s) it has ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

 

 

DocJC wrote:

Kinda weird that I have to connect TX to TX and RX to RX,

Agreed.

Actually not.

 

The original RS232 specification is about connecting equipment (DTE) to modems (DCE).
It doesn't define pins on the devices, it defines "circuits" (ie, connections) between them; eg, the "Tx Data" circuit is the wire which carries data to be transmitted - which is an output from the computer equipment, and an input to the modem.

 

     DTE                             DCE
+------------+                  +-----------+
|            |      TxD         |           |
|    TxD out +----------------->+ TxD in    |
|            |                  |           |
|    RxD  in +<-----------------+ RxD out   |
|            |      RxD         |           |
+------------+                  +-----------+

 

So whether the pin marked "TX" is an output or an input depends on whether the device thinks it's a DTE or a DCE.

 

Similar to the way SPI had MISO and MOSI - you connect the two MOSI  pins together; it's is an output on the Master, and an input on the slave.

 

EDIT

 

Historic references:

 

http://www.8052mcu.com/forum/rea...

 

http://www.8052mcu.com/forum/rea...

 

EDIT 2

 

Current Standards

 

https://www.itu.int/rec/T-REC-V.250/en

 

https://www.itu.int/rec/T-REC-V.24-200002-I/en

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Mar 4, 2021 - 09:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, but...

 

The Arduino labels the micro's USART's RxD pin as Rx, (and likewise the TxD pin Tx).

So the Arduino expects to see incoming data on the rx pin.

 

Cheap GPS modules, as devices / sensors /etc., typically label their data output as TxD, i.e. the pin that the module itself is transmitting on.

 

So, for 1/2 dozen or so GPS modules I've used over the years, all of them had the TxD <--> RxD, and RxD <--> TxD, (i.e. criss-crossed), labels.

 

YMMV !

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Indeed - I wouldn't have thought of a GPS receiver as a "DCE" - but, clearly, someone did. Or just got it wrong.

 

Or perhaps they thought they were being "helpful" in writing "TX" on the pin that needs to be connected to the Arduino's "TX"

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...