interfacing arduino with jazzy power chair pcb

I have updated the file to show the hookup for the joystick as well:
Arduino2Jazzy.fzz
Something that might be confusing about the fzz file is that the placement of the pins on the chair and joystick matches my pde by number but not by physical location.

it is clear now ... you used

joystick ====>arduino =====> RC circuit ===== > wheelchair

but i dont want to use manual joystick .... !!!!
anyway ... if i use the manual joystick to mimic the wheelchair as u did ...with other 2 inputs A3,A4 (forward/back , right/left) to control the wheelchair from another circuit ...it will be helpfull ?

Yes, you don't need the joystick at all for the arduino to controll the chair.

so how would be the shape of input signal ?

dear james ... i cut the cable between the joystick and module .... i donot remmber
how were the chair pins .... i see your work ... is it ok ??
if u have a picture of your joystick model pls show to me .. to be sure before i connect
...thnx for help

// Joystick Pins
// |8 7|
// |6 5
// |4 3
// |2 1|

// Chair Pins
// |2 1|
// |4 3
// |6 5
// |8 7|

I don't know what the signal looks like. I think arduino PWM is squarewave. With the RC in proper position it should look flat at 2.5 volts. I already have posted photos of the cable connected to the joystick and have the pinout in my sketch sample provided. I have also linked to the model of my joystick. D50800-03.PDF

thnx dear ...i solved my problem ...nice video ....perfect work

This thread is a few months old, but I wanted to chime in and say THANKS to jameshappy for all the research info! I suppose I will start a build thread for my very similar conversion, once I make a little more headway. But definitely saved me hours thanks to your generous documentation.

I recently got a Jazzy 1121 (older version it seems, old Pilot control unit with only an ON button and a "JC 200" joystick.)

The Penny-Giles website library has the JC 200 datasheet available which was great to have. It has only 5 wires (wasn't clear to me why your joystick seemed to have redundant pairs?) so it was easy to slap on some nice connectors. With 5V from my Arduino, it output the 2.5 / 2.5 / 2.5 volts for Center / X / Y as your test code demonstrates. So far so good!

However, I noticed that my stem is actually outputting 11.8 volts, instead of 5 like yours. Not terribly surprising, as the datasheet for the JC 200 says it'll take a range up to 14V. I suspect once I check it, that the joystick (at idle) will be outputting somewhere around 6V / 6V / 6V. So in effect I'll need to double the voltage of my output signals. I am going to try to use an op amp to accomplish this. I might just see if the stem will take the 2.5 / 2.5 / 2.5 signal and be happy, but I would be surprised.

Definitely a novice at these circuits so I'll take it slow; LTspice was recommended to me for experimenting with the resistor-capacitor values to choose for the PWM smoothing filters.

I didn't see mention of it, and was wondering how you handled the braking mechanism when you bench tested it with your sabertooth drive. Possibly you just removed the electromechanical brakes?

Congratulations on your progess so far.

The chair in the video has a mechanical break over-ride. It was designed so the chair may opperate in traditional wheelchair mode; be able to be pushed. I have another chair that does the same thing but it's done after the gear box. In that case I removed the maglocks. If I were to park on a hill I suspect if would roll away. In short, I have no breaks.

I see; thanks for that.

I am really excited about this as a robotic platform. 400 pound carrying capacity and up to 25 MILE range. Plus, I found it as an insane bargain off craigslist for $120 (and had to buy 2 batteries, but I found some 35 Amp-hour batteries for a good price.)

So far I've used it as a utility cart around the house (which is thankfully all 1 story.) I wish I had a 400 pound laundry load to really test it :slight_smile:

Off to get some op amps for some breadboard experimentation. I will perform the voltage boost then go through an RC smoothing filter; if it works I think it will suffice. A friend mentioned that adding opto-isolation may be overkill; I tend to agree in that I doubt there will be enormous voltage spikes coming out of the ~12V supplied by the stem. Hopefully an arduino won't die if I'm wrong about that.

I intend to use a single 12v battery rather than the 2 batteries in a 24v system. I am not using any of the Jazzy electronics. This way I can build two robots and I don't need to down-convert everything from 24v.

The first thing you did that I didn't understand (being basically a beginner and all) was how you knew to even try the resistor-capacitor circuit to "smooth" the PWM.
After a little research I see that it is somewhat of a "magic" trick, so decided I'd figure it out by using a simulator and watching what happens.

Here's your 1k/ 68 microFarad combo graph simulation, at a 50% duty cycle (and 500 Hz) it looks like it reaches stability (~2.5 V) from power-off at around 250 milliseconds.

The blue is the PWM from the Arduino. The yellow is the actual voltage after it goes through your RC filter.


Dropping the resistance a little and bumping up the capacitance a little seems to smooth out the "noise" even more, but at the cost of slower response. I think you chose pretty good values! This simulator (LTspice) seems to work well, handy indeed for trying out potential RC combinations.

Next I will extend this schematic with my attempts to boost my PWM from 5V to a 12V signal.

Note, I'm a novice, so what I've done might be completely wrong :slight_smile: But it seems to make sense.

Nikola Tesla always described electricity flow as being similar to water flow so I figured a capacitor would be a bucket and a resistor to ground would act like a hole in the bucket keeping the "water" at a set level.
I went to RadioShack and bought a grab bag of capacitors and a grab bag of resistors. Those were the first two I pulled out. Pure luck I suppose. I just figured all resistors worked with all capacitors in a similar way; it never occured to me that I had hit a magic ratio or whatnot.

Something that was brought to my attention was the Fast PWM modes on the arduino. Unless I missed it, I think your code is still using the 500 Hz mode (and your RC low-pass filter smooths that out nicely.) Perhaps bumping this up (edit: looks like it maxes out around 62.5 kHz?) would trick the Jazzy ECU into thinking it's getting an analog signal, without even needing the RC filters.

This weekend I should have some time to play with this and report my findings. Crossing my fingers that the Jazzy 1121's stem will accept a 5V signal. Otherwise I'll try out a transistor based solution to bump it up to 12V.

I'd like to thank everyone for posting here about their wheelchair robots, especially Jameshappy! As of last night, I got my Invacare Ranger II under Arduino control. I used your ideas, your inspiration, and with some tweaks, your test code. It looks like it's going to be a fun ride from here :wink:

My next large hurdle will be getting the Arduino Mega 2560 talking to Microsoft Robotic Developers Studio. I'm actually using my wheelchair robot platform to develop sensors and other electronics to inteface with and/or create a smart wheelchair.

Has anyone here had any luck with MRDS? Weeks of google searches brings up surprisingly little $)

