Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Old 23-12-2015, 06:12   #181
Registered User

Join Date: Jul 2015
Location: Barcelona, Catalonia.
Posts: 277
Re: OpenPlotter project

Quote:
Originally Posted by MatthewDurst View Post
I wish I would've found this thread a few months ago...

I used the MPU-9150 to make a calibrated IMU for my boat, and have all my instruments (GPS, DST-800, the IMU, and hopefully a replacement wind vane soon) plugged into an Arduino, which then multiplexes the data out to an RPI. But the RPI's only function is to wirelessly transmit the NMEA stream with stripeydog's kplex.

I want to switch over to OpenPlotter and ditch the Arduino altogether, but I'm not as familiar coding on the Pi... the one thing holding me back is that I use the IMU to filter my depth, water speed, and wind speed to correct for vessel roll and pitch, as well as the rate at which it is rolling/pitching (my triducer is unfortunately offset by about 23 degrees from the vertical (which throws off depth/paddlewheel info) due to some poor planning involving my holding tank).

If I ditch the Arduino and connect everything to the Pi, is there a simple way to manipulate the NMEA data before OpenCPN reads it? I'm not asking for someone do to the work for me, of course--I don't mind having to learn a few things on my own. And as far as connecting the additional instruments to the RPi, I'm assuming I'd get an RS-232/422 to USB converter? Or is it more efficient to connect to the pins with a TTL converter?
I agree with Conachair but in case you want to give it a go, I will try to explain how openplotter works.

Calculated data (true wind, ROT...), SDR AIS data and sensor data are converted into NMEA data and sent to UDP localhost 10110.

Then openplotter (kplex) combines UDP localhost 10110 data with all the serial and network devices created by user in an unique data steam on TCP localhost 10110. OpenCPN reads from this stream.

You could take data from TCP localhost 10110, filter it and sent it to another port. Finally you could set opencpn to read from this new port.
__________________

__________________
OpenPlotter Project
Site:www.sailoog.com/en/openplotter
Support: www.openmarine.net
Sailoog is offline   Reply With Quote
Old 28-12-2015, 16:05   #182
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 474
Re: OpenPlotter project -Emlid NAVIO+

Quote:
Originally Posted by Sailoog View Post
I have never tested this hat because is a little bit expensive so when I affirmed that some of its components will work on openplotter out of the box, I was assuming they were connected normally and it seems that they aren't. Step by step...

It seems that the GPS is conected by SPI so first of all go to Menu>Preferences>Raspberry Pi configuration and be sure the SPI interface is enable.

Then execute ublox-spi-to-pty to create /dev/pts/1

Now you have to start gpsd, try typing gpsd /dev/pts/1 in a terminal (I do not remember if you need sudo)

Finally create a network input (GPSD) in openplotter (NMEA 0183 tab) and apply changes. If you have satellite connection and all is ok you should have data in the NMEA inspector (show output).

If it works we will try to make this run at startup.
I found the NAVIO+ documentation Using default Raspbian - Emlid and did the documented settings. Most things seems to work now except for that I'm not able to get gpsd to work with the onboard M8N gps. If using the created virtual serialport /dev/pts/1 the gps works fine in kplex/openplotter but if I try to connect gpsd to /dev/pts/1
Code:
sudo /dev/pts/1
I will get no data in kplex or if testing with
Code:
gpsmon
__________________

__________________
petter5 is offline   Reply With Quote
Old 28-12-2015, 20:25   #183
Registered User
 
exkma367's Avatar

Join Date: Jan 2014
Location: PA
Boat: 68 tartan 34c
Posts: 75
Re: OpenPlotter project

Click image for larger version

Name:	ImageUploadedByCruisers Sailing Forum1451359159.652830.jpg
Views:	127
Size:	37.4 KB
ID:	115781. Here is my remote sensor housing. I cut and bent a small piece of lexan. Glued sockets to the lexan and soldered wires to the socket pins. Glued the assembly into a cat-5 box, punched it down. Now to get a cat-5 socket mounted in my openplotter project box.



Sent from my iPhone using Cruisers Sailing Forum
__________________
exkma367 is offline   Reply With Quote
Old 28-12-2015, 20:26   #184
Registered User
 
exkma367's Avatar

Join Date: Jan 2014
Location: PA
Boat: 68 tartan 34c
Posts: 75
Re: OpenPlotter project

Click image for larger version

Name:	ImageUploadedByCruisers Sailing Forum1451359576.786603.jpg
Views:	91
Size:	34.2 KB
ID:	115782


Sent from my iPhone using Cruisers Sailing Forum
__________________
exkma367 is offline   Reply With Quote
Old 29-12-2015, 03:08   #185
Registered User
 
exkma367's Avatar

Join Date: Jan 2014
Location: PA
Boat: 68 tartan 34c
Posts: 75
Re: OpenPlotter project

Click image for larger version

