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

 

Assembly instructions wind sensor Yachta

3D view* (Click on the picture, wait for the download and move the object with the mouse)

The wind sensor Yachta is used to measure wind speed and wind direction on boats. It is installed on the mast and supplied with 12V. The data transmission of the NMEA0183 telegrams takes place wirelessly via WiFi. The wind sensor contains an access point and a small web server. A mobile phone with a web browser is used to display the measured values. The measurement data can also be displayed in other programs such as SignalK, AvNav, OpenCPN, Navionics or similar that can process NMEA0183 data.

Copyright and Licenses

The copyright and the licenses must be observed when replicating. The wind sensor can be reproduced by anyone free of charge, as long as there are no commercial intentions and money is earned with it. With commercial intentions Contact with open boat projects be included. We will then clarify what options there are for commercial, non-exclusive exploitation.

If these instructions were helpful to you, we would be delighted if you would support us with a donation. This way we can publish other interesting projects. You also help ensure that this site continues to be available to the general public free of charge.

area License comment
documentation CC-BY-NC-SA All online and print documents
hardware CC-BY-NC-SA 2D, 3D CAD files
software GPL V3.0 Firmware, app

Difficulty level and time required

total
 
Level of difficulty 4
Time required [h] 2…3
Details
 
mechanics 2
electronics 6
software 2
network technology
4

The assembly instructions are aimed at those with technical skills. If you want to solder the electronics together, you should have experience in assembling SMD components. Without such experience, it is better to purchase a fully assembled board. Programming the ESP8266 microcontroller requires some experience in dealing with microcontrollers and programming adapters, but is not a major hurdle for beginners. If you want to modify the software yourself, you should be familiar with the programming language C and programming environments such as the Arduino IDE or PlatformIO. Since data is transferred via WiFi networks and TCP / IP, you should have knowledge of the configuration of WiFi routers and network technology.

Tools, aids and consumables

Tools use Source of supply
tweezers
Cutter knife / scalpel
Allen set
Open-end wrench set
Screwdriver set
Fine pliers
Electronics side cutter
Electronics soldering iron
Desoldering pump
USB cable (mini USB) programming
USB serial adapter (3.3V) programming
Aids
Digital multimeter Function test
Laptop / pc programming
mobile Function test with app
Oscilloscope (optional) Function test
Consumables
Tin solder D 1mm
Desoldering braid (optional)
Silicone oil / fine oil
Dupli-Color Aerosol Art, clear lacquer matt Protective varnish for plastic parts bauhaus.de
2K adhesive Weicon RK-1300 conrad.de
Alcohol 99% Drugstore, hardware store
Q tips Drug store
Rag

functionality

The wind sensor Yachta is an anemometer with a rotating cup wheel. The wind direction is measured using the wind vane. The wind vane aligns itself according to the wind direction. There is a neodymium magnet on the underside of the axle, whose magnetic field is measured by a non-contact magnetic field sensor (AS5600), which is located on the green circuit board in the middle. The angles are divided into 4096 partial steps per 360° and transmitted to the ESP8266 microcontroller via the I2C bus, resulting in an angular resolution of approx. 0.1°. The wind speed is measured using the shell wheel, on whose upper axis there is a ring with several small magnets. During rotation, the magnets move past a Hall sensor and trigger a digital switching signal that is evaluated by the ESP8266. The firmware of the wind sensor contains an access point and a small web server with which the measurement data can be transmitted via WiFi. With a mobile phone you can log into the WiFi network of the wind sensor and view the measurement data with a web browser. There is also an Android app with which the measurement data can be displayed. The wind sensor can also be connected to other evaluation and display software that is able to evaluate NMEA0183 data via TCP port 6666.

For mechanical details, you can explore the functional principle in the 3D view.

3D view* (Click on the picture, wait for the download and move the object with the mouse)

Project documents

Helpful links

Important instructions

Before you start the project, take the time to read these tips to avoid the most common mistakes. Before you get started, try to understand how the wind sensor is constructed and how it works. Use the contact options if you have any questions or are unclear. In this way you will be able to successfully implement your project.

PETG is ideal as a filament for the 3D parts. It has a higher temperature stability than PLA and can be processed just as well. Be careful not to use any dark filaments, as the wind sensor can heat up considerably when exposed to the sun and the plastic can become soft. The dimensional stability of PETG is only given up to 70°C. White filaments have been found suitable. Black PETG filaments, on the other hand, are unsuitable. If you absolutely want to build a black wind sensor, then it is best to use ABS. However, the printing is a bit more complicated than PETG and requires experience in handling ABS.

The printed parts of the wind sensor are not waterproof and must be painted afterwards. Otherwise there is a risk of water penetrating the wind sensor and damaging the electronics. Just any paint cannot be used as paint, since ordinary paint does not adhere to plastic parts. The paint listed in the component list is particularly suitable for direct plastic coating without pre-treatment. It is easy to process and achieves a good painting result. If you use alternative paints, check the suitability on test objects before you paint the wind sensor.

