Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Engineering & Systems > Marine Electronics
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 08-12-2019, 12:59   #16
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by mglonnro View Post
Sounds like a good idea

I wonder if my Raspberry is aware of its input voltage
If you run openplotter on the raspberry you can connect an ads1115 voltage sensor - this is old doc but V2 openplotter with full documenttion is promised soon>
https://sailoog.gitbooks.io/openplot...n/ads1115.html


It then will send very accurate voltage as signalk , which has an app to save to influxdb database, or file, or send to the web - extremely versatile. Same with temperatures using ds18b20 thermometers. I've 3, engine head, alternator and exhaust elbow.
Signalk on a Pi is just great

Also I've a few projects on the go , one is a pcb from JLCPCB which hopefully will provide 8 channels of voltage, 2 x ammeters, barometer, RPM, 2 x nmea muiltplexed, thermometers and variable voltage and I need to add a few controllable switches.
https://easyeda.com/editor#id=9b753b...5190814850862c

Boards won't cost much , they solder all the surface mount bits, just need to add a ESP32 and solder on some connectors. It then sends all the data as signalk (or straight to an influxdb database) over wifi to the Rasp Pi. Been running similar for a while, works really well.






https://easyeda.com/editor#id=|9b753...5190814850862c
conachair is offline   Reply With Quote
Old 08-12-2019, 13:28   #17
Registered User

Join Date: Apr 2019
Posts: 1,360
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by mglonnro View Post
The point of all of this is to draw a polar diagram with wind angles, speeds, boat speed.
Sounds like you need to just do a few passes at the data to scrub it as well as can be. Error toward washing out (rather than keeping) suspect data.

1. wash out any data where you remember motoring.
2. wash out any data with boat speed > apparent wind speed, and any with apparent angle < 25 degrees (and the surrounding data points)
3. run the resulting data set against this polar , and the one linked bottom of post, and be extremeley skeptical about any data points which are > 100% of that polar (and the surrounding data points)
4. Create a polar based on the resulting data set and examine any performance outliers (look at heel angle for instance) to see if any look like motoring - wash out if suspect.

I think that would get you pretty close. Polars are never ever 'exact' in any case - depend on sea state and crew and such, so 'close enough' is the best objective.

also you can get a quite good polar from racing rule measurement data - like fyi - hanse 388 M L-keel polar by ORC data
Breaking Waves is offline   Reply With Quote
Old 09-12-2019, 12:04   #18
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by Breaking Waves View Post
Sounds like you need to just do a few passes at the data to scrub it as well as can be. Error toward washing out (rather than keeping) suspect data.

1. wash out any data where you remember motoring.
2. wash out any data with boat speed > apparent wind speed, and any with apparent angle < 25 degrees (and the surrounding data points)
3. run the resulting data set against this polar , and the one linked bottom of post, and be extremeley skeptical about any data points which are > 100% of that polar (and the surrounding data points)
4. Create a polar based on the resulting data set and examine any performance outliers (look at heel angle for instance) to see if any look like motoring - wash out if suspect.

I think that would get you pretty close. Polars are never ever 'exact' in any case - depend on sea state and crew and such, so 'close enough' is the best objective.

also you can get a quite good polar from racing rule measurement data - like fyi - hanse 388 M L-keel polar by ORC data


Thank you for the encouragement and I will post back my results
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 09-12-2019, 12:06   #19
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by conachair View Post
If you run openplotter on the raspberry you can connect an ads1115 voltage sensor - this is old doc but V2 openplotter with full documenttion is promised soon>
https://sailoog.gitbooks.io/openplot...n/ads1115.html


It then will send very accurate voltage as signalk , which has an app to save to influxdb database, or file, or send to the web - extremely versatile. Same with temperatures using ds18b20 thermometers. I've 3, engine head, alternator and exhaust elbow.
Signalk on a Pi is just great

Also I've a few projects on the go , one is a pcb from JLCPCB which hopefully will provide 8 channels of voltage, 2 x ammeters, barometer, RPM, 2 x nmea muiltplexed, thermometers and variable voltage and I need to add a few controllable switches.
https://easyeda.com/editor#id=9b753b...5190814850862c

Boards won't cost much , they solder all the surface mount bits, just need to add a ESP32 and solder on some connectors. It then sends all the data as signalk (or straight to an influxdb database) over wifi to the Rasp Pi. Been running similar for a while, works really well.






https://easyeda.com/editor#id=|9b753...5190814850862c
This is some cool stuff here! Thank you and I'll get back to it once I get the Raspberry from our boat.
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 18-12-2019, 10:06   #20
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Some progress.

The attached diagram is drawn from a few hours of real sailing (the first we did here in Finland). I think the AWA (which everything is based on to calculate TWA/TWS) needs some calibration, but the idea is here.

The coloured dots are TWA/TWS/SOG observations. green = TWS 0-6 knots, blue 6-15 knots, yellow 15-20 knots, red 20+

