Arduino controlled wheelchair

Power wheelchair board for REAL info!

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

Re: Arduino controlled wheelchair

Postby terry2 » 01 Jul 2015, 10:14

User avatar
terry2
 
Posts: 1281
Joined: 07 Nov 2014, 12:08
Location: Solihull

Re: Arduino controlled wheelchair

Postby jcka22 » 02 Jul 2015, 23:30

Lenny- you were right, Thanks! Terry - thanks for the link, there's some useful info there.

For my next step, I need to pick some motor controllers since I am going to have to scrap the original control board (actually may keep it just to charge the batteries).

What are yall's thoughts on something like this:
http://www.ebay.com/itm/10-50V-40A-DC-M ... 565f16a383

I was debating making something myself, but making a nice h-bridge, and incorporating all the safety features (ex. flyback protection) I figured it would be easier to just buy an existing controller since they're pretty cheap. I can just scrap the pots on these and then use my arduino to control the speed, right?

I will also have to make something up to supply the 24V to the brake wires to release the brakes when I want to drive. I haven't looked into that yet, any ideas there?

Planning to buy some parts this weekend and really get going on this.
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby Burgerman » 03 Jul 2015, 01:42

A stalled or hard accelerating wheelchair motor is limited to "only" 80, 100 or 120A by the controllers measuring the current, and software limiting the current.

That controller has no output Amp limiting and will fail above 40A. As you turn on the spot in most powerchairs the motor current would exceed 100A each without Amps being limited.

Seriously you need to look for a more complex controller with greater max power capability and current limiting that doesent depend on a high impedance motor to limit Amps.
User avatar
Burgerman
Site Admin
 
Posts: 70264
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby LROBBINS » 03 Jul 2015, 02:09

That controller, 40A max (for how long?) would make for a very low-powered chair, but yes you could use two of them. It will be no small task, however, to write a program to properly control a chair - you not only need to mix Throttle and Steer joystick outputs to get Left and Right motor commands (or just turn the joystick 45o as some older chairs did), but you have to program how fast the PWM ramps up and down (acceleration and deceleration), numerous safety interrupts and much more. You'll also have to add current measurement circuitry in order to keep the motors from drawing enough to fry those boards (such as if stalled) and to implement motor compensation. Why not start by trying to write an Arduino program to do this, just using serial or LEDs to visualize the output, before trying to make it actually drive some motors.

The brakes are a simpler matter, however. They each draw about 1/2 amp, so all you need is a digital switch controlled by an Arduino digital output. Although you could design your own MOSFET circuit for this, it's simpler to take advantage of the integrated digital switches already on the market. Roboteq uses a chip that contains 8 low-side switches good for > 1 Amp each (there was a picture showing the part number on some thread here). In my system, for lights I'm using separate high-side switches (STM VN540-E) that are good for up to 2.8 Amps. There are many similar devices out there mostly designed for the automotive market, they're not very expensive and they already include, in addition to the MOSFET, over-current, over and under voltage, and thermal runaway protection.

The easiest way to control a chair from an Arduino is to start with a normal wheelchair controller that has an analog joystick that you can mimic - take a look at Woody's posts about plug-and-play RC for P&G controllers - he's done exactly that. Doing it from scratch is going to be a BIG, BIG, BIG project.

Ciao,
Lenny

Ciao,
Lenny
LROBBINS
 
Posts: 5788
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Arduino controlled wheelchair

Postby jcka22 » 03 Jul 2015, 19:00

Okay, I guess I was trying to get away too cheap, I was hoping to spend around $50 for 2 controllers, I can go higher but would prefer less than $100 for 2.

Originally I did want to hack the controller and use all the existing hardware. However that doesn't seem to be possible since this chair uses a proprietary CAN communication that I can't mimic.

I am planning to turn this wheelchair into a robot, so I won't need the many safety interrupts you might for a wheelchair with a person in it. I've built two very small, simple robots previously, using PWM & servos.

The first used a ultrasonic sensor and a simple algorithm I wrote to avoid obstacles, it decides whether to turn left or right based on the distance of objects. Here's a youtube link: https://www.youtube.com/watch?v=6LTKuldFzRQ