Note that the adhesive used must have a certain residual elasticity in order to be able to compensate for the expansion or shrinkage of different components when the temperature changes. After all, temperature changes of approx. 100 ° C (-10… 90 ° C) can occur between summer and winter and this can break adhesive bonds.

If you have little experience with SMD electronics, buy an assembled and programmed board. This saves you a lot of time and effort when troubleshooting.

If you want to program the electronics yourself, make sure you use a USB-to-serial converter with a 3.3V TTL signal level. Converters with a 5V TTL level are unsuitable and can destroy the electronics. Basically, you should be careful with the electronics and not unintentionally bring them into contact with metal parts. This can lead to short circuits and damage the electronics. Also, be careful not to be electrostatically charged. There is a particular risk in winter when the air humidity is low. Before working on the electronics, you can discharge yourself on a metallic water pipe or a heating pipe.

Schedule

The following component list refers to the assembly with a ready-equipped and possibly also programmed circuit board. If you want to assemble the circuit board yourself, you will find a parts list for the electronic components in the GitLab repository.

The sources of supply listed in the component list may no longer be up-to-date. Then it is best to look for alternative procurement options on the Internet.

Mechanical assembly

Step-by-step description of the assembly with pictures and information on the necessary tools, aids and consumables.

Painting

PLA is a plastic that cannot be painted directly due to its surface properties. The substrate must be specially pre-treated. However, there are special paints that can be applied directly to PLA without priming or pre-treatment. Dupli-Color's recommended Aerosol Art Clear Varnish (matt or gloss) is a polymer varnish containing acetone and n-butyl acetate in a 400ml aerosol can. It can be applied directly to PLA in multiple layers with no drying time.

The painting can be done in two ways. Either by painting with a brush or by spray can. In principle, 3 layers should be applied with each method. Appropriately thinner should be applied to the fits. In principle, the layer structure should be thin and not have any running noses. Run noses are to be removed when wet.

If possible, spray painting should be done outdoors, as more paint is sprayed off than is applied to the component. A piece of cardboard should be placed in the background to absorb the excess paint. Depending on the paint manufacturer's recommendation, a minimum distance of 30 cm from the component should be maintained when painting. Otherwise you wear too much paint and it comes to runs. The parts are slowly rotated or moved during spraying so that all surfaces can be reached. Painting the inside of the shell is a bit more difficult because you can't really see how much paint has been applied. You should be more cautious here, as you tend to apply too much. The correct layer thickness is reached when the wet paint starts to shine.

The paint is touch-dry after a short time and fully dry after 24 hours.

Cup wheel

The shells can best be slid into the base from below. To get it all the way in, it may be necessary to use a hammer for the last millimeters. You just have to be careful not to break the shells.

The M5 nut goes into the recess in the lower part of the base. To prevent it from falling out during assembly, the nut can be fixed in the recess with a drop of superglue.

Yachta Schalenrad

Magnet holder and lower bearing

The 695 ball bearing is inserted from below and the 625 ball bearing from above up to the respective edge in the lower part of the wind sensor.

Unterteil des Yachtasensors mit Kugellagern

The magnets can be glued relatively easily to the magnet holder with superglue. To simplify assembly, you can temporarily stick adhesive tape on the inside of the magnet holder and then press the magnets into the recesses from the outside. The adhesive tape can be removed again as soon as the superglue has dried. The M5 x 60 mm screw can then be fed through the magnet holder and secured from below with a nut. The holder can then be inserted through the lower part.

Magnethalter und Unterteil des Yachtasensors

In the last step, only the shell wheel has to be screwed on. Here you should be careful not to screw the whole thing too tight, so that the bowl wheel can turn easily. When the desired ease of movement is achieved, the screw on the lower nut can be secured with Loctite.

Kompletter Unterbau des Yachtasensors

Wind vane and substructure

The substructure of the wind vane consists of an upper and a lower part. The 625 ball bearing is inserted into the top of the lower part, the M5 x 25 countersunk screw is inserted from below and secured with a nut. At this point, too, make sure that the clamped screw can turn easily. The upper part is then screwed onto the lower part with four M3 x 10 screws to hold the ball bearing in place.

Windfahnenbasis des Yachtasensors

In the next step, an M5 nut is inserted into the recess of the wind vane and can also be fixed there with glue.

Windfahne des Yachtasensors

The base of the wind vane can now be placed on the substructure that has already been installed and then fixed with the wind vane.

Windfahne des Yachtasensors

Finally, the 5 x 5 x 5 mm magnet must be glued to the countersunk screw.

Magnet in der Windfahne

Standpipe and base

The aluminum tube slides into the base of the sensor and can then be holed in place for the cables. Then the circuit board with the already soldered cables for the power supply can be inserted into the recess provided. To do this, the cables must first be routed into the aluminum tube. If everything is in the right place, the circuit board can be attached with four M3x10 screws.