The outside line next to the dots is the max speed for that TWA.

The line even further outside is what the Korean Hanse 388 would have done in similar TWA/TWS. The difference lines between real and theoretical are: red = more than 1.0 knots, gray = 0.5-1.0 knots, green < 0.5 knots.

Detecting sailing time wasn't that hard. I realized I had a lot of timestamped pictures to help as well.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2019-12-18 at 19.53.35.jpg
Views:	63
Size:	268.0 KB
ID:	205315  
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 18-12-2019, 12:45   #21
Marine Service Provider
 
Snore's Avatar

Join Date: Jan 2011
Location: St. Petersburg, FL
Boat: Retired Delivery Capt
Posts: 3,684
Send a message via Skype™ to Snore
Re: Detect when engine is on from NMEA data?

I guilty of not reading past post 15 or so. sorry.


Battery voltage would be an indicator. If voltage is > 12.x then it must be getting a charge.

If you have solar, this may require a diode. Another way is to sense off the tach on the alternator. Not sure how- but some of the smart guys around here might help.
__________________
"Whenever...it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off- then, I account it high time to get to sea..." Ishmael
Snore is offline   Reply With Quote
Old 18-12-2019, 23:28   #22
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by Snore View Post
I guilty of not reading past post 15 or so. sorry.


Battery voltage would be an indicator. If voltage is > 12.x then it must be getting a charge.

If you have solar, this may require a diode. Another way is to sense off the tach on the alternator. Not sure how- but some of the smart guys around here might help.
Yes The voltage thing seems well worth trying. Unfortunately I didn't have any sensor or logging for that last season, but will see what I can do next season.

Wouldn't that be a useful NMEA message addition, btw? That you could send out a broadcast query for each connected device to report the voltage it sees? Or that they would broadcast it themselves periodically. Maybe this already exists? Didn't see voltages in my message database, though.
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 22-12-2019, 02:54   #23
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

DONE!

I solved the original question as suggested, by looking at the data and reminding myself of when we did what.

In the end it was pretty easy to filter out the sailing periods!

I wrote a blog post about comparing what we did to Hanse's marketing material (about 90-94% of advertised speeds having less sail area!): https://nakedsailor.blog/2019/12/22/...ed-and-polars/
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 22-12-2019, 03:01   #24
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by mglonnro View Post
DONE!

I solved the original question as suggested, by looking at the data and reminding myself of when we did what.

In the end it was pretty easy to filter out the sailing periods!

I wrote a blog post about comparing what we did to Hanse's marketing material (about 90-94% of advertised speeds having less sail area!): https://nakedsailor.blog/2019/12/22/...ed-and-polars/
Fantastic bit of work!!

How did you create the polar images from the data? Looks good, big well done.
conachair is offline   Reply With Quote
Old 22-12-2019, 03:11   #25
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by conachair View Post
Fantastic bit of work!!

How did you create the polar images from the data? Looks good, big well done.
Thanks!

The polar image is drawn with my own nodejs code onto an HTML5 canvas.

First a piece of code that reads all the "millions" of points (once) from influx and generates the (averaged) polar points.

Then a piece of code that takes the average points and uses the basic canvas drawing stuff to draw the graph.
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Old 22-12-2019, 11:38   #26
Registered User

Join Date: Feb 2016
Posts: 143
Re: Detect when engine is on from NMEA data?

Fabulous work! Have you considered packaging and publishing your code as a (Signal K) webapp?

What wind sensor do you have - how accurate do you think it is?
teppokurki is offline   Reply With Quote
Old 22-12-2019, 11:53   #27
Registered User

Join Date: Jul 2015
Boat: Hanse 531
Posts: 1,076
Images: 1
Re: Detect when engine is on from NMEA data?

Quote:
Originally Posted by teppokurki View Post
Fabulous work! Have you considered packaging and publishing your code as a (Signal K) webapp?

What wind sensor do you have - how accurate do you think it is?
Thank you!

And that's certainly a cool idea. I could package just the polar visualization stuff. And I'm sorry that I haven't found the energy boost to jump into Signal K yet!

The sensor -- it's a B&G 508. It actually broke all by itself later in the fall and I got a newer generation replacement for next summer. I'm pretty sure the data isn't spot on, but rather roughly in the ballpark.
__________________
Call me Mikael
nkdsailor.blog
mglonnro is offline   Reply With Quote
Reply

Tags
engine, nmea


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
how to detect CONTAINER lost at sea and NOT hit it? alexxx Navigation 45 25-06-2015 12:13
I Can't Smell, So How Can I Detect Gas ? SaucySailoress Plumbing Systems and Fixtures 26 21-08-2011 20:11
Another way to detect a propane leak coot Plumbing Systems and Fixtures 43 04-10-2007 15:50
An ideal, drop anchor along coast and metal detect wayland Boat Ownership & Making a Living 27 16-11-2006 06:33

Advertise Here


All times are GMT -7. The time now is 00:17.


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.