Arduino controlled wheelchair

Power wheelchair board for REAL info!

POWERCHAIR MENU! www.wheelchairdriver.com/powerchair-stuff.htm

Re: Arduino controlled wheelchair

Postby gcebiker » 12 Aug 2015, 16:47

I'll add low pass filter on pwm lines . should fix analog in Val's on the 2nd arduino skipping about so much
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 12 Aug 2015, 19:07

it looks like you're trying to map each nunchuck data element( joy_x, joy_y, buttonC, buttonZ ) to different PWM ports. Why not put them into a PPM stream like used on RC transmitter/receivers? There are enough Arduino's being used for RC and drones that there must be a few PPM libraries to pick from. That's what I plan to do with the FrySky modules I think I posted a link to. They are on order but coming from China so it'll be a few weeks more. I don't know if there's a limit to the number of "channels" but the way I see it we could use 7 channels and get all the nunchuck data. BTW, I have the nunchuck using the left right tilting to change the throttle. accel_x()/20 does the trick using the Wiinunchuck library. That gets me to 0-10 for the Jazzy Select( need 0-15 for the Select GT model ). Tilting to the right increases the throttle all the way to max and tilting to the left lowers it. I will change the lowering part to something like anything from -2 to -10 subtracts 1 from the current position.

looking good so far though.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby Burgerman » 12 Aug 2015, 20:24

Range on the Wii as it comes is not very good....dont need much standing in front of the gaming console.

The Wii Nunchuck wireless only has a PCB track antenna's, a better circular polarized antenna on RX and TX should improve things considerably.

Failing that i will use the Spark fun joy in a Jiffy box with an Arduino Nano and NRF2401+ as Transmitter.
Nano + NRF2401+ receiver to Analog
Nano analog to Power chair.

Long term i wont be leaving my good house chair anywhere unattended, its just part of the testing phase.

I'll lead up to a dedicated power chair base that i use outside semi permanently attached to a Custom made Trailer to take a PolyCraft Tough Tender boat.
Local creek is two blocks from my house with direct access to the Gold Coast Broadwater for fishing.


You want better reliability or range?
These WiFi boosters, give you 2 watts output with 100mW input.
I use one on my RC transmitter, and get totally reliable 1/2 mile around the local streets from my bedroom with Spektrum AR10000 multiple receivers. Its also a really noisy environment. Hopping, wide channels, 2 at once, interference is almost impossible.

They obviously work on wifi too, but you still wont get anything like that range or reliability. http://www.wheelchairdriver.com/12x.htm

I now use a 3 watt booster, with 6db gain antenna, and can fly easily 8 miles without a problem so far. At altitude via FPV in a plane.
User avatar
Burgerman
Site Admin
 
Posts: 65412
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby gcebiker » 13 Aug 2015, 02:12

DougL wrote:it looks like you're trying to map each nunchuck data element( joy_x, joy_y, buttonC, buttonZ ) to different PWM ports. Why not put them into a PPM stream like used on RC transmitter/receivers? There are enough Arduino's being used for RC and drones that there must be a few PPM libraries to pick from. That's what I plan to do with the FrySky modules I think I posted a link to. They are on order but coming from China so it'll be a few weeks more. I don't know if there's a limit to the number of "channels" but the way I see it we could use 7 channels and get all the nunchuck data. BTW, I have the nunchuck using the left right tilting to change the throttle. accel_x()/20 does the trick using the Wii nunchuck library. That gets me to 0-10 for the Jazzy Select( need 0-15 for the Select GT model ). Tilting to the right increases the throttle all the way to max and tilting to the left lowers it. I will change the lowering part to something like anything from -2 to -10 subtracts 1 from the current position.

looking good so far though.

Doug


Accelerometer data is not of much use for palsy or spastic type injuries, epilepsy chair user.
Or if you are in one chair traveling and directing another,...a random friend walks by and you wave to them with out thinking....

I volunteer with Sailability Gold Coast since acquiring my own brain injury in a MVA with drunk driver making me into a human pancake.

