Has anyone worked on anything similar? I have the remains of a Invacare Pronto wheelchair (heavy duty unit). I was going to just hack up the wheelchair and put in a motor controller. But that would be more expensive than just using the controller already in place. I would like to eventually turn this into a base for a raspberry pi autonomous robot with GPS/wifi/exc. But to start with, I'm just wanting to make it remote controlled. I have a 6ch radio on the way. I've been picking at the controller and the easiest means to interface it I think will be tapping into the joystick control of the wheelchair. (The only other way of reusing the hardware would be trying to interface with the can-bus it has perhaps) There's two wires that feed X and Y to the controller. The input voltage to the joystick is 5V. "Neutral" is when the two wires are at 2.5V each. And then you have a range to actuate the motors from 1V to 4V. IE: forward full throttle would be 4V. Reverse full throttle would be 1V. And the same for turning left and right. (Hard at least, steering at speed would be a mixture)
I'd like to see about using the PWM from the RC controller as a input to the uno. From what I gather, it would need to analogwrite that out as a map?
So let's take the following example:
Sitting still the input would be at 128 and 128. Moving the joystick forward, it would then shift to 255. Moving the stick backwards would shift to 0. At least this is what the arduino would see from the RC controller I guess. The output I need from the arduino needs to be "tuned". That 255 value for full throttle would exceed what the wheelchair joystick actually outputs. So it actually needs to output 204. And to explain the reverse throttle the output needs to be 51. I need to output the PWM to a DAC to smooth the squarewave into a voltage. (I'll be using a op amp for this)
Does anyone know of any sketches that convert PWM like that? Or anyone able to help?