Difference between revisions of "How to Add Encoders to a Robot"

(Components)
Line 2: Line 2:
  
 
==Adding Encoders to a Robot Kit==
 
==Adding Encoders to a Robot Kit==
If you're purchasing a robot from SuperDroid, if you want to add encoders to the robot then follow these guidelines when selecting options.
+
If you're purchasing a robot from SuperDroid Robots, if you want to add encoders to the robot then follow these guidelines when selecting options.
  
*Motors: Make sure to select motors with encoders! Most kits will have options for motors with and without encoders. To have encoders on the robot, you will need to select an option that says "with Encoders"
+
*Motors: Make sure to select motors with encoders! Most kits will have options for motors with and without encoders. To have encoders on the robot, you will need to select an option that says "with Encoders".
  
 
[[File:encoder motor option example.png|link=https://wiki.sdrobots.com/index.php/File:encoder%20motor%20option%20example.png|center|frame|Example Motor Options on an IG42 Robot Kit]]
 
[[File:encoder motor option example.png|link=https://wiki.sdrobots.com/index.php/File:encoder%20motor%20option%20example.png|center|frame|Example Motor Options on an IG42 Robot Kit]]
  
*Motor Controllers: If you're not sure what to pick here then read more about Motor Controllers down in the Components section of this page.[[File:motorControllerOptionExample.png|center|frame|Example Motor Controller Options]]
+
*Motor Controllers: If you're not sure what to pick here then consult the Reading Encoders section of this page. Essentially Roboteqs and Roboclaws are able to interface directly with encoders but Sabertooths will require a separate Encoder Buffer Board and microcontroller to read encoder values.[[File:motorControllerOptionExample.png|center|frame|Example Motor Controller Options]]
 
*Encoder Options: Simply pick the Encoder Kit that corresponds to your selected Motor Controller.
 
*Encoder Options: Simply pick the Encoder Kit that corresponds to your selected Motor Controller.
  
 
<br />
 
<br />
  
==Components==
+
==Encoder Hardware==
 +
Encoders can either come attached to the motor or installed separately as standalone units.
  
 
===Motors with Encoders===
 
===Motors with Encoders===
 +
[[File:TD-044-078 ig42 motor encoders.jpg|thumb|191x191px|link=https://wiki.sdrobots.com/index.php/File:TD-044-078_ig42_motor_encoders.jpg]]Our IG32, IG42, and IG52 gear motors come in variants with and without encoders. In the picture to the right, the encoder is inside the black end cap. There are four wires coming out of the encoder unit that provide access to the encoder power and [[Encoders#Encoder Output|quadrature]] A and B pulse signals.
 +
{| class="wikitable"
 +
|+
 +
!Wire Color
 +
!Function
 +
|-
 +
|Brown
 +
|5V Power Input
 +
|-
 +
|Green
 +
|Ground
 +
|-
 +
|Blue
 +
|Quadrature A
 +
|-
 +
|Purple
 +
|Quadrature B
 +
|}
 +
With these encoders, the A and B signals must have 1k pull-up resistors connected between each signal and the encoder 5V power. When we install these on our robots we include these resistors on either a <sdr item id=2760>Roboteq DB15 Breakout Board</sdr item>, <sdr item id=2397>Encoder Buffer Board</sdr item>, or <sdr item id=1512>Encoder Pullup Board</sdr item>, depending on the motor controller used.
 +
===Standalone Encoders===
 +
==Reading Encoders==
 +
We have a few preferred methods for tracking and reading encoder values.
 +
===Roboteq Motor Controller===
 +
Roboteq motor controllers include built-in functionality to connect directly with the encoder A and B quadrature signals, detect pulses, and maintain a count of the number of pulses observed. Roboteqs can use the measured encoder data to perform [[Speed Control#Closed Loop|Closed Loop Speed Control]].
 +
===Roboclaw Motor Controller===
 +
Roboclaw motor controllers are able to connect directly to the encoder quadrature signals and keep track of the number of pulses observed. Roboclaws can use the measured encoder data to perform [[Speed Control#Closed Loop|Closed Loop Speed Control]].
 +
===Encoder Buffer Board===
 +
This board is always an option when the robot's motor controller does not support encoder reading. This device uses the LS3766R chip and connects directly to the encoders, maintains a count of the encoder pulses, and provides a SPI interface to read the counts from a microcontroller. We sell this board in 1-, 2-, 3-, and 4-channel variants. The board provides optional pullup resistors for the encoder A and B signals so no additional circuitry is required.
  
===Standalone Encoders===
+
<sdr item id=2397>Single LS7366R Encoder Buffer Board (TE-183-001)</sdr item>
 +
 
 +
<sdr item id=1523>Dual LS7366R Encoder Buffer Board (TE-083-002)</sdr item>
  
===Motor Controllers===
+
<sdr item id=2398>Triple LS7366R Encoder Buffer Board (TE-183-003)</sdr item>
  
===Encoder Buffer Boards===
+
<sdr item id=2418>Quadruple LS7366R Encoder Buffer Board (TE-183-004)</sdr item>

Revision as of 16:04, 15 January 2021

This is a practical guide to adding encoders to a robot. In addition to the encoders themselves, extra components and circuitry are needed to interface with and keep track of the encoder output over time. This guide will cover how to select the correct options to add encoders to a robot kit and go into more detail about the required components.

Adding Encoders to a Robot Kit

If you're purchasing a robot from SuperDroid Robots, if you want to add encoders to the robot then follow these guidelines when selecting options.

  • Motors: Make sure to select motors with encoders! Most kits will have options for motors with and without encoders. To have encoders on the robot, you will need to select an option that says "with Encoders".
Example Motor Options on an IG42 Robot Kit
  • Motor Controllers: If you're not sure what to pick here then consult the Reading Encoders section of this page. Essentially Roboteqs and Roboclaws are able to interface directly with encoders but Sabertooths will require a separate Encoder Buffer Board and microcontroller to read encoder values.
    Example Motor Controller Options
  • Encoder Options: Simply pick the Encoder Kit that corresponds to your selected Motor Controller.


Encoder Hardware

Encoders can either come attached to the motor or installed separately as standalone units.

Motors with Encoders

TD-044-078 ig42 motor encoders.jpg

Our IG32, IG42, and IG52 gear motors come in variants with and without encoders. In the picture to the right, the encoder is inside the black end cap. There are four wires coming out of the encoder unit that provide access to the encoder power and quadrature A and B pulse signals.

Wire Color Function
Brown 5V Power Input
Green Ground
Blue Quadrature A
Purple Quadrature B

With these encoders, the A and B signals must have 1k pull-up resistors connected between each signal and the encoder 5V power. When we install these on our robots we include these resistors on either a Roboteq DB15 Breakout Board, Encoder Buffer Board, or Encoder Pullup Board, depending on the motor controller used.

Standalone Encoders

Reading Encoders

We have a few preferred methods for tracking and reading encoder values.

Roboteq Motor Controller

Roboteq motor controllers include built-in functionality to connect directly with the encoder A and B quadrature signals, detect pulses, and maintain a count of the number of pulses observed. Roboteqs can use the measured encoder data to perform Closed Loop Speed Control.

Roboclaw Motor Controller

Roboclaw motor controllers are able to connect directly to the encoder quadrature signals and keep track of the number of pulses observed. Roboclaws can use the measured encoder data to perform Closed Loop Speed Control.

Encoder Buffer Board

This board is always an option when the robot's motor controller does not support encoder reading. This device uses the LS3766R chip and connects directly to the encoders, maintains a count of the encoder pulses, and provides a SPI interface to read the counts from a microcontroller. We sell this board in 1-, 2-, 3-, and 4-channel variants. The board provides optional pullup resistors for the encoder A and B signals so no additional circuitry is required.

Single LS7366R Encoder Buffer Board (TE-183-001)

Dual LS7366R Encoder Buffer Board (TE-083-002)

Triple LS7366R Encoder Buffer Board (TE-183-003)

Quadruple LS7366R Encoder Buffer Board (TE-183-004)