It appears I have the classic one side drives faster than the other problem (right side is faster). I believe this problem is caused because the motors spin faster one way then the other (correct me if I’m wrong). We are using 2 small cims on each side. How is the best way to resolve this problem, put a limit in the program maybe?
I’ve found that the easiest way is a gyro-based feedback loop that corrects for undesired yaw. Almost as easy is a speed-based feedback loop with shaft encoders that keeps the robot’s wheels moving the same speed.
Now that sounds like classic motor BIAS issues. Of course, binding may also be contributing.
Adding velocity feedback or as kaszeta suggested, a gyro would give you a single input to sample. GTS on each side would be a little more complex, but would give you more accurate control. It’s your choice, but it sounds like some sort of feedback is in your future.
While feedback loops are the best way to get perfectly even performance on both sides, if you are experiencing severe undesired turning on a CIM drive system I suspect the problem is mechanical, not electrical.
My understanding is that the CIMs are very symmetric motors and exhibit almost exactly equal performance in each direction. (unlike some other DC motors that are timed for higher performance in one direction)
Check your drive train… gearboxes (does one turn more easily than the other?), chains (differing chain tensions can cause extra drag on one side), sprocket alignment, and bearing alignment for your axles. When you power down and turn the wheels by hand can you feel a different “stiffness” from one side to the other? Is your battery mounted to one side, or do you have other weight distribution differences? That might make a difference, too.
If you have access to a clamp on ammeter (or other convenient means of measuring current), put your robot up on blocks and run both sides full-forward and full-reverse. Does one side draw significantly more curent than the other? If so, that is a sign of a mechanical friction-type problem more so than an electrical problem.
For three years now we have used open loop control with the small CIMs and while the robots have not travelled perfectly straight, they have been good enough to be competitive… once we got the tensions equalized and the transmissions broken in. There is, however, a limit to how good you can go with this, and if you want perfection you are going to need some form of feedback.
Typically we use a single joystick drive (y-axis commands speed, and x-axis commands the turning rate), but the difference between the two sticks should work as well.
I’ve posted sample PID code for the gyro in some other threads, just look at some of my recent posts. Nothing terribly difficult to implement, although it helps to have an understanding of how feedback loops work.
One way you can slightly correct this issue is by putting your robot up on blocks and calibrating your speed controllers, if that doesnt work, you can try to do a more simple P function to correct for the difference between the two motor outputs.
Although, as posted before, the CIM’s exhibit very little bias as produced, small factors such as slight mounting shifts, small binds in the motor itself, and other minor variables will affect the performance of different motors slightly. If the issue is not as simple or noticeable as a bind in one side or the other, you may want to try a different motor pair.
As far as software compensation, as also stated before, try adding a constant in front of you problem motor’s output to adjust.
I would not recommend calibrating the Victors however. If the problem is not a static one, you will run into problems during autonomous, and it can create other unforeseen, mysterious issues. I speak from experience here…
Today we tried doing uploading a single-stick control, just so I could try it out (I was curious as to how it would drive). We had the same exact problem, one side was going faster than the other. This is why we ruled out one-stick driving, it’s very hard to get the joystick perfectly in the y-axis to have even power, however, this probably can be fixed with better programming. If the joystick travels slightly diagonal, then a certain amount of power is applied more to the left motor, less to the right, and vice versa.
Once we switched back to our original tank drive (two joysticks), the robot drives like a dream. I prefer driving this way as well - try using two-stick control and see how your robot handles.
Otherwise it’s mechanical. Test the gearboxes and poke around to see if theres any issues. Make sure the wheels are aligned perfectly with the chain, and the drive sprockets are properly mounted to the output shaft of the gearbox. Also if your chains are really tight, try slacking them up a bit, so they can be a bit more flexible.
All of the above suggestions are great but no one mentioned that wiring might be an issue. If you have desigened the robot with all of your electrical on one side and there is significant length of wire feeding the side that is slow, you may be experiencing current reduction in that motor set. If you are using #12 wire there could be a significant drop in the wire.
We received our 2 kit small CIMs…We looked at them, saw they were CIMs and put them in the locked cabinet until we needed them.
We took them out to mount em up, and I gave each motor shaft a quick twist. The 1st one was perfect, teh 2nd one, was horribly bound up. About half of the rotation was flawless, the other half required a bit of effort to turn. We figured we’d put it in the drive train to see if it would work itself out, but it appears that it may be getting worse. Any comments to this??
sure you can create some crazy algorithm to get both motors output to be almost equal at any given rpm__ because the motor’s difference between the motors changes with the rpm__ but that means that the robot will go slower that full capacity.
also the problem you have can be fixed by facing both motors the same direction then run a shaft paralel to one of the motors and have gears and chains reverse the rotation from clockwise to counter-clockwise
it’s complicated maybe if i get the time ill take a pic of how we did it to show you; and this way you don’t loose any speed
What you describe is usually the armature contacting the magnet structure. There are a variety of causes for this. The most common is dropping the motor which puts a small bend in the motor shaft or shifts the magnet structure a little. Check for obvious signs of external damage. Replacement is the only real fix on this. A good check is to power the motor up outside of your gearbox and then let it spin down by itself. If there is any rubbing of the internal structure it will be evident at this time with noise and intermittant braking.