The second was controlled using an Android phone and bluetooth. The Android sends the accelerometer information to the Arduino and the code I wrote turned this into a PWM voltage to the servos so you could tilt the phone to steer the robot. Youtube link: https://www.youtube.com/watch?v=GFZAt9tGh58

I want to do these same things (and many more) but with these bigger motors. I'll look for some better motor controllers and post what I find. Thanks all for your help.

Jack
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby woodygb » 03 Jul 2015, 19:44

Junk the Dynamic and replace it with a Penny and Giles control system the Pilot+ , VR2 or Vsi.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby LROBBINS » 03 Jul 2015, 21:08

and then don't hack into the P&G in the serial communication bus between modules, but into the internal joystick connection inside the hand control. You could also do this with a Dynamic DX or DX2 as they also use analog joysticks like the P&G.

BTW, if you are making a robot and not a chair perhaps you don't want motors as strong as a chair needs. If so, there may be some other options. For example, STM makes a 30 Amp integrated full-H bridge motor controller, the VNH3SP30-E, suitable for 24V systems that already is set up to use PWM and has over-current, over-voltage, over-temp and so on protection as well as a diagnostic pin that gives fault information. You would need to make a printed circuit board with a fairly big copper area for cooling if you want to pull a full 30A, and you would probably want to add reverse voltage protection (yes, you won't attach the batteries backwards, but it could happen). Price from RS (the European name for Allied Electronics) is E8.16 in single units, to which you have to add the cost of a circuit board for two of them, a couple large electrolytics, and a hefty diode for reverse voltage protection (or a P-channel MOSFET - the data sheet describes several ways to protect from reversed voltage). BUT, 30 Amps is not sufficient for the motors from anything but the puniest chairs.

Lenny
LROBBINS
 
Posts: 5788
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Arduino controlled wheelchair

Postby jcka22 » 04 Jul 2015, 03:12

The thing is I already have these motors. I'm a college student and thus have a very low budget so it doesn't make sense to buy new motors.

I know my motors are 200W so would this H-bridge work:
http://www.ebay.com/itm/240W-High-power ... 19e147a18b

Do I need to do some kind of power supply, or if I'm using one of these pre-made H-Bridges are they set up to just take the power straight from the battery?
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby LROBBINS » 04 Jul 2015, 08:39

The Watt rating on motors is NOT the maximum current X voltage as you might think. It is the continuous mechanical watts it can produce without overheating. Under load, the current draw will be much, much higher than what you'd get by doing 200/24 = 8.3 A. Initial starting current might be 50 or 70 A or even more. Going slowly up hill, it might draw 30 A, and turning on carpet 100A - IF THE CONTROLLER DOESN'T LIMIT THE CURRENT. A motor does not limit the current it draws beyond what's provided by the internal resistance of its windings. It's up to the controller to do that.

Mobility controllers, and good hobby controllers, and automotive controllers all limit the current. So, if the mechanical load is such that the motor would draw 100A and the controller limits it to 50A, the motor will just never produce the torque it could if directly connected to the battery, but neither the controller nor the motor will be fried. The controllers you've been finding don't do this (well, I didn't look at the details on all of them, perhaps some do), they just say what maximum current draw they can tolerate. If the motor tries to draw more than that, goodbye controller. You are not going to end up saving money by using a controller that doesn't limit maximum current, you're just going to see lots of smoke.

Motors rated 200W are pretty small as wheelchair motors go. In a robot, without the weight of the WC user, they might give fairly snappy performance. In a WC they're "granny" level. For your use, you can probably get away with the smallest of wheelchair controllers. I think the P&G's Woody mentions start at 40 A (really way too low for a real chair, except for going slowly in a shopping mall), but it might do for your purposes. Used ones should come pretty cheaply on e-bay, and I completely agree with Woody that this is probably not only the easiest, but in the end cheapest, way to make what you want.

Not that I object to roll-your-own designs. If you have a clear goal in mind and the knowledge to pull it off, that's a great way to go. At this stage, however, I think you have to invest first in learning, not hardware, before you can do that. You are a student, so it's time to put those studying skills to use. To start with, you really need to know more about electric motors and their electrical and mechanical properties. What are the important parameters to design around? What are motor characteristic curves and what can you glean from them? Even if you can't get hold of those data for the particular motors you have, understanding what those things are will let you at least make ball park estimates of what you need to do. Wikipedia probably is a decent place to start, but if you can find an old Encyclopedia Brittanica (e.g. from the 50s) you will find some excellent articles on all kinds of electric motors and their characteristics (of course, without anything about things like brushless DC motors - they didn't exist then). Or just search for "electric motor characteristics" and you'll find enough to keep you well-occupied and eventually well-informed.

