Skip to content

counts the anchor chain pulses via inputs DSR and CTS on serial line

License

Notifications You must be signed in to change notification settings

laasa/avnav-anchor-chain-counter-rs232

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

avnav-anchor-chain-counter-rs232

counts the anchor chain pulses via "inputs DSR" and CTS of an RS232 device (e.g. USB-to-RS232-device)

grafik

General

The plugin reads pulses from a reed relais on the anchor winch. Addtionally it need the Up (and Down) information of the anchor windlass relais.

It is widely based on the

Parameter

  • device: e.g. '/dev/ttyUSB0'
  • usbid: as alternative for devive name
  • circumference: circumference of anchor winch
  • debuglevel: debug level

Details

Hardware needs

It is recommended to use optocoupler between board voltage level and RS232.

An example for such an circuit is suggested here: https://pysselilivet.blogspot.com/2020/06/seatalk1-to-nmea-0183-converter-diy.html

First tests are made with th module BUCCK_817_4_V1.0. grafik

The reed relais is a brought one: grafik

Software installation

To install this plugin please

  • create directory '/usr/lib/avnav/plugins/avnav-anchor-chain-counter-rs232' and
  • copy the file plugin.py to this directory.

Using in anvav

grafik

TODOs

  • only tested with linux

Helpers

Setup the serial devices by their serial numbers

  • Label your first USB serial device (e.g SeatalkOut)
  • Connect the first USB serial device to the PC
  • Get the vendorID, deviceID and serial number of the tty device (here "/dev/ttyUSB0") udevadm info -a -n /dev/ttyUSB0 | grep {idVendor} | head -n1 => ATTRS{idVendor}=="0403" udevadm info -a -n /dev/ttyUSB0 | grep {bcdDevice} | head -n1 => ATTRS{bcdDevice}=="0600" udevadm info -a -n /dev/ttyUSB0 | grep {serial} | head -n1 => ATTRS{serial}=="A10KKBM3"
  • creates an udev rule mcedit sudo mcedit /etc/udev/rules.d/10-local.rules SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKBM3", MODE="0666", SYMLINK+="ttyUSB_SeatalkOut"
  • Continue with the next devices
  • at the end the file /etc/udev/rules.d/10-local.rules may look like that SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKF9V", MODE="0666", SYMLINK+="ttyUSB_SeatalkInp" SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A10KKBM3", MODE="0666", SYMLINK+="ttyUSB_SeatalkOut"
  • Use this names in avnav (e.g: "/dev/ttyUSB_SeatalkInp")

About

counts the anchor chain pulses via inputs DSR and CTS on serial line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages