Arduino controlled wheelchair

Power wheelchair board for REAL info!

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

Re: Arduino controlled wheelchair

Postby gcebiker » 19 Apr 2020, 23:22

Hi,

I am not sure it if will help with the DX but I've attached the protocol for the Shark (RS485 38400 baud)
Shark Bus Communications version5.pdf
(71.85 KiB) Downloaded 146 times
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby stevelawiw » 20 Apr 2020, 00:00

@gcebiker
I am now working on using the emulator to drive a Storm Arrow power chair with Brushless or 'GB' motors as Invacare calls them (Gearless Brushless)

Sorry I know nothing about your emulator, will you use the existing controller or perhaps RoboteQ? I've been trying to get RoboteQ and the GB Motors to play nicely, I was hoping there might be some common ground!
stevelawiw
 
Posts: 660
Joined: 21 Jul 2012, 20:55
Location: Isle of Wight, UK

Re: Arduino controlled wheelchair

Postby gcebiker » 20 Apr 2020, 00:32

stevelawiw wrote:@gcebiker
I am now working on using the emulator to drive a Storm Arrow power chair with Brushless or 'GB' motors as Invacare calls them (Gearless Brushless)

Sorry I know nothing about your emulator, will you use the existing controller or perhaps RoboteQ? I've been trying to get RoboteQ and the GB Motors to play nicely, I was hoping there might be some common ground!


The present emulator i have built up for the Shark Controller will turn on the GB motors on the Storm Arrow Chair but not do any thing else.
I have yet to hook it up to the Logic Analyzer to see the data stream.

If it turns out to be RS485 then i will mod the code i have for the Shark and use that to control the factory Power Module.

I have also tried swapping the Original Joystick for the Shark (as manual says it can use either) but same issue.
I have the programming SD card for the Original Joy and OEM Wizard for the Shark, just been to busy to get to tinkering...

Enter COVID19 , now lots more time as house bound again....
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby stevelawiw » 20 Apr 2020, 01:09

The present emulator i have built up for the Shark Controller will turn on the GB motors on the Storm Arrow Chair but not do any thing else.
I have yet to hook it up to the Logic Analyzer to see the data stream.


Oh ok,well good luck with your project, and stay safe!
stevelawiw
 
Posts: 660
Joined: 21 Jul 2012, 20:55
Location: Isle of Wight, UK

Re: Arduino controlled wheelchair

Postby Ri5ux » 14 Jan 2021, 13:10

Hello everyone. Would just like to start by thanking everyone involved in the process of reverse engineering\hacking the shark bus on these mobility scooters. I ended up reading approximately 90% of this forum thread to attempt it myself and was successful at doing so and may have even learned a bit of information that is unknown here. Regardless, for future users attempting to interface with their scooters or re-purpose an older one, I have started organizing a sort of tutorial\walkthrough of the process on a blog I created a few days ago.

The Blog Post (Part 1): http://blog.arisux.com/2021/01/12/dynam ... r/#more-47
Summary Video (Showing the concept working): https://www.youtube.com/watch?v=8B36xSl ... nnel=Ri5ux
Update Video (Showing it interfaced with a tablet PC): https://www.youtube.com/watch?v=ECUhorI ... nnel=Ri5ux

I did also notice a post mentioning that you had to use a MAXIM branded DG419 IC, but found this to not necessarily be true. I am using the Vishay variant of the same part in mine with the initial pulse being the full battery voltage and have had no issues. I initially purchased this part before I had noticed that post, but figured I would try it anyways. After viewing the datasheet I hadn't seen any data showing it may be damaged due to the voltage or perhaps overlooked something you may have seen.

Regardless, just wanted to share my experiences with you and other hackers as well. Thanks again, it would have taken me significantly longer without the information I sourced here.

Image
Ri5ux
 
Posts: 4
Joined: 14 Jan 2021, 12:35

Re: Arduino controlled wheelchair

Postby Ri5ux » 14 Jan 2021, 13:23

Additionally my startup packet ended up being different. On the DK-PMA01 the startup packet I used is as follows:
Code: Select all
74 130 135 129 128 143 180 165 128 153 15

