Difference between revisions of "Optointerrupter"

From Mech
Jump to navigationJump to search
m
 
m
Line 1: Line 1:
[[Category:Sensor]]
[[Category:Sensors]]


===Overview===
===Overview===
[[image:diagram.gif|right]]
An infrared slotted optical switch is a device similar to the photo-reflector except that the emitter is pointed directly into the phototransistor. The slotted optical switch can be used to build shaft encoders. Shaft encoders can give the robot feedback on how far its wheels have turned or on synchronizing two wheels' velocity. A shaft encoder usually consists of a slotted optical switch and a striped wheel with a palette of radically alternating holes or slots on it. The palette of stripes will alternately reflect or not reflect light to the phototransistor, yielding a pulse-train output. The robot can then tell how far its wheels have rotated by counting the pulses.
[[image:pinout.gif|right]]
An infrared slotted optical switch is a device similar to the photo-reflector except that the emitter is pointed directly into the phototransistor. The slotted optical switch can be used to build ''shaft encoders''. Shaft encoders can give the robot feedback on how far its wheels have turned or on synchronizing two wheels' velocity. A shaft encoder usually consists of a slotted optical switch and a striped wheel with a palette of radically alternating holes or slots on it. The palette of stripes will alternately reflect or not reflect light to the phototransistor, yielding a pulse-train output. The robot can then tell how far its wheels have rotated by counting the pulses.

===Circuitry===
[[image:circuit.jpg|right]]
The wiring for the slotted optical switch is straightforward. The white dot on the optical switch corresponds to pin 2 in the pinout diagram and you can figure out the pins using the pinout diagram shown above. The emitter LED is powered by te Handy Board's +5V supply, with a 330 ohm resistor in series to limit the current through the LED to an appropriate value. In fact, there is a pull-up resistor of 4.7K ohm built in the Handy Board and it is not shown in the diagram. Different varieties of phototransistor, however, may perform better with a smaller resistor value than the on-board 47K resistor. If the sensitivity of the device is poor, you can try connecting the signal line to the power supply through another resistor to determine the best response.

Revision as of 11:19, 21 June 2006


Overview

An infrared slotted optical switch is a device similar to the photo-reflector except that the emitter is pointed directly into the phototransistor. The slotted optical switch can be used to build shaft encoders. Shaft encoders can give the robot feedback on how far its wheels have turned or on synchronizing two wheels' velocity. A shaft encoder usually consists of a slotted optical switch and a striped wheel with a palette of radically alternating holes or slots on it. The palette of stripes will alternately reflect or not reflect light to the phototransistor, yielding a pulse-train output. The robot can then tell how far its wheels have rotated by counting the pulses.

Circuitry

The wiring for the slotted optical switch is straightforward. The white dot on the optical switch corresponds to pin 2 in the pinout diagram and you can figure out the pins using the pinout diagram shown above. The emitter LED is powered by te Handy Board's +5V supply, with a 330 ohm resistor in series to limit the current through the LED to an appropriate value. In fact, there is a pull-up resistor of 4.7K ohm built in the Handy Board and it is not shown in the diagram. Different varieties of phototransistor, however, may perform better with a smaller resistor value than the on-board 47K resistor. If the sensitivity of the device is poor, you can try connecting the signal line to the power supply through another resistor to determine the best response.