Videogame Controller for Rocky Backup Control

     The primary control system for my robot, Rocky, is a PCIe/104 stack. It runs real-time Ubuntu, has DSPs for high-speed low-level joint control, and it cost a lot. It's an incredibly powerful, capable, flexible embedded system, but it's not ideal for all applications. Rocky's drivetrain is not backdrivable or easily disconnected from the wheels, which means that when it's turned off, we can't push it around the room. That makes day-to-day logistics very difficult. Even if it were backdrivable, it weighs 200 lbs. I decided we should have an instant, backup control mode, something where we can flip a switch and drive it around the room under its own power without having to boot up, login, and execute code.

     Rocky is designed to have sophisticated force control built in at all levels, but in its simplest form, we can control it open loop with just three analog voltages (corresponding to three joint velocities). The transformation from cartesian velocities to joint velocities is trivial, so those three voltages could be produced with something like an Arduino. I decided to throw together a prototype board that can turn joystick input into analog voltage output, using straight battery voltage, without booting any other hardware.


     The result is a handheld controller/prototype board that uses two joysticks to produce three voltages proportional to cartesian velocities, an arduino that applies a jacobian and produces three PWM signals corresponding to joint velocities, RC filters that smooth those out, and op-amps that boost those analog signals for the motor drivers. I'm sure there's a better way to do that, maybe I could have used I2C and a proper DAC instead of the PWM/RC, but I didn't consider that at the time. Oh well. It works. I shut the battery breaker, flip the arduino power switch, and drive it around. Our motor drivers are unhappy when it's sitting still, because they read input at >1MHz but the input voltage is fluctuating above and below zero at 1000Hz, but it does what we need it to do. Next problem ...