SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By lukebarber

I bought a motor with an encoder attached to it. It's an Accu-Coder model 25t/h.

I am trying to get the encoder to work with arduino. I want to relate the count to the rotation in angle. Is there some sample code out there that I can test with?

Thank you
Do you have the encoders full model number?
The link you posted. Shows many options. Like pulses per revolution, operating voltage and output type. There is a chart on the page and downloadable manual to look at.
User avatar
By DanV
You asked very nearly the exact same question 18 months ago.
Unfortunately, you would have been much better off with the open collector version of that encoder, rather than the line driver version.
I don't believe it's as simple as just hooking up the signals to the Arduino - the line driver being a differential connection.
I think you'll need to get a converter from line driver to open collector.

As far as the code is concerned, it's a fairly simple proposition to find quadrature encoder code for the Arduino, just google it.