Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 16-11-2012, 11:07   #31
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by ebaugh View Post
That's pretty neat. Worked on IPad Safari, although I'm unsure if I tested every feature. If your not out of analog inputs you could add engine data too. And a battery amp hour gauge.

How sure are you the hardware will remain easily available? Looks like there is a several week wait for the Pi.

Any plans for vector charts? Not sure how hard that is with a HTTP interface, the strength of the app.

Are you planning to make it open source?

Best Bob
Bob,
Thanks for the feedback. Freeboard will be open source. It has to be as its based on many opensource products - its only possible because I'm standing on the shoulders of giants so to speak.

Battery info voltage is easy. Amp/Hours needs a digital ammeter on the main battery +ve, not difficult or expensive.

The Freeboard Arduino can read pretty much any physical input, but as a sailor I havent spent time on the motor data. If its a well known protocol (eg NMEA0183) its easy, if its NMEA2000 you need to buy a spec document for $50K!. Or you use a converter to something more open. If its CANBUS its probably not difficult. The Arduino can output any data format.

There are many spare IO pins on the Arduino Mega, but eventually you run out of CPU cycles. You may have to use 2 Arduinos to one RaspberryPi. Its designed to expand that way.

Raspberry Pis are scarce, but that will improve. They are such a hit worldwide that they will be here for a while. Freeboard can use other similar boards, I chose the Raspberry because its popular and cheap.

Vector charts are possible in two ways. One is to draw on the client in javascript - complex and power hungry. The other is to convert to raster images and do it the same way as the current charts. The conversion can be 'smart', eg many layers with different data, so you get the same effects as vector charts. Conversion should be easier but I havent tried yet.

Rob
motu42 is offline   Reply With Quote
Old 16-11-2012, 12:32   #32
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by Mollymawk View Post

Interesting. I'm not familiar enough with either NMEA and RS232/RS422 or TCP and UDP protocols to know how this works behind the scenes; but would a basic (cheap) RS232-ethernet device such as this, which "supports" TCP and UDP, be able to do the same thing? I had assumed it was necessary for the device to "understand" NMEA and be able to "translate" it to something it can send over TCP or UDP - but perhaps this is not the case? Maybe any type of data on the serial port would be retransmitted via TCP or UDP without the device having to "understand" it?
Based on what FlyingCloud1937 says, this would seem to be the case, if I'm understanding correctly.


Now, I have another question partly related to this. I'm starting to understand a little more about NMEA0183 and I now see that it's not as simple as I'd previously thought. So what I want to know, is do I need a multiplexer?

I've just found that the VHF/AIS has two NMEA outputs; one for DSC data (which I'm not too interested in) and a different one for AIS targets (which is what I am interested in). The former is "normal" NMEA0183 at 4800 baud. The latter, however, is something the manual calls "NMEA HS ASI" (is that a typo for AIS, I wonder?) at 38400 baud.
MollyHawk,

Ive spent lots of time on this as a part for the Freeboard project. Basically NMEA0183 is specified to be 4800 baud. Thats s-l-o-w now, so the AIS version was spec'd at 38400 baud. Hence the two ports.

In fact NMEA0183 is just lines of normal text, human readable. It can be sent at any speed if you can control your serial port speed. Its often set at higher rates because you can flood a serial line at 4800baud quite easily.

The catch is NMEA0183 devices assume they are the only ones transmitting. A serial TX wire is connected to a serial RX reciever. You can have many recievers listening but only one talker.

So if two talkers share a single serial TX line, then they will simply talk over each other, ruining communications. Hence if you have more than one talker, you need to multiplex. If you have more than one speed (baud) you need to multiplex cos you cant mix speeds on one wire.

Because NMEA0183 just sends strings, any serial<>TCP converter would work, but the receiving program would need to know about the TCP packets and how to read them. Think web browser<>server. The web browser connects to the server (TCP) and asks for a page. The server sends HTML to the browser in TCP packets. The browser knows what to do with the text (HTML) inside.

