by MARGARET TOEBES
(AGE 16)
Dr. Otto H. Schmitt
For this year's Science Olympiad competition held in my
home state of North Carolina (
www.sciencenc.com), my
team was challenged to build an electric vehicle that would
go a given distance and then stop. Our first car used a 555
timer circuit, but it did not give u s the accuracy we wanted.
To be effective in the state competition, we needed a much
better way to actually measure the distance the car went.
Since we had built the car using the Vex Robotics kit from
Innovation First (
www.vexrobotics.com), we decided to use
the shaft encoder that was part of the
kit. With every revolution of the
wheel, the shaft encoder sends
90 pulses which we could
count to measure the
distance. Next, we designed
a counting circuit that would
connect to the shaft
encoder. For every pulse
emitted by the shaft encoder,
the counting circuit would
count down one from its
loaded value. We connected
that to a JK flip-flop so that
when the counting circuit hit
zero it would put out a
pulse to the flip-flop causing
the circuit to stop, giving
power to the motors.
While the design was
flawless in our own minds,
when we tested it out by
rotating the shaft encoder
it did not count down by one
but rather descended by
■ FIGURE 2. LM339 Schmitt Trigger Schematic.
■ FIGURE 1.
Disassembled Vex
Shaft Encoder.
random amounts. After some discussion and tests, we
concluded the problem originated with the shaft encoder.
We hooked it up to an oscilloscope and observed that the
signal it was putting out was not a digital wave like we
expected but was an analog one. Because the shaft encoder
operates by shining a light through a disk with slits in it
(Figure 1), we thought that the output would be binary;
one for when light was shining through and another for
when it wasn't. What we didn't anticipate was that as the
disk rotated there would be points at which some light was
shining through but not at the maximum amount, resulting
in somewhat of a sine wave.
Because our counting circuit was constructed with TTL
logic, it did not take kindly to these in-between signals and
behaved erratically. To address this problem, we tried several
options including a debounce circuit using a 555 timer but
SERVO 10.2008 49