Name:	ImageUploadedByCruisers Sailing Forum1451382739.337813.jpg
Views:	113
Size:	45.2 KB
ID:	115789Click image for larger version

Name:	ImageUploadedByCruisers Sailing Forum1451382775.373934.jpg
Views:	117
Size:	49.0 KB
ID:	115790
I was able to cram everything into a old DSL router case I pulled the guts out of. Not much AIS traffic here in the middle of PA, so testing will have to wait. Remote viewing and control works great though my old nook color and Iphone4. Tomorrow may see an amphenol connector for power. Wifi range is limited but more than enough for my 35 foot boat. Great job putting this on the RPI. It is a convenient, low cost, low power, bit of redundancy. I am looking forward to installing a few temp sensors, maybe a high bilge water alarm, twitter notification if my boat try's to go anywhere without me, ect, ect. Thanks again for all your hard work!!!!


Sent from my iPhone using Cruisers Sailing Forum
__________________
exkma367 is offline   Reply With Quote
Old 29-12-2015, 04:28   #186
Registered User

Join Date: Jul 2015
Location: Barcelona, Catalonia.
Posts: 277
Re: OpenPlotter project -Emlid NAVIO+

Quote:
Originally Posted by petter5 View Post
I found the NAVIO+ documentation Using default Raspbian - Emlid and did the documented settings. Most things seems to work now except for that I'm not able to get gpsd to work with the onboard M8N gps. If using the created virtual serialport /dev/pts/1 the gps works fine in kplex/openplotter but if I try to connect gpsd to /dev/pts/1
Code:
sudo /dev/pts/1
I will get no data in kplex or if testing with
Code:
gpsmon
If you have serial data trough kplex, you don't need to start gpsd because GPS data will be already on the system (TCP localhost 10110) but in case you want to start gpsd the code is:

Code:
gpsd /dev/pts/1
or

Code:
sudo gpsd /dev/pts/1
Paste here what the terminal returns
__________________
OpenPlotter Project
Site:www.sailoog.com/en/openplotter
Support: www.openmarine.net
Sailoog is offline   Reply With Quote
Old 29-12-2015, 04:41   #187
Registered User

Join Date: Jul 2015
Location: Barcelona, Catalonia.
Posts: 277
Re: OpenPlotter project

Quote:
Originally Posted by exkma367 View Post
Attachment 115789Attachment 115790
I was able to cram everything into a old DSL router case I pulled the guts out of. Not much AIS traffic here in the middle of PA, so testing will have to wait. Remote viewing and control works great though my old nook color and Iphone4. Tomorrow may see an amphenol connector for power. Wifi range is limited but more than enough for my 35 foot boat. Great job putting this on the RPI. It is a convenient, low cost, low power, bit of redundancy. I am looking forward to installing a few temp sensors, maybe a high bilge water alarm, twitter notification if my boat try's to go anywhere without me, ect, ect. Thanks again for all your hard work!!!!
Yesssss. I like seeing people assemblies. Thanks to you for testing.

If no major issues are reported I will publish v0.6.0 stable version ASAP in order to start working on documentation and the last step of development (analog sensors interface).

__________________
OpenPlotter Project
Site:www.sailoog.com/en/openplotter
Support: www.openmarine.net
Sailoog is offline   Reply With Quote
Old 29-12-2015, 08:49   #188
Senior Cruiser
 
Vamonos's Avatar

Cruisers Forum Supporter

Join Date: May 2011
Boat: Pearson 385
Posts: 176
Re: OpenPlotter project

Quote:
Originally Posted by Sailoog View Post

Can you imagine a beautiful panel instrument with sexy gauges and custom virtual switches to trigger openplotter actions? Running from any tablet/phone/laptop browser connected to openplotter access point? I love it! Noted!
I was looking into how to handle gauges, in a platform independent way, and came across a CodeProject that does gauges in HTML5 and jquery. Here is an example: Aqua Gauge - HTML5

and here is the project page here:
HTML5 Canvas - Aqua Gauge - CodeProject

Richard
__________________
Vamonos is offline   Reply With Quote
Old 29-12-2015, 10:12   #189
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,026
Re: OpenPlotter project

Quote:
Originally Posted by exkma367 View Post
Attachment 115781. Here is my remote sensor housing. I cut and bent a small piece of lexan. Glued sockets to the lexan and soldered wires to the socket pins. Glued the assembly into a cat-5 box, punched it down. Now to get a cat-5 socket mounted in my openplotter project box.



Sent from my iPhone using Cruisers Sailing Forum
COOL !

Have you tested it yet ?

How long is the cable ?

How are you using the twisted pairs of the cable for the I2C signals ?

Thanks,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 29-12-2015, 10:35   #190
Registered User
 
Arne Henriksen's Avatar

Join Date: Jul 2012
Location: Just outside Trondheim, Norway
Boat: Brenning 880MS
Posts: 16
Re: OpenPlotter project

