# more fun with encoders...

Hello again everybody…

My robot’s finished and after some minor problems with software, I’m almost done programming.

I have two encoders placed on the back wheels of my robot so I can drive a certain distance. I’m using 4 inch omni-directional wheels and 4 high strength motors (2 on each side). The programming language is easy c.

The question is this:

Is there a general range of values for encoders that equals an approximate distance with that wheel size?

I want to eliminate trial and error as much as possible. If you don’t know, or if no such general guidelines exist, that’s fine. I have no problem with trial and error. It’s just annoying.

If circumference equals pi times diameter, and the diameter of the wheels is 4", and you travel the circumference of your wheel in one rotation, then however many ticks equals a full rotation (90? 180? I’m not a programmer…) will mean you traveled pi times 4 inches forward, which is 12.56637… inches. From there you should be able to reduce that into a managable ratio.

I… think thats right.

You are on the right track. A 4" omni wheel will travel 12.5666" per rotation and there are 360 “ticks” per revolution so to go 12.56" you will set the encoders to 360. Hopes that helps

First you need to figure out if they are regular encoders or quadrature encoders. If they are quadrature encoders they will have 2 wires and a full revolution would be 360 ticks, but if they are regular encoders they will only have one wire and a full rotation will only have 90 ticks. This is important to keep in mind when you first start programming shaft
encoders.

Thanks for the help.

I have quadrature encoders on my bot, and thanks to everybody who helped me out, they’re fully programmed for 5 different autonomous modes. I still had to deal with some trial and error, but much less than I originally thought. thanks again.