Author Topic: R/C Wheelchair PWM to Analog  (Read 4834 times)

0 Members and 1 Guest are viewing this topic.

Offline wingnutTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
R/C Wheelchair PWM to Analog
« on: May 02, 2009, 06:59:00 AM »
I am preparing to start a new project and was looking for some pointers before I get to far in my design. The concept is your standard R/C wheelchair. I have found much information on the conversion to R/C, but they all involve the purchase of a new motor controller. I have a functioning Merits chair with its PG controller, and I am having a hard time just throwing this perfectly good controller away and starting with something new. The question I have involves the attached spec sheet for the controllers joystick. I would like some suggestions for a component (pre-made or DIY) that would receive the signal from the R/C receiver and take the place of the chairs joystick for input to the chairs controller. I am new to circuit design, but would like to learn and this is my opportunity.

Would a programmable chip be the best bet or discrete components? I would like to do this as efficiently as possible, both in terms of cost and circuit design. If anyone knows of something that exists, or an example I can learn from, I would be very grateful. Thanks. Anxiously awaiting your suggestions.

--wingnut

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: R/C Wheelchair PWM to Analog
« Reply #1 on: May 02, 2009, 07:10:59 AM »
if the joystick uses pots you could stick a servo on each pot axis and have them do the job?
Howdy

Offline wingnutTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #2 on: May 02, 2009, 07:27:44 AM »
SmAsH,
Thanks for the reply. I was hoping to go servo free.
How I see it in my mind:

R/C Receiver Output (PWM?)--->Input of new circuit (conversion to required voltage per joystick spec sheet)--->Circuit output to controllers input (taking the place of the actual Joystick)

Conceptually it seems pretty simple (If you know what your doing), but I am pretty new to this. From what I have read this is just Digital to Analog conversion. What I am wondering is what components would address this in the most efficient way (smallest form factor, fewest number of components, ....).

This would be a 'Tank Steering' setup, from what I have read would require mixing of the 2 channels. I plan to accomplish this via the R/C Transmitter with built in mixing. If I understand this correctly it will allow me to control the chair via 2 channels on the transmitter, but only 1 stick. If I am not understanding correctly please let me know. Thanks.

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: R/C Wheelchair PWM to Analog
« Reply #3 on: May 02, 2009, 07:51:25 AM »
Welcome to the forum Wingnut :)

So the motor controller takes an analogue voltage in from the joystick. The way i would approach this problem would be to use a microcontroller (PIC or AVR) to analyse the input of the R/C controller and then output the corresponding analogue voltage (which i guess is what you are hinting at...). The problem with this is that creating analogue outputs is notoriously difficult. There are a few methods - PWM with a smoothing RC circuit, R-2R resistor ladders, or using a digital-to-analogue IC are amongst the most common. You could take a look at those.

Another possibility is to just input a PWM signal straight into the motor controller, without prior conversion to a steady DC voltage. This depends on the electronics of the motor controller... It should work though.
If that will work, then you could use a microcontroller to convert the PWM from the R/C receiver into a suitable corresponding PWM for the motor controller.

Another approach would be to look at the controller - if it has a stage where it converts the joystick's analogue output into a PWM, you could bypass the MCU on the controller with some clever soldering.

Or you could use Smash's idea and just connect the joystick mechanically to some servos controlled by the r/c receiver. This would require almost zero electronics skills, and more mechanical skills. Actually i think i'd use this idea... its so easy :P

Hope that helps

EDIT: just re-read it... the wording is terrible :P Feel free to ask me to explain in more depth
« Last Edit: May 02, 2009, 07:53:47 AM by hazzer123 »
Imperial College Robotics Society
www.icrobotics.co.uk

Offline wingnutTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #4 on: May 02, 2009, 08:24:10 AM »
Thanks hazzer123,

I plan to look into the controller later today. I was hoping that I could interface the controller in the least intrusive way possible. In theory I would only need to connect to it via the connector the joystick uses. This seems like such a simple concept and so many people are attempting this in some way, I would think a product would exist to accomplish this. I would love to tear everything apart and use the Sabertooth 2X25, but the controller is fine, it does the mixing, is tuned for motors, incorporates the charging interface, provides diagnostics, and interfaces with the electric brakes. Yes the Sabertooth would address the R/C interface issue, but would also create new issues that would need to be addressed. I guess I would like to work on a solution that would apply not only to my project, but benefit others as well.

