feedback to help with the PID tuning.
To avoid a huge problem I had with using the WC
Wizard, make sure that the RS-232 adapter between your
computer and the WheelCommander converts the signal to
standard TTL voltage levels (0-5V) and that it inverts the l
ogic levels, or the two devices won’t communicate with
each other. Also, make sure that the CTS and RTS lines
are jumpered together. The WheelCommander manual
recommends several adapters from Acroname (www.
acroname.com) who is also a distributor of the Nubotics
It is highly recommended that the baud rate be changed
from 38400 to 9600 for the BASIC Stamp that is embedded
on the SumoBoard. This is because at higher baud rates, they
don’t synchronize together properly.
In the example program, there is a subroutine called
“initfw” (see below). The call to this routine is normally
commented out since it only needs to be called once. The
first command “F0302” changes the baud rate to 9600. If
the baud rate was changed by the WC Wizard, this line can
be commented out. The command “F0289” MUST be executed one time successfully after the baud rate has been
changed to 9600. Otherwise, the BASIC Stamp won’t be able
to effectively communicate with the WheelCommander
(actually setting bit 0 to high for the Mode Constant is
needed). This command adds a critical time delay in the serial communication strings that is needed for the BASIC Stamp
to properly synchronize and transmit all bytes back and forth.
SEROUT 1, 6, [“F0302”, LF] ‘ at 38400, set baud = 9600
SEROUT 1, 84, [“F0289”, LF] ‘ mode = slow comms
At this point, you should be ready to start programming
your robot to solve line mazes. Like I said before, this sounds
like a fun project. When you get your robot up and running,
write a short article about what you did and submit it to
SERVO Magazine. I am sure many readers would love to
learn and see what you did.
Q. I have noticed over the years that you use the
BASIC Stamps and the SX microcontrollers in most
of your examples. Why is that, and why haven’t you
talked about the new Propeller microcontroller from Parallax?
This looks like a very interesting microcontroller, especially
with its multitasking capabilities.
— Shawn Kidwell
A. I suppose that some people may think I am biased
towards Parallax ( www.parallax.com) products. Well,
to tell you the truth, I am biased towards them.
Especially in the context for this magazine and the way I write
my articles. The way I look at all of this is that most of the
people that read this magazine want to learn how to do
Figure 13. Completed reconfiguration of the Parallax SumoBot.
something. I have chosen a writing style that tries to explain
how you would go about solving various challenges with real
working examples, along with explanations of how things
work and also showing some pitfalls.
This teaching style is one of the main reasons I like working with Parallax products. They have the best documentation in the world on how to use their products (along with
many other topics such as basic electronics) with many practical examples. Their documentation style is about teaching
people how to do things from scratch, taking you from little
to no experience to making you a competent embedded
microcontroller applications designer/robot builder. If you
run into a problem, give them a call or go to their online
forums, and they will bend over backwards to help you.
If after building one of my example products, you want
to learn more about what you can do with a BASIC Stamp or
with the SX microcontroller — or even with the Propeller —
you can find the answers on the Parallax website or on their
forum pages ( http://forums.parallax.com).
I am not saying that other microcontrollers and
documentation is bad. They have their places, and they have
some very devoted supporters/developers. In most applications, just about any microcontroller will work just as well as
any other microcontroller. Some just do certain things better
than others. That is why there are so many to choose from.
In most applications, Parallax products will do a fine job.
As for the Propeller chips from Parallax, to tell you the
truth, I haven’t really had the chance to dive into them until
recently. And now that I have, I wish they were around
many years ago when I first got involved with robotics. For
robotics applications, the Propeller chips are probably the
best microcontroller out there. The reason I say this is
because it can do multiple things at the same time. With
other microcontrollers, we spend a lot of time trying to
figure out how to write code that can continuously monitor
its environment, make decisions on what the sensors are
telling it, and controlling all the functions of the robot.
Trying to get the right timing of all of these different things
SERVO 03.2008 23