Basically, pins on the joystick are numbered 1-10, and while the wheelchair controller board does have numbers on them, they are not in that order.
Additionally, the wheelchair board seems to have a fair bit of 'protection' logic in place to keep the joystick from being hacked. It requires constant voltage, and the right synchronization in order to initialize.... Luckily, I devised a simple solution to this.
I added two switches (Each DPDT controlling the dual channels necessary for Front/Back and Left/Right Control), which interrupt the signal from the joystick when the arduino is ready to start sending commands. This allows the arduino to come up and stablize voltage to prevent the Joystick on the wheelchair from suspecting anything has gone ary. However, the arduino itself proved to be a bit of a pain because the PWM digital output pins on the arduino are NOT ALL CREATED EQUAL. More specifically, pins 10, 11, 3 and 9 are the only pins on the arduino that do PWM at the correct frequency necessary to drive the chair.
All of this is of course configurable in the arduino library itself... but having had no idea about this ahead of the time, I wasted a lot of time poking at it.
Once the arduino was able to send commands to the motors to control them, the rest of this hack has been gravy. I added a java app to send serial commands to the arduino, and integrated an old joystick I had to control the wheelchair.
My next step is to hack my WRT54GL router, adding a serial port, and using that as a base station on the mower to make it wireless. The only other things after that are finding a good way to power the wireless camera and router from the wheelchair; and attaching a mower.
Here is a video of all the pieces together: (I of course forgot to take video when I drove this thing into the drywall in the basement... :) )
Note to self... test outside.
No comments:
Post a Comment