This is only a preview of the March 2006 issue of Silicon Chip. You can view 35 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "PC-Controlled Burglar Alarm System, Pt.2":
Items relevant to "AVR ISP SocketBoard":
Articles in this series:
Items relevant to "Phone/Fax Missed Call Alert":
Purchase a printed copy of this issue for $10.00. |
Giving the Viper some direction in life!
– ADDING A LINE TRACKER
L
ast month, we gave the Microbric
Viper some control via infrared;
this month we’re giving him
some eyes, courtesy of a line tracker
module.
This allows the Viper to follow
a high contrast line (at least 20mm
wide). This line can be black on a white
surface or it can be the opposite – a
white line on a black surface.
Contrast can be set to suit the lighting conditions and the blackness or
whiteness of the line, relative to its
background. We’ll cover this shortly.
First, as Mrs Beaton’s cookbook
says, you have to catch your hare Line
Tracker Expansion Pack.
That’s the easy part: just mosey into
your nearest Dick Smith Electronics store (or visit them on www.dse.
com.au) and part with just $29.98
and you’ll receive a pack just like the
photograph at right.
Naturally, we are assuming that you
have been following this series and
have previously purchased and built
70 Silicon Chip
the Viper robot. It’s a bit hard to do
anything unless you have!
In the Line Tracker Expansion Pack
you’ll also get instructions on how
the modules should be attached to
your Viper, so we won’t waste space
repeating that here.
As you can see, the various modules
are prebuilt – that’s one of the biggest
features of the Viper: the hard work is
all done for you!
How it works
There are two main modules in
the Line Tracker – one has a red LED
which shines down onto the surface
F
A
B
E
D
C
D
C
The line tracker expansion module contents, shown here still attached to
their carrier, include the LED module(A), the line tracker module (B), two
right angle modules (C), two straight modules (D), two strips (3-way, E and
5-way, F), plus packs containing 4 Brics, 6 nuts, 12 screws and 6 spacers.
siliconchip.com.au
Here’s the LED module (left) and
the Line Tracker module (right),
both reproduced significantly
larger than life size (they’re
actually about 20mm high). The
object in the centre of the left shot
is the red LED; the two lighter
objects centre right of the right
shot are the phototransistors,
which pick up the light through
holes in the PC board. The
IC right in the middle is the
microcontroller while the device
at the “pointy” end is another
LED, this one to indicate it’s logic
state (high or low).
under the Viper. The second has phototransistors and a microcontroller
– as you might expect, the phototransistors “pick up” light reflected from
the surface underneath (range is about
3-12mm) which the microcontroller
then analyses.
A white surface will reflect a lot of
the red light, while a black surface will
reflect little, if any.
The microcontroller determines
from the reflected light (or lack of it)
whether the surface underneath is
white or black and sends a logic high
(5V) or low (0V) to the main onboard
controller.
This then tells the Viper to maintain
its present course or to turn back onto
the line if the line has turned away or
if the Viper has strayed off the path.
As the onboard LED is red, the Viper
is “blind” to red surfaces (red surfaces
reflect just as much red light as white
surfaces do). Hence the need for black
and white lines and surfaces (either
way around).
Here’s how to do it:
Using the Microbric screwdriver
(supplied with the main kit) place
the tip into the hole at the front of the
Line Tracker (receiver) module until
the front LED flashes.
When the front LED stays on, place
the Viper on the line you want it to
follow, then when the LED goes out,
place the module on the surface off
the line.
The front LED should then quickly
flash five times to tell you that you
have successfully calibrated the
unit.
If it flashes slowly five times, calibration has failed and you’ll need to
repeat the calibration.
The reasons for failed calibration
could include too similar shades in
your line and background (ie, grey
and grey instead of black and white)
or perhaps the module is mounted too
far away from the line. Remember it
has a 3-12mm range.
So there you have it: something else
to keep you and your Viper amused for
another month (at least!). Don’t forget,
there is plenty more information available at www.microbric.com.au
SC
Protection
While the markings and construction method of the Viper mean that
reverse polarity is unlikely, it is not
impossible, so both transmitter and
receiver modules have a FET in series with the supply line to protect
the components. When the polarity
is connected the right way around,
the FETs conduct, supplying power
to the circuits.
(This is an idea that you might like
to use in projects – it’s more expensive than a series diode but has less
voltage drop).
Calibration
We mentioned earlier that the Viper
Line Tracker can be calibrated to suit
the lighting and contrast of your lines.
siliconchip.com.au
The assembled Microbric Viper with Line Tracker module. The receiver module
is mounted in front with the right angle modules alongside. The LED goes
underneath, aimed down to provide the red light by which the unit tracks. It
looks a bit different to the infrared version above left!
March 2006 71
|