Electronic – how to count 2 wheel encoder signal

encodermotorroboticswheel

I'm looking to a simple solution to keep the position of a robot. It has two DC motor and one wheel encoder for each. The encoder are incremental type.

I need to be able to get the current count of increment from an atmega.

I found some chip like the LM628/629 who will do great job, too great in fact, because it cost ~50$.

Do you know a dedicated IC that has only the count (in both direction) features for a wheel encoder, Or is it possible to make à simple one with an attiny ?

Best Answer

"Do you know a dedicated IC that has only the count (in both direction) features"?

You may be surprised to learn that a few simple, cheap, generic logic chips are sufficient to decode a rotary encoder -- it doesn't require some special chip specifically customized for rotary decoders. The Codewheel Generator Page has a few relatively simple circuits that decode the 2 rotary quadrature outputs into a "direction" and "count" outputs. Those outputs can be wired into the "direction" and "clock" inputs of any up/down counter -- such as, for example, the CD4029, the CD4516, the CD40193, 74HC193, etc.

"is it possible to make à simple one with an attiny"?

Yes, you can make a simple quadrature encoder with an ATtiny. Some tips for connecting a quadrature encoder to a Atmel chip and decoding it in software are at:

If you have relatively few pulses-per-second, you might be able to run the 2 signals from each encoder directly into your main ATmega and use the above techniques to do it all in software, without any external conversion hardware.