Anchor watcher YappApp

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,650
Location
Up some Hebridean loch
Visit site
Of all the YAPPs I have produced over the years the most useful one I have found has been my anchor watcher. This links to the boat's data network to get a continuous update of depth, SOG, position, windspeed, heading and boat position (and later on, atmospheric pressure). Limits can be set on these values and if any reading goes beyond the limits an alarm sounds. Although chart plotters can usually provide this feature for position they are often not near where the skipper sleeps and use significant electrical power. The anchor watcher devices have all been low power and able to be moved around (albeit with a cable) to be positioned near the sleeping skipper's head.

The previous 3 incarnations, going back to 2013, have all been physical devices that get their boat data from a Seatalk 1 bus which I had at the time. The first had no user interface and had to be configured using an app on a laptop which was a bit of a kefuffle. I have no pictures of it but the original thread is here...

YAPP Low power Seatalk Anchor Watcher

The next one had its own display and buttons and could be configured from it's own user interface. The thread is here...

YAPP New Achor Watcher - with user interface

The pictures from the thread have gone but this is what it looked like...

mqdefault.jpg


Then the whole standalone anchor watcher disappeared and the same functionality was incorporated in a larger device that did a whole host of things. Atmospheric pressure was added at this point. The thread is here...

Return of the YAPP

and it looked like this...

index.php


That device lives on with the new owner of my old boat, but as I don't have it any more, it's time for a new one.

The previous incarnations all received their data from an old Seatalk 1 network. The new boat won't have that with the network being NMEA2000. I was going to make a device similar to the above with a NMEA2000 interface instead of Seatalk 1, but then had a change of plan. Rather than have a device I've made by my head when I sleep I instead will send the boat data out via Bluetooth and implement the anchor watching functionality in an Android app - as I'm likely to have my phone near me anyway. As this is a phone app, the project is a YappApp.

Getting the NMEA2000 boat data out via Bluetooth - that will use the same device that I send the same data via Bluetooth to OpenCPN - described in this dull thread that no-one is interested in here...

NMEA2000 to Bluetooth YAPP

Now to the Android app. I have to stay from the start that phone apps of any kind are not really my thing, and the language it's programmed in (Java) is new to me. Android apps are, I found out, one enormous bloated kerfuffle, so it's been a bit painful. Getting it to look nice (known as flower arranging by us hardcore low level types) is also not my thing, so it looks a bit functional rather than pretty. But here it is...

Screenshot_20220323-103523.png

There's a big connect button for connecting to Bluetooth. The device has to have been previously paired. Once connected you can set your limits and also see the live data coming through. You can enable or disable any particular item. Once set up you press start which starts the watching and then looks like this...

Screenshot_20220323-103537.png

The blue box at the bottom will show your anchor wanderings around but as I have no boat to test it on at the moment it's not showing anything. If an alarm goes off then a loud sound is made and an alarm dialog is shown...

Screenshot_20220323-103603.png

An alarm also happens if the Bluetooth connection is lost or if any expected data doesn't arrive within the expected time. There's also a rearm time during which no repeat alarm will happen. This should be configurable but isn't yet. The app is shown running on a tablet but also runs on a phone as well. It will keep running even when the screen is off.

I've tested it on a 5 year old device and a 1 year old device and it works on both. It's a beta at the moment. It works on my test network with simulated data but hasn't been tested in real life yet.

It's built using Android Studio. It's open source and can be found under the app folder here...

GitHub - miniwinwm/BlueBridge
 
Last edited:

KevinV

Well-known member
Joined
12 Oct 2021
Messages
2,500
Visit site
It never ceases to amaze me what a huge range of skills can be brought to bear on messing about in boats - one of the reasons I really enjoy this forum.
 

Beneteau381

