Instruments can't see NMEA 0183 data from Ublox Neo-6M GPS module

ianj99

Active member
Joined
11 Nov 2009
Messages
2,103
Location
UK
Visit site
Hello,

For the VHF radio you would not need an inverter. You could connect TX to Nmea- and Nmea+ to +5V. For the AIS it looks like it has a non differential Nmea 0183 input accepting voltage data between Input and Ground. I do not see a reason to include an optocoupler here. If you use an optocoupler, the output transistor will perform the inversion. Instead I would use a simple PNP transistor wired as per the diagram enclosed. The diode in the base of the transistor could be omitted except if the high idle voltage of TX is less than 4,4V. If you use a Led diode it even gives you a tip for data activity. If using a Led the 10k resistor should be about 470R or less to light up the Led properly. The general purpose PNP will be strongly saturated with this lower base resistance but, at 4800 baud, there will be no harm. The resistor from the collector to the AIS input could also be omitted. And the waveform is much better than that of an optocoupler.

The same inversion could also be achieved with a MAX485 IC powered from your 5V supply without resistors or else. In the following url you can see a circuit diagram where a "3V3 TTL Serial" signal (GPIO2 in the case) enters pin 4 on the MAX485 to create an inverted signal on its pin 7 (A3 in the diagram).

https://www.vela-navega.com/images/stories/nmea2wifi/nmea2wifi-schematics.gif

I also left here a post that I wrote in my forum about optocouplers hoping that it would be of interest to others:

https://www.vela-navega.com/forum/viewtopic.php?f=6&t=64

Regards, Luis
That won't work because the GPS module is running on 3.3V so its output will not go high enough to turn off the transistor (needs to go above 4.5 to do this) A transistor will not give a cleaner signal than an opto coupler.
If the distortion is causing unreliablity, a Max232 is probably the best option.
 

ianj99

Active member
Joined
11 Nov 2009
Messages
2,103
Location
UK
Visit site
I had a similar unit, and I'm fairly certain it also used a Ublox chip, and also had a Windows app for setting it. But I had the same issue - it wouldn't save the settings when powered down and as I wanted to run it at 5 updates per second, it was no use to me. I just use it as a 1Hz GPS source for my backup Windows chartplotter, using the excellent Bellfield Chart Plotter.
 

Elbows

Member
Joined
24 Dec 2016
Messages
137
Visit site
I had a similar unit, and I'm fairly certain it also used a Ublox chip, and also had a Windows app for setting it. But I had the same issue - it wouldn't save the settings when powered down and as I wanted to run it at 5 updates per second, it was no use to me. I just use it as a 1Hz GPS source for my backup Windows chartplotter, using the excellent Bellfield Chart Plotter.

I really hope it's not that as it would mean this whole thing has been a complete waste of everybody's time. It's OK short term, but this time it was left overnight. It's got a backup battery (or possibly supercapacitor) which is supposed to retain the settings and I assumed that would be for longer than an hour two.

BTW, the VHF is now seeing the data as well.
 

ianj99

Active member
Joined
11 Nov 2009
Messages
2,103
Location
UK
Visit site
I really hope it's not that as it would mean this whole thing has been a complete waste of everybody's time. It's OK short term, but this time it was left overnight. It's got a backup battery (or possibly supercapacitor) which is supposed to retain the settings and I assumed that would be for longer than an hour two.

BTW, the VHF is now seeing the data as well.

On post 6, there are two pins on the (internal) Ublox module that can set the baud rate. What else do you need to change?

Looking at the Ublox data sheet, it does indeed require a backup battery or it does a cold start on power up.

So either the backup battery is flat or not charging or is not actually fitted. I suspect the latter was the case with mine, a fact the seller conveniently forgot to mention and explaining why the thing was so cheap.

Have you read section 9 of the app guide as it offers a way to save the baud rate to the reciever's non volatile memory which makes the backup battery irrelevant.
 
Last edited:

Vladis

Member
Joined
20 Mar 2011
Messages
54
Visit site
That won't work because the GPS module is running on 3.3V so its output will not go high enough to turn off the transistor (needs to go above 4.5 to do this) A transistor will not give a cleaner signal than an opto coupler.
If the distortion is causing unreliablity, a Max232 is probably the best option.
Hello,

Yes you are right if the TX voltage does not go higher than 3V3. That is the reason why I suggested a diode. Actually I tested that using a Led diode in the transistor Base terminal as a way to achieve 2 things: a) get a 3V3 to 5V level adapter b) get the inversion that we are talking about.

