Sail Instrument Plugin for AVnav

The idea of this AVnav plugin is to display an instrument that contains all the basic information needed for sailing. With the possibility of showing this display directly on the map at the boat position, the sailor has all the information at a glance. The laylines give you the quickest bearing to a waypoint upwind, and when displayed on the chart you can follow those lines.

If you want to know what laylines are, you can find some information here:

https://www.blauwasser.de/navigation/app-sailsteer-bandg

https://www.bandg.com/de-de/blog/sailsteer-with-mark-chisnell/

Fig: Sail Instrument Plugin for AV nav

The inspiration for the instrument is based on B&G's Sailsteer instrument. There is a project on GitHub for the Sail Instrument where you can find all the important information about the plugin.

https://github.com/kdschmidt1/Sail_Instrument

 

 

Lilygo T-Watch 2020 with connection to SignalK

Fig. Lilygo T-Watch 2020 (Lilygo)

 

Jan Dytrych has started a software project to be able to display data from SignalK and receive alarms with a smart watch. Not just any common clock under Android is used as a smart watch. He uses the smart watch Liligo T Watch 2020. The special feature of this clock is that it has an ESP32 installed as a processor and can be programmed via the Arduino IDE or PlatformIO. The manufacturer Liligo supports the watch with a number of libraries that make programming much easier.

The Liligo T-Watch 2020 has the following components:

Fig. Hardware Lilygo T-Watch 2020 (Lilygo)

  • CPU: ESP32, dual-core MCU, 240MHz
  • FLASH: QSPI Flash 16MB
  • SRAM: 520KB SRAM / PSRAM 8MB
  • WiFi 802.11bgn 2.4GHz
  • Bluetooth 4.2 BR/EDR, BLE
  • Display: 1.54 inch color TFT, capacitive touchscreen, 240 x 240 pixels
  • 3-axis accelerometer BMA423
  • RTC clock: PCF8563
  • IR receiver
  • speaker
  • Button: power button
  • USB to TTL: CP2104 (Micro USB)
  • Lithium battery 380 mAh, 3.7 V, exchangeable Type: YX-W9A
  • Operating temperature range: -40 ~ +85 degrees
  • metal body
  • Water tightness none
  • Silicone strap 270mm
  • Weight: 58.5g

A USB cable is supplied with the T-Watch 2020, which can be used to charge the watch and transfer programs. The watch has an aluminum metal case and the design is based on the Apple I-Watch. The watch is comfortable to wear with the non-replaceable silicone strap. The only weak point is that the watch is not waterproof.

Properties of the firmware

The firmware for the clock is at GitHub hosted and has the following features:

  • Clock function main screen with status bar
  • Setup screen for Date, Time, Alarm time, WiFi, SignalK
  • Custom screens for values from SignalK
  • SignalK events wake up the clock and display messages
  • Sleep mode with display off for long operation up to 24 hours
  • Wake up the display with a tap or twist of your wrist
  • Day/night mode via double tap
  • Language customization via source code
  • pedometer

Fig. Start screen, warning message and SignalK values

Settings and Configuration

The basic settings can be made on the watch via the display. The program is available for designing user-defined image content for SignalK values TWatchSK Designer for Linux, Mac and Windows. This makes it very easy to create new display pages for SignalK and transfer them to the clock via a USB connection. The configurator allows a wide variety of representations and color selection for the values to be displayed.

Fig. TKWatchDesigner with result

Conclusion

With his open source software project, Jan Dytriych has developed a cool application with which it is possible to view and monitor data from SignalK on the wrist. The alarm messages in particular are a useful function for being informed about limit value violations. The project is very well documented on Github and those interested should find all the necessary information. With the T-Watch 2020, Lilygo has provided interesting hardware for little money, with which a large number of projects can be implemented. The use of the popular CPU ESP32 simplifies software development for makers, as they can develop in familiar environments with known knowledge. The only downside of the T-Watch 2020 is that it is not waterproof. Whether this is a KO criterion remains to be seen in practical use on the boat. Let's hope that Liligo will also release a waterproof T-Watch in the future.

Left

Project Homepage: https://github.com/JohnySeven/TWatchSK

TWatchSK Designer: https://github.com/JohnySeven/TWatchSKDesigner#twatchskdesigner

Lillygo T Watch 2020: http://www.lilygo.cn/prod_view.aspx?TypeId=50053&Id=1380&FId=t3:50053:3

pictures

Fig. Lilygo T-Watch 2020 (Lilygo)

Fig. Opened cover, lithium battery on the right

