Shop OBEX P1 Docs P2 Docs Learn Events
Sumo won''t turn and moves slowly — Parallax Forums

Sumo won''t turn and moves slowly

ArchiverArchiver Posts: 46,084
edited 2004-04-12 08:33 in General Discussion
--- In basicstamps@yahoogroups.com, Eliza Yasmin <eliza_yasmin@y...>
wrote:
> I noticed that the SumoBot in the Parallax's page is
> different from mine. Mine has 4 wheels and an on-off
> power switch instead of a three-position power switch.
> Can I still refer the manual? I would appreciate some
> guidance. [noparse]:)[/noparse]

If it has four wheels, it definitely is NOT a SumoBot. I suspect you
may have one of the TAB Build Your Own Sumo kits, which I'm pretty
sure are controlled by a BASIC Stamp. I would also guess that your
robot is using DC motors, not modified hobby servos. That would
explain why the code from Experiment 2 isn't working for you.

At the risk of confusing you again, modified hobby servos, like the
ones used in the SumoBot, use Pulse Code Modulation (PCM) to control
the direction and speed of the motors. Essentially, you are supplying
a 1 - 2 ms pulse to the control circuit in the servo that tells it
what position to turn to (for a modified servo this has the effect of
making the motor rotate at a given speed in one direction or the
other). This pulse is usually sent to the servo every 20 ms.

On the other hand, DC motors are usually driven by a high-current
circuit called an H bridge using Pulse Width Modulation (PWM).
Similar to the PCM described in the SumoBot manual, you control the
motor speed by varying the pulse width to the H-bridge circuit.
Unlike PCM, PWM controls the speed by varying two parameters: pulse
width (also referred to as pulse repetition time (PRT) or pulse
repetition frequency (PRF), where PRF is just the inverse of PRT) and
duty cycle. The duty cycle is the percentage of the pulse width that
the pulse is high. The pulse width is how often the pulse is sent to
the H bridge. Motor direction is normally controlled by a separate
enable signal (or signals) to the H bridge.

So, you need to determine whether you have servo motors (a black
rectangular box) or DC motors (usually a metallic can, but they can
take many forms). If servo motors, you should be able to use the code
from the SumoBot manual. If they are DC motors, you will need to use
PWM and figure out what signals need to go to your H bridge.

Regardless, as mentioned in earlier posts, replace your rechargeable
batteries with some good Alkaline batteries. I know the rechargeables
are more convenient and environmentally friendly, but four
rechargeable AAs only supply 4.8 V, compared to 6 V for alkalines.
This makes a big difference for 5 V logic circuits, like the Basic Stamp.

Hope this helps.

Dan Stormont
Sign In or Register to comment.