# Encoder Question

This is probably a stupid question but, if I am directly powering each motor, do I have to have an encoder on each motor? Can I still have good autonomous runs with one encoder, say on the back wheel, and no encoder on the front wheel.

Let me know!

While not absolutely necessary I would suggest at least one encoder on each side. If you only have one encoder total you may encounter issues with slight turning but with one motor on each side you just run the sides together and the encoders give you the amount of rotations done by that sides wheels.

The thing is the wheels are not chained or geared together. So if I stick on encoder on each side, it will still work?

Back wheels are powered by motor with no encoder (on each side)

Wheels are not chained, or geared together. Will having just the encoders in the front be fine to program nice solid autonomous routes?

You will want to ideally measure the effect of each driven wheel. It would help to describe your drive train a bit more - 2 wheel or 4 wheel drive, all the same motor type?

If you are always driving all four wheels the same rate, you could get away with no encoders but on one wheel. But it’s shaky. If you have all wheels driven and perfectly turning on the pivot point, then each wheel is supposedly truning the same distance to turn 90 degrees.

Also, If you have different rates of power to the motors, you can’t use this and need more sensors.

If you are two wheel drive, you will want to turn I imagine. When you turn one direction, the outside wheel travels further than the inside wheel.

So on your 2 wheel drive point turn, that inside wheel does not move at all. So if you measured just one back wheel, how far do you need to turn if it’s not moving at all? Also, the error rate of measuring just the inside turn wheel is greater than the outside wheel.

Alternatively you could measure your turn with just a gyro and only measuring straight lines with an encoder you might get away with it. But your position may not be where you thought it was without feedback from another sensor.

Also no matter if you are 2 or 4 wheel dirve, while driving straight, in order to keep yourself straight as you drive along, you want to compensate when you see you are not going exactly the same distance you expect from the left & right encoders. You then could adjust power accordingly to get yourself back to straight. Layer in a gyro and you get nice and complex (who wins? gyro or encoder?).

Shouldn’t be an issue because you will know the distance traveled by both sides and just the front or back wheels wont be strong enough to move the robot so the robot wont be able to move without at least a side being powered.
So yes you should be able to program good autonomouses, autonomi, with that set up but you should still test it just to be sure something doesn’t go wrong.

You can get away with one encoder - the solution is a gyro. With a gyro your turns will be so accurate an encoder will not be necessary. Use an encoder for your straight driving (I can post how to use a gyro+encoder to drive straight as well), and use the gyro for turning.

Hey Giga do you actually use gyro in vex because I don’t remember seeing one on your robot last year? I might have just missed it but they do look kinda obvious.
Do you plan on using a gyro this year?

I will definitely use a gyro this year. I used it on a separate robot last year. The separate robot would, with the press of a button, use a proportional loop to remain facing “straight.” (whichever orientation it was in when the button press started) The robot had a 2.75" omni wheel that stuck out six inches from the robot - it could remain perfectly straight while strafing with a single motor on that wheel (or if someone decided to kick it). You will see minor drift eventually, but the benefits that come with the gyro outweigh it completely. I highly recommend using a gyro, even with all of the lines on the field.

OK, the drive train is a H-holonomic drive. The reason we are doing an H-holonomic drive, rather than a Mecanum drive, is that the mecanums are really big, and we wanted to have our intake at least 11" wide to gobble up the center stack.

Do you plan to use the old red quad encoders or the new integrated motor encoders?

With regard to gyro sensor, shouldn’t the robot wait for about two seconds while the sensor is being initialized? Doesn’t this loss of time put your robot at a disadvantage during the autonomous period? For example, the opponent robot could get to the yellow sack under the trough while your robot is sitting on the starting tile waiting for the sensor to be initialized.

The new integrated motor encoders.

The gyro initializes before autonomous. You will have to make sure the robot is sitting still when you power on, but it will not take time off your autonomous routines.

One encoder per side is fine. The encoders should go on the back wheels because front wheels have a much higher tendency of “slipping” - wheels are turning, robot is not moving. When you run into a sack and a front wheel slips a little bit, your whole routine will be off.

Ideally, you chain the two wheels together so that your counts don’t go off and so that you don’t lose drive power when a wheel slips.

As long as you test your routines, it should be fine. If your robot is turning or moving at all, then both of the encoders can measure the movement and there will be no ambiguity in what they record.

Good to know. Thanks.