Question about Polulu 2590 encoder and arduino

Hi Guys, first, I have zero experience using an optical encoder with DC motors. So my questions is more of "is there some tutorials or handy libraries " type of thing.

I am trying to use a Polulu 2590 optical encoder that fits in the rear of a micro metal gear motor.

The short of it is, is there any tutorials or articles available on how to use these? Does someone have arduino code examples of this in action?

The long form:

I know there are larger motors that have nice libraries and integrated rear hall effect encoders, but I am trying to keep the size down and thought this would be the right motor/encoder combo. I also need to use the rear-encoder style because im trying to use this system with the polulu tracks like the one that comes with the zumo. Basically, im trying to achieve a zumo robot with encoder.

I have google searched and forum searched with little to no information on using these encoders with the Arduino. So I have no where to turn for useful information regarding using this encoder for speed/positional control for the micrometal motors , and ideally using them with the Arduino.

The only thing I came up with is using the polulu DC motor shield with this encoder, but im not sure the shield supports quadrature encoders. Anyway, any direction, tutorials, or advice would be extremely helpful.


Hello, Anupam.

Unfortunately, we do not have a tutorial for using the optical encoder kits, but we do have an AVR library for quadrature encoders that would work with those optical encoders. The Pololu AVR C/C++ Library User’s Guide has a link to download our entire AVR library (which includes the encoder functions), and also provides an example for using those functions under the “Pololu Wheel Encoder Functions” section. By the way, those products are just standard quadrature encoders, and there are probably lots of resources and tutorials out there about quadrature encoders. There are probably also a number of Arduino libraries out there for quadrature encoders that would work with ours.

We do not have any Arduino shields that support quadrature encoders, but you could read the encoder outputs directly with your Arduino (using an appropriate library) and send motor commands to one of the Arduino motor shields we carry. Depending on your motor specifications, you might consider using our Dual MC33926 Motor Driver Shield or Dual VNH5019 Motor Driver Shield.

By the way, I am not entirely sure what you typed into your Google or forum searches, but in the future, you will probably get better results if you spell our name correctly: Pololu.