John

I am a C# developer by trade. Microsoft Robotic Studio was not useful to me. It seems to be tuned for academics and for high end robots like you might find on a factory floor. I have a FEZ Panda II and a netduino. Using the .NET micro framework is interesting and fun. I always come back to the arduino UNO though because the knowledge base is huge and almost everything has been written in one form or another. I also have the arduino due and it is awesome. There are tweaks you need to make when bringing across your source but it is so much more powerful. I am attempting to get the USB host to talk to a Kinect.

Hi everyone,

I just started working on my power chair robot project again, and thought I'd share some of the things I've learned/done over the past few months that might help somebody who finds this thread.

The power chair I'm using happens to be an older Invacare Storm Arrow series with the MKIV ECU system. The joystick controller it came with is the MKIV A+ controller, which has the D50800-03 joystick. This is a 5-wire joystick, but it only uses 4 of the wires. However, I found a way to replace the joystick by using the arduino's SPI interface instead of emulating the analog joystick.

As with anything I tear into, I first jotted down all of the IC's found in the joystick controller module and after downloading the datasheets, I found that the joystick connects to an IC labled MC14053D. This is a 10-bit A/D Converter with serial interface (SPI). This made me believe I should be able to replace the MC14503D chip on the SPI bus with the arduino.

First thing I did after hooking the arduino up to the SPI bus was to snoop it and determine what data the MC14503D chip was providing over the SPI bus. I found it was the joystick value for X and Y. I determined the values were MIN=100 (0x064), CENTER=500 (0x1F4), MAX=900 (0x384). Once I had this data, I lifted the SS pin of the MC14503D chip so that the arduino could act as the slave instead. I was able to emulate the MC14503D with the arduino, and provide the X and Y values over SPI. Works great. If anyone finds they also have the MC14503D chip in their joystick controller, let me know and I will provide more details such as schematic drawings/pictures and some example arduino code.

