Installing, Connecting and Using the Encoder Mod-
138 AX2500/2850 Motor Controller Users Manual Version 1.7. February 1, 2005
Using this circuit, when the switch is open, a 0V (low-level) output from the encoder goes
through a 1k and 4.7k voltage divider, thus creating a voltage that will never be below 0.8V
at the encoder modules input.
When the switch is activated, the modules input is pulled to 0V.
It is recommended to use a voltmeter and/or oscilloscope to verify that the right voltage
levels are created as the encoder rotates and the switches activated.
You may also use the Encoder setup/test function in the Roborun utility (see Encoder
Testing and Setting Using the PC Utility on page 150). If the wiring is correct, the counte rs
should increment/decrement as the motor rotate. The switch indicators should be always
off unless the switches are actually activated.
Using the Encoder Module to Measure Distance
As the encoders rotate, their quadrature outputs is automatically processed and incre-
ments/decrements two 32-bit counter inside the Encoder Module. There is one 32-bit
counter for each of the encoders.
The counter values is stored as a signed binary number, ranging from -2,147,836,648 to
+2,147,836,647 (Hexadecimal format of value 80000000 to 7FFFFFFF respectively. When
the maximum or minimum counter value is reached, the counter automatically rolls back to
zero.
The counters can be read and set using the commands described in RS232 Encoder
Command Set on page142.
Encoder
SW1 SW2
Encoder Module
1kOhm
GND
5V Out
Ch A In
Ch A
Ch B
Ch B In
5V
GND
1kOhm
4.7kOhm
4.7kOhm
FIGURE 86. Signals seen by encoder using multi-levels and limit switches