Magnetix - a digital compass with NMEA2000

why

I've always found the idea of not only showing the course on my plotter when the boat is moving, but also when it's bobbing along quietly, I've always found it exciting.

After searching the I-Net for different manufacturers, it quickly became clear that I might not need an e-compass on board at current prices. Due to the corona restrictions and the more free time being spent at home, the idea of building the compass myself came up.

The construction of the electronic compass with an output to the NMEA2000 network was inspired by a post by Andreas in the "segeln-forum.de" forum.
Thanks to many tips in different forums, it was successful. The compass is ready, but not yet tested on the boat (status: 2022.01).

description

Magnetix is an electronic compass that transmits its data on the MNEA2k bus. A CMPS14 serves as a basis as a sensor, an ESP32 as a calculator, a Waveshare SN65HVD230 (don't forget to break out the resistor) as a link to the bus and an LM2596 as a voltage converter. A 0.91 inch OLED with 132×32 pixels is used for the display in the housing.

The housing for the electronics is a Bocube from "www.bopla.de". Both the bracket and the housing were 3D printed for the sensor. The brackets for the OLED and the touch sensors (VA screws) were also created with a 3 printer.

The connection between the compass sensor and the ESP is made via a KAT5 network cable, in which two cables are always connected to form a pair. Although the protocol between the CMPS and the ESP is a short range protocol (I2C), I have no problems with a cable length of ~70cm

Power is supplied via the NMEA bus and is ~1LEN. A built-in plug from Techno-Spark is used to connect to the network.

The ESP gets the data via the I2C bus, converts the whole thing into an NMEA2K data set (127250) and sends it to the network.

The compass identifies itself on the bus as "Magnetix Alpha" and can also be found under that name in the network's sources.

variables in the code

Complete source code https://open-boat-projects.org/wp-content/uploads/2022/01/compass_NMEA2k_V05_01.zip
devotion []
is an array with 36 possible entries. A deviation table can be stored in it, which automatically corrects the given course for the respective courses.
CorrectionMountingAngle
This can be used to set a - horizontal - correction for a deviation of the compass line from the boat axis.

[-] Values for a port correction

[+] Values for a starboard correction

service

Operation is limited to the two touch surfaces (screws):

touch surface function
1 auto calibration on
2 autocalibration off
1 & 2 initiate new calibration

screen

The display is divided into three areas:

Left (in 90° rotated font)
Current function of the sensor
"calib" the sensor is currently being calibrated, which was triggered by touch 1&2.
"inacc" if the sensor is not fully calibrated (not all sensor responses are 1) “inaccurate” will appear. The HDM data was not switched off, as messages 0 occur very often.

It may have to be adjusted after field tests on board

"ON" The sensor is in "autocalibration" mode
OFF The "autocalibration" mode is switched off
center
S Sensor system status followed by two numbers
A. 'Status of the accelerometer
M Magnetic sensor status
The three details are each specified by the following numbers:
00 nothing is OK
11 everything OK
01 or 10 partially OK
(Unfortunately, what these numbers mean exactly is not clear from the documentation of the CMPS14)
Right of the line
M magnetic course
R roll of the sensor
P pitch of the sensor

construction and assembly

I built the whole thing in a standard housing in which I built a base plate as a support for the perforated plate and the voltage converter. The only thing to note when assembling is that the terminating resistor on the CAN module (Waveshare SN65HVD230) has to be broken out. Otherwise the Waveshare SN65HVD230 terminates the entire NMEA bus. The wiring can be in the Circuit diagram to be checked.

Unfortunately, in the first version, I placed my brackets for the display and the touch surfaces flush with the upper edge of the case. However, since the cover “pulls” itself completely over the lower housing, it no longer closes. 🙁

updates

2022-03-01 New bracket for the case with a wall bracket to compensate for a wrong horizontal installation -> Thingiverse

libraries

the libraries used appear in the header of the INO file and are not discussed further here.

Links and Materials

All 3D printing components https://www.thingiverse.com/thing:5207953
ESP-32 Dev Kit C V4 https://www.az-delivery.de/products/esp-32-dev-kit-c-v4
Wave share SN65HVD230 https://www.amazon.de/gp/product/B00KM6XMXO/ref=ppx_yo_dt_b_asin_title_o01_s01?ie=UTF8&th=1
0.91 inch OLED I2C display 128 x 32 pixels https://www.az-delivery.de/products/0-91-zoll-i2c-oled-display
LM2596S DC-DC power supply adapter step down module https://www.az-delivery.de/products/lm2596s-dc-dc-step-down-modul-1
PCB Board Set breadboard breadboard circuit board https://www.az-delivery.de/products/pcb-board-set-lochrasterplatte-platine-leiterplatte-4×4-stuck
casing https://www.bopla.de/gehaeusetechnik/product/bocube/pc-ul-94-v0-glasklarer-deckel.html

However, I can't find my measurements in the list there!

PG - bushings https://www.conrad.de/de/p/kvpg9gr-kabelverschraubung-verschraubbar-mit-zugentlastung-pg9-pg9-polyamid-grau-1-st-1521121.html

(think of mother)

Micro-C chassis connector https://technospark.de/nmea-2000-panel-mount-connector?number=SW1153
basics This year's winter tinkering: A NMEA heading sensor or electronic compass pitch and roll compensated

https://www.segeln-forum.de/thread/66453-diesj%C3%A4hrige-winterbastelei-ein-nmea-heading-sensor-oder-auch-elektronischer-komp/?pageNo=1

touch functions https://www.wiegleb.org/2018/09/22/esp32-ttgo-mit-touch-funktion/
NMEA basics AK Homberger Workshop (ESP -> NMEA2k)

https://github.com/AK-Homberger/NMEA2000-Workshop

Examples I2C NMEA https://www.robot-electronics.co.uk/htm/arduino_examples.htm#CMPS12/11%20I2C

https://www.robot-electronics.co.uk/files/arduino_cmps12_i2c.ino

gallery

Air pressure level sensor

Fig. Control box with pump, pressure sensor and valves

In the Facebook group Raspberry Pi for Boats I saw a cool solution for level measurement. Erik from Finland constructed a monitoring system for 4 tanks with an air pressure sensor. The functional principle is based on the displacement of liquids in a measuring tube. A corresponding air pressure then builds up in the measuring tube, which is proportional to the level. The system uses a pump that builds up pressure in a hose system until the air flows out at the end of the hose in the tank. Depending on the length of the hose, the pump works for between 5 and 10 seconds, after which the static pressure in the hose system is measured, which is proportional to the static pressure of a column of liquid. So that you can control 4 tanks, 5 valves are built into the system, which establish a connection to the respective tank from which you want to determine the fill level. With this cool solution, he circumvents the problem of pressure loss in the hose system, because before each measurement he briefly starts the pump and refills the air that has escaped. At that time I had also experimented with hose systems and considered the solution to be unusable because I could not compensate for the pressure loss. The problem was that air has a very low density and can diffuse through hoses or escape at hose connectors. The air pressure can then not be maintained for several days or weeks. You can get around this by using continuous metal lines without connectors, which then makes the whole thing more complex. At the time I was involved in my project Engine diagnosis decided to install the pressure sensor directly in the tank and measure the liquid column directly.

Erik's solution has the advantage that there are no dangerous voltages on the tank and, in principle, you can monitor any number of tanks with the method. He uses a Raspberry Pi as an evaluation unit and displays the measurement results on a website. He housed all the electronics on a simple strip circuit board. Erik has the project on his Homepage described.

You can find one in the sailing forum interesting discussion with further information on this topic.

Fig. Pneumatic system structure

 

Fig. Hose end in the tank

 

Fig. Pump and valve control

Fig. Display and control unit

Volvo Penta NMEA2000 interface

First of all, a few important notes that you should definitely pay attention to.

Disclaimer: The descriptions of the wiring and the pin assignments correspond to what I found in my boat. Therefore, if you want to recreate the interface, you have to make sure that the wiring and pin assignments on your own boat are identical or adapt the interface accordingly. The entire description of this solution is in an experimental state and comes without any guarantee. Changes to the cabling of the boat or the electrical and electronic conditions can lead to damage or critical situations. You do so at your own risk.

 

General

The basic installation of a Volvo Penta engine (engines D1 and D2) with EVC consists of various sensors on the engine that are connected to the EVC / MDI (electronic vessel control / motor data interface) are connected. These data are sent from the MDI to the speed instrument via a CAN bus. Often there is only the tachometer with a small LCD display to show data. However, additional instruments can be purchased and connected behind the rev counter via the so-called Easy-Link.

 

 

 

The speed is displayed continuously. Other values, such as cooling water temperature and charging voltage, are only alerted in the event of an error, but are not displayed continuously. The interface described here connects the engine's CAN bus with an NMEA2000 bus. The information in the VP-CAN bus, which is available as J1939 datagams, is read, evaluated and written to the NMEA2000 bus as NMEA2000 datagrams. The data implemented so far are

  • Engine speed
  • Charging voltage
  • Cooling water temperature
  • Engine hours

In the NMEA2000 bus, the information can be displayed, for example by a plotter, and provided with warning levels.

When my boat was transferred over the Unterems in the direction of DEK, that saved me from very big problems. Due to the large amount of sediments in the Ems, the outer cooling circuit was increasingly clogged. Via my plotter (MFD) I was able to notice the temperature rise early on and react accordingly. Without the interface and the display in the MFD, the alarm would have come at some point, and then I would hardly have had any options for action, that there would have been no opportunities to moor or anchor. I should have continued driving with the risk of the machine overheating.

 

Components

The Volvo Penta - N2K Interface consists of hardware and software components.

hardware

To physically connect the interface to the VP-CAN bus of the engine, you need an adapter cable with a Y-branch. The connection of the cable from the MDI to the tachometer are so-called 6-pin 'Deutsch plugs', male and female. (e.g. https://www.kabelschuhe-shop.de/KALI-1206-DEUTSCH-DT-Steckverbinder-Set-6-polig). You connect the six pins of the plug with those of the socket. In addition, one derives 12v +, GND Can high and CAN low.

In order to physically connect the interface to the N2K bus (either Seatalk NG or NMEA2000), you also need a suitable cable. My interface is connected to a Raymarine Seatalk NG network. So I cut through a STNG standard spur cable to get a cable with a plug and an open end.

 

CAN bus transceiver

I use an SPI-MCP2515-CAN-Transceiver-TJA1050 to connect the interface to the engine's CAN bus at protocol level. This transceiver is controlled by the MCP_CAN_lib from Cory J. Fowler.

To connect the interface to the N2K bus at the protocol level, I use a Waveshare SN65HVD230. This transceiver is controlled by Timo Lappalainen's NMEA2000 library.

Since the ESP32 requires a voltage supply of 5V and the CAN bus is supplied with 12V, you also need a stepdown converter to 5V.

 

 

software

The code is available here: https://github.com/buhhe/VolvoPenta-N2K_Interface

It is based on code from:

Timo Lappalainen https://github.com/ttlappalainen

Andreas Koritnik https://github.com/AK-Homberger

Cory J. Fowler https://github.com/coryjfowler

 

These libraries are required:

https://github.com/coryjfowler/MCP_CAN_lib

https://github.com/ttlappalainen

 

 

Volvo Penta - N2K Interface: How to proceed

  1. Obtain the hardware components
    • ESP32 development module
    • MCP2515 CAN transceiver
    • SN65HVD230 CAN transmitter / receiver
    • DC-DC step-down converter 5V
    • A pair of 6-pin "Deutsch plugs" (male / female)
  2. Create the Y-branch cable. (See page 3)
  3. Carry out the wiring. (See page 4)
  4. Obtain the required libraries.
  5. Compile and flash the software.
  6. Install everything on your boat.
  7. Have fun!

 

Connection of the interface to the VP CAN bus

 

The tachometer with integrated LCD display is connected to the engine's MDI via a cable harness and a 6-pin Deutsch connector. The connection is called “Multi-Link” at Volvo Penta. The data are provided as CAN-based J1939 datagrams.

 

 

A Y-branching cable is required for connection to the bus. The cable is connected between the connector of the cable harness and the speedometer.

 


Pin assignment:

  • 1 not used
  • 2 CAN low
  • 3 not used
  • 4 minus
  • 5 CAN high
  • Plus, 5V

 

cabling

 

OpenData

The database of the OpenStreetMap's database contains a lot of geoinformation, which is quite useful for planning a boat trip.
OpenNauticalChart creates a seamark-overlay from this data, OpenSeaMap makes this available online. Chart packages are also available for download, here.
A wide variety of chart styles and applications have been developed around this idea. Especially the Inland Navigator will find all necessary information about bridge heights, lock times and even automated routing throughout Europe.

To complete the maps, information on water depth is essential: openDEM shows in which sea areas free bathymetry data is available.

The project lives from many volunteers who continuously update data!

 

AIS data exchange

ship spotting

Popular services like marinetraffic.com or vesselfinder.com do rely on numerous AIS station around the world.
Volunteers are collecting AIS-data within reach of their receivers and pass them to the servers. There are still areas, not yet covered!
Setting up a receiving station is simple and does not cost a fortune: Internet access, raspberryPi, a cheap DVB-T-stick and an old TV arial do the job.
The owner of an AIS station benefits from extra services offered by service providers, others have to pay for.