Introduction:
Imagine a rectangular array of sensors
about 500 across and 500 high focused on a
stars in a portion of the sky only a few
arc-minutes wide. (Each degree of angular view
is equal to 60 arc-minutes.) The SOFIA
observatory will use such an array to measure
where the telescope is pointed and send the
data back to guide the repositioning of the
telescope via torque motors.
In this experiment we will build a two
sensor array and measure its ability to detect
the angular position (in one direction or
dimension) of a lamp which will simulate a
star. The telescope must measure angular
position of 2 or more stars in two dimensions,
and with higher precision, but our 2 sensor
array illustrates the same fundamental
requirement for one simulated star in one
dimension. We need to understand a little
about the optics associated with the
phototransistors and how phototransistors
work. And we will need to build a shield and
to add focusing optics to the phototransistors
to increase their sensitivity to angular
changes in light. Finally we will test the two
sensor array to measure its sensitivity to
angular position of a light source.
Objectives:
1. Explore the characteristics of a
phototransistor.
2. Construct directional sensors from two
phototransistors with a simple lens and
shields.
3. Integrate the directional sensor
signals with Interactive C code to compute
the angle discriminating function in
real-time.
Phototransistor
Characteristics and Requirements
A phototransistor is a light-sensitive
device similar to other transistors which
act as current amplifiers, except that it
converts visible light, or photons, to
current which is then amplified. The output
current creates a voltage drop which is in
reverse proportion to the light intensity
until it is reduced to small value. If the
phototransistor is plugged into one of the
analog input ports on the Handy Board, the
voltage can be read as a digital number,
ranging from 255 for minimal light to about
10 for bright/close light.
The phototransistors in the Botball kit
(Panasonic PN168) will register a value of
about 10 for an unfocused pen lamp (~4w)
at 30-40 cm. Unfortunately, the optical
characteristics of these phototransistors
are not well matched to the requirements
for our sensors. In order for the two
element array to be sensitive to
direction, each phototransistor should
only respond to light coming from a narrow
range of angles, but each of our
phototransistors is enclosed in a plastic
dome or lens which gives it a wide angular
view. This also makes it relatively
insensitive to the rays of light coming
from a small source like our pen lamp
(simulating a star). To correct the
problem we will mount the phototransistor
in a small box with a narrow opening and
fit it with a focusing lens to give it
better sensitivity in the direction of the
opening. We want the angular response to
be about 5 degrees in the direction of the
beam movement (up & down) and about 15
degrees in the side-ways direction. These
requirements lead to the sizing of the
shield box in the construction
description. The focusing lens does not
have any tight requirements so it can be
made from any transparent plastic. The
construction description suggests soft
plastic bumpers so they can be easily cut
to fit the box. The students are
encouraged to experiment with other optics
and with the placement of the lens in
front of the phototransistor if they are
interested in improving the sensitivity
and directionality of the sensors.
Directional Sensor
construction
Materials:
masking tape (1/2 inch strips)
popcicle sticks
3x5 note card stock
black marker pen
clear , soft plastic
bumpers, ~ 9 mm diameter
x 2 mm high
latex glue
sharp craft knife
Make shields and
lens for two
phototransistors,
for each sensor:
4. cut a
popcicle stick
down the middle
and make four 5
cm lengths.
5. Cut two
rectangular
pieces 2 x 5
cm each from
the card
stock.
6. Glue
sticks to
each other
and to one
card piece
as shown to
make a
channel:
7. Color
the inside of
the channel
black with the
marking pen.
8. Remove
bumper from
its card and
stick to a
clear
plastic bag
(so the
sticky side
won’t
attract
dust); cut a
4 mm slice
from the
middle of a
bumper with
the knife to
make a lens:
side
top
9. Mount
the lens and
phototransistor
in the open
channel with
the lens about
in the middle,
2.5 cm from
one end as
shown from
above (hold
with masking
tape):
10. Cut a
short piece of
popcicle
stick, about
10 mm, and
tape on top of
phototransistor
wire leads to
help hold it
in position,
and block
light from the
rear .
11. Blacken
the inside
of the
second piece
of card
stock and
tape on top
to complete
each sensor.
Array
Assembly and
Test Procedure
Each
phototransistor
& shield
sensor should
be measured to
establish its
ability to
discriminate
small changes
in angle
relative to a
lamp. Mount
each sensor on
the sensor
testing jig
built in
experiment 5,
and use the
sensor test
program
sensa&b_cal1.c
to gather its
data (connect
sensor to
analog(0) and
analog(1)
inputs). Be
sure to
measure the
distance of
the lamp from
the sensor,
and set it the
same from each
sensor.
1. The
lamp and
sensor
configuration
provides
us with an
opportunity
to verify
a
fundamental
law of
radiation.
Because
the sensor
is
designed
to respond
only to
parallel
rays of
light, it
responds
primarily
to the
lamp and
is not
very
sensitive
to ambient
light in
the room
(this is
also
important
if we are
to track
the lamp).
The law
says that
the power
density
(p)* from
a
non-coherent
radiation
source
will be
proportional
to the
inverse
square of
the
distance
(r) from
the
source, or
p = k/r2 .
The sensor
test
program
displays a
value of
250-255
with no
lamp (lets
call that
the
dark_ref)
and the
reading is
reduced in
proportion
to the
light
power or
intensity
hitting it
from the
lamp, so
we should
expect the
following
relation:
Display
=
dark_ref
– k/r2
Point
the
sensor
at the
lamp
so as
to
minimize
the
reading,
then
move
the
lamp
twice
as far
away
and
readjust
the
pointing
again
to
minimize
the
reading.
Does
the
display
reading
follow
the
1/r2
law?
Take a
few
points
at
various
distances
and
plot
the
results.
2.
Using
the
test
jig
and
program
sensa&b_cal1.c
with
the
lamp
about
35-40
cm
away
point
each
sensor
at
the
lamp
and
automatically
gather
angular
response
data
and
plot
it
from
each
sensor.
The
plots
should
look
similar
to
the
following
plots:
*
power
density
=
power
per
unit
receiving
area
3.
Mount
both
sensors
together,
one
on
top
of
the
other,
on
the
test
jig
with
a
spacer
near
the
open
ends
so
that
the
top
sensor
is
directed
about
5
degrees
higher
than
the
bottom
one.
Adjust
the
angle
between
them,
using
the
program
display
as a
guide,
such
that
the
top
sensor
response
begins
to
decrease
(to
numerically
increase)
at
same
angle
that
the
bottom
sensor
response
approaches
its
peak
(numerically
approaches
it
minimum).
This
alignment
should
allow
a
program
which
subtracts
the
top
from
the
bottom
sensor
readings
to
generate
a
smooth
function
of
angle
which
measures
zero
at
the
cross-over
angle.
The
two
sensors
aligned
in
the
above
manner
and
subtracted
create
our
real
time
angle
discriminating
function.
4.
To
verify
the
control
capability
of
our
angle
discriminator,
load
aim7.c
program
into
the
Handy
Board.
This
program
will
drive
the
test
jig
servo
to
dynamically
acquire
and
track
the
light
source
as
it
is
moved
up
and
down.
/*aim7
Kevan
Anderson
8/99*/
/*
This
program
runs
the
servo
to
track
the
light.
Use
the
servo
tracking
to
test
your
sensor
characteristic.*/
void
main(){
int
pos;
servo_on();
pos=begin();
track(pos);
while(1){
track(lost(pos)
);
}
}
/*
allows
for
bottom
sensor
to
be
aimed
and
returns
that
position*/
int
begin(){
int
pos;
while(!start_button()){
pos=
knob()
;
printf
("angle=%d
%d\n",
pos,analog(0));
servo_deg((float)pos);
sleep(0.5);
}
return(pos);
}
/*
given
a
sensor
correction
and
a
starting
position,
will
track
a
light
sourse
up
and
down*/
void
track(int
pos){
int
a;
int
b;
printf("tracking\n");
sleep(1.);
while
(!((a>250)&&(b>250))){
/*
assumes
sensors'
dark
ref
>
250
*/
a=
analog(0);
b=
analog(1);
if
((a-b+1)<0){
pos=move_down(pos);
}
if
((a-b-1)>0){
pos=move_up(pos);
}
}
}
/*
given
a
position
where
a
signal
is
lost,
will
return
a
postion
where
a
signal
is
found*/
int
lost(int
pos){
int
i=0;
printf("lost\n");
while
(1){
if
((pos+i)>120){
pos-=40;
}
servo_deg((float)(pos+i));
sleep(.1);
if
((analog(0)<250)&&(analog(1)<250)){
return(pos+i);
}
if
((pos-i)<10){
pos+=40;
}
servo_deg((float)(pos-i));
sleep(.1);
if
((analog(0)<250)&&(analog(1)<250)){
return(pos-i);
}
i+=3;
}
}
/*
moves
up
one
position,
waits,
then
returns
new
position*/
int
move_up(int
a){
a++;
servo_deg((float)(a));
sleep(1.);
return(a);
}
/*
moves
down
one
position,
waits,
then
returns
new
position*/
int
move_down(int
a){
a--;
servo_deg((float)(a));
sleep(1.);
return(a);
}
