NMEA to wifi for less than a tenner?

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
I have RS232 devices driving my simrad instruments and auto pilot. I also have my SH GX 2000 DSC radio driving a RS232 to USB converter to input DSC messages into my PC.

Is it worth bothering with the DSC messages over nmea? I have the GX2100 (love it!) , only now getting round to wiring up the AIS to the Raspberry Pi which will be with a ESP8266 - what actually comes over the DSC output?

After leaving northern Europe waters the DSC alarm rarely goes off, wondering if it's worth wiring the nmea feed up to opencpn..

ta
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,471
Visit site
Is it worth bothering with the DSC messages over nmea? I have the GX2100 (love it!) , only now getting round to wiring up the AIS to the Raspberry Pi which will be with a ESP8266 - what actually comes over the DSC output?

After leaving northern Europe waters the DSC alarm rarely goes off, wondering if it's worth wiring the nmea feed up to opencpn..

ta

I connected it up as when the DSC position report message or the response to a position request message is received OpenCPN will mark the position on the chart. Also if a DSC emergency call is received ICON will again plot the position.

I already had AIS before I got the GX, which is why I went for the GX2000. I feed my GX2000 and the OpenCPN with the same RS232 signal. I also have a separate RS232 GPS mouse that feeds the GX2000 and my MOB tags system I got from Angus.
 

Hoolie

Well-known member
Joined
3 Mar 2005
Messages
8,123
Location
Hants/Lozère
Visit site
I connected it up as when the DSC position report message or the response to a position request message is received OpenCPN will mark the position on the chart. Also if a DSC emergency call is received ICON will again plot the position.

I already had AIS before I got the GX, which is why I went for the GX2000. I feed my GX2000 and the OpenCPN with the same RS232 signal. I also have a separate RS232 GPS mouse that feeds the GX2000 and my MOB tags system I got from Angus.
According to the GX2000 manual you can't have a 38,400 AIS/GPS input and DSC position report output simultaneously. Has this limitation been removed with later firmware updates?
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,471
Visit site
According to the GX2000 manual you can't have a 38,400 AIS/GPS input and DSC position report output simultaneously. Has this limitation been removed with later firmware updates?

My manual is on the boat so I cannot look at the one that cane with my radio

I have found 2 manuals and the SH site

1) GX2000 and GX2100
2) GX2000 and GX2150

in both manuals on page 21 in manual 1) and page 15 in manual 2)

the NMEA wiring is as follows in manual 2) page 15

Green NMEA Ground
Blue NMEA GPS input 4800 baud
Gray NMEA DSC output 4800 baud
Brown NMEA AIS input 3840 baud

the NMEA wiring is as follows in manual 1) page 21

Green NMEA Ground
Blue NMEA GPS input 4800 baud
Gray NMEA GPS output 4800 baud
Brown NMEA AIS input 3840 baud

So yes there is a difference between 2 different manuals and a manual is also for a later model there must have been a change
 

Hoolie

Well-known member
Joined
3 Mar 2005
Messages
8,123
Location
Hants/Lozère
Visit site
Thanks. I was (and perhaps still am) confused by the data transfer tables in GX2000/GX2150.

Page 18 shows GX2000 4800 connections - 1) GPS in : 2) DSC out : 3) AIS in at 38400
Page 19 shows GX2000 38400 connections - 1) not used : 2) DSC out : 3) AIS in, presumably including GPS data
Page 20 shows GX2150 4800 connections - 1) GPS in : 2) DSC out : 3) AIS out at 38400
Page 21 shows GX2150 38400 connections - 1) GPS in : 2) DSC & AIS out : 3) not used

I'm considering a GX2000 and I think it does what I want: GPS and AIS inputs from a Vesper XB8000 : DSC outputs to PC for use with OpenCPN. It's not crystal clear though and I think by a convoluted route I can get DSC data on WiFi for use on a remote tablet.

Sorry for the thread hi-jack ... ...
 
Last edited:

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,471
Visit site
Thanks. I was (and perhaps still am) confused by the data transfer tables in GX2000/GX2150.

Page 18 shows GX2000 4800 connections - 1) GPS in : 2) DSC out : 3) AIS in at 38400
Page 19 shows GX2000 38400 connections - 1) not used : 2) DSC out : 3) AIS in, presumably including GPS data
Page 20 shows GX2150 4800 connections - 1) GPS in : 2) DSC out : 3) AIS out at 38400
Page 21 shows GX2150 38400 connections - 1) GPS in : 2) DSC & AIS out : 3) not used