The Led has a forward voltage of about 2V which summed to the 0.6V of the emitter junction means that a voltage of 2.4V will cut off the transistor. On the other hand a series resistor of about 470R will cause a current of about 5mA to bright the Led when data is coming though. About the shape of the waveform on the optocoupler it really depends on its speed.

Regards, Luis
 

ianj99

Active member
Joined
11 Nov 2009
Messages
2,103
Location
UK
Visit site
Hello,

Yes you are right if the TX voltage does not go higher than 3V3. That is the reason why I suggested a diode. Actually I tested that using a Led diode in the transistor Base terminal as a way to achieve 2 things: a) get a 3V3 to 5V level adapter b) get the inversion that we are talking about.

The Led has a forward voltage of about 2V which summed to the 0.6V of the emitter junction means that a voltage of 2.4V will cut off the transistor. On the other hand a series resistor of about 470R will cause a current of about 5mA to bright the Led when data is coming though. About the shape of the waveform on the optocoupler it really depends on its speed.

Regards, Luis

I didn't spot the diode!
Still, he's got both vhf & ais now working with the opto.
 

Elbows

Member
Joined
24 Dec 2016
Messages
137
Visit site
On post 6, there are two pins on the (internal) Ublox module that can set the baud rate. What else do you need to change?

Looking at the Ublox data sheet, it does indeed require a backup battery or it does a cold start on power up.

So either the backup battery is flat or not charging or is not actually fitted. I suspect the latter was the case with mine, a fact the seller conveniently forgot to mention and explaining why the thing was so cheap.

Have you read section 9 of the app guide as it offers a way to save the baud rate to the reciever's non volatile memory which makes the backup battery irrelevant.

Yes, I thought I was permanently saving the settings by going to CFG/CFG which is detailed in section 9. I've just done a spot of digging around and it turns out it's not that straightforward.

Apparently the Neo-6M doesn't have flash memory built into the Ublox module, but there's supposed to be an EEPROM of the correct type mounted on the PCB of the GPS unit which permanently saves settings. However many suppliers either don't fit it or else it's the wrong spec so the settings aren't saved. The batteries/supercapacitors are known to be a bit weedy and are really only meant to save the stuff which allows it to get a quicker fix after a short power-off. That explains everything.

Good point about settings other than baudrate not being needed. I've just reset it to default configuration and had a look at the text console output. It's outputting 8 different NMEA formats one after the other, including GPRMC, on all ports. I'm assuming my instruments will ignore all the other formats and just read the GPRMC. I'll test that and make sure it works and if so I'll try the hardware mod to set the baudrate as suggested. I've been reluctant as it's an SMD component. I have done some surface mount work but I know how easy it is to screw things up with some clumsy wielding of the soldering iron.
 

Elbows

Member
Joined
24 Dec 2016
Messages
137
Visit site
OK, next stage of the saga!

According to the the Neo-6M datasheet, to set the baudrate to 4800 pin 14 has to be pulled high and pin 15 pulled low. I've scraped the lacquer off around the pins and shone a light through the board and they don't appear to be connected to anything outside the module footprint, but there may be tracks underneath it.

The default baudrate is 9600 and the pin configs for that are both high, but it doesn't make clear whether that's purely an internal setting, or whether it's the default hardware connection. The pin description does say to leave both pins open if they're not being used which suggests they're not already pulled high.

Assuming that they are unconnected at the moment, then can I just connect pin 14 to Vcc and pin 15 to GND? Or should I use a resistor in series for either or both?

EDIT:
I've put my multimeter on the pins and they are currently both high. Again, I don't know whether that's internal or because they are connected by PCB tracks under the module.
 
Last edited:

Elbows

Member
Joined
24 Dec 2016
Messages
137
Visit site
Bingo!

Got fed up with it and just bridged across between Pin13 (Gnd) and Pin 15. It was either that or chuck the bloody thing out of the window. Plugged it in, no smoke, and it still works! If I set everything back to default in u-center it stays on 4800 baud.

So thanks again to everybody who contributed, and particularly to ianj99 again. If I had more time I'd play around with the MAX485 but as it all works now I'm going to leave well alone and just install it as it is on the boat.

Once again the PBO forum members have been a huge help. Thank you.
 

gregcope

Well-known member
Joined
21 Aug 2004
Messages
1,622
Visit site
Bingo!

Got fed up with it and just bridged across between Pin13 (Gnd) and Pin 15. It was either that or chuck the bloody thing out of the window. Plugged it in, no smoke, and it still works! If I set everything back to default in u-center it stays on 4800 baud.

