Twin Tweaks ...
CHARTING THE OBSTACLE AVOIDANCE PATH.
sample program for such obstacle avoidance, and after a
little modification for the reaction to obstacles, we were
ready for another run.
For obstacle avoidance, we give a tip of the hat to the
program’s many advantages: it is more responsive to
obstacles; it doesn’t need advance information about the
course; the programming is more efficient; and it is a better
way to realize the full potential of the sensors. The possible
side effects include: infinite loops, parsing error, excessive
paranoia, battlebot infestation, Gort, klaatu barada nikto,
and floating voltages. On a more serious note, an obstacle
avoidance program that uses a lot of sensors can be a bit
more of a hassle to debug because the problem may be
harder to isolate, and the bot may overestimate the
difficulty of obstacles and be scared away by the walls of
the maze. The Scribbler (in our case) kept bumping into a
casebook on religious freedom, illustrating that it had
problems with codes in more ways than one.
The obstacle avoidance Scribbler — given enough time
— did reliably complete the maze. It took about two
minutes to do so, but patience always saw it find its way to
the big star at the end of the big W. While it may have not
exactly been unfazed by unexpected cat crossings, the
obstacle avoidance program was able to recover and
complete the maze.
design, and the logical construction of code based
on an intuitive understanding of how the sensor
works. Ample documentation for both the Scribbler
and the BASIC Stamp 2 should be able to answer
any perplexing questions that one might have, and
we are also pleased to report that the Scribbler
presented no compatibility problems for
programming (now that we had our reliable
Keyspan serial-to-USB adapter).
We think a dead reckoning program is a great
way to introduce Basic with a program that is easy
to write and easy to debug. And while our dead
reckoning program didn’t take advantage of any of
the Scribbler’s other sensors, the unit is designed to
relieve the main microcontroller of position and
speed tracking to free up its attention for other
sensors. Once users are confident with the bare
bones dead reckoning program, they can work on
integrating more sensors to improve the adaptability
of the program. With enough other sensors, even a
dead reckoning program should be able to deal
with even unexpected cat attacks. Hopefully, the
sample obstacle avoidance program provides novice
programmers with the template they need to
incorporate more sensors into their projects.
The position controller can also work with any
microcontroller, as long as it can connect through a UART
interface. This would be a great way for intrepid members
of the Nation to teach themselves new programming
languages. Because the theory of operation remains the
same, all that hackers would have to deal with when
switching from one microcontroller to the next would be a
change in syntax. Perhaps other robots could be well suited
to the HB- 25 motor controller that the position controller is
meant to complement. Also, multiple position controllers
can be used with the HB- 25. The position controller includes
a set of two jumpers that allow up to four unit IDs to keep
multiple units straight when using them for one project. We
really think that starting with a simple hack can inspire
tinkerers to do more, and to challenge themselves to
complete more sophisticated projects with more involved
programming.
The position controller is a versatile and affordable
module that would be an excellent first hack for new
members of the SERVO Nation. While an encoder is not as
immediately recognizable as a fun-filled project, it has the
promise of starting casual tinkerers down the path to a
lifetime of learning in the robotics field, and that is the
greatest gift of all. SV
And That’s Tonight’s Last Word
Overall, we think the position controller is a prime
candidate for a first hack for young members of the SERVO
Nation who may have already been enchanted by the
whimsical artistic tendencies of the Scribbler. It presents a
project that includes some simple but critical mechanical
76 SERVO 07.2010
Recommended Websites
www.parallax.com
(search 27906 or “position controller”)
www.parallax.com/tabid/455/Default.aspx
(Scribbler Robot)