So the recieving program needs to know to go to the converters IP address to get the connection setup. And the reciever needs to kow how to deal with the NMEA text. Not hard to write code for this, a feature for OpenCPN maybe.

Rob
motu42 is offline   Reply With Quote
Old 17-11-2012, 04:24   #33
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by motu42 View Post
Ive spent lots of time on this as a part for the Freeboard project. Basically NMEA0183 is specified to be 4800 baud. Thats s-l-o-w now, so the AIS version was spec'd at 38400 baud. Hence the two ports.

In fact NMEA0183 is just lines of normal text, human readable. It can be sent at any speed if you can control your serial port speed. Its often set at higher rates because you can flood a serial line at 4800baud quite easily.

The catch is NMEA0183 devices assume they are the only ones transmitting. A serial TX wire is connected to a serial RX reciever. You can have many recievers listening but only one talker.

So if two talkers share a single serial TX line, then they will simply talk over each other, ruining communications. Hence if you have more than one talker, you need to multiplex. If you have more than one speed (baud) you need to multiplex cos you cant mix speeds on one wire.
Right so basically I need a mux if I have more than one talker. And the VHF/AIS counts as two talkers, and the GPS a third.

But multiplexers all seem to be expensive, so buying one is not really an option for me. $200-$350 is simply way more than getting this data into the computer is worth to me; it's a convenience thing more than something I _have_ to have for navigation.
(I normally navigate with paper charts, so this would be mostly for the sake of getting a nice AIS display on the computer screen. But for the sake of $200 I can live with the basic display on the radio.)

However, I do see here an opportunity to build myself a multiplexer using an Arduino...
And I imagine you're just the person to give me some tips there, as (if I understand correctly) that's more or less what you're using the Ariduino for in the Freeboard project, isn't it?

The Freeboard project looks very interesting by the way; it's something I certainly might be interested in building and perhaps later contributing to.
Isn't network latency a problem for this sort of project? How responsive is it in real life? The internet-based demo is unbearably slow for me, but obviously something accessed over a LAN would be considerably faster.
And is the Pi fast enough to handle the graphics? Particularly once you start drawing vector charts? What are you using on the Pi software-wise?

Quote:
Originally Posted by motu42 View Post
Because NMEA0183 just sends strings, any serial<>TCP converter would work, but the receiving program would need to know about the TCP packets and how to read them. Think web browser<>server. The web browser connects to the server (TCP) and asks for a page. The server sends HTML to the browser in TCP packets. The browser knows what to do with the text (HTML) inside.

So the recieving program needs to know to go to the converters IP address to get the connection setup. And the reciever needs to kow how to deal with the NMEA text. Not hard to write code for this, a feature for OpenCPN maybe.
Thanks for the very clear explanation; I understand this now, I think!
According to bcn, this feature has been added to the next version of OpenCPN which is currently in beta.


Quote:
Originally Posted by ebaugh View Post
I looked at that inexpensive serial to Ethernet product. It looks like it may work. But I could not tell if it supports multiple TCP or UDP connections simultaneously. Ie two PCs or a PC and an IPad at the same time. It does not have a serial port emulation mode if your PC software won't support TCP or UDP natively. It is also RS232 not RS422. Sometimes that does not matter...maybe someone else can comment. You can find the signaling specs via Google. They are close but not exact. RS422 also provides for multiple listeners.
I don't really need serial port emulation as I'm not primarily using Windows so it wouldn't help me anyway. None of the other devices can do it on other OSes anyhow.

Quote:
Originally Posted by ebaugh View Post
DSC is nice to have, but I have not yet implemented it. The power comes at sea where there is a traffic conflict on AIS, then you can (with the right stuff) click on the ship and directly ring them up on VHF, even of they are not maintaining a perfect radio watch. I will add this when I add an AIS transponder eventually and open up the wiring. Was too expensive when I did the original project. Can be done manually via the Standard Horizon radio front panel interface in the meantime.
Yeah - as it can be done from the radio itself I'm not too worried about doing it from the computer. Nice to have, but probably the least important part of the setup.