So thanks again to everybody who contributed, and particularly to ianj99 again. If I had more time I'd play around with the MAX485 but as it all works now I'm going to leave well alone and just install it as it is on the boat.

Once again the PBO forum members have been a huge help. Thank you.

Can you supprise how you got a 3.3v logic system to work with Marine NMEA systems?
 

Elbows

Member
Joined
24 Dec 2016
Messages
137
Visit site
Can you supprise how you got a 3.3v logic system to work with Marine NMEA systems?

Do you mean can I explain it? The 3.3V system is sending the signal to an optoisolator which inverts it and passes it to the instruments as a 5V signal. It's a long read, but the details are all in the thread. It's not necessarily the most elegant system possible but it works, which is the important thing.
 

markbatey

New member
Joined
1 Feb 2019
Messages
18
Visit site
Hi,

For anyone else attempting to make a cheap GPS to interface with marine kit, here's an extra step I found necessary to make all this work.
I bought the NEO6M module off Ebay as usual and successfully changed the baud rate to 4800 to communicate with my Standard Horizon GX1200 VHF and had the module working fine. Not surprisingly, it wouldn't talk to the radio itself. I tried using an optocoupler as described in this thread, but with no success.
I was about to give up when I found a TTL to RS422 convertor for a couple of quid - described as a "RS422 Mutual Transfer TTL Bidirectional Signal Module Full-duplex". This converts the TTL style NMEA signals from the NEO6M to the RS422 that a lot of marine kit needs, and it works really well. Connections were: RX from NEO6M to RX on the RS422 box, TX from NEO6M to TX on RS422, 5v to VCC on both plus ground connections.
Hope this helps anyone wanting to make their own budget GPS receiver.

Mark
 

strauchiigais

New member
Joined
21 Apr 2021
Messages
1
Visit site
Hi,

For anyone else attempting to make a cheap GPS to interface with marine kit, here's an extra step I found necessary to make all this work.
I bought the NEO6M module off Ebay as usual and successfully changed the baud rate to 4800 to communicate with my Standard Horizon GX1200 VHF and had the module working fine. Not surprisingly, it wouldn't talk to the radio itself. I tried using an optocoupler as described in this thread, but with no success.
I was about to give up when I found a TTL to RS422 convertor for a couple of quid - described as a "RS422 Mutual Transfer TTL Bidirectional Signal Module Full-duplex". This converts the TTL style NMEA signals from the NEO6M to the RS422 that a lot of marine kit needs, and it works really well. Connections were: RX from NEO6M to RX on the RS422 box, TX from NEO6M to TX on RS422, 5v to VCC on both plus ground connections.
Hope this helps anyone wanting to make their own budget GPS receiver.

Mark
Hi

I have managed to solve a similar problem that was escaping me for several days.
My setup is a NEO-6M that has to feed $GPRMC messages into Clipper Tactical Wind instrument.

The main culprit was indeed the Serial Protocol difference between what NEO-6M tallked and what Clipper Wind Instrument expected.

NEO-6M Talks TTL
Clipper Tactical Wind Instrument talks RS232

Its basically an inverse signal
RS-232 vs. TTL Serial Communication - SparkFun Electronics

My solution is an Arduino board that listens to Neo-6M on the physical serial RX port and duplicates the info out to different pin using softwareSerial Library and inverse_logic to make it RS232 instead of default TTL

Using SoftwareSerial in Arduino for Serial Communication - Iotguider

I'm sure its not the cleanest solution but its budget friendly for sure.
 

northwind

Well-known member
Joined
6 May 2010
Messages
1,189
Location
Me -Storrington / boat Chichester
Visit site
Hi

I have managed to solve a similar problem that was escaping me for several days.
My setup is a NEO-6M that has to feed $GPRMC messages into Clipper Tactical Wind instrument.

The main culprit was indeed the Serial Protocol difference between what NEO-6M tallked and what Clipper Wind Instrument expected.

NEO-6M Talks TTL
Clipper Tactical Wind Instrument talks RS232

Its basically an inverse signal
RS-232 vs. TTL Serial Communication - SparkFun Electronics

My solution is an Arduino board that listens to Neo-6M on the physical serial RX port and duplicates the info out to different pin using softwareSerial Library and inverse_logic to make it RS232 instead of default TTL

Using SoftwareSerial in Arduino for Serial Communication - Iotguider

I'm sure its not the cleanest solution but its budget friendly for sure.
Even cheaper is to use a max232 chip... No programming required
 
Top