UNDERSTANDING, DESIGNING & CONSTRUCTING ROBOTS & ROBOTIC SYSTEMS
■ BY PHIL DAVIS
PARAMETERS ON THE FLY: Part 1
WHENEVER I BUILD A ROBOT, THERE ARE ALWAYS variables and constants
which need to be adjusted to make sure the bot does just what I want it to;
the problem is, it’s usually a pain to change these. So, how can we make this
better? First of all, I want to give a better description of the problem I am
referring to and the cumbersome way it currently has to be managed.
Not so long ago, I built a mini
Sumo robot which didn’t have
encoders on the wheels — as I suspect
most don’t — and I had to gauge how
long it took the robot to rotate 90
degrees, 180 degrees, and 360
degrees. This required setting a
variable which I used to time how
long the motors were on. This was a
time-consuming thing to do as I had to
follow this process:
• Make a change in a variable.
• Compile the program.
• Plug the bot into my computer.
• Download the new code.
• Unplug the bot.
• Start the bot up and observe the effect
of the changes.
I have to go through this process
every time for every small change to
converge on a value which caused the
bot to rotate as closely as possible to
the desired positions. That’s not the
only variable, for example, if I want
the bot to run in a straight line, I need
to adjust another variable, to pause
between attacks, yet another variable,
and so on.
that way. In actual fact, I would have
used the jtag cable and run bot
application in symbolic debug mode.
This would have worked just fine
with the mini Sumo which sits firmly
on the ground and would not be
affected by the weight of the cable,
but for the balancing bot, this would
be a different story. In either case,
there may have been timing problems
which would have affected the end
result, as well.
SO, WHAT’S THE
Well, to define the problem a little
better, we need something that:
• Won’t physically affect the bot.
• Won’t affect the code in some way.
• Allows variables to be changed
• Allows us to view the old and new
■ FIGURE 1. Conceptual
view of the console.
which was much more
complicated was the
balancing bot which
we talked about a few
articles ago. This was
more complicated to
tune because some of
the variables were
dependant upon one
another; to get it to
balance just right,
several variables had to
be adjusted at the
Now, with the mini
Sumo bot, I guess I
could have run a cable
from the bot to my
computer and using
debug mode, adjusted
the variables on the fly
My thoughts on this are to build a
small handheld console, with an LCD,
a keypad, some switches, and an RF
interface. Figure 1 shows a conceptual view of this. This might seem like a
little overkill, but if I can bypass
multiple compilations and change the
parameters on the fly, not only will I
save lots of time, but I’ll have a bot
tuned exactly the way I want it.
Most, if not all, of the bots I build
are autonomous, so I should make it