You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Revamp Encoder articles
Seperate out form factor of encoder from electrical characteristices.
Document Duty Cycle encoders and move Analog Encoders from
Potentiometer articles to encoder articles.
Remove encoder examples that are better covered elsewhere
* Don't omit leading/trailing 0s throughout document
* Fix Lamprey formatting and add to output types
* Address review comments
* More capitalization
* Resolve duplicate IDs
* Add Duty Cycle connected
Copy file name to clipboardExpand all lines: source/docs/hardware/sensors/analog-potentiometers-hardware.rst
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,6 @@ As mentioned before, a potentiometer is a voltage divider, as shown in the circu
23
23
24
24
Since the circuit is symmetric, it is reversible - this allows the user to choose at which end of the travel the measured voltage is zero, and at which end it is 5 volts. To reverse the directionality of the sensor, it can simply be wired backwards! Be sure to check the directionality of your potentiometer with a multimeter to be sure it is in the desired orientation before soldering your wires to the contacts.
:alt:Connecting a US Digital MA3 Absolute Encoder to the roboRIO.
31
-
32
-
An "absolute encoder" is an encoder that measures the absolute position of the encoder shaft, rather than the incremental movement (as a :doc:`quadrature encoder <encoders-hardware>`) does. In this respect, absolute encoders are more similar to potentiometers than to incremental encoders. Many absolute encoders offer a simple analog output - these can be used exactly in the same way as a potentiometer, except their wiring is not generally reversible. Absolute encoders have the advantage of lacking a hard travel limit - the signal will simply reset when the shaft crosses the zero point. The analog potentiometer pictured above can be found at `AndyMark <https://www.andymark.com/products/absolute-encoder-with-cable>`__.
33
-
34
-
Absolute encoders that do not offer a simple analog output require :doc:`more complicated communications with the RIO <serial-buses>`.
Copy file name to clipboardExpand all lines: source/docs/hardware/sensors/encoders-hardware.rst
+94-22Lines changed: 94 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,66 +5,108 @@ Encoders - Hardware
5
5
6
6
.. note:: This section covers encoder hardware. For a software guide to encoders, see :ref:`docs/software/hardware-apis/sensors/encoders-software:Encoders - Software`.
7
7
8
-
Quadrature encoders are by far the most common method for measuring rotational motion in FRC\ |reg|, and for good reason - they are cheap, easy-to-use, and reliable. As they produce digital signals, they are less-prone to noise and interference than analog devices (such as :doc:`potentiometers <analog-potentiometers-hardware>`).
9
-
10
-
The term "quadrature" refers to the method by which the motion is measured/encoded. A quadrature encoder produces two square-wave pulses that are 90-degrees out-of-phase from each other, as seen in the picture below:
:alt:The signal pattern in both directions and how using two channels allows us to tell the direction.
14
-
15
-
Thus, across both channels, there are four total "edges" per period (hence "quad"). The use of two out-of-phase pulses allows the direction of motion to be unambiguously determined from which pulse "leads" the other.
16
-
17
-
As each square wave pulse is a digital signal, quadrature encoders connect to the :doc:`digital input <digital-inputs-hardware>` ports on the RIO.
8
+
Encoders are by far the most common method for measuring rotational motion in FRC\ |reg|, and for good reason - they are cheap, easy-to-use, and reliable. As they produce digital signals, they are less-prone to noise and interference than analog devices (such as :doc:`potentiometers <analog-potentiometers-hardware>`).
18
9
19
10
Types of Encoders
20
11
-----------------
21
12
22
-
There are three types of quadrature encoders typically used in FRC:
13
+
There are three main ways encoders connect physically that are typically used in FRC:
23
14
24
15
- `Shafted encoders`_
25
16
- `On-shaft encoders`_
26
17
- `Magnetic encoders`_
27
18
28
19
These encoders vary in how they are mounted to the mechanism in question. In addition to these types of encoders, many FRC mechanisms come with quadrature encoders integrated into their design.
29
20
30
-
Shafted encoders
21
+
There are also three main ways the encoder data is communicated that are typically used in FRC:
22
+
23
+
- `Quadrature encoders`_
24
+
- `Duty Cycle encoders`_
25
+
- `Analog encoders`_
26
+
27
+
.. note:: Some encoders may support more then one communication method
Shafted encoders have a sealed body with a shaft protruding out of it that must be coupled rotationally to a mechanism. This is often done with a helical beam coupling, or, more cheaply, with a length of flexible tubing (such as surgical tubing or pneumatic tubing), fastened with cable ties and/or adhesive at either end. Many commercial off-the-shelf FRC gearboxes have purpose-built mounting points for shafted encoders, such as the popular `Grayhill 63r <https://www.grayhill.com/documents/63R-Datasheet>`__, pictured above.
36
+
Shafted encoders have a sealed body with a shaft protruding out of it that must be coupled rotationally to a mechanism. This is often done with a helical beam coupling, or, more cheaply, with a length of flexible tubing (such as surgical tubing or pneumatic tubing), fastened with cable ties and/or adhesive at either end. Many commercial off-the-shelf FRC gearboxes have purpose-built mounting points for shafted encoders.
:alt:Diagram of the AMT103 and the AMT102 shaft encoders.
44
48
:width:600
45
49
46
-
On-shaft encoders (such as the `AMT103-V <https://www.cuidevices.com/product/motion/rotary-encoders/incremental/modular/amt10-v-kit/amt103-v>`__ available through FIRST Choice) couple to a shaft by fitting *around* it, forming a friction coupling between the shaft and a rotating hub inside the encoder.
50
+
On-shaft encoders couple to a shaft by fitting *around* it, forming a friction coupling between the shaft and a rotating hub inside the encoder.
51
+
52
+
Examples of On-shaft encoders:
47
53
48
-
Magnetic encoders
54
+
- `AMT103-V <https://www.cuidevices.com/product/motion/rotary-encoders/incremental/modular/amt10-v-kit/amt103-v>`__ available through FIRST Choice
55
+
- `REV Through Bore Encoder <https://www.revrobotics.com/rev-11-1271/>`__
56
+
- `US Digital E4T <https://www.andymark.com/products/e4t-oem-miniature-optical-encoder-kit>`__
Magnetic encoders require no mechanical coupling to the shaft at all; rather, they track the orientation of a magnet fixed to the shaft. The `CTRE Mag Encoder <https://store.ctr-electronics.com/srx-mag-encoder/>`__ is a popular option, with many FRC products offering built-in mounting options for it. While the no-contact nature of magnetic encoders can be handy, they often require precise construction in order to ensure that the magnet is positioned correctly with respect to the encoder.
65
+
Magnetic encoders require no mechanical coupling to the shaft at all; rather, they track the orientation of a magnet fixed to the shaft. While the no-contact nature of magnetic encoders can be handy, they often require precise construction in order to ensure that the magnet is positioned correctly with respect to the encoder.
The term "quadrature" refers to the method by which the motion is measured/encoded. A quadrature encoder produces two square-wave pulses that are 90-degrees out-of-phase from each other, as seen in the picture below:
:alt:The signal pattern in both directions and how using two channels allows us to tell the direction.
81
+
82
+
Thus, across both channels, there are four total "edges" per period (hence "quad"). The use of two out-of-phase pulses allows the direction of motion to be unambiguously determined from which pulse "leads" the other.
83
+
84
+
As each square wave pulse is a digital signal, quadrature encoders connect to the :doc:`digital input <digital-inputs-hardware>` ports on the roboRIO.
56
85
57
-
Encoder Wiring
58
-
--------------
86
+
Examples of quadrature encoders:
87
+
88
+
- `AMT103-V <https://www.cuidevices.com/product/motion/rotary-encoders/incremental/modular/amt10-v-kit/amt103-v>`__ available through FIRST Choice
:alt:Wiring the E4T Optical Encoder to two DIO ports.
62
99
:width:400
63
100
64
-
Encoders that need two digital inputs, such as the `E4T OEM Miniature Optical Encoder <https://www.andymark.com/products/e4t-oem-miniature-optical-encoder-kit>`__, can be wired to two digital input ports. Other encoders, such as the on-shaft ones shown above, often need :doc:`an analog input port <analog-inputs-hardware>`. CTRE Magnetic encoders shown above can be wired to a :ref:`TalonSRX data port <docs/hardware/sensors/serial-buses:CAN Bus>` with a ribbon cable.
101
+
Quadrature Encoders, such as the `E4T OEM Miniature Optical Encoder <https://www.andymark.com/products/e4t-oem-miniature-optical-encoder-kit>`__, can be wired to two digital input ports as shown above.
102
+
103
+
Index
104
+
~~~~~
65
105
66
-
Encoder Resolution
67
-
------------------
106
+
Some quadrature encoders have a third index pin which pulses when the encoder completes a revolution.
107
+
108
+
Quaderature Encoder Resolution
109
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68
110
69
111
.. warning:: The acronyms "CPR" and "PPR" are *both* used by varying sources to denote both edges per revolution *and* cycles per revolution, so the acronym alone is not enough to tell which is of the two is meant when by a given value. When in doubt, consult the technical manual of your specific encoder.
70
112
@@ -77,3 +119,33 @@ As encoders measure rotation with digital pulses, the accuracy of the measuremen
77
119
Thus, a resolution stated in edges per revolution has a value four times that of the same resolution stated in cycles per revolution.
78
120
79
121
In general, the resolution of your encoder in edges-per-revolution should be somewhat finer than your smallest acceptable error in positioning. Thus, if you want to know the mechanism plus-or-minus one degree, you should have an encoder with a resolution somewhat higher than 360 edges per revolution.
:alt:The PWM signal pattern for minimum and maximum angles.
128
+
129
+
Duty cycle encoders connect to a single digital input on the roboRIO. They output a pulse where the length of a pulse is proportional to the absolute position of the encoder.
0 commit comments