Well-known member
Joined
19 Nov 2019
Messages
1,907
Visit site
Of all the YAPPs I have produced over the years the most useful one I have found has been my anchor watcher. This links to the boat's data network to get a continuous update of depth, SOG, position, windspeed, heading and boat position (and later on, atmospheric pressure). Limits can be set on these values and if any reading goes beyond the limits an alarm sounds. Although chart plotters can usually provide this feature for position they are often not near where the skipper sleeps and use significant electrical power. The anchor watcher devices have all been low power and able to be moved around (albeit with a cable) to be positioned near the sleeping skipper's head.

The previous 3 incarnations, going back to 2013, have all been physical devices that get their boat data from a Seatalk 1 bus which I had at the time. The first had no user interface and had to be configured using an app on a laptop which was a bit of a kefuffle. I have no pictures of it but the original thread is here...

YAPP Low power Seatalk Anchor Watcher

The next one had its own display and buttons and could be configured from it's own user interface. The thread is here...

YAPP New Achor Watcher - with user interface

The pictures from the thread have gone but this is what it looked like...

mqdefault.jpg


Then the whole standalone anchor watcher disappeared and the same functionality was incorporated in a larger device that did a whole host of things. Atmospheric pressure was added at this point. The thread is here...

Return of the YAPP

and it looked like this...

index.php


That device lives on with the new owner of my old boat, but as I don't have it any more, it's time for a new one.

The previous incarnations all received their data from an old Seatalk 1 network. The new boat won't have that with the network being NMEA2000. I was going to make a device similar to the above with a NMEA2000 interface instead of Seatalk 1, but then had a change of plan. Rather than have a device I've made by my head when I sleep I instead will send the boat data out via Bluetooth and implement the anchor watching functionality in an Android app - as I'm likely to have my phone near me anyway. As this is a phone app, the project is a YappApp.

Getting the NMEA2000 boat data out via Bluetooth - that will use the same device that I send the same data via Bluetooth to OpenCPN - described in this dull thread that no-one is interested in here...

NMEA2000 to Bluetooth YAPP

Now to the Android app. I have to stay from the start that phone apps of any kind are not really my thing, and the language it's programmed in (Java) is new to me. Android apps are, I found out, one enormous bloated kerfuffle, so it's been a bit painful. Getting it to look nice (known as flower arranging by us hardcore low level types) is also not my thing, so it looks a bit functional rather than pretty. But here it is...

View attachment 132128

There's a big connect button for connecting to Bluetooth. The device has to have been previously paired. Once connected you can set your limits and also see the live data coming through. You can enable or disable any particular item. Once set up you press start which starts the watching and then looks like this...

View attachment 132129

The blue box at the bottom will show your anchor wanderings around but as I have no boat to test it on at the moment it's not showing anything. If an alarm goes off then a loud sound is made and an alarm dialog is shown...

View attachment 132130

An alarm also happens if the Bluetooth connection is lost or if any expected data doesn't arrive within the expected time. There's also a rearm time during which no repeat alarm will happen. This should be configurable but isn't yet. The app is shown running on a tablet but also runs on a phone as well. It will keep running even when the screen is off.

I've tested it on a 5 year old device and a 1 year old device and it works on both. It's a beta at the moment. It works on my test network with simulated data but hasn't been tested in real life yet.

It's built using Android Studio. It's open source and can be found under the app folder here...

GitHub - miniwinwm/BlueBridge
Complete changeof subject, whats the new boat going to be? Was in Pwllheli last weekend. Lots of changes!
 

sailoppopotamus