I get to meet many people with physical and brain injuries, met my wife there. Whom at 17 had a stroke type thing happen and she lost most of the left side function and is Completely Left side blind and limited physical use of her left side.

So, although i want to go fishing in a boat independently. Its just a stepping stone to helping me understand Arduino's and adding sensors for assistance, ive another friend Geoff that had a water ski stunt accident in 1990 (or about then) and is not allowed to drive a power chair (by his very loving wife) due to his injuries limiting his processing power -- obstacle avoidance...walls, cars...people.

An aux processor and sensors on a chair would give him a little bit more freedom to just achieve some simple things.

In short...most people i know with brain injuries dont have full control to make use of an accelerometer. A great many also have limited fine motor control but have found the Wii remote i built into the control systems for the Access Dinghies at Sailability Gold Coast to be very natural to use and in their words "freakin awesome"

The Wii mote is such a great form factor , we even had a cradle for someone to sail unassisted with just chin control (spinal injury).

Long answer and not so well written but onto next question.

PPM data stream, cause with parts on hand its easier to do it this way for now :)
Could also be achieved by better coding and just use the one Arduino, ...but with parts on hand(and limited talent) its easier to do it this way for now :

Aerial, yep i'm into a bit of FPV and other RC stuff, I'll test the Wii chuck at the water. There is a good chance it will be ok or only need a slight change to the Board Aerial.

Now off to build a low pass filter.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 13 Aug 2015, 07:07

Measured Out volts (Arduino 1 ) ...only 0.16 ..DAC aint going to do much if nothings goin in i guess.
Ill post back when i get it sorted out, looks ok on serial so i must have coded something wrong.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 13 Aug 2015, 14:05

...i thought the pwm was Analog pins.., its working but i wired it up wrong.

Just measured with DMM and the pwm is working, rewire tomorrow.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby terry2 » 15 Aug 2015, 20:59

I don't know if this would help you, the BQ ZUM BT-328. http://www.bq.com/gb/placa-zum-bt
It runs my 3D scanner but it also runs robots. Easy to code via a webpage or very easy software http://s4a.cat/
User avatar
terry2
 
Posts: 1281
Joined: 07 Nov 2014, 12:08
Location: Solihull

Re: Arduino controlled wheelchair

Postby gcebiker » 18 Aug 2015, 14:42

Tried it all on one board, made a mess of that business so went back to using two Arduinos.

Bus Pirate came in the mail today, i guess i should read the book...mmm.

But here is a pic of it while mucking about with it connected to my chair.
(Leads i added to extend the internal wiring, not the charging jack)
Image
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 18 Aug 2015, 17:57

looks like some clock on input 1 and data on input 0. I don't know what is going on down at input 4 though.

Internal wiring from where? what? Are they something from the joystick lines between the joystick module and the power base?

As for the charge connector goes, there's little to do there since it's only 3 connections and 2 of them are power( +V/28V and GND ) with the 3rd being the Inhibit/Program signal. Not much use there given you want to control the power base not program it's firmware.

Once you know what protocol is being used for communications I used the Protocol analysis part of the Logic Analyser software to decipher what that data means relative to movement and control of the power base.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 05:31

DougL wrote:looks like some clock on input 1 and data on input 0. I don't know what is going on down at input 4 though.

that is just a screen shot of me mucking about, didnt have it connected correctly.

Internal wiring from where? what? Are they something from the joystick lines between the joystick module and the power base?
.
I spliced in some extension wires from the purple and Yellow in this picture, its of the wiring between the joystick and the charging port.
Image

As for the charge connector goes, there's little to do there since it's only 3 connections and 2 of them are power( +V/28V and GND ) with the 3rd being the Inhibit/Program signal. Not much use there given you want to control the power base not program it's firmware.

Yeah found that when i opened it up, I'm using it for the GND port only.

Im still learning to use the Bus Pirate, Ive the OLS software.
I dont know why but at the moment all i can get from it is identical (inverted/mirror image)wave forms.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 08:51

