Speed Control for Balancing Vehicle

I was looking for a speed control to use in my balancing vehicle (like a segway) project. You may have seen in my other thread that I got forward only ones without realizing they were forward only. Instead of trying to make a relay switch really fast, I figure I’ll just sell the one’s I have and get the proper reversing one(s).

http://www.robotcombat.com/marketplace_rsg.html (scroll down about half way to RSGSS 24V 40A Dual Motor Speed Controller)

This is made to plug into a standard RC receiver. I will be needing to control it with a BASIC Stamp.

  1. Is this possible?
  2. Are the signals the same? Or will I need to use Parallax’s PWM Pal?
  3. What about IFI’s pwm signal booster thingy? What does that do?

It is my understanding that this controller has a brake feature that cannot be disabled.

  1. Will it still work in my balancing vehicle or no? Will any special programming have to be done?

  2. Last, if anyone knows of any comparable or better controllers for a lesser price, please inform me. I am on a budget here.

Thanks in advance.

you would want to disable the brake feature in SW by making sure you never output the ‘off’ code (usually 127 on our Robot Controllers)

cause the brake feature is a discontinuity in the control curve of the motor

the victors have a similar problem, you would need to over step the deadband as well - they usually are off from somewhere around 120 to 135 - so you need to compensate for that in the SW as well.

Well, the main problem I see with using r/c type speed controllers is speed. Now, I’m not sure what speed you are planning having your control loop running at, but r/c pwm signals are typiclally 50-60Hz.

  1. Is this possible?
  2. Are the signals the same? Or will I need to use Parallax’s PWM Pal?
  3. What about IFI’s pwm signal booster thingy? What does that do?

First of all use the pulse out command to generate the pwm signal needed to control an esc. The basic stamp’s pwm signal is not the right one to use. I do belive it is possible to control a Segway type vehicle with an hobby esc.
http://tlb.org/scooter.html
Of course this uses a five-hundred dollar esc.

I dont think that will be the limiting factor - I think you will have a hard time finding a motor big enough to drive something like a segway, that has a resonant frequency (frequency response) as fast as 60Hz

the motor core has enough inertia that you might only get a 10 or 20 hz response out of it

so if you are changing the commanded power to the motor at anything faster than that, it wont have time to respond - in otherwords you would be wasting your money on a controller with a 200Hz response rate, if the motor can only respond at 10 or 20 Hz

I’m wondering, how will you get it to ballance? If you are just relying on speed controllers, it won’t work.

I’m using code in a BS2 and gyro sensors

What is the difference between the PWM command and the pulseout command? I’m not a programmer but I’m fiddling a little. I tried my RC car speed control on the pulseout command and it works fine. I’ve yet to try it with the PWM command.

What is the difference between the PWM command and the pulseout command? I’m not a programmer but I’m fiddling a little. I tried my RC car speed control on the pulseout command and it works fine. I’ve yet to try it with the PWM command.

It is a matter of producing the right wave. I don’t believe the PWM command produces a nice on and off signal like the pulseout command does. R/C controllers use that on and off signal to determine the speed of the esc. The only time you would use the PWM command is to produce an analog voltage by attaching a resistor to the pin. I believe Parallax would have more information on it. Also, if you search a little you can find a debate I had with someone on this same topic.

The differences bettween pulseout and pwm are as follows: (don’t have an actuall manual at hand, but this should be correct anyhow)

PWM: outputs a square wave of a given frequency and periond. If you keep the frequency fixed and simply vary (Modulate)the duty cycle (Pulse Width) you can use the signal for various things: driving a motor through a H-Bridge, creating an analog output with a resistor and capacitor between the pin and ground (in parallel).
Note however, this isn’t quite the same as the PWM signal used in RC cars (which is what the IFI speed controllers use). The rcPWM signal has a frequency of 50-60Hz and the duty cycle varies from approx. 1-2ms. Now you could try and use the this to control a speed controller but you would only have about 25 steps of resolution for the rcPWM signal.

PulseOut: Outputs a single pulse of a specified duration. Not quite sure of the resolution (due to the lack of manual), but it will be considerably better for rcPWM than the PWM command.
To use it to control a speed controller (or a servo) you simply need to output a pulse of 1-2ms in width about every 20ms (that doesn’t need to be too accurate). Now while that will still force to keep track of when you have to emit the pulse, it will considerably improve your control of the motor.

Sorry for my long post…(I seem to have a tendency to do that)

Heh, you haven’t been around here too long I guess. That is not even medium. Thanks for the info.

Actually the real name of the rc control signal is Pulse Positioning Modulation. Pulse width modulation is what causes the speed of the motor to change.

Not really. The controll signal for a servo is a PWM signal by definition. The width of the pulse is varied to encode the data. With PPM however, the data is encoded by moving the pulse in time with respect to some reference.

This is also good document on the servo control signal: http://www.princeton.edu/~mae412/TEXT/NTRAK2002/292-302.pdf

I am confused now. I can do a search with PPM and I can get a lot of websites on r/c radio control. Not to mention I have two books that call it Pulse Position Modulation and the acronym PPM is listed on R/C radios being sold.