Electric wheelchairs DIY motor and control questions

Hi,
I'm helping a local non-profit NGO build electric wheelchairs for people with (very) limited income.
The concept of the project is to:

  • wheelchairs are to be built in-house to keep the cost down, taking advantage of the workshops available at the NGO's premises (steelworks, basic electronics, upholstery, etc...)
  • the wheelchairs should be easily serviceable, meaning an open source platform with discrete components is the way to go, as opposed to some off the shelf proprietary design.
  • Wheelchairs should have an autonomy of 1.5 to 2.5 hours of continuous use before needing a recharge

When I got on board, a dozen geared DC brushed motors (32:1 ratio) had been acquired and an unsuccessful cooperation with a local university for the control module design was attempted- test carts were difficult to control and some were just unstoppable and crashed.

In order to get the project back on track I appeal to those knowledgeable in the fields of DC brushed motors control , and anyone with an experience in electric wheelchair control and hardware.
We're looking to build it based on an arduino platform (most probably the UNO, since it has everything required and sticks to our frugal approach).

Practically, the topics we need some help in are as follows:

  • Does the motor have to have a braking system, or could braking be applied through PWM (we're leaning towards a breaking system anyway, but wanted your opinion on it)
  • Does the system need feedback from the wheels?
  • What would the disadvantage be should stepper motors (geared or not) be used instead of brushed DC motors? (cost, autonomy, etc...)

I'm sure there are many more questions and this is just the beginning of a discussion which I hope would lead to some interesting and open source hardware and software platform.

I don't know if that's the right forum to post in, so admins, please feel free to move it.

Oh, and btw, I have a background in Mechanical engineering and some limited arduino experience :slight_smile:

These motors have to go both backward & forward? So an H-bridge is needed?
What control circuit was attempted before?
Are these single battery (12V) or dual battery (24V) operation?

In some areas wheelchairs may be considered medical devices, which might get into regulatory space. Note the "Not available for sale in Florida, Nevada, North Carolina" for the below wheelchair and walker. Bottom are some Chinese "mobility scooter" designs that might be of interest.

Using a conventional battery-powered wheelchair as a reference, you might want to consider the following :

a) Brakes must be capable of operating (being applied) with no power available, (fail-safe) ie they must be applied until power is available to permit release. To permit manual operation of the wheelchair with no power available, the brakes actuate on the drive motor shafts and the motor gearbox can be manually disconnected from the chair wheels. Brakes are automatically released as drive is actuated by joystick movement.

b) There is no need for speed feedback from the motors as the "brain" monitoring speed rests with the wheelchair user.

c) Steering is accomplished by using two independent wheel-drive motors controlled via a single joystick

d) The joystick provides speed control, direction control and forward/reverse control

e) Maximum reverse speed is much less than maximum forward speed

Might I suggest you visit your local wheelchair service branch/graveyard where you might pick up lots of tips or even defective items to give you design ideas.

try and find the manufacturer of electric wheel chairs you may be able to get them at the prices they sale them to the dealers for not the rip-off price they charge, I look up the factory that made mine the cost was 1/3 what the dealer sold it for.

Thanks for your replies guys,
Let me address the options and questions above:
@ Crossroads:

  • Motors need to move both forward and backwards, and a dual H-bridge is definitely the way to go
  • The control circuit attempted before relied on some output mosfet controlled through PWM. (as far as I can tell from the schematics)
  • The motors are 24V and so will run on two batteries.

@Zoomkat:

  • These are to be manufactured and used in Lebanon where no regulations exist for such devices

@Jackrae:

  • Brakes are to be fail-safe of course. I'll look into the very pertinent point of being able to manually disconnect brake and gearbox, thanks for the tip
  • So a feedback circuitry is therefore optional, good news.
  • Ready-made joystick modules are already identified, but future plans are to fabricate them in-house.
  • Thanks for the heads up on reverse speed.
  • There are no wheelchair graveyards unfortunately, so we rely on the half dozen different defective wheelchairs we have hoarded through he years to derive something practical and workable (budget is tight at best)

@Daniellyall:

  • We have previously contacted manufacturers and got some good deals, but with the low local labor costs it makes more sense to have some non-proprietary design that would make troubleshooting, maintenance and repair in-house a viable option. (replacement parts on these devices often end up costing more than a new module...)

So, If I'm understanding things

  • Stepper motors do not offer any advantage?
  • PWM control for DC motors?
    Am I right so far?

