Problems with Autonomous due to motor setup

We are using two drill motors that are facing opposite directions to run a 4 wheel drive chain setup. Problem is that the drill motors run at a different speed in forwards than reverse. So when we try to run our autonomous to go straight into the movable goal, it eventually begins to curve to the right and overshootes the goal after moving it.

Does anyone have any suggestions to our problem?

We compensate by using our encoders on each wheel and ajusting untill its right.

The elegant solution is to have feedback so you can maintain consistent wheel speeds on each side. Banner sensors pointed at gear teeth or at reflective marks on the wheels, or rotary shaft encoders, or magnets and reed switches, or any of a number of sensors can let your software measure the actual wheel speeds. You can have the code adjust the motor drive pwm numbers to keep the speeds the same.

The other “cheap” solution is to figure out what pwm values cause the two motors to run at the same speed, and hardcode them into your autonomous mode software.

We have had friction/ speed problems too. We compensate in the Program. More power to the lagging motor.

[edit/] You beat me by a minute Alan :slight_smile: . [/edit]

Ok, there is a lot of help in these threads, answers below are not all the ways you can do it.

  1. If you can re do drive so moters turn the same way.
    2.If you can’t do that, use the dash board program, monitor under driver control to get values for speed you want and straight at the same time.
  2. Add a gyro chip (search the treaeds for yaw rate or gyro)
  3. Add Wheell or shaft encoders use them and negitive feed back
    The last two require programing and working on the bot at a competition
    #2 would be the fastest to emplement, but the least accruate.
    We had a tank drive last year that would hardly trun on carpet, and with the drill moters driving it as you describe it would not go straight without cutting power to the motor turning clockwise as viewed from the back of the motor.
    The drill motors are set up to drive screws in, so much more power and speed in the “tighten” direction.
    Good luck

actully even feedback is not the perfect solution in this case - closed loop feedback requires an errror condition ( or signal) to build up to a certain point before it makes a correction

so using either wheel encoders or a yaw rate sensor you will still see some error to one side, until the error signal is big enough to apply the needed correction

our bot has the same problem - we use a yaw rate sensor to stay on heading, and it drifts right about 10° over a 2 second period, (while the error signal is building up and appying more and more ‘left’ command) then it goes straight as an arrow

we tweaked the desired heading in the SW and got it down to about 5° - but you cant get rid of it completely - so even with our gyro we have to point our bot about 5° to the left of where we want it to actully go.

It took us a couple matches to get the ‘aim’ down - but after that we were dead on target 100% of the time.

so the really easy solution is to leave your bot alone and figure out where you need to point it so it ends up where you want it.

We just did #1- at the begining of the season, the mech team figured out what motors went fastest in what direction. So we compensated in design.

the quickest and simplest solution is to give the PWM a different number, try 230 as aposed to 255 for the right motor to straighten out your auto mode :cool:

And never, ever set pwms to 255. always use 254 (Plus, with 0-254, 127 is actually center. If you don’t believe me, make a number line, put a finger on 0 and 254, and start working your way to the center)

2.If you can’t do that, use the dash board program, monitor under driver control to get values for speed you want and straight at the same time.

I like this idea - even easier would be to send your p1_x signal to the User output on the OI -then all you need to do is drive your bot so its going straight and look down and see how much ‘left’ input its taking to hold it.

And I forgot do the testing on the “first” carpet that should help reduce the friction issues.