Help needed with interfacing voltages from arduino to a wheelchair

Hi,
I am hacking(trying to) an electric wheelchair I bought and when I opened up the controller I found out that it uses a Penny and Giles JC200 inductive joystick!? After looking up the datasheet and doing some testing I found that the X & Y axises give out analog signals ranging from 4.6 volts (full speed backwards) to 7 volts(full speed forwards). What is the simplest way that I can interface one of the arduino's analog pins to emulate the signals from the joystick? Would it be possible to use a transistor connected to 12 volts to give out an analog signal in the range I need?
All help is appreciated,
L

What is the point of the project?

Do you need to keep the manual controls in the loop?

You can generate an approximation of voltage from the Arduino using PWM and an RC filter:

http://arduino-info.wikispaces.com/Analog-Output

...but that will only have a voltage swing between 0 and 5 volts; you will need some kind of amplifier or something to swing it up to the range you are looking for (note the circuit in the above link using an LM358 op-amp; that will potentially work).

Alternatively, you could use the PWM to drive a transistor to switch a higher voltage, then put the RC filter (with suitable components) after that (it may not work as well as the LM358 example above, though - you might want to put a scope on the output before connecting it to the wheelchair controls).

If your just trying to get the wheelchair under Arduino control, without needing the original controls, and you have the money to spare - you might look into purchasing a high-power h-bridge for the motors (not building - don't go down that route unless you like throwing good money after bad, or you have a lot of experience building high-power h-bridges).

Two manufacturers to look into would be Vantec and Roboteq (be prepared to spend a good sum of money for such a controller, though).

Lastly - in your testing of this machine - put the wheelchair up on blocks or something so that the wheels are free-spinning. A wheelchair careening around (with or without a person in it) - can be a very heavy, dangerous, and difficult to stop machine. Don't put it on the ground until you are -sure- your control software is completely debugged, and even then, do your testing outdoors in an open area and have some way to emergency stop the machine on command (and potentially some intrinsic method to limit the speed of the machine). I have seen images of people and property injured/damaged from wheelchairs that they hadn't properly set up before testing, and the motors or software got out of control...

luketheduke:
Hi,
I am hacking(trying to) an electric wheelchair I bought and when I opened up the controller I found out that it uses a Penny and Giles JC200 inductive joystick!? After looking up the datasheet and doing some testing I found that the X & Y axises give out analog signals ranging from 4.6 volts (full speed backwards) to 7 volts(full speed forwards). What is the simplest way that I can interface one of the arduino's analog pins to emulate the signals from the joystick? Would it be possible to use a transistor connected to 12 volts to give out an analog signal in the range I need?
All help is appreciated,
L

The easiest way to get what you want is to use an op-amp.

Use the high impedance non-inverting input with an R/C filter to convert Arduino PWM to a DC voltage, then set the bias and gain of the op-amp to give you the desired output voltage range with 0-5 input.

The op-amp is going to basically act like an analog "Y=MX+B" equation. The gain is X and the bias is B.

luketheduke:
Hi,
I am hacking(trying to) an electric wheelchair I bought and when I opened up the controller I found out that it uses a Penny and Giles JC200 inductive joystick!? After looking up the datasheet and doing some testing I found that the X & Y axises give out analog signals ranging from 4.6 volts (full speed backwards) to 7 volts(full speed forwards). What is the simplest way that I can interface one of the arduino's analog pins to emulate the signals from the joystick? Would it be possible to use a transistor connected to 12 volts to give out an analog signal in the range I need?
All help is appreciated,
L

The datasheet is here:
http://www.pennyandgiles.com/getattachment/a6bb9db0-f4be-47c9-8e9d-e8931694969f/

Note that the controller outputs a mid-rail reference voltage, and that the signals are relative to that, so that the wheel chair is expecting the same, a mid-rail reference and
signal that varies above and below it.

Definitely a case for an opamp circuit, you seem to be running from about 12V, so something
like this:

which is low-pass filtering the PWM at 5V, then amplifying the difference by about 45% and
shifting from centred around 2.5V to centred about 1/2 the 12V supply (which the second
opamp is generating as a reference voltage.

The opamps (or dual op amp) needs to run from +12V and ground (0V) supplies, and doesn't
need to be fully rail-to-rail as is running near-the 12V midrail voltage. The output
swing should be about +/-1.2V from the Vref.

The PWM gets inverted I think, so 0 will mean largest output voltage, 255 will mean lowest.
The two 4k7 resistors might need to be changed to 5k6 if the output range isn't quite
enough.

Thanks for all of your help! But I am going to focus on controlling the motors themselves with h-bridges.
Regards,
L