Cant seem to get it to play nice on the suggested settings.

Screen shot of it in "Test Device" Capture mode
I2C protocol analyzer.

...this is it with the joystick turned off...must be data from the Motor Driver underneath the chair ?
Image
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 09:38

oh jokes on me,

ASCII this reads,

Hello world this is a sample I2C bit stream ! :oops:
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 15:40

I wonder if the Bus Pirate is just not up to the job of measuring the data stream.

I cant get decent readings, and the stream capture is way to small to do any meaningful comparisons between on/off let alone anything else.

Any one used the LOGIC pirate http://dangerousprototypes.com/docs/Logic_Pirate
..any thoughts ? or suggestions on a better analyzer to use ?

Ill do a bit of reading up on the http://papilio.cc/index.php?n=Papilio.PapilioPro but i was really hoping for something plug and play.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 19 Aug 2015, 15:51

The Pro is pretty plug-n-play.... buy it and a 16bit I/O level shifter wing... plug wing into the middle socket... install their latest DesignLab software and go to the tools section and click the Logic Analyzer. It'll ask to install firmware, say yes, see logic analyzer window and use analyzer.

The PPro has a bunch of onboard memory for longer capture windows. I found I needed that extra window of capture since there were so many milliseconds of initialization before the real joystick control data stream started.

But I was able to capture even with 4K of data capture but had to use IIRC, 500KHz or so to see the data. With the PPro's 16K capture capabilities enabled I could capture at 1MHz and still see lots of data.

I don't know about the Bus Pirate.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby Burgerman » 19 Aug 2015, 16:00

Anyone know what language that was in? :mrgreen:
User avatar
Burgerman
Site Admin
 
Posts: 65412
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 16:03

Quite like the look of these, no limit to data capture (well till you run out of HDD space).

https://www.saleae.com/index

Prices seem quite reasonable.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Aug 2015, 16:35

Just ordered a Logic 4 with express post from USA to Australia.
At $183.00AUD its still cheaper than a few tanks of fuel for the car, dam fuel is expensive now.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 19 Aug 2015, 17:22

gcebiker wrote:Just ordered a Logic 4 with express post from USA to Australia.
At $183.00AUD its still cheaper than a few tanks of fuel for the car, dam fuel is expensive now.



You do realize it has only 4 inputs to use to sniff and that's fine for many serial protocols but anything 8bit parallel you'll be out of luck. it also only captures at 500KHz which was the lower limit on the 38,400K baud rate I saw on the Jazzy Select joystick. This capture rate is a big deal when you think about what's happening. if both the serial stream and capture rate were the same( let's use 40khz ), then when the data stream had a high bit, the capture trigger would capture that high bit but on the next capture trigger it would not capture any more of the high bit/pulse since it would now be measuring the next bit. But if the capture frequency was 10 times the data frequency, the capturing of that high bit would have 10 measurements of the high bit before the next bit in the stream came into play so it could be displayed as a high pulse bit with pretty good accuracy.

40K/40K
Data - _______|----------|________|----------|______
Capt- __________|________|________|_______|______
View- __________|________|________|_______|______ it just looks like short pulses

40K/400K
Data - _______|----------|________|----------|______
Capt- ||||||||||||||||||||||||||||||||||||||||
View- _______|----------|________|----------|______ it looks more like the original stream's highs and lows

The minimum is 4 times the data stream frequency for the data capture rate. So for RS232/UART of the Jazzy Select ~40K rate * 4 is 200K minimum. 500K might work but it's really on the lower edge and what if they are using 115.200K baud instead of 38.400K baud?

You might want to change that order to the Logic 8.... I think those can be found for under $150US.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby gcebiker » 20 Aug 2015, 00:03

...ordering online at 1.30am when i should be in bed ...arrr

I had thought that the Logic 4 @ 12ms/s was fast enough (mega 000000's V ...being faster than Kilo 000's?)