Ciao,
Lenny
LROBBINS
 
Posts: 5788
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Arduino controlled wheelchair

Postby Burgerman » 04 Jul 2015, 08:44

A 250 watt motor doesn't take 250 watts. It takes about 120 to 150A stalled or initially accelerating at 24v.

120A x 24V = PEAK WATTS OF 2880

250 Watts refers to its max average continuous power without overheating.

Didn't see lennys reply! Oops... :o

That controller you link to can do about 10 amps before heat/failure/smoke. Take a look at http://www.roboteq.com/index.php/docman ... sheet/file
User avatar
Burgerman
Site Admin
 
Posts: 70264
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby woodygb » 04 Jul 2015, 12:14

http://www.teamtornado.co.uk/ssheet.htm
download this http://www.teamtornado.co.uk/data/motors.zip it includes a wheelchair motor in the examples.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby jcka22 » 04 Jul 2015, 21:53

Okay I think I'm getting a better idea of what's necessary now.

I looked at some P&G controllers on eBay but they were around $100 and that wasn't with the joystick controls. Buying a different wheelchair control system and hacking the joystick doesn't seem like the most efficient way of doing this.

It seems like what I need is a good motor controller. And if I am going to get one, I'm probably going to need something more like this: http://www.robotshop.com/en/sabertooth- ... river.html

What do you all think? 60A continuos and 120A max should be sufficient. Something as small as 40A continuous would probably work, as long is it had a high max rating (~100A) right? Obviously this is a little pricey for me but if I could find something similar for a little less I could probably swing it.

It has over-current and thermal protection, are over-current protection and current limiting two different things?

Also, the previous PWM frequency was 20kHz, will there be any problem using something with a higher or lower frequency, like 16-24 kHz?

Maybe two of these could work? http://www.robotshop.com/en/cytron-sing ... oller.html
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby woodygb » 04 Jul 2015, 22:25

One last try ...
http://www.ebay.com/itm/Penny-Giles-VSI ... 234ed70922

I've used the Sabertooth in my feather weight robot of 13kg .... it went pop.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby woodygb » 04 Jul 2015, 22:47

B.T.W the VSi is an all in one controller and joystick.
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby Burgerman » 04 Jul 2015, 23:01

Not sure what you are using it for but non of these robot controllers have a suitable tank steer setup. Even the Roboteq required this script to make it steer correctly and be controllable and predictable:

http://www.wheelchairdriver.com/BM3-con ... Script.txt

Now I susspect that to get full control you would need that even on a robot. Or its all spin and zoom about. And turning depends on motor acc rates etc. Meaning you have to have acc/dec set up way faster than you will move the sticks or it has a mond of its own. That script works on the 150A per channel roboteq, as well as the smaller dual channel ones. And you will find out that you need this eventually...
User avatar
Burgerman
Site Admin
 
Posts: 70264
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby jcka22 » 04 Jul 2015, 23:36

Okay, that listing doesn't really have much information, the controller looks pretty old, how can I be sure it will work for what I want to do? How do I know it's the right specs for my motors?

I'm assuming some of ya'll have used this controller in the past. The joystick is analog? So it would be relatively easy to program an Arduino to mimic the joystick signals and control the motors that way? Has anyone done this before?
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby woodygb » 05 Jul 2015, 00:03

I have made an interface for the VSi ...both R/C and Android phone via Bluetooth .

Specs ...ask the seller ...

Suitability for your motors ... well it's I.M.O. more suitable than your other choices and can be reprogrammed .
User avatar
woodygb
 
Posts: 7128
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Arduino controlled wheelchair

Postby Burgerman » 05 Jul 2015, 01:39

Okay, that listing doesn't really have much information, the controller looks pretty old, how can I be sure it will work for what I want to do? How do I know it's the right specs for my motors?

I'm assuming some of ya'll have used this controller in the past. The joystick is analog? So it would be relatively easy to program an Arduino to mimic the joystick signals and control the motors that way? Has anyone done this before?
jcka22 Posts: 10Joined: 16 Feb 2015, 21:00


