--- ---

Analog Protocol

29 Mar 2020 - Courtney McBeth

The optical encoder and anemometer wind direction output communicate with the microcontroller via an analog signal. This means that these sensors have a common ground (ground signals are connected together) and the output signal from the sensor to the microcontroller has a variable voltage. Our microcontroller has a logic level of 3.3V, so the maximum voltage along this line is 3.3V. The voltage of this signal represents some data value. For example, for the anemometer wind direction output, a voltage of 0V corresponds to a wind direction of 0 degrees with respect to the boat, while a voltage of 3.3V corresponds to 359 degrees, and 1.65 corresponds to 180 degrees, etc. An Analog to Digital Converter (ADC) circuit is used to convert the voltage along the output signal to an integer value.

Microcontroller Configuration Documentation
Arduino Analog Library
PIC32 PIC32 Analog Library
Raspberry Pi N/A (requires external ADC)