Engineering information for electrical interface

Optical Encoder Engineering Information
QUADRATURE
All Grayhill encoders use quadrature
output code, which is the same as a 2-bit,
repeating gray code. Quadrature is the most
popular and cost effective output format
because only two detectors are required.
However, quadrature can only be used in applications where incremental data is required.
Absolute positioning is not possible because
the code repeats every four positions. In other
words, changes in the encoder in magnitude
and direction can be determined, but the
actual position of the encoder cannot. In most
applications this is not a problem.
In a quadrature rotary optical encoder
two detectors are used to provide outputs,
“A” and “B”. The code rotor either blocks the
infrared light or allows it to pass to the detectors. As the shaft turns the rotor, the outputs
change state to indicate position. The resulting output is two square waves which are 90°
out of phase.
OPEN COLLECTOR OUTPUT
The open collector output is typical of
the Series 61B, 61C and 62, and is the simplest form of output available. The first step
in interfacing with open collector outputs is to
provide an external pull-up resistor from each
output to the power source. These pull-up
resistors provide the output with the high-state
voltage when the phototransistor is “off”.
In a phototransistor, base current is
supplied when light strikes the detector, which
effectively grounds the output. Typically, the
detector is operated in saturation. This means
sufficient light is provided to completely sink,
or ground, all the current provided by the
pull up resistor plus that of the interfacing
electronics. In the logic high state, the light
is sufficiently blocked by the rotor and the
detector functions like an open circuit. The
pull up resistor then provides sourcing current
to the interfacing electronics. This “on” or “off”
digital arrangement allows the open collector to interface with popular integrated circuit
technologies such as TTL, TTL LS, CMOS,
and HCMOS.
SCHMITT TRIGGERS
To provide signal enhancement it is
recommended that a Schmitt Trigger be connected to each output. This device is already
included in the Series 61K, 61R, 63K and 63R
encoders. The Schmitt Trigger “cleans up” the
output into a pure digital signal. It does this
by removing the small linear region between
the “on” and “off” states of the detector. During this transition the light is only partially
blocked and the output is somewhere between what the interfacing circuit might con-
sider to be “on” or “off”. In other words, the
output is not completely digital. The Schmitt
Trigger contains a very important feature
which makes it attractive for this application.
The device has a higher threshold, or trigger
level, when it is in the “on” state than it does
in the “off” state. This hysterisis filters any
electrical noise, which can cause the output
to change state rapidly during the transition.
And since the output from the Schmitt Trigger
is a pure digital signal and is isolated from the
phototransistor, the signal is basically immune
to loading problems that can effect encoders
without the Schmitt Trigger. Schmitt Triggers
are available in most popular IC technologies.
SHAFT AND PANEL SEAL
A shaft and panel seal are available to
provide water-tight mounting for the Series
61B, 61D, 61K, 61R and 62 encoders. Sealing
is accomplished by an o-ring shaft seal and
a panel seal washer. The panel seal washer
in the 61B and 61D encoders does not affect
the overall dimensions of the switches. In
the 61K and 61R encoders, the .045" thick
washer is placed over the threads and sits flat
on the base of the bushing. The 61KS and
61RS are also epoxy-sealed on the bottom
of the switch to provide a completely sealed
switch.
Open Collector Output Schmitt Trigger
PHOTOTRANSISTOR
AS AN OPEN SWITCH
POWER
SOURCE
EXTERNAL
PULL-UP
RESISTOR
CURRENT
FLOW
HIGH
OUTPUT
LEVEL
TO NEXT
OUTPUT
STAGE
PHOTOTRANSISTOR
PHOTOTRANSISTOR
AS A CLOSED SWITCH
EXTERNAL
PULL-UP
RESISTOR
OUTPUT
PHOTOTRANSISTOR
www.grayhill.com
LIGHT
PARTIALLY
BLOCKED
LIGHT
DETECTED
LOWER
THRESHOLD
INPUT TO
SCHMITT
TRIGGER
OUTPUT
FROM
SCHMITT
TRIGGER
OUTPUT
LOW
OUTPUT
HIGH
OUTPUT
LOW
POWER
SOURCE
POWER
SOURCE
CURRENT
FLOW
UPPER
THRESHOLD
LIGHT
BLOCKED
LOW
OUTPUT
LEVEL
TO NEXT
STAGE
EXTERNAL
PULL-UP
RESISTOR
SCHMITT
TRIGGER
OUTPUT
PHOTOTRANSISTOR
Series 65
Optical Encoder Interface
Features
•Interfaces with all Grayhill and
Most Standard Quadrature Optical
Encoders
•Power Reduction of Up to 75-90%
in Optical Encoder Use Through
Power Management Feature
•User Selectable Output Modes:
Magnitude/Direction, Up/Down,
•Standard Quadrature
•Simplified Microprocessor Interface
Reduces Design Time
•Debounces Encoder Integral
Pushbutton Switch
•Ideal for Battery Powered Applications that Include Optical Encoders
Name
M0, M1
VDD
RES
VSS
ØAI, ØBI
SWI
SWO
NC
PW
RC
ØBO/DN/DR
ØAO/UP/MG
Description
The GH65C11-X is designed to receive
input from standard quadrature optical encoders. The power management feature allows
power to the encoder to be applied only during sampling intervals, thus conserving power
(especially advantageous in battery powered
systems). Sample rate is a nominal 4K per
second allowing high speed quadrature input.
The optical encoder interface can operate in
1 of 3 user-selectable output modes. These
modes are: magnitude and direction, up
and down count, and standard quadrature.
Debouncing of an integral pushbutton switch
within the optical encoder can also be accomplished.
Type*Description
I
Mode selection input pins
P
3–6 Vdc power source
I
Reset pin, normally connected to VDD
P
GND, 0v nominal power return
I
Phase A and B quadrature input pins
I
Switch input pin
O
Debounced switch output pin
O
No connect, this pin must be left unconnected
O
Power source for encoder power management
I/O
RC oscillator pin
O
Phase B, down, direction, mode conditional output pin
O
Phase A, up, magnitude, mode conditional output pin
SOIC/DIP
M0
M1
VDD
RES
VSS
ØAI
ØBI
SWI
SWO
1
2
3
4
5
6
7
8
9
18
17
16
15
14
13
12
11
10
SSOP
ØBO/DN/DR
ØAO/UP/MG
RC
NC
VDD
PW
PW
PW
PW
M0
M1
VDD
RES
VSS
VSS
ØAI
ØBI
SWI
SWO
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
ØBO/DN/DR
ØAO/UP/MG
RC
NC
VDD
VDD
PW
PW
PW
PW
* Pin Types: I = Input, O = Output, P = Power.
Ordering information
GH65C11-X-YY
Temperature: C = Commercial (0° C to 70° C)
N = Industrial (-40° C to 85° C)
Packaging:
PD = 18 lead 300 mil wide Plastic DIP
SO = 18 lead 300 mil wide gull wing SOIC
SS* = 20 lead SSOP
* The SS package style is not available in the -40°C to 85°C temperature range.
Available from your local Grayhill Distributor. For prices and discounts, contact a local Sales Office, an authorized local Distributor or Grayhill.
www.grayhill.com
Bulletin 1223
Rev 04/14