Quote:
Originally Posted by EricS-Team180
I would add d) drive motors (like CIMS) do not run at the same speeds forwards vs backwards for the same absolute value of PWM request. So many robots have a tendency to have a drift to one side. (lots of threads about that out there in SEARCH-land I bet) Adding a small constant bias solves many of the effects of a + b + c + d.
|
Seconding this. Even a few percent bias is enough to be noticeable while driving - something we've seen every single year.
If you have an oscilloscope handy, you can actually see what's really going on:
The Jag outputs a PWM signal to the motor - Essentially, it never gives the motor 10V, or 8V (unless that's what your battery is at). Instead, it'll oscillate between a high and low voltage, and the width of the pulses averages out to be 10V, or 8V, or whatever you want.
When hooked up to a motor, the motor essentially does the averaging for you. So if you hook the scope or a multimeter up to a Jag with a motor attached, your going to see the output voltage you expect for the speed its going. On the other hand, if you remove the motor, you'll see the actual square waveform on the scope.
We've done this demonstration on our team (we were fortunate enough to have an old scope donated last fall by our primary sponsor). It's very clear that for the same speed forwards and backwards, the waveforms are simply inverted images of each other.
The issue comes with the motors - they have a forward bias. In other words, they prefer to run forwards. As a result, you'll see the robot drift to one side, since the motors running in reverse are running slightly slower.
Don't believe it? Here's something any team can do with what came in the KoP:
- Hook up the nice rotary encoders we got from US Digital to 2 CIMple boxes.
- Hook a motor up to each CIMple box.
- Place some sort of load on the output shaft of the CIMple boxes, (a flywheel, a pully lifting a weight, something). We don't want to just let these run at free speed with no load.
- Run the motor leads together, but switch polarity - red from one motor meets black from the second motor, and vice-versa.
- Hook the encoders into your digital side car, and that up to the cRio.
- Set them up in code to read out the speed or distance.
- Hook the CIM motor leads directly up to power, with no speed controller between them
- Run the whole thing, and look at the encoder output - you should see that one is running faster than the other!