Quote:
Originally Posted by ebaugh View Post
What is your Nav program going to be?
Primarily OpenCPN for the moment. It seems to be the best thing around, though by no means wonderful.
I've thought about writing my own software, but that's something I don't see myself finding time for for many years... Contributing to OpenCPN to improve it is probably a more realistic goal, except that I'm not comfortable with the Linux-based toolkits and languages they use for it.
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 17-11-2012, 08:20   #34
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
Quote:
Originally Posted by motu42

Bob,
Thanks for the feedback. Freeboard will be open source. It has to be as its based on many opensource products - its only possible because I'm standing on the shoulders of giants so to speak.

Battery info voltage is easy. Amp/Hours needs a digital ammeter on the main battery +ve, not difficult or expensive.

The Freeboard Arduino can read pretty much any physical input, but as a sailor I havent spent time on the motor data. If its a well known protocol (eg NMEA0183) its easy, if its NMEA2000 you need to buy a spec document for $50K!. Or you use a converter to something more open. If its CANBUS its probably not difficult. The Arduino can output any data format.

There are many spare IO pins on the Arduino Mega, but eventually you run out of CPU cycles. You may have to use 2 Arduinos to one RaspberryPi. Its designed to expand that way.

Raspberry Pis are scarce, but that will improve. They are such a hit worldwide that they will be here for a while. Freeboard can use other similar boards, I chose the Raspberry because its popular and cheap.

Vector charts are possible in two ways. One is to draw on the client in javascript - complex and power hungry. The other is to convert to raster images and do it the same way as the current charts. The conversion can be 'smart', eg many layers with different data, so you get the same effects as vector charts. Conversion should be easier but I havent tried yet.

Rob
Rob,

Thanks for the information! And good luck with the project. I hope someday it can be packaged into a cookbook for those of us that don't write code anymore...is there a COBOL compiler?

On older engines like my Lehmans, you can get readings off the existing oil pressure and water temp senders by measuring voltage. Can be tapped at the engine or instrument panel. It's not linear, so you need a lookup table or can dream up a formula. The most accurate way to measure Amp Hours is a shunt, but it's only usually 50mv full scale, so an amplifier might be needed or something like a thermocouple input.

The new engines have all that data in the ECU and there is some standard on how to get at it. At least one mfg has a black box plug in that converts to, I think to NMEA2K.

Speaking of which...NMEA2K is not especially easy for home brew development. But I thought they had something less than 50K, if all you want to do is read data now. Not sure. There is a product called SeaSmart by Chetco Digital that interprets NMEA2K and has a built in web server. You can write your own, or use their standard pages to display data. I think it will also stream the data in formats either the same or similar to 0183. They paid the development fee, so you don't have to. But I think its about $500 for the interface.

Hopefully you can drum up some help and get all the bases covered.

Bob
ebaugh is offline   Reply With Quote
Old 17-11-2012, 12:04   #35
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Mollyhawk/ebaugh,

Thanks for the feedback. Yes the Freeboard Arduino will combine 3 NMEA tx streams to one output. At different baud rates if needed. You will need an Arduino Mega or clone, and the code which I hope to get onto Github this week - I'll announce it. You will also need a RS232<>TTL convertor board - I have built my own, but the may be available form Sparkfun or similar. They are very simple if you can manage a soldering iron.

Im still coming to grips with how to make it all practical for anyone - is there a need for kits or full hardware packages?

An alternative is to use the Rasberry Pi, and a 7port USB hub. Each NMEA can go to a seria<>USB converter and the Raspi can combine and output them. It would need some work on my part, so not just now.

Re speed: Yeah the internet affects things. A lot of the initial load is about 2Mb of javascript. On my local wifi I get a full screen load in <10secs on my 'fast' laptop,and about 15 secs on the slow one. There is still quite a lot of improvement to be had, you are using my dev code at present.

Once loaded the instruments work in real time, they use websockets so no delays or lag from reloading pages. The chart is the same technology as google maps,so once loaded you may wait a few seconds for new tiles after scroll/zoom.

I also plan 'lite' and 'special needs' pages, eg no chart, or chart on another tab with load on demand. Special needs include simple cellphone lcd screens etc,or just a wind dir.
motu42 is offline   Reply With Quote
Old 17-11-2012, 13:31   #36
Registered User
 
ebaugh's Avatar

Join Date: Dec 2011
Location: On the boat
Boat: DeFever 44
Posts: 292
The more it's packaged, the more people will adopt it.

Maybe you could do a "config" tab or page and store display preferences and other options in a cookie? Then each device can be set up however it makes sense. I could not figure out how to drag the NMEA displays around, just resize them. But if you can drag them, all you really need to do is display them and update the display location and size after they get moved around.

Just some ideas...I'm not ready to change chart plotters yet. Need my proprietary CMap and Navionics charts at the moment.
ebaugh is offline   Reply With Quote
Old 17-11-2012, 13:38   #37
Moderator Emeritus
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 4,663
Images: 4
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by motu42 View Post
The Freeboard Arduino can read pretty much any physical input
(I see that you have answered some of the interface questions. Please keep us posted!)

Rob, what are you using for the Freeboard NMEA I/O? Do you have a solution for multiple RS232 or RS422 interfaces? I've seen Arduinos with two UARTs, and some limited-utility software UART designs, but I'm not aware of anything available that can handle (say) four NMEA-0183 ports. I would love to find an SPI-port shield with a quad (or hex or octal) UART and 232 or 422 interfaces.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 17-11-2012, 13:58   #38
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by ebaugh View Post
The more it's packaged, the more people will adopt it.

Maybe you could do a "config" tab or page and store display preferences and other options in a cookie? Then each device can be set up however it makes sense. I could not figure out how to drag the NMEA displays around, just resize them. But if you can drag them, all you really need to do is display them and update the display location and size after they get moved around.

Just some ideas...I'm not ready to change chart plotters yet. Need my proprietary CMap and Navionics charts at the moment.
Im currently playing with a menu system, but I hate the way browsers gobble screen space - look at the content of this site, and compare it with the PC's screen size - what % is actually interesting content, and what is just branding and fluff etc.! I'm leaning towards a bottom toolbar, that collapses away when not used.

That will give me a place to manage user prefs etc

BTW you can drag the instruments about by click-drag on the tabs attached to them. Also you can hide them with the little ^ icon on the tab
motu42 is offline   Reply With Quote
Old 17-11-2012, 14:04   #39
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by Paul Elliott View Post
(I see that you have answered some of the interface questions. Please keep us posted!)

Rob, what are you using for the Freeboard NMEA I/O? Do you have a solution for multiple RS232 or RS422 interfaces? I've seen Arduinos with two UARTs, and some limited-utility software UART designs, but I'm not aware of anything available that can handle (say) four NMEA-0183 ports. I would love to find an SPI-port shield with a quad (or hex or octal) UART and 232 or 422 interfaces.
I use an Arduino Mega, which has 3 UARTS, and I use SoftwareSerial to read more pins. I use a MAX232 chip on a simple pcb to do RS232<>TTL conversion. Ive considered making a shield with all the nice stuff included, but its all extra work at present. Its probably easier to use Serial<>USB converters and deal with it in the Raspberry Pi, so I'll implement that at some point. Trouble is one serial converter is cheap, 5 becomes expensive.

I already have the ridiculous situation where my cables and hub cost more than the Rasberry and Arduino, which do all the work!
motu42 is offline   Reply With Quote
Old 17-11-2012, 15:35   #40
Nearly an old salt
 
goboatingnow's Avatar

Join Date: Jun 2009
Location: Lefkas Marina ,Greece
Boat: Bavaria 36
Posts: 22,801
Images: 3
Surely there is at this stage no future in 0183. It would be better to help develop an open source NMEA 2k protocol stack. NMEA 2k can be accessed by buying an antisense converter without having to pay any NMEA fees at all

The other thing is SImrad have just released a tcp/ip specification. Also NMEA themselves are in the middle of developing one. However again this is all NMEA 2k. There simply isn't enough standardised sentences in 0183 to build comphrensive info streams.

