Budding · Taking shape, still changing

A GPS module sent garbage instead of NMEA: it was RS-232, not TTL

Planted Czytaj po polsku →

I had a GPS module with no markings apart from the maker’s name (Skylab) – most likely an SKM51. According to the datasheet it uses TTL levels, so I hooked it up through a cheap FT232RL USB-UART adapter. Data arrived regularly and repeatably, but instead of readable ASCII NMEA sentences it was garbage.

PuTTY window on COM9 full of repeating, unreadable characters instead of NMEA sentences
Output from the module, read through a TTL adapter.

What I checked

  • a second adapter – same result,
  • different baud rates and serial settings – either no data or garbage,
  • 3.3 V and 5 V logic (adapters with a jumper) – no difference,
  • the TX↔RX wiring – checked many times,
  • a Raspberry Pi instead of the adapter – the same repeatable garbage,
  • several antennas – all behaved the same.

The clue: a negative voltage

I measured the voltages on the original device that used to talk to this module: VCC +5 V, TX 0 V, RX −5 V. A negative voltage on a data line is the signature of RS-232 – generated by the charge pump in a MAX232-style chip. The standard allows levels from ±3 V to ±15 V, so −5 V is within spec. And the datasheet did say the module comes in two variants: RS-232 and TTL.

That explains the symptom: RS-232 is inverted relative to TTL – a logical one is a negative voltage – so a TTL adapter reads inverted bits. The data is repeatable but unreadable.

The fix

I used an RS-232-to-TTL converter, plus, for convenience, a cable with a breakout to screw terminals so I would not have to cut the original lead. I also had to bring +5 V to the GPS module and tie its ground to the USB ground. After that, the data was readable.

Lessons

  • Repeatable but unreadable data at the right baud rate is a classic sign of inverted logic or wrong voltage levels.
  • Before trusting the datasheet, measure the idle voltage on the data line: TTL idles high (3.3 or 5 V), RS-232 idles negative.
  • Another possible cause: some GPS modules output the maker’s binary format and have to be switched to NMEA with the maker’s tool.

Source: my thread on elektroda.pl (in Polish) – Moduł GPS Skylab SKM51 i chińskie przejściówki: nieczytelne znaki ASCII w formacie NMEA (September 2020).