Using Optical Absolute Rotary Shaft Encoder

Hello,

I am a student and this is my first experience with arduino, so I apologize in advance for my lack of knowledge. However, any help would be appreciated to help me understand more about absolute encoders and my arduino uno.

I need to keep track of shaft rotations using an optical absolute shaft encoder from US Digital. Here is the link: A2 | US Digital

The encoder came with a 6-Pin Modular Connector: http://usdigital.com/products/cables-connectors/cables/6-pin/CA-MD6A-SS-MD6

I will be using an ardunio uno.

I will be turning a shaft. I would like to have the arduino display on an LCD screen how many rotations have been completed. I will be moving the shaft clockwise and counter-clockwise. (For example: If I turn the shaft 5 times clockwise, then 1 time counter-clockwise, I would like the LCD to display 4 rotations. I know these won't be exact whole numbers due to the bits, but saying this for the simplicity.)

I know I need to arduino to interpret the analog voltage output from the sensor, however I do not know how.

I have read countless threads and forums about encoders and arduino, however I was wondering if anyone could help me with this specific hardware and purpose.

Is there any starting suggestions, code, or hardware connections that could help me with this project. Any help would be appreciated. Thank you.

I have used a homemade optical encoder to tell the angle of a wind vane. However, I think for your use, you need an incremental rotary encoder that uses a quadrature encoding system. They are much cheaper than a absolute encoder, and can tell which direction the shaft is turning for each increment. So just count the CW increments vs. the CCW increments.

The first example given in this source shows how the counting is done. http://www.robotoid.com/appnotes/circuits-quad-encoding.html

Try making your own quadrature encoder, it isn't hard. See A cheap $6 DIY quadrature encoder for Arduino using optical sensors | Frobot – a DIY robot

A more complex build (the quadrature one): Home-Brew Shaft Encoders