I'm considering a GX2000 and I think it does what I want: GPS and AIS inputs from a Vesper XB8000 : DSC outputs to PC for use with OpenCPN. It's not crystal clear though and I think by a convoluted route I can get DSC data on WiFi for use on a remote tablet.

Sorry for the thread hi-jack ... ...

I think you will find a baud rate setting somewhere that also changes what data is sent out which connections.

I chose to have my GPS mouse feed my radio direct and not via my AIS receiver as I already have a USB GPS mouse feeding my PC. If your Vesper had GPS and AIS on the 38400 baud line chose the setup described on page 19 with the appropriate coms speed setting.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
two and a half days so far without a glitch, these boards are amazing!


N7TCW3R.png
 

Frankklose

Member
Joined
25 Nov 2001
Messages
191
Location
germany
Visit site
The idea of using the NodeMCU is really great, but for most people the design of Vladis is even better. I like his layout and software. (3 optocouplers and a stepdown powersupply, leds...)
Since I wanted to fiddle as well I got the NodeMCU and used the software of Vladis
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
The idea of using the NodeMCU is really great, but for most people the design of Vladis is even better. I like his layout and software. (3 optocouplers and a stepdown powersupply, leds...)
Since I wanted to fiddle as well I got the NodeMCU and used the software of Vladis

It does look good for sure, and opto isolators are nice - gets rid of earth loops if nothing else. A couple of downsides is cost, though it's not that much really - but not having one wire for thermometers and i2c for a accurate voltmeter is a big omission for my set up. Easy Esp seems to be happy running 1 serial to wifi, 3 thermometers and a 4 channel voltmeter so far, it would be nice to have another serial input but don't think that's going to happen with easyesp. Which isn't too much of a problem here.
 

smartcom

New member
Joined
19 May 2009
Messages
131
Location
Nether Wallop
www.smartcomsoftware.com
A few comments from our NMEA and ESP experience.
- whilst the boat's supply is nominally 12V it can spike up to about 18V, so I suggest a properly regulated power supply is worthwhile. If you add in a chunky capacitor it will also keep the device powered up when, say, switching battery banks
- Electrically NMEA0183 can basically be seen as a superset of RS422 - most new marine electronics follow RS422 and so comply with NMEA0183, but quite a lot of older NMEA kit isn't strictly compliant with RS422, though most RS422 chips are tolerant enough that they will work with it. RS422 and NMEA0183 are differential, i.e. they use 2 wires and measure the voltage difference between them. RS232 (and some instrument manufacturers, the biggest of which is Garmin) don't use a differential signal, but instead one signal wire and the electrical 0V level on the device. This is more prone to interference and ground loop problems, though generally it works OK connecting 0V to the NMEA B connector. The reason it is more prone to interference is that with a differential signal interference may (say) put a spike of an extra 1V on the wires, but as the voltage difference is the same this doesn't matter, whereas with RS232 the signal wire goes up by 1V but the electrical 0V is unchanged, so the signal level has gone up by 1V which may turn your 0 into a 1.
- Any decent commercial kit should have opto-isolation as it helps remove both ground loops and interference. For DIY projects you may decide to skip it, and obviously the level of complaint is less than if you had just paid for something! To do it properly, both the data lines and the power supply need to be isolated, otherwise the power supply can be used to bypass the opto-isolation. More importantly, both power and data signals should be protected against reverse polarity and over voltage, e.g. connecting power into the data connector.
- Unless your app just supports UDP, I'd strongly recommend switching to TCP. UDP will lose quite a lot of the NMEA data, and generally slow the speed of the Wi-Fi network (though not a problem if you are just running a dedicated AP for NMEA0183 data. TCP is lossless, faster, and bi-directional
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
- Unless your app just supports UDP, I'd strongly recommend switching to TCP. UDP will lose quite a lot of the NMEA data, and generally slow the speed of the Wi-Fi network (though not a problem if you are just running a dedicated AP for NMEA0183 data. TCP is lossless, faster, and bi-directional

As a test I tried sending UDP at 100Hz , lost near zero sentences.

Is TCP faster than UDP? Everything I've read points to the opposite, no need for ACKs , one way traffic. Would you need bidirectional traffic for NMEA sensors?

For some traffic I've gone over to MQTT as it's easier in my setup to configure.
 
Last edited:

smartcom

