divider works using two parts: a fixed resistance (330
ohms) and a variable resistance (phototransistor). As any
one phototransistor is exposed to light, a tiny current is
produced at its base which causes an even greater
current to flow from its collector to emitter. The more
light focused directly at the phototransistor, the more
collector current will flow. As the collector current
increases, so does the voltage drop across the fixed
330 ohm resistor.
There is only a total of + 5 volts to be split between
the resistor and phototransistor; so as more voltage
drops across the fixed resistor, the greater the voltage
drop ratio of resistor to phototransistor. This provides
an analog measure of the amount of light that any
one phototransistor sees. The area of the bug eye
experiencing the greatest fixed-resistor voltage drops is
the area hit most directly by the sun. That is how a
machine looks for the sun!
■ FIGURE 3. Inside the BugEye with its “optical nerve” wires.
your eyes. Your retinas receive the light and send electrical
impulses to your brain, which interprets those signals
allowing you to locate the apple (processing). Your brain
then sends electrical impulses to your muscles, directing
your hand to pick up the apple (output).
We started by designing an input device. How do
you make a machine look for the sun? Why not build
an analog eye (Figure 3)? We constructed a four inch
diameter semi-spherical plastic dome with an array of
16 phototransistors evenly spaced about its surface
(Figure 4). It appeared to be a multi-faceted bug eye, so
that’s what we called it! Each of the 16 phototransistors
was placed in series with a 330 ohm resistor between
+ 5 volts and
16 voltage divider
COVERING NEW GROUND
Uh-oh! Problem: The bug eye was speaking one
language (analog), but the microprocessor only spoke
digital! What we needed was a translator between them —
an analog-to-digital converter (ADC) (Figure 5). This also
posed another problem: serial communication — the way
that the ADC and microprocessor talk to each other
(something I knew nothing about!). Adam, wishing to
avoid learning a new microprocessor and programming
language, chose to go with the Parallax BASIC Stamp II
(BS2p40) (Figure 6). He had used it before and was
familiar with it. I, on the other hand, had never used a
BASIC Stamp; as the electronics buff of this group, I would
have to do a bit of programming while prototyping the
circuitry. So, there I was trying to make an “eye” and a
“brain” communicate, and I knew nothing about analog-to-digital converters, BASIC Stamps, or serial communication.
Talk about a learning curve!
■ FIGURE 6.
A Parallax Basic
Stamp II with 40 pins
■ FIGURE 4. The completed BugEye
and Analog-to-Digital Converter
■ FIGURE 5. Two TLC0838CN 8-bit, 8 channel ADC
chips on a homemade printed circuit board.