As for my robot, I currently have an XBOX 360 wireless receiver board connected via USB to the same arduino, and use a wireless XBOX 360 controller to move the power chair around. I am in the process of putting a Linux based laptop on the chair, and plan to install ROS (Robot Operating System) on the laptop and will use the rosarudino library to interface the arduino controller and ROS.

As for future projects, I have several sensors to use (sonar, gyro, gps, webcam/opencv, etc). I also happen to have the Tilt-Recline (TRCM) MKIV controller which gives me 7 individual motor-driven extender arms I can control independently over that same SPI interface or via a 9-pin on/off interface. So much I want to do, and so little time!! :slight_smile:

Bye all, let me know if the SPI details I mentioned above would be useful and I'll write it all up.

Take care
Paul

@dj: wow, nice work, on the SPI interface DJ. Do you know the pinouts of the 9 pin on the ECU yet? I haven't been able to get mine to play nice yet...thats why I ended up hacking the joystick.

@james: interesting to know your thoughts on MRDS. I've only just started playing with it. Still forming my limited opinion I guess. Do you have any suggestions for an operating system? ROS? or maybe just many smaller programs that call each other as needed? I was thinking a good next-step for me would be processing and firmata. PLEASE keep us informed about your work with the Kinect! I'm very interested in that. And again, your test code, etc was invaluable to me. Thank you again!

John

@jl: From some quick google searching, it looks as though the Invacare Ranger II comes with a MKIV controller system, I just don't know exactly which one. However, if it is in fact MKIV, the good news is that I have a service manual for the whole MKIV system which provides all connector pinouts, etc. If you only have the single ECU controller box which comes with a 9-Pin D-Subminature connector on it (Like a 9-pin com port), then you might be very in luck as far as controlling the chair. Here is that connector's pinout:

Here is a link to a WWW directory I just threw up that contains the MKIV service manual, the Arrow/Ranger base service manual, and a few other goodies which you may find useful: http://www.hiddenmatrix.org/pc/

A couple of questions for you, if you don't mind: On your chair, is the control module that contains the analog joystick separate from the black module which connects to the drive motors? If so, let me know what connector is in between these two or better yet if possible, post a picture of them? This would help me narrow down exactly what Invacare system it is. Although I know the MKIV system the most, I do know a bit about other Invacare controllers as I've spent a few years now repairing power chairs and medical beds for those who don't have insurance to take it to an official shop.

Oh by the way, if your controller does turn out to be an MKIV based one, I also have the PC-interface wiring diagram and software to program all the advanced parameters within the controller as well. Took me a long time, but finally found everything needed online.

Take Care
Paul

Paul,
Thanks so much for putting up those manuals. They will be very helpful. This old ranger was about to be put out for trash when I rescued it. Its VERY old. No 9pin on these electronics. The joystick uses a round connector to plug into the lower control unit. Similar to the charger port, but with more pins. Probably 7 or 8 of them. I'll post a pic sometime next week. I've got my hands full at the moment with family medical issues, and I can't access the innards at the moment, so I can't show you a picture of the connectors. Long story...don't ask. lol. Sometime next week I hope to be able to get more specifics on the version.

I asked about the 9pin connector for another reason. I have a fully working Permobil Chairman chair. This thing is a beast! It's got at least 7 or 8 seat/leg/footrest/recline motors and actuators I'm going to be able to use. I'm going to turn it into something like a utility cart/snow plow to help around the house/yard. Mostly under manual control. It's got the Pilot Plus ESP system in it. One interface box says "Pilot + 100 ESP". I know the 100 means 100amp motor controller. No biggie. But trying to used the closed-switch method, or even my Arduino on the 9pin connector throws the chair into error every time. I'm assuming it's looking for voltage levels (similar to PWM), but I have no clue. I was just hoping to get some ideas about the pinouts on that 9pin. I've got some family medical issues going on right now, and I won't have time to get into those electronics for a while, but I really appreciate your input.

Now that I have the ranger under basic control, my next steps are to tidy up the wiring/circuits/test programs I did just to get it working. I need to install a kill switch too, before I let it down off the blocks. In the meantime, I'm trying to figure out the best way to control it. I started with an Arduino sketch, but thinking about trying "firmata" and processing on the laptop. There's also AVR Studio and Webbotlib. Eventually, MRDS would be nice. Easy access to a Kinect sensor then. I'm leaning away from ROS only because I haven't touched linux in about 15 years. I've got enough of a learning curve on all these other things, and I'd rather my head didn't explode! lol.