Optical Parts
These are electronic components, using either visible or
infra-red light. You can use them, for example, to detect and
follow lines on the RoboRugby table, or to detect the presence of a
ball in the robot.
The distance sensor is covered on a
separate web page.
Reflective Optical Sensor
This optical sensor is easy to use, as it has the source and
detector in one package. However, it is only suitable for
detecting light reflected from objects in a 5 to 10mm range, as the
source and detector are angled sharply towards each other.
Each kit has two of these sensors already wired up as shown below, with a plug to fit the
Handyboard.
For those who want to build more sensors, the basic sensor
component is available in two versions - the only difference is
the connection arrangements:
|

|

|
| Optek OPB704 - data
sheet |
Optek OPB704W - data
sheet |
| This version has short pin connections.
You can solder wires directly to these or bend them and
solder them into a circuit board. Great care is needed
when soldering, as the pins are short - too much heat will destroy
the device in seconds! |
This version has long insulated wire
connections. You can solder these wires into a circuit
board, or connect them directly to other components or
wires. The wires are colour-coded to indicate which is
which. A mistake here can
destroy the device! |
Light source
These devices use an infra-red light-emitting diode (LED) as the
light source. See details of LEDs below. Like other LEDs,
this one needs a series resistor to
set the current flowing in it at the required value.
The maximum current which the LED can survive is 40mA. It
is normal to operate it at 10 to 20mA. Higher current will
give more light output and increase the range of the sensor.
The range is is limited by the sensor geometry anyway, so there is
little point in using more than 20mA.
At a current of around 20mA, the voltage across the LED is
typically 1.6V. With the 5V supply from the Handyboard, this
leaves 3.4V across the series resistor. A series resistance of
180 ohms will give a current of about 19mA. The circuit that
we have used is shown below, along with the pin connections of the sensor.
Light detector
The light detector is a photo-transistor, which can control the
current flowing in an external circuit. When it is dark, it
only allows a very small current to flow - about 100nA. As the
light intensity increases, the photo-transistor allows more current
to flow, up to a maximum of 200µA.
As the Handyboard analogue inputs respond to voltage, you have to
make this current flow through a resistance. The Handyboard
inputs already have a resistance of 47kohm connected to the 5V
supply, which is ideal for this purpose. The circuit that we
have used is
shown above.
This circuit will give a high voltage (close to 5V)
when the photo-transistor is dark. As the light intensity
increases, more current flows, and the voltage falls, reaching 0.3V at a current of 100µA.
This means that on the Handyboard, smaller numbers correspond to
brighter light.
For information on building electronic circuits, see the circuit
building and soldering pages.
Light-emitting Diodes
| A diode allows current to flow through it in
one direction only. A light-emitting diode emits light
when a current flows through it. The larger the
current flowing through an LED, the more light will be
emitted.
There is a limit to the current which an LED can
survive. It is important to connect a resistor in
series with an LED to set the current at the required
value. Too much current will
destroy the LED!
A current of 10mA is a good starting point - it will
produce plenty of light from the LEDs provided. |

|
Details
There are two different LEDs in your kit of parts:
| LED type: |
Red |
Infra-red |
| Package colour (for identification): |
Red |
Blue |
| Part details: (click for data sheet) |
Kingbright
L531D |
Temic TSUS
5202 |
| Peak wavelength of light output: |
625 nm |
950 nm |
| Angle of half intensity: |
30° |
15° |
| Maximum current: |
30 mA |
100 mA |
| Typical current: |
10 mA |
20 mA |
| Voltage at typical current: |
2 V |
1.3 V |
Using an LED
As the Handyboard provides a constant voltage supply, of 5V, you
must connect a resistor in series with an LED to set the current at
the required value. Connecting an LED directly to the 5V
supply will destroy it! The diagram below (centre) shows the
circuit which you need.
The diagram above (left) shows the symbol for an LED, and the ways of identifying
the pins on the package: the cathode (negative terminal) is the shorter pin, and is also
marked by a flat part on the side of the LED package. Connecting an
LED backwards will destroy it!
The equations above (right) show how to calculate the resistor
value needed. You need to know what current you want to flow
in your LED, and the voltage across your LED when this current is
flowing. You can assume that this voltage will be the value at
the typical current given in the table above. An LED is not
like a resistor - it does not obey Ohm's law - the voltage
remains fairly constant for a wide range of current values.
For information on building electronic circuits, see the circuit
building and soldering pages.
Light Detectors
| These are light-sensing elements with a
built-in amplifier circuit.
The detectors operate from a 5V supply, and give an
output voltage proportional to the light intensity detected,
up to a maximum of about 4V. Any further increase in
light intensity will cause no change in voltage. |

|
Details
There are two different light detectors in your kit of parts:
| Detector type: |
Visible |
Infra-red |
| Package colour (for identification): |
Clear |
Dark |
| Part details: (click for data sheet) |
Texas Instruments
TSL250 |
Taos TSL260R |
| Response to light: |
450 to 950 nm |
850 to 1000 nm |
| Angle of half response: |
55° |
45° |
| Minimum output voltage (dark): |
3 mV |
4 mV |
| Maximum output voltage (bright): |
3.5 V |
3.8V |
Using a light detector
These light detectors can be connected directly to a Handyboard
analog input port. The Handyboard provides the 5V supply
needed. The detector output voltage is within the 0 to 5V
range of the Handyboard inputs.
The diagram above shows how to identify the pins on the light
detector package, and how to connect these pins to the Handyboard
port. The 47kOhm resistor shown is part of the Handyboard
input circuit - it does not have to be added. Take
care with the connections - connecting the wrong pin on a light
detector to the 5V supply will destroy it!
For information on building electronic circuits, see the circuit
building and soldering pages.
|