New member
Joined
19 May 2009
Messages
131
Location
Nether Wallop
www.smartcomsoftware.com
Over a wired network you're right, the lower overhead is a benefit, but over Wi-Fi the way they have implemented broadcast and multicast UDP means that you do get significant data loss, and also the speed of the Wi-Fi links are all brought down to that of the slowest on the network.
I would point you to the blog entry I wrote on this at nmeatools.com, but unfortunately the blog component on the site has fallen over so it won't be up and running till later in the week.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
Over a wired network you're right, the lower overhead is a benefit, but over Wi-Fi the way they have implemented broadcast and multicast UDP means that you do get significant data loss, and also the speed of the Wi-Fi links are all brought down to that of the slowest on the network.
I would point you to the blog entry I wrote on this at nmeatools.com, but unfortunately the blog component on the site has fallen over so it won't be up and running till later in the week.

OK, Ta. Not really a problem on my little boat, MQTT & UDP work fine, great having such cheap sensor data available these days. Temperature, barometer & accurate voltage for less than a london pub lunch :cool:
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
Just gets better :cool: So after wifi ing nmea data into your Raspberry Pi, having ordered a couple of spare ESP8266's you can make a remote display, 20 x 4 LCD off ebay or amazon - https://www.amazon.co.uk/s/?ie=UTF8...vtargid=kwd-4606729028&ref=pd_sl_1170bbey2a_b

Get an enclosure from screwfix and a USB power pack and you have a display to carry around with you!

Below is just made up data but it's coming in over wifi from a raspberry pi, tiny bit of code to write to get it to send the data but you can cut and paste that. Same easyEsp firmware makes setting up the Esp easy.

https://www.letscontrolit.com/wiki/index.php/LCDDisplay

Might be up to twenty quid for this one with a case.

yoQflcf.png




Edit - Thinking about it, if you have wifi onto the web on the boat then this should work anywhere as it uses MQTT to transfer the data, the Pi throws throws that out into the web as well as around the boat if it's connected. Have boat windspeed, battery voltage & fridge temperature displayed on your mantlepiece :cool:
What could be more useful ;)
 
Last edited:

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
So what options for a waterproof case?

Thinking maybe something like this with 3 x 18650 batteries and a waterproof 2.1mm socket for charging. Charger boards and buck converters to charge / power the esp are less than a beer each. Maybe a waterproof motorbike usb socket as well.

125-125-75mm-Electrical-Switch-Box-Transparent-Waterproof-Enclosure-Box-Outdoor-Waterproof-Switch-Socket-Box-Free.jpg_640x640.jpg
 
Last edited:

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,471
Visit site
So what options for a waterproof case?

Thinking maybe something like this with 3 x 18650 batteries and a waterproof 2.1mm socket for charging. Charger boards and buck converters to charge / power the esp are less than a beer each. Maybe a waterproof motorbike usb socket as well.

125-125-75mm-Electrical-Switch-Box-Transparent-Waterproof-Enclosure-Box-Outdoor-Waterproof-Switch-Socket-Box-Free.jpg_640x640.jpg

With that kind of box you must not tighten the screws too much otherwise the polycarb lid will crack and let water in.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
With that kind of box you must not tighten the screws too much otherwise the polycarb lid will crack and let water in.

Now how did you find that out... ;)


Just found a little ESP board that comes with a tiny screen and battery holder for a 18650 Lithium, screen's too small to be that much use but cool device :cool:

1pc-ESP8266-Development-Board-WeMos-D1-Esp-Wroom-02-Motherboard-0-96-Screen-Module-18650-Battery.jpg
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,427
Location
Hopefully somewhere warm
Visit site
Now just maybe this is a bit more geeky than some might think strictly necessary...... ;)

But, ages ago when the fridge thermostat packed up it turned out making one out of an arduino was actually cheaper and much more fun than buying a new one, even if it took a little bit longer.

So now, it might just turn out that swapping out the fridge arduino for an Esp8266 might be even more fun, and actually quite useful.
So, when it's time for a navtex or weatherfax to come in the Raspberry Pi tells the fridge to shut up for a while and don't run cos I'm busy getting stuff over the airwaves, fridges are really RF noisy. Then tells it OK, done, as you were. :cool: Long passages before the fridge has had loads of unscheduled defrosts after forgetting to turn it on again after downloading a weatherfax.

Should be an easy swap out physically, then some software to do which easyesp should make mostly quite straight forward, some variable stuff might mean some head scratching. Good bit is it's all done over wifi so once fitted no need to get a usb cable in there to reprogram.

Anyone actually still reading.. ;)
 
Top