Posts Tagged ‘joystick’

Wheelchair: Keeping it Straight

Monday, January 3rd, ©2011 Marcus Brooks

I recently found a kind blog-related message from Lydia amidst my inbox spam. Lydia asks how my wheelchair is doing, and mentions worries about balancing the speed of two motors driving two wheels. Here’s what I told her (more or less):

The wheelchair is soldiering on in spite of my woeful neglect. The joystick is getting jumpy (hey, it only cost about $6), and of course DigiKey doesn’t sell the same model anymore so I have to build a new joystick box, but I got it half done and mislaid the parts… etc., etc., etc…

Regarding wheel speeds, my joystick box software simply reads the joystick position and sends proportional left-right and forward-back signals to the chair’s Robot Power Sidewinder speed controller, which is set to “mix” the signals internally and send the theoretically correct voltage to each motor. Up to walking speed it’s not hard for me to stay straight just by hand-eye coordination; in other words, with no other motor speed feedback.

At higher speeds, though, sometimes I catch a crab and veer left or right (usually right). I recently modified the joystick code and gear train so I can go too fast, and it’s possible now for me to ground loop and lay the chair down. (No, nobody caught it on video.) I intend to try making the joystick less sensitive at higher speeds, but it’s possible something else is happening. I may be seeing a performance difference between the two motors or drive trains (like a sprocket binding); or possibly one channel of the speed controller is going into current-limiting mode.

Important: With the simple no-feedback system I’m using, I strongly suggest limiting the chair’s top speed to a slow walk; and start out even slower, just in case.

To be absolutely safe, it would be best to add some sort of position or RPM encoder to the motors and fix the software to synch them, so the turn rate isn’t affected if one side suddenly decides to perform differently than the other.

To synch the motors, I would probably change the joystick software so user inputs are translated to a target speed and turn rate set point for each motor. The output to the speed controller (now set for “tank” mode, independent left/right control) would be slaved crosswise to the sensed RPMs, matching each motor’s target speed only if the other motor can maintain the desired turn rate (within tolerance). So, for example, if one motor fails in a turn, the other will slow and stop in proportion, so as to maintain the input turn rate.

(This could possibly all be done in the speed controller’s software, but I don’t care to learn another MPU’s quirks if I don’t have to.)

If anybody besides Lydia happens to be looking in, I hope this post helps. Good luck!