12v absolute encoder

Hi All

I've been trying for hours to get this to work (and searching online) but to no avail.

I'm using an absolute encoder (http://www.mouser.com/ds/2/307/e6cp-a_ds_csm496-45867.pdf) to check the rotary position of a wheel

Unfortunately it requires 12-24v so I have it connected to a 12v power supply. Obviously I can't connect the output straight to the Arduino so I've got 2x 10kohm resistors to halve the output so it's safe. However, the Arduino always reads high, even when I can see with a multimeter that the output is zero (or close to). I've tried hooking the sensor's ground to the Arduino's but still no joy. What am I doing wrong? I've looked at doing a pull-up/down resistor but I can't quite figure out how to join that into the existing setup so if that's what a need to do, please explain how I can do this

(The attached doesn't show when I have tried joining the sensor's ground to the Arduino's)

Many thanks
John

moonCrater:
Obviously I can't connect the output straight to the Arduino

The datasheet states open collector outputs.
If so, then you can connect it straight to an Arduino input (with the internal pull up resistor enabled in setup).

Measure the output voltage of the (powered) encoder with a DMM before you connect it to the Arduino.
There should be 0volt on the output if it has open collector outputs.
Leo..

Thanks so much for your help, you were correct.

For anyone else having the same trouble - I was still a bit baffled by the input as it wasn't adding up correctly. I had assumed the encoder was returning a binary result but it giving weird results. On closer inspection of the data sheet I realised it's grey code - you need to convert the grey code input into binary and then into a decimal figure. Kinda stupid but I'd never used grey code before!

Thanks again Leo