Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Consistent motor output with TReX driver without use of encoders

My name is Jason Greenberg, and I am an Electrical Engineering PhD student at Michigan State University. I am currently using a Pololu TReX Dual Motor Controller DMC01 for R/C motor control the 4 motors in the A4WD1 Combo Kit for PS2 (BotBoarduino)(http://www.lynxmotion.com/p-861-a4wd1-combo-kit-for-ps2-botboarduino.aspx ) rover robot from Lynxmotion for my experiments. Each of the 4 motors is a “Gear Head Motor - 12vdc 30:1 200rpm (6mm shaft)” (see http://www.lynxmotion.com/p-93-gear-head-motor-12vdc-301-200rpm-6mm-shaft.aspx). Two motors per side of the robot.

My objective is to get the motor to produce a consistent output each time I run the motor. To elaborate, for my current experiments, I need the robot’s movement to acheive loop closure, that is the robot needs to end up at the same spot where it began. I have attached a MATLAB plot describing this desired trajectory. In this trajectory, the robot needs to make a circle around the grid map I have laid out on the floor. In order to guarantee it ends up at the same spot as its started I have designed the turning portion of the trajectory so that for each of the 2 half-circle turns (i.e. U-turn) the robot should turn approximately 18 degrees and move forward a set distance, repeating this turn and forward combination 10 times.

However the main troublesome issue that the motor output varies depending on the batteries current level of charge. To combat this issue I have introduced a DC-DC buck converter ( see https://www.amazon.com/DROK-DC-DC4-5-30V-Converter-Step-down-Transformer/dp/B00C4QLK52 ) between the switch for the battery and the TReX driver to ensure a constant 12V. With this buck converter I have been able to complete at least half of this trajectory with more or less consistent results, needing to make tweaks here and there.

I should mention that at each of the squares (iterations) that are illustrated in the MATLAB plot of the trajectory I have the rover stop and wait about roughly 88 seconds before moving to the next iteration. The reason for the stop is that during my actual experiment the robot would be stopping at these points for this amount of time to conduct data collection and data communication. It is important the robot is still during these data exchange sequences.

However the problem that I am having is that the motor output is not consistent between runs. For instance during the straight portion of the trajectory the rover is supposed to move 0.5 units forward for each iteration. Without changing this command or reprogramming, for 1 run I can get the rover achieve a forward movement of 0.5 units, next run it would be go below 0.5 units and the run after that it would go above 0.5 units. Similar situation with the turning of the robot.

Do you have any suggestions on how to ensure a consistent motor output? I know using encoders and PID controller are my best bet, however due to the other devices that are on the rover for sensing and communication tasks I do not have enough room to install encoders on to the rover. Should I be using the buck converter or is that making the situation worse?

Thank You for any suggestions


Like you mentioned, having encoders would probably be the best solution for getting consistent performance from your gearmotors. Alternatively, you might be able to use a gyro and accelerometer to track the motion of your robot. Using a regulator for the motor power should help with getting a more consistent performance from the motors, but it sound like that might not be enough for your specific application…


Thank you for your suggestions, I will certainly try them out.