one other thing you could do is try and get the contract for fixing electric wheel chairs this will give you lots of spear parts that you will be able to recycle. then you will be able to do both low cost and high cost chairs. also if you have not done it yet just find the manufacturer of all the parts the go on these chairs. for some of the things I make I buy from the factory direct it saves me a lot of money like 1/3 the prices sometimes even less. that's also why I use arduino stuff its not a rip off.
you need to do all of what jackrae says to do, you will need uno, joystick board, motor control board, screen if you wont different speed settings (select from list) or just a switch, some way of engaging and disengaging breaks and the same with the motors.

These are to be manufactured and used in Lebanon where no regulations exist for such devices

Do you already have a somewhat standardized non powered wheelchair being built? If so, then I would look at making an add-on pack for these chairs. You might be able to use simple friction drive setups on the existing wheels and self centering DPDT on-off-on toggle switches for the motor control. Something a local fix-it person would understand and be able to maintain.

One thing I should have mentioned about brakes.

They do not need to be "progressive" since the joystick control is used to reduce chair speed. If the controller is designed with regenerative braking then simply reducing joystick setting will provide a braking effect.

On standard electric wheelchairs the brakes comprise a rotating friction plate (splined to the motor shaft) and a floating static plate. The floating static plate is moved by action of a solenoid coil against a reaction spring. When the clutch is disengaged (solenoid coil energised) the motor shaft is free to rotate. By this means the brakes are either fully ON or fully OFF.

@ Zoomkat,
We actually do have a standardized non-power wheelchair being produced in-house, but since it was designed from the ground up to be as simple and light as possible, adding the electrical hardware to it would be tougher than designing something new. .

@Jackrae,
Thanks for the information about the braking system, it helps simplify things a lot.

For the breaking mechanism, there's one point that remains kind of vague to me:
Since breaking is the on/off type, how would we be able to slow down the wheelchair before the breaks get applied?

Everyone's input is highly appreciated. Thanks for chipping in
Regards

Generally the motors are connected to the wheels via worm drive gearboxes. This design of box is not capable of "over-run" if the gear ratio is high enough. By this I mean the chair wheels cannot turn the motor by driving back through the gearbox. Hence by simply demanding less speed on the control the chair slows down (just like brakes) Once power is completely removed the brakes automatically apply. Note that you will need to build in pre-set acceleration and deceleration rates into your electrical controls such that the chair cannot do a "wheelie" if the joystick is rammed fully forward and conversely the chair does not come to an instant stop if the joystick is either released or pulled fully back.

We actually do have a standardized non-power wheelchair being produced in-house, but since it was designed from the ground up to be as simple and light as possible, adding the electrical hardware to it would be tougher than designing something new. .

Below is a DIY mobility chair. Bottom is an electric window motor that might make a drive motor. I think I a drive add on pack powered by a rechargeable electric drill could be made.

http://www.allelectronics.com/make-a-store/item/DCM-572/12-VDC-AUTO-WINDOW-LIFT-MOTOR-RIGHT-HAND/1.html

With traction motors you have to be able to handle high loads for sustained
periods without overheating, something that most occasional-duty motors
like this won't handle.

You also need some real grunt (ie power) to handle slopes and rough surfaces.

Indoor only use will be a lot easier on a motor, it is true though.

I will make some specific comments and give you a couple links to things you may find interesting to read.

(1) braking. The solenoid brakes on wheelchairs are indeed On/Off and are used ONLY as parking brakes. Braking while driving is provided by dynamic (i.e. regenerative) braking and the parking brake coil is de-energized only after the H-bridge has gone to 0 for some time (often programmable so that it can be adjusted to avoid having the parking brake engage before the chair has stopped moving, but so that the chair doesn't drift too much if stopped on a slope).

(2) Wheelchair controllers. On most modern powered wheelchairs the controller is not just an H-bridge, many safe-fail and fail-safe features are built in, and there's usually at least a joystick pod and a separate motor controller. On some of the simplest chairs, everything is in one box, and on the more complex ones there may be several additional modules, such as for lights or seating actuators. In most cases modules are connected together over a CAN bus, with each control system manufacturer having its own CAN protocol. They are expensive and definitely not open source. Designing high current motor controllers and safe wheelchair controls is not trivial - a major automotive electronics company tried, had their units adopted by some WC manufacturers, but their controllers were so trouble prone that they are no longer around.

(3) Add-on units have been marketed, and I think there is one on the market even now, but they have not had a very successful history. That is not to say that a workable add-on couldn't be designed, just that the ones produced until now have left a lot to be desired. All of them have been slow, none have offered decent control feel, and they've suffered from other problems as well. Friction drives, for example, often leave one stranded as soon as there's a bit of rain.

(4) If you are aiming to make a slow chair and can make do with not having proportional control, just forward, back, left and right, consider wiring a pair of SPDT relays (for each motor) as H-bridges. Proportional control is certainly much more pleasant, but you might be surprised how well some people can drive without it -- and some people have no choice in the matter as they need to use switches of one sort or another to drive because they can't use a joystick. You would have only one speed in each direction, and braking (by shorting the motor) would be pretty abrupt (that's why this is workable only for slow chairs), but a total of four relays driven by some transistors from four digital pins are certainly cheaper than high-current PWM bridges.

