PROJECTS: TINY WANDERER ROBOT
makeprojects.com/v/29
AVOIDING A FALL
The Tiny Wanderer uses 2 DIY infrared proximity sensors
and a cheap 8-pin microcontroller chip to autonomously
navigate tabletops, obstacle courses, or black-line paths,
depending on the sensor placement and chip programming.
F
I
A
1. Before the robot starts
wandering, the code calibrates
each sensor against the table
surface by measuring the
phototransistor’s output with
the IR LEDs both off and on.
G
;;;;;;
;;;;;
;;;;;;
C
J
H
B
D
E
E
2. As the robot travels, the IR
LEDs blink on and off, and the
code compares the sensed difference in IR bounce-back with the
difference seen during calibration. If there’s no bounce-back —
danger, Tiny Wanderer, danger!
A The robot’s chassis is bolted
together from flat-cut pieces.
B The 2 servomotors each drive
a large wheel with a rubber tire.
C A swiveling caster centered
under the chassis rear provides a third
wheel, for balance.
D The PCB holds an ATtiny85
microcontroller chip, its programming
header, connection headers, a power
switch, and other supporting components. In this project, the ATtiny85 is
programmed in C, with its hexfile firmware generated by the GCC compiler.
H Next to each IR LED is an IR
phototransistor that becomes more
conductive when it sees more infrared.
When a reflective object is close to
the sensor board, the phototransistor
detects IR bounce-back from the LED.
On the PCB, the collectors of the
phototransistors are connected to
VCC through pull-up resistors and to
analog input pins of the microcontroller. This allows the microcontroller
to monitor the IR levels detected. With
this input, it controls the servomotors
according to programmed behavior —
for example, by backing the robot up
when the sensors detect that it’s
about to roll off the table.
3. Face the same 2 sensors
forward, and you can program
the Tiny Wanderer to avoid
obstacles in its path.
E A sensor tray in front of the
chassis holds the 2 sensor arms.
F On the end of each arm is a
sensor board.
I A small piece of unshrunk
heat-shrink tubing blinders the
phototransistor, shielding it from IR
that comes from the LED directly.
G Each sensor board has an
infrared (IR) LED that’s switched
on and off by the microcontroller.
J A
4×AA battery pack supplies
power to the servos and microcontroller.
4. Move the sensors closer
together, facing down, and you
can program the Tiny Wanderer
to follow a black line.
Rob Nance
90 Make: makezine.com/29