From a54396cd6d7ff39bd29ce1338d81accc0606110f Mon Sep 17 00:00:00 2001 From: David Ingraham Date: Mon, 11 Dec 2023 22:24:33 -0800 Subject: [PATCH] Add Angle Sensor and Wind-Vane-Angle-Sensor Docs --- common/source/docs/common-angle-sensor.rst | 31 ++++++++++++++++++++ rover/source/docs/wind-vane-angle-sensor.rst | 17 +++++++++++ rover/source/docs/wind-vane.rst | 6 ++-- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 common/source/docs/common-angle-sensor.rst create mode 100644 rover/source/docs/wind-vane-angle-sensor.rst diff --git a/common/source/docs/common-angle-sensor.rst b/common/source/docs/common-angle-sensor.rst new file mode 100644 index 0000000000..5a4a79b11e --- /dev/null +++ b/common/source/docs/common-angle-sensor.rst @@ -0,0 +1,31 @@ +.. _common-angle-sensor: +[copywiki destination="rover"] + +===== +Angle Sensor +===== + +This article describes how to attach an angle sensor so that your vehicle can sense angular position. This is used most commonly +for :ref:`wind-vane sensors ` for sailing rovers. + +Currently, only AS5048B Encoders are supported. + +AutoPilot connection +-------------------- +Connect the encoder to the autopilot's I2C Port using standard connections. + +Autopilot Configuration +----------------------- + +Connect to the autopilot with a ground station and set these parameters and then reload the parameters. + +- :ref:`ANG_TYPE ` = 1 (Enable) + +After reloading parameters, set the following parameters: + +- :ref:`ANG_BUS ` - set this to the serial bus ID for the I2C bus you've connected to. +- :ref:`ANG_ADDR ` - set this to the I2C Address of your sensor (defaults to 64 for AS5048B). +- :ref:`ANG_OFFS ` - set this to apply an offset in degrees to the zero position. +- :ref:`ANG_DIR ` - set this to -1 if you need to reverse the direction of rotation for the sensor. + + diff --git a/rover/source/docs/wind-vane-angle-sensor.rst b/rover/source/docs/wind-vane-angle-sensor.rst new file mode 100644 index 0000000000..6a29f84d02 --- /dev/null +++ b/rover/source/docs/wind-vane-angle-sensor.rst @@ -0,0 +1,17 @@ +.. _wind-vane-angle-sensor: + +======================= +Angle Sensor Wind Vane +======================= + +An angle sensor can be configured as the wind-vane direction source. In order to use this option, you must first configure +the angle sensor as described in the :ref:`Angle Sensor library ` documentation. + +To select the angle sensor as the wind-vane direction source, set :ref:`WNDVN_TYPE ` = 4. Then, select the absolute +encoder instance via the :ref:`WNDVN_DIR_PIN ` parameter (0=AngleSensor1, 1=AngleSensor2). + + +Wind Vane Construction +++++++++++++++++++++++ +A 3D-Printable model for an angle sensor wind-vane is available on `thingiverse `__. This example +uses an AS5048B breakout board available `here `__. diff --git a/rover/source/docs/wind-vane.rst b/rover/source/docs/wind-vane.rst index 2d73debef1..632256917a 100644 --- a/rover/source/docs/wind-vane.rst +++ b/rover/source/docs/wind-vane.rst @@ -27,7 +27,7 @@ to a alternative sensor. Note that any change to the _TYPE parameters will requi Wind Direction ---------------------- -Wind direction can be directly sensed through the use of an analogue voltage input. However it is also possible to use a fixed wind direction, +Wind direction can be directly sensed through the use of a directional sensor. However it is also possible to use a fixed wind direction, this is not recommended for long term use, but will allow testing of sailboats without the need for specialist sensors. The wind vane type can be selected with :ref:`WNDVN_TYPE `. The wind direction is filtered using a low pass filter, the frequency of this filter can be set using :ref:`WNDVN_DIR_FILT `. If the wind direction is oscillating this frequency can be reduced. This will reduce the effect @@ -42,6 +42,8 @@ the vehicle will have no new information about wind direction. Analogue Wind Vane Home Heading + Angle Sensor Wind Vane + NMEA Wind Speed @@ -59,4 +61,4 @@ speed is filtered using a low pass filter, the frequency of this filter can be s RPM Modern Devices rev-p Connecting Bluetooth Windvane to ArduPilot - + NMEA