Great solution with the cat5-box, I guess we will see more of these...

Another question: These relay boards should work fine with OpenPlotter on the Pi?

__________________
Regards,
Arne
S/Y Tiarora
Arne Henriksen is offline   Reply With Quote
Old 29-12-2015, 10:46   #191
Registered User

Join Date: Jul 2015
Location: Barcelona, Catalonia.
Posts: 277
Re: OpenPlotter project

Quote:
Originally Posted by Vamonos View Post
I was looking into how to handle gauges, in a platform independent way, and came across a CodeProject that does gauges in HTML5 and jquery. Here is an example: Aqua Gauge - HTML5

and here is the project page here:
HTML5 Canvas - Aqua Gauge - CodeProject

Richard
Nice!!!! really customizable. Downloaded. I will try to do something with it but I am not a javascript master at all. Anyone?
__________________
OpenPlotter Project
Site:www.sailoog.com/en/openplotter
Support: www.openmarine.net
Sailoog is offline   Reply With Quote
Old 29-12-2015, 10:59   #192
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: grenada
Boat: bristol 27
Posts: 2,508
Re: OpenPlotter project

about 3 years ago I connected a 10dof to a raspberry pi. I still have, it's 4 wires, but I had to write drivers (fortunately in userspace) for the sensors.

I used an arduino to drive pwm for motor controllers, but apparently there is a way to do it directly from the raspberry. Maybe instead it's better to have some kind of optically coupled and electrically isolated connection to an arduino which measures analog voltages and drives pwm while the rpi is protected from voltage spikes.
__________________
boat_alexandra is offline   Reply With Quote
Old 29-12-2015, 11:06   #193
Registered User

Join Date: Jul 2015
Location: Barcelona, Catalonia.
Posts: 277
Re: OpenPlotter project

Quote:
Originally Posted by Arne Henriksen View Post
Great solution with the cat5-box, I guess we will see more of these...

Another question: These relay boards should work fine with OpenPlotter on the Pi?

It should work but you have to consider:

These kind of boards have 2 options to power the internal switches (5V) by setting a jumper. Power from raspberry gpio pins or external power. Try to avoid powering from gpio pins because it drawn more current than gpio pins can serve. You have to set the jumper to external power. Powering from +5 gpio pin is an option but there is a current limitation too. I have see similar boards (x4 5v relays) working powered by raspberry +5 gpio pin (not from general gpio pins) but it would be better to power it from the general 5v source.

I have not tested yet so this is not empirical information. I thought that if you have to power from an external source, it will be better to use 12v relays in order to power it from boat batteries. I am waiting for 12v relays, as soon as I can make serious tests I will report.
__________________
OpenPlotter Project
Site:www.sailoog.com/en/openplotter
Support: www.openmarine.net
Sailoog is offline   Reply With Quote
Old 29-12-2015, 11:29   #194
Registered User
 
Arne Henriksen's Avatar

Join Date: Jul 2012
Location: Just outside Trondheim, Norway
Boat: Brenning 880MS
Posts: 16
Re: OpenPlotter project

Quote:
Originally Posted by Sailoog View Post
It should work but you have to consider:
...You have to set the jumper to external power...
Thanks, I have a lot of 12V->5V power supplies around these days so that should be no problem.
__________________
Regards,
Arne
S/Y Tiarora
Arne Henriksen is offline   Reply With Quote
Old 29-12-2015, 16:19   #195
Registered User
 
exkma367's Avatar

Join Date: Jan 2014
Location: PA
Boat: 68 tartan 34c
Posts: 75
Re: OpenPlotter project

Quote:
Originally Posted by NahanniV View Post
COOL !

Have you tested it yet ?

How long is the cable ?

How are you using the twisted pairs of the cable for the I2C signals ?

Thanks,
JM.
Tested and working fine with a two foot cable, (I will use a longer cable on the final install). I believe I2C has enough range for any boat install. I put the data and clock on one pair and put power and ground on another. I connected a wire to GPIO4, for the DS18B20 temp sensors. I also put a 4.7K resistor between 3.3v and GPIO4 at the PI header connection. I am going have to sit in the boat for a while to figure out where I want to put temp sensors. I am in the middle of a major rebuild of the boat so the install may wait a bit.
__________________

__________________
exkma367 is offline   Reply With Quote
Reply

Thread Tools
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want To Buy: Project Boat: Engineless 35'ish blue water cruiser project Max Sail Classifieds Archive 52 24-03-2013 13:27
Greetings + my project Marco Meets & Greets 8 27-02-2009 17:28
Major Project: What is the best way to organize our discussions? Andy R Forum Tech Support & Site Help 6 04-04-2006 15:21
Our ongoing project - Offshore 41 By Invitation Construction, Maintenance & Refit 7 04-12-2005 07:42
Portal sailing website project CaptainTom Meets & Greets 2 20-03-2003 07:50


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 23:49.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.