Platine in Basis

 

software

Description of how to prepare the development environment for compiling the source code and how to program the binary file in the hardware. Pictures or circuit diagram for the programming hardware.

Firmware installation

The firmware can be installed on the ESP12-E before soldering in using a programming adapter or on the fully equipped circuit board.

Fig: ESP8266 programming adapter for external programming

Fig: Programming adapter for programming on the circuit board

When using a programming adapter for programming on the circuit board, make sure that the signal levels for TX and RX support 3.3V TTL levels. 5.0V TTL levels cannot be used as this can damage the ESP12-E. The programming adapter is to be connected as shown in the picture. You have to make sure that RX is connected to TX and TX to RX. Otherwise you will not be able to carry out any other program transfer.

Fig: programming circuit

Programming instructions

  1. Build the programming circuit together
  2. Connect PRG and GND
  3. Connect the USB programming adapter to the laptop or PC
  4. Connect the 9V battery block
  5. Programming software NodeMCU Flasher start on laptop or PC and load firmware
  6. Start the programming process
  7. If programming is successful, disconnect USB and switch off 9V
  8. Separate PRG and GND
  9. Disconnect the programming circuit from the circuit board
  10. Switch on 12V and check firmware via WiFi connection

NodeMCU Flasher

The easy-to-use Windows tool NodeMCU Flasher be used. The EXE file can be started directly without any special installation. The tool can be used for both external and in-circuit programming. The first thing to do is take Advanced made the following settings.

After that, under Config the Current firmware file firmware_Vx.xx.wsb selected.

You open up to flash surgery and selects the corresponding interface to which the adapter is connected. Then you press Flash and wait until the firmware is loaded.

The progress of the transfer is displayed during the flashing.

If the firmware has been successfully loaded, the following screen will appear.

After the transfer, the programming tool can be closed and the adapter removed.

To start the new firmware, the wind sensor needs a reboot. After the restart, the wind sensor provides a WiFi network called NoWa, which you can log into 30 s after the restart with a mobile phone and the password 12345678. The blue LED then goes out briefly 3 times when the web server is ready. If you then call up the website of the wind sensor with the Android app (http://192.168.4.1), you should see the following. If access data from an access point is entered under WLAN Client SSID and WLAN Client Password, the wind sensor logs into this WiFi network. The blue LED will then turn off to indicate a successful connection. If measurement data is retrieved via port 6666 from a program such as OpenCPN or similar, the blue LED always flashes briefly when a telegram is transmitted.

The last thing that needs to be done in the firmware is the correct type of wind sensor Yachta must be selected in the configuration so that the data is displayed correctly.

Fig: Device Settings for Yachta

Fig: Measured values for Yachta

 

Function test

Step by step description of the function test with measurement results and images. Describe how, for example, the device must be calibrated.

Troubleshooting

Description of typical assembly errors and their effects and how they can be rectified

Technical specifications

description Value / range of values comment
Measurement data
Wind speed 0 ... 40 m / s, 0 ... 78 kn
Start speed 1 m / s
Wind direction 0… 360 °
Wind direction resolution 0.1 °
Function type magnetic
calibration Slope, offset
Environmental conditions
Ambient temperature 0 ... 60 ° C
Storage temperature -10 ... 80 ° C
humidity 0…100 %
Weight class IP63, IPX3 protected against spray water
Power supply
Supply voltage 7… 30V reverse polarity protected
Power consumption 0.5W typical
Data transfer
Network type WiFi 11 bgn 2.4 GHz
Data rate 3 Mbit / s
Range approx. 50 m in the free field
AccessPoint Yes max. 3 clients
Web server yes, port 80 Operating pages
JSON data server yes, port 80 Control data
TCP data server yes, port 6666 NMEA0183 data stream
Serial interface yes, 3.3V level NMEA0183, debug data, parameterizable
mDNS Yes can be switched off
NMEA0183 Sentences
MWV Wind data
VWR Wind data
VPW Performance data
INF Custom code
Supported software
Linux AvNav, OpenPlotter, OpenCPN
Android Wind sensor app, AVnav, OpenCPN, Navionics, WinGPS pro
Windows WinGPS
iOS NMEAremote, Navionics
Dimensions
Dimensions 175 x 120 x 150 mm without pipe and foot
weight 150 g with pipe and foot
materials
plastic PETG: housing parts painted
Metals Alu: holding tube anodized
V2A: tip, screws, nuts
miscellaneous
CE no
UL no
guarantee no
Licenses CC-BY-NC-SA Hardware, documentation
GPL 3.0 software

Opinions and tips

We hope that these instructions were of help to you in successfully implementing the project. Your opinions and tips are important to us. Please let us know if you got along with the instructions, had difficulties or have any tips on where we should improve the documentation. It is best to use our contact form. In this way we can enable a high quality of the replication instructions and a successful project implementation.

Hints

* Requires a 3D graphics card WebGL supports