42 SERVO 08.2010
How It All Works
For basic wireless joystick control, Windows first reads the joystick,
then that data is sent to RoboRealm. This software runs in an endless
loop or pipe to constantly read a USB camera and process video. This
makes it possible to add different built-in software modules inside of
this pipe to perform different functions. For basic teleoperations in
Ethel, I added the joystick module, a VBscript module, then a display
variable module “for debugging,” and finally an SCC- 32 board module.
The joystick module reads the x and y position of the Logitech
wireless joystick and the condition of all 10 of its switches. This data is
stored in 12 variables that are passed to the VBscript module where
the custom code I wrote makes decisions on what actions to take
based on joystick moves. Turning is controlled by reading the “X” right
or left position of the joystick. The values are sent to a math formula
to provide mixing and proportional speed control. These values are
passed using a USB-to-serial connection to the actual SCC- 32 servo
control board and its Atmel 128 processor continually converts this
data to PWM signals which are sent to the motor controller which, in
turn, feeds highly excited electrons to the dual 750 watt Bosch
motors. It is almost too simple.
However, I found that getting the speed and acceleration mix
right was actually a bit painful. Originally, Ethel would accelerate
instantly to full speed in one body length. When I first tested her, she
was really quick and too touchy to drive safely around humans. I
actually ran myself down and almost broke my leg. After that incident,
I had to de-tune her software a bit.
All of the other digital joystick button functions (that are on/off
controlled) work in a similar manner depending on what is being
controlled. My VBscript code just sends a full on (servo full clockwise),
full off (servo center), or proportional PWM (servo) commands with a
serial data link to the SCC- 32 board, then PWM position commands to