Rotary encoder on a motor

Hello,

I bought a motor with an encoder attached to it. It’s an Accu-Coder model 25t/h. https://www.clrwtr.com/Products/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.

Hi, Thank you for the fast response. Here’s the full model number for the encoder. 25T-05SG-1024-NV1RHV-SMK-S3

Following PDF has all the technical details listed.

https://files.clrwtr.com/userfiles/ct/d … t-2018.pdf

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.

Found a really helpful encoder library.

https://www.pjrc.com/teensy/td_libs_Encoder.html