(5) You need to plan on handling substantial currents. Even a very slow indoor-only chair will need a controller with at least 40 Amp per motor output , and outdoor capable chairs, or chairs that can handle heavy users, or ones that go any faster than 6 km/hr will need a lot more. Typically, a 10 km/hr chair with some outdoor capability will have an 80, 90, or even 120 peak Amp/channel controller. Also, you must plan for voltages much higher than the nominal 24V of a pair of batteries; especially during regeneration voltages can go quite a bit higher, say 36 Volts. You might want to take a look at the Pololu motor controllers and see which ones they say are suitable for 24V systems; only a minority of the ones they sell are.

(6) http://www.wheelchairdriver.com/ and its associated forums are a good place to learn about wheelchair design and to meet people who have been building do-it-yourself chairs. For the most part they are working on high-performance or very personalized projects, but there are people there with plenty of hands on experience with the mechanical and electrical side of things, and some people with substantial electronics and/or programming skills. My own feeling is that if you jump in to designing something before you have a good idea of what you want the chair to be capable of, you will be very disappointed.

(7) For some time now I have been working on an Arduino-based open-source, open-hardware CANbus wheelchair controller (NOT the motor controller; for that I intend to use a hefty Roboteq unit). You will find several pages of discussion, code for several modules as well as circuit board designs (each with several revisions as problems were dealt with) at Multi-node CAN bus: a progress report - Project Guidance - Arduino Forum This project is still a ways from being finished, and I'm taking things slowly and carefully because I'm very concerned about the safety issues involved (my daughter will be using the prototype). I'm also having to learn a lot as I go along as I am a geneticist by profession (now retired) and only an amateur for everything else. Nevertheless, it might give you an idea of how this kind of design evolves.

I applaud you for taking this on. Powered mobility can be a very liberating thing and there is certainly need to bring affordable powered mobility to places like Lebanon. Do be prepared though to make a major investment of your time so that you can make something that people can really use and use safely.

Ciao,
Lenny (Siena, Italy)

P.S. If you can get at least one chair to strip down and see how it is built, that might really help. Unfortunately, used chairs are only going to be available in places where a fair number of people have power chairs, which is clearly not the case where you are. It's also not the case here in Italy where powered wheelchairs are rather few; in Siena with a population of about 40,000 I think there are no more than 6 people using powered chairs. They are also heavy to ship. BUT, if you can find some reasonable way to get a chair or two from the U.S. or U.K., you can probably find some (even on e-bay) at reasonable prices so that you can see how they're put together (often not really very well) and how they are controlled.

We actually do have a standardized non-power wheelchair being produced in-house

Probably would be best to show a picture of the current wheel chair you are making, and what you expect the motorized chair to be able to do. Also what is the parts availability?

Hi Lenny,
Your comment are very much appreciated and duly taken into consideration.
I've taken on this project as a favor for the NGO i'm working with because they have been stuck with a non-working control module prototype that has been designed by a local university for the better part of 6 years now.
The NGO specializes in helping people with reduced mobility in leading a decent and fruitful life, and this was for me to get on-board and try to help.

I've spent the Christmas holidays at their workshops (where 90% of the workers are on wheelchairs) and listened to their comments, feedback, wants and needs in order to better understand how they expect their wheelchairs to perform.
What has transpired from these exchanges is that:

  • A PWM module is a must, because acceleration and deceleration need to be well controlled.
  • The motors used require peaks of 60 amps for a couple of seconds and 20-30 amps while cruising on a slope.
  • The maximum speeds and accel/decel profiles need to be adjusted for each individual, depending on their case, handicap and overall mobility requirements.
  • More thinking needs to go into controlling the wheelchairs on upward and downward slopes as this will impact the control algorithm.