To clarify, I did not try the startup packet you guys used, so both may actually work. Looks like different joysticks have different startup packets.
Ri5ux
 
Posts: 4
Joined: 14 Jan 2021, 12:35

Re: Arduino controlled wheelchair

Postby woodygb » 14 Jan 2021, 13:28

This thread may have given you better information,

viewtopic.php?f=2&t=6503
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 6320
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby gcebiker » 14 Jan 2021, 22:56

Ri5ux wrote:Additionally my startup packet ended up being different. On the DK-PMA01 the startup packet I used is as follows:
Code: Select all
74 130 135 129 128 143 180 165 128 153 15

To clarify, I did not try the startup packet you guys used, so both may actually work. Looks like different joysticks have different startup packets.


Hi, thank you for the compliments.
Regarding the start up packet - many will work as it mostly just contains manufacturing data - Please see excerpt from the manual below.

Type 04 SR power-up information
The minimum allowable length for this packet is 6 data bytes. If the SPM receives this packet with a length less than 8 data
bytes, it shall assume that the SR does not support actuator or lighting control.
Byte 0: Remote type: Types recorded elsewhere ( see )
Byte 1: Year of manufacture, minus 2000 - for example, 01 is 2001, 127 is 2127.
Byte 2: bits 3-0: Month of manufacture ( 1 is January, 12 is December).
Byte 3: Serial number bits 20-14
Byte 4: Serial number bits 13-7
Byte 5: Serial number bits 6-0
Byte 6: Software version number
Byte 7: Capabilities:
bits 6-3: currently unused
bit 2: If 0, has a virtual speed pot. If 1, has an analog speed pot. This flag is only honoured where the software version
is 2.5 or greater (whether prerelease or not)
bit 1: Supports 2 actuator control
bit 0: Supports lighting control
Notes:
The serial number format is chosen for compatibility with Dynamic Controls' standard serial number format (YYMXXXXX).
Allowance has been made such that the maximum serial number for any month can go up to 1,048,576. (they start at 10,000)
The values for the Software version number are:
0x00Versions before 1.0 release. This version has a 7-byte power-up packet, it omits the build version number.
0x01Release version 1.0. This version has a 7-byte power-up packet, it omits the build version number.
0x02Version 1.1 up to release candidate 1. No released product uses this value.
Where the upper nibble of the version number is greater than zero, the format of the version number is:
Bits 6-4: Software major version
Bit 3: "Pre-release flag": when set, this software is pre-release and is not suitable for production.
Bits 2-0: Software minor version.
For example, software version 1.1release candidate 2 will have a software version number of 0011001b or 0x19. Version 3.2
release will have a software version number of 0110010 or 0x32.
The format is chosen to enable easy reading of a hex dump such as that produced by the ^ terminal command on the Shark
Power Module (see SPM SRS section 26.14 for details).
The maximum version number that can be indicated using this scheme is 7.7.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby gcebiker » 14 Jan 2021, 23:06

I did also notice a post mentioning that you had to use a MAXIM branded DG419 IC, but found this to not necessarily be true. I am using the Vishay variant of the same part in mine with the initial pulse being the full battery voltage and have had no issues. I initially purchased this part before I had noticed that post, but figured I would try it anyways. After viewing the datasheet I hadn't seen any data showing it may be damaged due to the voltage or perhaps overlooked something you may have seen.


Yes, the other data sheets for other brands (that i read at the time) indicated a voltage operational rage that was not high enough to withstand a fully charged battery or different battery chemistry (LiFePo4) when they were fully charged.

I see you are using Woody's variant with the relay, this is something i am yet to implement but a very good idea of his.

I love what you are doing with the tablet interface.

A shorter version of this thread may be found here - http://greenmobility.com.au/rc-wheelchair-controller/

Cheers
Tony
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby Ri5ux » 15 Jan 2021, 16:00

Thanks. I ended up going back through the document pertaining to the sharkbus protocol, and re-wrote the code to be able to build the startup packet and SR general packet bit by bit, quite literally. And you're right, the startup packet is pretty flexible on most values. I'll share the final result of that here when I'm done with it as well.