I like the use of be Pi though I have three of them at the moment on the go.

Dave
__________________
Interested in smart boat technology, networking and all things tech
goboatingnow is offline   Reply With Quote
Old 17-11-2012, 15:50   #41
Registered User

Join Date: Nov 2012
Location: Nelson NZ
Boat: Novara 16.4m catamaran
Posts: 57
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by goboatingnow View Post
Surely there is at this stage no future in 0183. It would be better to help develop an open source NMEA 2k protocol stack. NMEA 2k can be accessed by buying an antisense converter without having to pay any NMEA fees at all

The other thing is SImrad have just released a tcp/ip specification. Also NMEA themselves are in the middle of developing one. However again this is all NMEA 2k. There simply isn't enough standardised sentences in 0183 to build comphrensive info streams.

I like the use of be Pi though I have three of them at the moment on the go.

Dave
Yes I totally agree about 0183, but its there, its common, and its well understood, so I need to support it anyway.

Freeboard uses its own protocol to communicate to the web front end, but thats just simple text for now. It saves dealing with NMEA in javascript.

I would support an open stack for nav data, probably the best is to modify some common existing stack. But I have enough on without starting on that too!. Also if there is a way to access NMEA2000 I will add a Freeboard interface to it.

BTW my strength is in java/web, if you have strong C++ or hardware skills your help would be appreciated?

Rob
motu42 is offline   Reply With Quote
Old 17-11-2012, 16:43   #42
Nearly an old salt
 
goboatingnow's Avatar

Join Date: Jun 2009
Location: Lefkas Marina ,Greece
Boat: Bavaria 36
Posts: 22,801
Images: 3
Quote:
Originally Posted by motu42

Yes I totally agree about 0183, but its there, its common, and its well understood, so I need to support it anyway.

Freeboard uses its own protocol to communicate to the web front end, but thats just simple text for now. It saves dealing with NMEA in javascript.

I would support an open stack for nav data, probably the best is to modify some common existing stack. But I have enough on without starting on that too!. Also if there is a way to access NMEA2000 I will add a Freeboard interface to it.

BTW my strength is in java/web, if you have strong C++ or hardware skills your help would be appreciated?

Rob
My work is all in micro controllers , atmel, pic,arm, c c++ , ruby and some java. In the middle of a new startup , so up to my eyes. But would contribute to a open source nmea2k stack

Dave
__________________
Interested in smart boat technology, networking and all things tech
goboatingnow is offline   Reply With Quote
Old 17-11-2012, 21:11   #43
Moderator Emeritus
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 4,663
Images: 4
Re: NMEA via ethernet/wifi

Quote:
Originally Posted by goboatingnow View Post
Surely there is at this stage no future in 0183.
When I worked in the telecom equipment field, I used to remind my engineering team "The funny thing about obsolete legacy standards is that they keep making stuff that uses it."

I would bet that we haven't yet reached the point where new N2K installs exceed new 0183 installs. If we're there, it's not by much.

Sure, we (someone) should develop more N2K products and N2K development tools, but don't imagine that the need for 0183 has vanished.

There is some interesting development and standards work for carrying N2K over ethernet. I would really like to see a uniform standard for that, but we're still in the stage where everyone is rolling their own protocol -- some proprietary and others open.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 18-11-2012, 00:21   #44
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,198
Re: NMEA via ethernet/wifi

Guys...
For opensource N2K stuff you certainly want to have a look at https://github.com/canboat/canboat Another interesting piece is Open Skipper | Free software downloads at SourceForge.net, but it's written in C#, so less useful code-wise.

Pavel
nohal is online now   Reply With Quote
Old 23-11-2012, 03:11   #45
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: NMEA via ethernet/wifi

This might be of interest.

Yachting and Boating World Forums - View Single Post - iPad........AIS?

I've been sent the multiplex code and will be having a play around with a Pi later, though a bit linux challenged so don't expect much to happen
conachair is offline   Reply With Quote
Reply

Tags
nmea

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 08:44.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.