Ive tried to put my order on hold till i can clear it up but they are not answering their phones as probably after hours now.
Ive already received the tracking number and 'item sent' advice...i think i missed the boat to change the order unfortunately.

Logic 4 is 12 ms/s
Logic 8 is 100 ms/s
Logic PRO 8 500ms/s
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 20 Aug 2015, 00:20

yes mega is faster than kilo but you also need more samples just to get a good picture.

AS in the diagrams I posted, think of it like blinking your eye to see a volt meter. If you blink every second but the volt meter is changing every half second what you see when you open your eyes for a flash is only a glimps of some unknown portion of the measurement. So you can't put together an accurate picture of what's going on. If you blink faster you'll see more of what is going on and if you blink really fast then you'll see effectively exactly what's going on even up close to when the meter shows the voltage going from high to low and/or low to high. So faster sampling rates are better but you also have to have enough memory to capture all those samples. My Papillio Pro had a limit of 4K bytes originally but Jack at that store coded up and improvement which provided 16K bytes of sample data and that was enough for me to finally see the slow startup/initialization sequence and the start of the joystick control data stream.

How does what you have compare to what you ordered? And play around with it. I'm no expert at this either but I probably spent 4-6 hours messing around with measuring things I knew what frequency and what data was supposed to be there.

Originally, a good guy at the local Fablab used his Saleae 8 to sniff the data stream and that's what got me to buy an FPGA board and make a logic analyzer since the $85 board uses the same FPGA board in the Saleae... BTW, they probably have a return policy...

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby gcebiker » 21 Aug 2015, 13:08

Yep, understand the analogy, i use the fan one all the time to explain frames/second to people....stopped you can see it, starting you can see it moving, then it seems to stand still ...then it seems to go backwards.

The Bus Pirate on its web pages lays out that its limited in its function, i was hoping i would get lucky.
The capture window is way to short for our needs.

The Saleae sales team got back to me, i was to late, FedEx will return it if its not to late but its probably on the plane to here already.

It may well be enough, ill wait and see. Its unlikely ill ever have a use for it outside of sniffing wheelchair data.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 24 Aug 2015, 13:54

Logic 4 delivered today midday, i think it was delivered via StarGate,

Some light reading about fans/sampling ... https://en.wikipedia.org/wiki/Nyquist%E ... ng_theorem
...its mentioned in the Spec Sheet, so i thought i would look it up...didnt read to much of it, brain started to explode :o

Spec sheets here for anyone interested in getting one (i am not sure the Logic 4 is enough).
http://support.saleae.com/hc/en-us/arti ... heets-PDFs
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 24 Aug 2015, 18:34

can you remind me how it was determined the protocol was SPI? From a previous post there are only 4 wires going from the power base to the joystick control board and 2 of those are power(V+/GND) and 2 wires are signal(Y/V).

Also, there is a 3 pin charge connector on the joystick and one of those is the Inhibit/Prog pin and I found that pin was a direct circuit(and wire) down to the power base. So that left a 1 wire signaling protocol and UART made the most sense so it was the first tried and it turned out to be true.

This is why I ask how it was determined the protocol was SPI which is a 2 wire protocol(1=data, 2=clock)?

Remember, the Inhibit line is a safety feature of most all power chairs as it prevents the chair from being moved in any way when plugged into the charger.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby ex-Gooserider » 25 Aug 2015, 04:46

Two different plugs, with different wiring and protocols...

