Difference between revisions of "Fundamental Concepts"

From Bike Wiki
Jump to navigation Jump to search
Line 6: Line 6:
  
 
==Encoder Channels==
 
==Encoder Channels==
The encoders used on the bike are incremental encoders that have a total of three channels (A, B, and C). Channel A is a square-wave signal such that every time the rotary encoder passes through a "tick" it will produces a square-wave. From the number of these incremental ticks, one can determine the amount of rotation. The second channel B produces a signal identical to A except for the fact that it has an induced phase to determine the direction of the rotation (i.e. CW or CCW). The third channel C produces a one-pulse-per-revolution to signal when the encoder completes one turn. The function behind this is for homing and pulse count verification.
+
The encoders used on the bike are incremental encoders that have a total of three channels (A, B, and C). Channel A is a square-wave signal such that every time the rotary encoder passes through a "tick" it will produces a square-wave. From the number of these incremental ticks, one can determine the amount of rotation. The second channel B produces a signal identical to A except for the fact that it has an induced phase to determine the direction of the rotation (i.e. CW or CCW). The third channel C produces a one-pulse-per-revolution to signal when the encoder completes one turn. The function behind this is for homing and pulse count verification. The encoders have three channels, yet six outputs (i.e. A1, A2, B1, B2, C1, C2). These extra three outputs provides differential measurements for more accurate data.

Revision as of 13:47, 3 May 2020

Overview

This page serves to hold fundamental information related to the electrical, embedded, communication systems present on the bike.

Serial Peripheral Interface (SPI)

The motivation behind using SPI communication rather than serial ports is because serial ports act on asynchronous communication. Ansynchronous communication (i.e. not synchronized with a common clock) often requires extra overhead due to the use of start and stop bits (i.e. sync bits). Synchronous communication, however, uses a common clock to synchronize data transmission. The clock is normally idle and only produces an oscillating signal to tell the receiver when to sample bits on the data line. SPI is type of synchronous communication that allows bi-directional data transmission. Thus, there are two lines of communcation, MOSI and MISO. MOSI (Master-Out-Slave-In) allows the master to send data to the slave. MISO (Master-In-Slave-Out) allows the slave to send data to the master. Only one side of the SPI generates the clock signal (called SCK for Serial Clock) and is usually referred to the master (because they control when transmission occurs). In the case of the bike, the arduino DUE is the master and IMU acts as a slaves. Another capability of SPI is communicating with multiple slaves and supported using the SS line (Slave Select). There are two ways to implement SS: separate lines for each slave or salves daisy-chained. The bike uses separate lines to communicate with the IMU and RS (i.e. BeagleBone).

Encoder Channels

The encoders used on the bike are incremental encoders that have a total of three channels (A, B, and C). Channel A is a square-wave signal such that every time the rotary encoder passes through a "tick" it will produces a square-wave. From the number of these incremental ticks, one can determine the amount of rotation. The second channel B produces a signal identical to A except for the fact that it has an induced phase to determine the direction of the rotation (i.e. CW or CCW). The third channel C produces a one-pulse-per-revolution to signal when the encoder completes one turn. The function behind this is for homing and pulse count verification. The encoders have three channels, yet six outputs (i.e. A1, A2, B1, B2, C1, C2). These extra three outputs provides differential measurements for more accurate data.