So now, the next step is to:

  • Find a suitable yet well priced PWM driver board that would fit our needs.
  • Start working on the arduino sketches and try to make it work.

Any input is highly valuable.
Thanks again for everyone's input

P.S: should anyone need access to the arduino sketches or any other information, please do let us know, we mean for this to be a truly open source hardware and software project.

Has anyone mentioned the open source motor controller project yet?
http://www.robotpower.com/osmc_info/

Dear Hajj,

I'm glad your still working on this and pleased to see pretty clear specification of what kind of controller you need. I think that there are three avenues you might explore, so I'll take them up one by one. There'll be two messages because this will take more than the 9500 characters allowed in a single message.

**(1) Do it yourself. ** This seems to be what want to do, but I think it may not be the best way to go. You wrote:

  • A PWM module is a must, because acceleration and deceleration need to be well controlled.
  • The motors used require peaks of 60 amps for a couple of seconds and 20-30 amps while cruising on a slope.

As wheelchair controllers go, that is a basic level of output suitable for a chair going no more than say 7-8 km/hour on relatively smooth terrain. Many wheelchairs do use controllers of this type, but faster chairs, chairs for heavy users, and chairs that have to handle the outdoors often have more powerful controllers - top-of-the-line commercial controllers at the moment provide up to 90-110 Amp for several seconds, adequate for 10 km/hr with a heavy user and perhaps 12-13 km/hr with a very lightweight driver.

However, even a 60 Amp PWM controller is not an easy thing to engineer, especially when the person riding that chair can't get off and walk away if something goes wrong. Not only must it have low resistance MOSFETS and enough of them to handle the current, at a minimum it needs run-away protection, brake control (about 1Amp at 24V for each brake), overheat protection, under and over voltage protection and you CAN NOT use the chair frame as part of the battery circuit as you would in a car and you MUST make sure that there are no low-impedance connections between the electronics and the frame. The PWM is going to be switching high currents to (and from) an inductive load. Transient protection is not trivial for this, nor is keeping electrical noise to a reasonable level so that it doesn't drive the microcontroller crazy. Even the circuit boards are very different from the 1 oz copper boards used for low power circuits. You need lots of copper, good isolation and excellent heat sinking if you expect it to work for any length of time. You already have a controller that doesn't work, you don't need to create another one, so a lot of study is going to be needed if you want to go this route.

You wrote:

  • The maximum speeds and accel/decel profiles need to be adjusted for each individual, depending on their case, handicap and overall mobility requirements.

This would be handled in the microcontroller, again with a lot of attention to safety, but it is not nearly as difficult an engineering challenge as the motor controller. Other things to consider for the algorithm are how to mix X and Y joystick outputs to get left and right motor power, an adjustable deadband for users that might have a hand tremor, different speeds in forward and reverse, turn rate, turn acceleration and deceleration, variable exponential curving so you can have fine control near stick center and increased response with large joystick deflections. There's a good discussion of chair programming on the WheelchairDriver web site. As noted there, the best control for those who have good hand coordination comes with turn accelerations/decelerations maxed out, but turn rates reduced way down. If acceleration is turned down, the delay between control input and response can make the chair very difficult to control and easy to over-control. It sets you up for what in aviation is called a "pilot induced oscillation".

Lastly, you wrote

  • More thinking needs to go into controlling the wheelchairs on upward and downward slopes as this will impact the control algorithm.

Most wheelchair controllers do this by using what's called IR compensation. As mechanical load on a motor increases, the current flow increases as does the back EMF. That back EMF, which is current x (motor + wiring) resistance is then used as FORWARD feedback to increase PWM on time. Notice that this is a potentially unstable situation; the more PWM is boosted, the more current flows, when PWM increases current goes up, then PWM again increases and so on. Hence, a fraction of the motor resistance is experimentally found that gives enough boost for decent control, but not so much that the chair is "nervous" (or in the worst case actually takes off on its own). One might start out with 0.7 * resistance (in the 50-300 milliohm or so range) * motor current, and then adjust in small increments to get the response needed. If you don't know the motor resistance, you have to start with a very low value, and work cautiously up from there. Set up well, motor compensation will let a chair go at fairly constant speed as slope changes, and keep going reasonably straight if one wheel hits a bump -- at least until your controller runs into its Amp limit or the motor just can't produce the needed torque. The only hardware needed is a good way to measure actual motor current: voltage across a shunt or (better) a Hall-effect current sensor. Take a look at the data sheet for the Allegro ACS758 family of current sensor ICs, particularly the board layout, to get an idea of the engineering involved in working with these kinds of currents.