It is and Yes, yes and yes.

It also has proper control logic rather than simple tank steer which wont actually work for you, although you haven't found out why yet, and can be reprogrammed and configured. And includes such essentials as motor compensation so you get almost max torque at low input signals without requiring feedback from the motors etc, and will give controlled turns and speed independently. It also has current limiting and 101 other things you can set up and will require. You just need to program it with the software that's available free if you ask...
User avatar
Burgerman
Site Admin
 
Posts: 70264
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Arduino controlled wheelchair

Postby DougL » 06 Jul 2015, 18:07

jcka22 wrote:Hi,

I am new to this forum. I am looking to interface an Arduino board into an electric wheelchair. I found a little information on this site but couldn't find any information on actually setting this up and getting it working.

I'm not sure the brand of chair but it uses a Shark power module and control system. I know these chairs have a ton of safety features which makes it difficult to do projects like this.

Is it possible to keep the existing wheelchair circuit boards and somehow use an Arduino to control the wheelchair? Or would it be easier to just scrap all the control boards and start from scratch, keeping just the motors and batteries of the chair?

Any advice would be much appreciated !

Thanks,

Jack



Jack, I too went down this road and was not satisfied with getting into the physical joystick signaling so I built a logic analyzer from an FPGA board(Papilio - http://store.gadgetfactory.net/papilio-pro/ ) and figured out the protocol for the GC2 controller. What I like about this solution is it leverages the forward/reverse _and_ turning configuration built into the firmware on the GC2 controller. I just have to give it commands to move a percentage(0-100) forward, backwards, left and/or right or a combination. The controller firmware handles the _tank_ steering.

Search my name/ID and look at my posts. I've not yet setup a blog on this but plan to do so soon. I'm presenting to the local robotic club on this tomorrow night so there will be a fire under my butt to move on the blog.

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

Re: Arduino controlled wheelchair

Postby jcka22 » 07 Jul 2015, 04:42

Okay burgerman/woody, what software? I would love to hear about it, thanks!

Doug, you did this with Arduino ? Or something else?
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby DougL » 07 Jul 2015, 05:24

jcka22 wrote:Doug, you did this with Arduino ? Or something else?


Yes, Arduino. An Adafruit Trinket Pro 5V to be exact and plugged directly into the 4 pin joystick pigtail off the base/controller.
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby jcka22 » 23 Jul 2015, 02:49

Doug - I don't think I have the type of wheelchair where I can do that.

I think my chair uses an inductive joystick, it's either that or Hall effect but I'm not sure how to tell. There are 4 coils like below on each side.
IMG_4008.JPG
control board
IMG_4008.JPG (89.23 KiB) Viewed 16114 times


Why is it not possible to hack a joystick like this? Doesn't it still have to send some type of voltage signal to the processor based on the position of the joystick? Wouldn't it be possible to simulate this voltage? I can't figure out how this joystick sends the signals that dictate it's position. I've measured every chip on this thing and nothing changes voltage whether it's still or moving.

Does anyone know if it's possible to hack an inductive joystick?
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby DougL » 23 Jul 2015, 03:07

If it is a hall effect type joystick then the signals for X and Y movement will be in the millivolts and a good amplifier would need to be used to see it on a general purpose multimeter. I could not find anything on the GSM555108 number I thought I could see in the picture.

What model number is on the joystick controller itself?
DougL
 
Posts: 69
Joined: 19 May 2015, 22:47
Location: San Diego, CA USA

Re: Arduino controlled wheelchair

Postby LROBBINS » 23 Jul 2015, 08:22

The problem is not inductive vs. Hall effect, but whether it is an analog-output or digital-output joystick. I have both inductive (which yours is) and Hall effect analog sticks and they can be hacked in the same way. There are some controllers, however, (if I recall correctly the Dynamic Shark is one) that use a joystick with digital output (again, memory only here, SPI, but might be I2C). That is, the conversion from analog to a basic digital signal takes place inside the joystick. These two could be read with an Arduino, but you'd have to first figure out what SPI or I2C protocol is being used (clock rate and a few other things) and for that you'll need an oscilloscope or digital signal analyzer. For example, if it's SPI, you would program an Arduino (or other) with the same SPI protocol and connect 4 leads to the same points the stick is connected to in the pod. Most often those connections are called CS, MOSI, MISO and SCLK - you might even find those labels near your joystick's connections.
Ciao,
Lenny
LROBBINS
 
Posts: 5788
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Arduino controlled wheelchair

Postby DougL » 23 Jul 2015, 13:53

if it were digitial then there would be something seen on a DMM even if it didn't make sense because it would most likely be TTL logic or CMOS(3v) logic. It would be easily seen on an O'Scope. The analog joysticks I read about many hacking generally were 0-5v with 2.5v center on both X and Y axis. So that would be easily identified. Now if it's hall effect type with sensing circuit off the joystick it can be tough to see the signals.

I'm not sure what the advantages would be to hacking directly into the joystick output as opposed to bypassing the joystick controller all together. At least on the low end joystick controllers with just 'dumb' battery level indicators, speed knob and a few buttons. All that can be replaced with an Arduino at the joystick pigtail since there is the raw battery connections there, the Prog/Inhibit line and the JSig/Ctl line. A DPDT relay could be used to switch in/out the either the Arduino control or the original joystick controller.

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

Re: Arduino controlled wheelchair

Postby jcka22 » 24 Jul 2015, 01:19

Doug - You keep mentioning that you are bypassing your joystick. If you are doing this I am guessing yours does not use CAN communication? Since mine does wouldn't it would be nearly impossible to figure out how to communicate with the chair in this fashion?


Lenny - YES! That is exactly what mine has. See the picture below:
IMG_4015 (1).JPG
bottom of controller
IMG_4015 (1).JPG (57.51 KiB) Viewed 16084 times


How do I determine whether it's SPI or I2C? And once I know this, how do I go about programming the Arduino with the same protocol?

Thanks!
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby jcka22 » 24 Jul 2015, 01:29

Okay based on what I've read it seems to be SPI. Still not sure where to begin on how to program the Arduino. Am I going to need an Oscilloscope ?
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Re: Arduino controlled wheelchair

Postby DougL » 24 Jul 2015, 03:01

jcka22 wrote:Doug - You keep mentioning that you are bypassing your joystick. If you are doing this I am guessing yours does not use CAN communication? Since mine does wouldn't it would be nearly impossible to figure out how to communicate with the chair in this fashion?


Correct, the Jazzy Select and Jazzy GT models use a 6 byte serial bursts at 38.4K baud to send the x, y, throttle and unknown to the controller. I created a logic analyser from a $85 FPGA dev board( Papillo Pro ) and a $10 level shifter from the same company to do 5V TTL sniffing. The open source software I used OLS has a protocol analyzer plugin builtin which does the serial sniffing. There's I2C and SPI protocol plugins builtin too. I didn't see a CAN protocol plugin.

As for coding the Arduino, there's lots of libraries for Serial, SPI and I2C which probably work. I've used Serial and I2C myself.

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

Re: Arduino controlled wheelchair

Postby DougL » 24 Jul 2015, 03:07

jcka22 wrote:Okay based on what I've read it seems to be SPI. Still not sure where to begin on how to program the Arduino. Am I going to need an Oscilloscope ?


A logic analyzer should do the trick but an O'scope will help you verify the logic levels. What I did was capture some data and look at it and guess at what it was doing. Then move the joystick a bit and capture the data and noticed 2 bytes changed. Move one axis on the joystick to max and notice what byte and value matched the movement. I did the same for the throttle setting. Then I did things like capture stream and the Inhibit line during power on and what they did when the power off occurred. I coded the Arduino to match the power on and power off sequence and sent out the joystick and throttle data at around the same 20mS interval as noticed in the captured data.

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

Re: Arduino controlled wheelchair

Postby jcka22 » 24 Jul 2015, 15:56

Well that's good news that this is possible. Unfortunately I don't have a logic analyzer or an oscilloscope... It seems like even the low cost ones aren't cheap.

Would you be willing to share your Arduino code? I'll continue doing some research to see what I can find but it would be really helpful to see the structure of a working Arduino program.
jcka22
 
Posts: 15
Joined: 16 Feb 2015, 21:00

Next

Return to Everything Powerchair

Who is online

Users browsing this forum: acid_coke, Bing [Bot], Burgerman, Kande_ian, shirley_hkg and 58 guests

 

  eXTReMe Tracker