There is the three wire (on most controllers) XLR charging plug - the wires on this are +V and Gnd, with the third wire serving as EITHER an inhibit wire (shorted to ground by the plug on the charger which has the two pins wired together) OR a programming wire that uses some sort of one wire serial data protocol, via either a dongle or a converter that does some serial data conversion between the usual PC TX/RX + handshake signals, and the one wire setup.... (Some controllers have an oddball setup with a proprietary version of the XLR plug that adds more extra, tiny, pins that are used only in programming, and are ignored in charging.

Then there is the connector / cable between the joystick pod and the rest of the chair electronics (controller, ALM modules, etc...) This will have a variable number of wires. At least two that are usually bigger than the others and carry the charging current from the XLR plug on the pod to the power module where they feed into the battery cables. Then there will be some additional wires (often very small, as they are only for data signals, which carry data, including joystick commands, information about button pushes, inhibit signals, etc.... The number of wires, protocols and so on will vary depending on the controller brand / family.... It is reverse engineering this set of wires, protocols, and messages that pose the big challenge when trying to hack into the chair electronics....

The inhibit / programming wire and signals on the XLR plug has NOTHING to do with the wire and signals on the cable to the rest of the system. The inhibit / programming wire goes ONLY to the board in the joystick module. The electronics in the pod take whatever comes into it from the XLR plug, and does some processing on it, including translating it to the protocol used to talk to the rest of the chair and sends out whatever it needs to.... The exact details of what gets sent is again variable depending on the controller type.... For instance some controller systems store the programming data in the joystick pod, and others in the power module....

The charger inhibit signal is actually one that doesn't NEED to be sent to the rest of the chair - if the joystick pod sees it, then all it needs to do is flash that controllers error code, and simply NOT send any other signals to the rest of the chair....

ex-Gooserider


DougL wrote:can you remind me how it was determined the protocol was SPI? From a previous post there are only 4 wires going from the power base to the joystick control board and 2 of those are power(V+/GND) and 2 wires are signal(Y/V).

Also, there is a 3 pin charge connector on the joystick and one of those is the Inhibit/Prog pin and I found that pin was a direct circuit(and wire) down to the power Rob@ with the subject line I want better communication from robbase. So that left a 1 wire signaling protocol and UART made the most sense so it was the first tried and it turned out to be true.

This is why I ask how it was determined the protocol was SPI which is a 2 wire protocol(1=data, 2=clock)?

Remember, the Inhibit line is a safety feature of most all power chairs as it prevents the chair from being moved in any way when plugged into the charger.

Doug
User avatar
ex-Gooserider
 
Posts: 5975
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Arduino controlled wheelchair

Postby gcebiker » 25 Aug 2015, 04:56

Yep, we are all good on that point, i think there was some confusion earlier on a few weeks back (from my end) regarding the ability to just plug in via charging port.

Ive since spliced into the wires internal to the joystick that go to the Controller.
(pics earlier in thread for anyone interested)

(+), (-), A blue/purple, and a Yellow wire.

The Logic 4 is connected to the Yellow and Blue/purple wires for data and the ground for reference.

Im just getting my feet wet re:data capture and writing a supporting .h file for Arduino use as per what is available for the Wii Nunchuck.

Doug has given me some pointers and ill try them out later tonight.
(as i am using my only power chair i dont want to get a knock at the door and not be able to answer it cause i am wired up to the computer :)

Im just in a constant learning curve at the moment, i find this part the most interesting and fun thing i have done in years.

Step by step ill find the bits/bytes of info the Shark Joystick is sending.
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 25 Aug 2015, 06:32

ex-Gooserider wrote:Two different plugs, with different wiring and protocols...


maybe and maybe not. The batteries are down in the power base yet the charge plug is up in the joystick controller. What that means is that 2 battery wires(V+/GND) must be in the bundle of wires coming up from the power base to the joystick controller. Those are pretty easy to figure out so now we know what 2 of those pins are in the joystick to power base cable. The 3rd pin in the charger connector is the inihibit/programmer signals for the Jazzy VR2/GC2 type controller based power chairs. The Jazzy 600 has a VR2 based controller. Because the Inhibit line operates to inhibit the power base from moving there's a good chance not only is the 3rd pin in the charge connector the Inhibit signal but also there is an Inhibit signal wire going down to the power base. If this is the case, ie using a DMM to ohm out the charge connectors Inhibit pin to a pin on the joystick cable to the power base, then we would now know what 3 of the wires are coming from the power base up to the joystick controller. On the GC2 controller I found in the Jazzy Select it had a connector next to the joystick pigtail and I found a page which listed that as an aux charge port with INH/PROG pin for an onboard charger. It had 3 pins and one was Inhibit so I checked and verified the V+/Batt+ and GND wires in the joystick controller cable and then found that the Inhibit pin on the Aux Charger connector also was connected to a pin/wire in the joystick cable. That INH wire in the joystick controller cable was indeed connected to the charge port on the joystick controller.

I've seen that some chairs have the controller and joystick all in a huge box mounted on the armrest but the Jazzy Select and Jazzy 600 are not that type. These power chairs have a controller mounted in the base and a smaller joystick controller( with a charge port ) on the armrest.

So are you saying that the Inhibit line from the charge port on the joystick controller does not ohm out as having a direct connection to one of the wires in the joystick cable doing down to the power base?

There is the three wire (on most controllers) XLR charging plug - the wires on this are +V and Gnd, with the third wire serving as EITHER an inhibit wire (shorted to ground by the plug on the charger which has the two pins wired together) OR a programming wire that uses some sort of one wire serial data protocol, via either a dongle or a converter that does some serial data conversion between the usual PC TX/RX + handshake signals, and the one wire setup.... (Some controllers have an oddball setup with a proprietary version of the XLR plug that adds more extra, tiny, pins that are used only in programming, and are ignored in charging.

Then there is the connector / cable between the joystick pod and the rest of the chair electronics (controller, ALM modules, etc...) This will have a variable number of wires. At least two that are usually bigger than the others and carry the charging current from the XLR plug on the pod to the power module where they feed into the battery cables. Then there will be some additional wires (often very small, as they are only for data signals, which carry data, including joystick commands, information about button pushes, inhibit signals, etc.... The number of wires, protocols and so on will vary depending on the controller brand / family.... It is reverse engineering this set of wires, protocols, and messages that pose the big challenge when trying to hack into the chair electronics....

The inhibit / programming wire and signals on the XLR plug has NOTHING to do with the wire and signals on the cable to the rest of the system. The inhibit / programming wire goes ONLY to the board in the joystick module. The electronics in the pod take whatever comes into it from the XLR plug, and does some processing on it, including translating it to the protocol used to talk to the rest of the chair and sends out whatever it needs to.... The exact details of what gets sent is again variable depending on the controller type.... For instance some controller systems store the programming data in the joystick pod, and others in the power module....

The charger inhibit signal is actually one that doesn't NEED to be sent to the rest of the chair - if the joystick pod sees it, then all it needs to do is flash that controllers error code, and simply NOT send any other signals to the rest of the chair....


I found it was differently on the Jazzy Select having a GC2 controller in the base and a joystick controller w/charge connector on the armrest. The Inhibit signal could be handled by the micro controller in the joystick as you mentioned but since the "PROGRAMMING" portion of the INH/PROG pin in the charge port is for programming the controller in the power base then it makes sense they would connect that wire all the way through the joystick controller down to the power base. Again, as I saw them do it in the Jazzy Select. But it is possible they have implemented some other form of communications with the power base controller using the joystick controller as a form of intermediate control module. It's a bit dangerous though since any fault in the joystick system would prevent an Inhibit signal getting to the power base and locking out any change of the wheels moving.

I would just like to hear it be say that the Inhibit line( on the charge connector in the joystick ) with all other(skip known V+/GND wires) wires coming from the joystick controller to the power base were ohmed out and only the Battery wires are in common between the joystick controller cable and the charge port on the joystick controller.

Doug


ex-Gooserider


DougL wrote:can you remind me how it was determined the protocol was SPI? From a previous post there are only 4 wires going from the power base to the joystick control board and 2 of those are power(V+/GND) and 2 wires are signal(Y/V).

Also, there is a 3 pin charge connector on the joystick and one of those is the Inhibit/Prog pin and I found that pin was a direct circuit(and wire) down to the power Rob@ with the subject line I want better communication from robbase. So that left a 1 wire signaling protocol and UART made the most sense so it was the first tried and it turned out to be true.

This is why I ask how it was determined the protocol was SPI which is a 2 wire protocol(1=data, 2=clock)?

Remember, the Inhibit line is a safety feature of most all power chairs as it prevents the chair from being moved in any way when plugged into the charger.

Doug
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby gcebiker » 25 Aug 2015, 15:24

Same capture but with Async Serial Analyzer - at least getting some sort of readings other than 0xFF '255' .
Lots of framing errors , so im fiddling with settings.

For now till i figure out what settings ie baud rate, Analyzer Protocol to use and so on.
Im just focusing on On/Off codes...i figure they are the most straight forward to interpret ?

I hope this level of limited 'success' means that the Logic4 is sufficient ... (any thoughts ?)

This is a capture, of starting turned off, power on at 0.14072275

Cut/past from Excel of exported CSV with some notes i made,

Code: Select all
Time [s]    Analyzer Name    Decoded Protocol Result   Notes
0.14072275   Async Serial   '0' (0x00) (framing error)   //Jazzy 600 Joy Turned on (Off / High) (On/low)
0.15108   Async Serial   '145' (0x91)   
0.15134   Async Serial   '31' (0x1F)   
0.1516   Async Serial   = (0x3D) (framing error)   
0.151912   Async Serial   '31' (0x1F)   
0.152354   Async Serial   '188' (0xBC)   
0.15264   Async Serial   '148' (0x94)   
0.1529   Async Serial   '248' (0xF8)   
0.15316   Async Serial   '241' (0xF1)   
0.153498   Async Serial   '148' (0x94)   
0.153784   Async Serial   '132' (0x84)   
0.154096   Async Serial   '0' (0x00) (framing error)   //Low pulse, data lead in ?
0.156042667   Async Serial   } (0x7D) (framing error)   
0.156503417   Async Serial   COMMA (0x2C) (framing error)   
0.1581415   Async Serial   x (0x78) (framing error)   
0.171125833   Async Serial   '18' (0x12) (framing error)   
0.17146375   Async Serial   '252' (0xFC)   
0.171723833   Async Serial   '8' (0x08) (framing error)   
0.172191833   Async Serial   '131' (0x83)   
0.172607833   Async Serial   '156' (0x9C)   
0.172893833   Async Serial   '252' (0xFC)   
0.173179833   Async Serial   t (0x74) (framing error)   
0.173465833   Async Serial   '132' (0x84)   
0.173777833   Async Serial   '0' (0x00) (framing error)   //Low pulse, data lead in ?
0.175570583   Async Serial   O (0x4F) (framing error)   
0.176031333   Async Serial   '252' (0xFC)   //
0.176312833   Async Serial   '252' (0xFC)   //
0.176568833   Async Serial   '248' (0xF8)   //Repeating section of code
0.176875417   Async Serial   '252' (0xFC)   //
0.177156917   Async Serial   '252' (0xFC)   //
0.1774385   Async Serial   '252' (0xFC)   //
0.17772   Async Serial   '12' (0x0C)   //
0.177976   Async Serial   '0' (0x00) (framing error)   //Low pulse, data lead in ?
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 25 Aug 2015, 15:36

And Ive only four wires from Shark Controller to Under chair Motor Driver.
Image
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby DougL » 25 Aug 2015, 15:38

I skipped the startup/initialization at first because the steady stream of the joystick data was readily available and knowing what was X, Y and throttle seemed more interesting. Turned out it was way easier too since the initialization on the Jazzy Select was bit twiddling and not UART data. And it was bit twiddling on both JSIG and INH lines.

did you google what "frame errors" means?
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby gcebiker » 25 Aug 2015, 15:47

Yeah, Saleae has a fair bit of info for dummies .. I feel right at home. In a nutshell, I've got the settings not quite right or/and its syncing it self after each packet of data
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: acid_coke, Burgerman, Jay_x, martin007, mentado020477, woodygb and 98 guests

 

  eXTReMe Tracker