A less common scheme is to use sensors (gyroscope, or shaft encoder etc.) and closed loop control. This can give very constant speed and direction, but is more complex and more expensive.

(2) Use a commercially available generic motor controller and add your own microprocessor control. I think that this is a more feasible approach, but might still not be the best way to go. MarkT suggested looking at Robot Power OSMC Project Info, and I agree that would be a good idea. What you will see is that very few the control boards they sell would be workable for you. First off, none of the controllers for "up to 28V" are suitable, even though the battery is nominally 24V unless you block regeneration - the motor acting as a generator when decelerating or going down hill. Voltages generated during regeneration can easily go to 32V or more, and you really don't want to prevent regeneration because it is what gives a chair controlled deceleration and also adds to efficiency. So, the OSMC store controllers that can handle 60Amps are just two: the Vyper and the OSMC. Both have far more current capacity than you need, and they are not cheap. Each one is just one channel, so you'd need two, hence $400 for two Vypers, or $440 + fans for two OSMC. Even then, you would have to design and engineer the safety controls that are needed on a wheelchair controller.

Another possibility, are some Roboteq products. http://www.roboteq.com/index.php There are a few people using these on wheelchairs because they want higher power than commercial wheelchair controllers produce, or want to move to higher voltage LiFePO4 batteries, or want open-source programming (and can't, as individuals, get full access programmers for standard WC controllers). The Roboteq NextGen series of controllers already has many of the safety features built in, or programmable, though at least an external high-current contactor has to be added to meet the minimum safety requirements for a wheelchair. Most people experimenting with these for wheelchairs are using the HDC2540 which is a dual channel, 150 Amp for a full minute controller that costs $645. At least one person is experimenting with brushless motors and a Roboteq dual channel brushless controller. For your specs, the MDC2460 (60A/channel for 1 minute) costing $395 is one to consider. You can download their user manual, spec sheets and software to get an idea of the work involved in making safe use of these for a wheelchair.

--- continued in next post ---

-- continued --

(3) Commercial wheelchair controllers. I know that you don't want to go this route because you want to have something open source, but I do think you should still consider it -- at least you would start out with something that you know is safe. If it's the high retail prices that are keeping you away from these, please be aware that the wholesale prices, and even more so OEM prices, are far, far lower than retail. For example, 18 months ago I bought a Dynamic DX 80A/channel power module from the U.S. distributor (Rosstron Inc.) and it cost $495. (I live in Italy, but Dynamic sells only to manufacturers in Europe and will not sell to an end user. In Italy I would have to buy from a dealer at retail; Rosstron's price is far better.) That's already cheaper than going route (2) once the safety stuff is added. Since your NGO is already a wheelchair manufacturer that now wants to add power chairs to the manual product you already make, I suspect that you can open an OEM account with either Dynamic or the other major WC controller manufacturer (P&G Controls) and get pricing even better than that. Moreover, as an OEM you would also be able to get OEM-level programming access (I do too, even though I'm not a manufacturer; I got mine directly from Dynamic engineering, but Rosstron will sell the OEM dongle to individuals who are technically competent; wheelchair manufacturers will not) which will allow you to adjust virtually every parameter of the controller. Thus, I would urge you to write to both Dynamic and P&G, outlining the specifications you need (both have simpler, cheaper models than the DX), asking them to suggest which of their products best meet your needs and telling them that you would want to purchase one unit and OEM programming access for evaluation purposes, but expect to be producing xxxx chairs per year. If you write the technical part, and an "official" of the NGO co-signs the letter, I suspect that you will get positive responses from them. When you have that information you will be in a position to make a truly knowledgeable decision between approaches (1), (2) and (3).

Ciao,
Lenny

Seconded re Roboteq, I know someone building a powerchair using one of their
controllers (inspired by Burgerman's designs: POWER WHEELCHAIRS and ADAPTED MOBILITY VEHICLES)