If a 'Universal' interface circuit were designed it could apply to a variety of controllers. I have read of controllers that operate on the same concept, but the required signal voltage is 12Vdc as opposed to the 5Vdc for this controller. Could the circuit be designed so these values could be easily changed?

I will also look into the direct PWM you suggested. I guess I am just trying to approach this while keeping the big picture in mind and not just this particular project. As for the mechanical approach, I know I could easily accomplish this, but I really wanted to avoid the bubblegum and band-aid approach. ;D

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: R/C Wheelchair PWM to Analog
« Reply #5 on: May 02, 2009, 03:56:47 PM »
as hazzer said you could probably create some kind of analogue voltage that would just replace the joystick... do you know where the wires from the joystick pots go to? if it only uses one wire to read voltage it will be easier for this method.
Howdy

Offline johndavid400

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #6 on: May 25, 2009, 07:35:06 PM »
The RC signal is actually a PPM signal. It sends a 1-2 ms pulse every 20ms. The length of that pulse determines the value of the RC (PPM) signal. So you have to measure the length of the pulse with a microcontroller every 20ms.

you could use an Arduino (avr microcontroller) to interpret the RC signal from your Rx and then translate that into a PWM signal to control a high-powered H-bridge. I went through the same thing, trying to control 2 wheelchair motors (appx. 350watts each) for an RC controlled lawn mower with a tank drive steering setup. I accumulated some code to translate the RC signal into PWM using an Arduino, but have yet to locate a good high-current H-bridge IC that can handle upwards of 20amps. I have decided on using the Sabertooth 2x25 since it will make things so much more simple for $125. But I use this code to play with cheap RC cars from the thrift store using my Arduino and it works very well (with the small > 2a H-bridges that I've tried).

here is a thread with my Arduino code:
http://www.ladyada.net/forums/viewtopic.php?f=25&t=11119


Offline Mack6225

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #7 on: May 01, 2013, 06:28:52 PM »
I am starting a similar project (Jazzy Select) and thanks to your tech sheet (i have the same exact controller as described) I'm going to use arduino uno. first analog read to prove the voltages on each channel then configure analog out to the joystick controller.  so i keep all the functionality of charger & brakes etc.

basically no cost since i already have all of these components

If we could keep in touch to update each other on this project please do email me. I'll email you asap - i gotta get out of here before they lock the doors.

cheers

Offline Duane Degn

  • Jr. Member
  • **
  • Posts: 40
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #8 on: May 01, 2013, 09:14:09 PM »
I agree with those suggesting keeping the original motor controllers. Those things can be pretty expensive for motors this size.

I'd go with the trying to simulate the output from the joystick using some sort of DAC. Reading the pulses from the RC receiver is trivial, the challenge will be getting the voltage output your controller will accept.

Do you know what voltage the pots in the joystick are using? If it's 5V then an analog write from an Arduino might be all you need. There are also dedicated DAC chips that should give a very clean voltage if your controller doesn't like the PWM from the analog write.

Here's an 8-bit DAC that lets you output a voltage twice as high as the voltage it's running on.

https://www.sparkfun.com/products/9719

Here's a 12-bit DAC.

https://www.sparkfun.com/products/8736

Both of these should be relatively easy to control from an Arduino or other microcontroller (my favorite uC is the Propeller). You'll need two DACs to simulate one joystick (since each joystick has two pots).

If your joystick is using 12V, you many need to use an op-amp to increase the voltage range (I think you'd use an op-amp, I'm don't know a lot about them myself).

Do you know how many channels you want use on your RC controller? The number of channels to read and the other tasks your robot needs to perform may effect your choice of microcontroller.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: R/C Wheelchair PWM to Analog
« Reply #9 on: May 01, 2013, 11:04:02 PM »
The joystick is not a voltage, it's a resistrance. If you're lucky, you can cut into the wires at the point where the voltage has turned into a resistance, and use a voltage output. (If you use Arduino analog out, remember that that's a PWM and needs significant filtering!)

Here's an option: A digital potentiometer!
http://www.digikey.com/product-detail/en/MCP41050-I/P/MCP41050-I/P-ND/362080

There are actually a bunch of those, with different resistance, different interface (that one's SPI; there's I2C, step/direction, etc as well) as well as multiple pots in a single package.


Btw: Each time I post a digi-key link in this forum, I get a permission denied, saying my computer has a trojan trying to make a request entity attack. The only reason for this is that the URL that I paste contains "% 2 F" (without the spaces) which is an escaped slash character. Clearly, that's a legit use case, so can someone please turn off that behavior?

Offline Duane Degn

  • Jr. Member
  • **
  • Posts: 40
  • Helpful? 0
Re: R/C Wheelchair PWM to Analog
« Reply #10 on: May 02, 2013, 09:47:04 AM »
The joystick is not a voltage, it's a resistrance.

Each of the pots acts as a variable voltage divider with the output voltage on the wiper tap.

After reading the datasheet from the top post a bit more it looks like the joystick uses a 5V supply(VS). There's a 1/2 VS tap to compare the two outputs against. The two output pins of the joystick output a voltage of 2.5V (assuming 5V VS) +/- 1.39V. So the output pins' voltage can be from 1.11V up to 4.39V. The datasheet includes a graph of this range.

Hobby servos usually have a 5K ohm pot inside. It turns out this 5K ohm value isn't important and a servo will work just fine with a 10K pot since a servo uses the voltage from the pot's center tap to determine its position. A 10K pot wouldn't work if the resistance were the important characteristic. I'd be very surprised if the chair's controller didn't also use the voltage from the pots wipers' to determine the pot's (joystick's) position.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: R/C Wheelchair PWM to Analog
« Reply #11 on: May 02, 2013, 12:20:25 PM »
Of course there's a voltage at some point further down the chain. The joystick itself (the mechanical part) is not a voltage source, though, it's a resistance that implements a voltage divider. If you want to replace the joystick only, you need a controllable resistance. If you are OK with going further down the line in what you replace, clearly you can use a voltage source replacement, at least as long as the impedance of your voltage source is equal to or lesser than what the downstream control circuitry expects.

Regarding using a different resistance in a servo feedback potentiometer, yes, it will "work." Often, if you're close enough, it will even "work well." However, if the resistance of the potentiometer you choose is significantly higher than the design resistance, then the source impedance of that voltage divider will be too high, and the comparator input stage in the servo will not be sufficiently driven, and you will end up with any or all of slow response, excessive noise, or unreliable input. If the resistance of your replacement pot is too low, then the pot will draw more current than needed, and add some heat build-up, although you'd need to go pretty low (< 1k, say) before that would be a real problem, unless there's a very marginal regulator feeding the potentiometer.

Offline Tommy

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 3
Re: R/C Wheelchair PWM to Analog
« Reply #12 on: May 02, 2013, 06:24:21 PM »
Quote
I have a functioning Merits chair with its PG controller
I'v found the analog voltage of the P&G drives to be 1.0 to 4.0Vdc  with 2.5V as center,
if the voltage goes outside of these values the drive will go into Fault mode. also If the
drive is turned on with out the center value(2.5V) it will also go into a fault mode.

Tommy

Offline jlizotte

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 2
Re: R/C Wheelchair PWM to Analog
« Reply #13 on: May 03, 2013, 09:21:09 AM »
Sorry for the late response (I've been seriously busy), but I'll second what Tommy said.  I tapped into my joystick and used and Arduino to supply the voltages. http://www.societyofrobots.com/robotforum/index.php?topic=16752.msg117794#msg117794. Two other things I came across: I needed to make sure the Ground from the joystick was also connected to my Arduino ground. Without the common ground, my controller would seem to initialize fine, but as soon as I issued a motor command, it would error out. I also needed to add a low-pass filter (thanks, jwatte) to eliminate some other random faults.

One other important point that I learned. Don't turn your wheelchair motors on before your controller. And turn them off before turning off the controller. When I shut down or reboot my Arduino, the voltage goes low, and the chair controller interprets this as a command to move. The motors run for at least 5 or 10 seconds before it errors out when this happens.  Unexpectedly. Just FYI. Be ready for that, just in case.
« Last Edit: May 03, 2013, 09:23:45 AM by jlizotte »

 


Get Your Ad Here

data_list