Also I didn't actually use relay variant, but yes it's a good idea. You may have mistaken my DCDC converter for a relay, it's quite a bit larger than the one you used.

I had also completely missed the threads you both posted, but that's how it goes haha.

The tablet is actually running a Java application, interfacing it with the Arduino via serial was pretty straight forward once you figure out the RXTX library functions. My intentions are actually not to drive the wheelchair base with a tablet though. As odd as it seems, that's just a temporary solution to be able to make sure it functions as intended. I plan on turning into a self-navigating autonomous robot of sorts. Basically navigate from point A to point B within an environment with absolutely no intervention. Going to use a combinations of sensors here including a GPS with RTK support, ultrasonic sensors for distance measurements, IR sensors to determine how fast/if the base is actually moving, and likely a camera or two. Will probably link to an RF base station for more accurate location measurements.
Ri5ux
 
Posts: 4
Joined: 14 Jan 2021, 12:35

Re: Arduino controlled wheelchair

Postby gcebiker » 16 Jan 2021, 03:37

Seed Studio is coming out with really cheap Lidar at the moment - here is just one of them
https://www.seeedstudio.com/RPLiDAR-A1M ... -4785.html

And if you used an Arduio Pilot from the quad copter world its already got all the software and hard ware stuff setup.
I started then found the resolution on the GPS to be to low/slow with non military grade access to the GPS satellites and at the time the LIDAR's were prohibitively expensive.

Here is a link to the Ardupilot Rover, the land based version of the platform https://ardupilot.org/rover/index.html
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Arduino controlled wheelchair

Postby Ri5ux » 16 Jan 2021, 07:00

gcebiker wrote:Seed Studio is coming out with really cheap Lidar at the moment - here is just one of them
https://www.seeedstudio.com/RPLiDAR-A1M ... -4785.html

And if you used an Arduio Pilot from the quad copter world its already got all the software and hard ware stuff setup.
I started then found the resolution on the GPS to be to low/slow with non military grade access to the GPS satellites and at the time the LIDAR's were prohibitively expensive.

Here is a link to the Ardupilot Rover, the land based version of the platform https://ardupilot.org/rover/index.html


Very cool! That lidar has an insanely better sampling rate and range than the one I was looking at earlier today. I think the one I found only had a sample rate of 1800, so 8000 is just insane. And to think this one is $20 cheaper.

I noticed most of the GPS modules available under $100 USD were pretty low resolution as well. The only one I found that had a millimeter level accuracy was $250 and required a base station to achieve that level of accuracy. Supposedly it doesn't work very well indoors either, which is understandable, so I keep trying to find other solutions.

I'll look into the Ardupilot platform as well, sounds like it's exactly what I need. Thanks for all the tips.

Additionally, I was able to quickly implement bluetooth on the controller instead of being tethered to a USB cable, so the previous tablet interface is now wireless! Quite fun to mess around with as well, haha.
Ri5ux
 
Posts: 4
Joined: 14 Jan 2021, 12:35

Re: Arduino controlled wheelchair

Postby gcebiker » 16 Jan 2021, 11:58

This is an earlier iteration of the code, controlled via Wii Nunchuck .... the code is partially not finished works but does not have the finesse of later versions.

The best bit about this code is that you could use it for the onboard accelerometer and gyro if you needed them, just have the Nunchuckii mounted to the chair and use a hard wired version instead of the wireless one i did.

You will need the Nunchuck libraries.

Best bit about this code and the Nunchuck (i feel) is that it uses I2C , very smooth to use.

Video of the code in action.

youtu.be/6GkNFPJlW4c
Attachments
SR_Wii_input_limited_mapping620pm.zip
(4.51 KiB) Downloaded 34 times
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 857
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Previous

Return to Everything Powerchair

Who is online

Users browsing this forum: Arima, Bubbernator, Burgerman, DirtinLa, Frank, Google [Bot], Heygnow, Jay_x, MarkFox, Roadrunner, Rollin Positive, rover220, wes4dbt, woodygb, Yennek and 54 guests

 

  eXTReMe Tracker