Active member
Joined
7 Jan 2022
Messages
229
Location
Athens, Greece
Visit site
This is very interesting. It would be even cooler if you could stream the data through the Internet via a 4G connection. Then one could keep tabs on their boat when away from it (e.g. when you've left the boat on anchor and gone ashore). I would imagine that the easiest way to do this would be to have a tablet running android receiving data over bluetooth and forwarding it to your BlueBridge app.
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,650
Location
Up some Hebridean loch
Visit site
This is very interesting. It would be even cooler if you could stream the data through the Internet via a 4G connection. Then one could keep tabs on their boat when away from it (e.g. when you've left the boat on anchor and gone ashore). I would imagine that the easiest way to do this would be to have a tablet running android receiving data over bluetooth and forwarding it to your BlueBridge app.

I've done that sort of thing in the past. I could easily add a cheap 2G modem with a PAYG SIM with a bit of data allowance on it to the hardware part of this project - the NMEA2000 to Bluetooth box. Previous incarnations got their data by Seatalk 1, but that's easily changed. The data can be sent to a free account on a MQTT broker and then it's available from anywhere on the internet. I made a small webserver that showed the data on a webpage that could be displayed on any phone/tablet/laptop with an internet connection. This overcomes the problem of most internet connected devices not having a public facing IP address which prevents direct communication.

I'll see if I can find the link. I posted about it here before.

This is the link to the project files:

BluePillDemo/BluePillDemo_Seatalk_MQTT_Website at master · miniwinwm/BluePillDemo

Here's the original post, but the website that it linked to is down and I can't remember the password to reinstate it.

Live boat instruments' data on internet via GSM - open source project

I've reuploaded the webpage that shows the data from the boat, although there is nothing sending data at the moment, but it gives you an idea...

http://miniwinwm.000webhostapp.com/

If anyone is a sad nerd and wants to see that webpage do something data can be simulated by following this procedure...

1) Go to webpage http://miniwinwm.000webhostapp.com/
2) Go to MQTT Websocket Client
3) Click Connect
4) In the Topic box enter BluePillDemo/depth
5) In the Message box enter 4.2
6) Click Publish button
7) You'll see the depth value change on the webpage

You can also use these topics...

BluePillDemo/boatspeed
BluePillDemo/sog
BluePillDemo/tws
BluePillDemo/aws
BluePillDemo/trip
BluePillDemo/log
BluePillDemo/cog
BluePillDemo/heading
BluePillDemo/lat
BluePillDemo/long
BluePillDemo/twa
BluePillDemo/awa
BluePillDemo/temp

to change the respective value on the webpage.
 
Last edited:

Neeves

Well-known member
Joined
20 Nov 2011
Messages
12,285
Location
Sydney, Australia.
Visit site
I'm from the Stone Age, long before Beaker Man - I wired a piezo electric alarm to the MFD and when necessary set an anchor watch. My wife tells me she prefers the old fashioned ways as the noise of the alarm is a danger to health.

Many MFDs are at the helm, a ing way from the skippers berth - the alarms are pretty useless.

One of my granddaughters is in 2nd year Physics at Sydney Uni and is building me a device to measure movement of an anchor on the seabed, they constantly vibrate driven by the yacht movement. Our original idea was to have a float and send the data - but we are going the simple route and store the data and down load when we retrieve the anchor. We are using the same sensors as you have in you tablet or phone that determines which way up you are using your device.

Keep up the good work Angus, even those of us in the Stone Age are interested in what is possible (as I have someone, granddaughter, who can turn ideas into reality).

Take care, stay safe

Jonathan
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,650
Location
Up some Hebridean loch
Visit site
This is very interesting. It would be even cooler if you could stream the data through the Internet via a 4G connection. Then one could keep tabs on their boat when away from it (e.g. when you've left the boat on anchor and gone ashore). I would imagine that the easiest way to do this would be to have a tablet running android receiving data over bluetooth and forwarding it to your BlueBridge app.

I've added a SIM800L 2G modem. 2G is plenty fast enough for the small amount of data that's sent. It needs a strange 4.2V power supply though. Here are the design files:

Untitled3.jpg
Untitled2.jpg
Untitled.jpg

No code written yet, but it will only take a jiffy tomorrow. I can do it between watching cat videos after my afternoon siesta. The website still works so no change needed there. I think I'll add an on/off button on the webpage though and implement that in the functionality on the above device. I might add atmospheric pressure on the webpage too - not because it's useful, but because I can. That blank bit on the bottom right of the circuit board is just asking for some other gadget to fill the space!
 
Last edited:
Top