Will this rotary encoder work with my arduino mega?

Specs: http://www.jinzon.com.tw/pdf/WDG40A.pdf

I got the 40A-1000-ABN-G24-K2, and I connect it to an oscilloscope to see what comes out and I am getting square waves in range +/- 12v.
Now before I connect this to my Arduino and kill it... is the -12v(negative 12) a problem?
According to specs the Arduino Mega can handle voltages up to 20v, and I know there are some libraries for rotary encoders, which I am planing to play with and hopefully get this to work... but maybe somebody can tell me if I can just connect this to my Arduino and tweak the code, or do I need some special IC in front of that before I can use...?!

The Encoder itself has 6 wires... 2 for power and 4 for the signal... I guess... but the device I got this encoder from used only 2 of the 4 wires and I don't know why. My oscilloscope shows a nice clean signal with just the 2 wires so thats what I am planing to use on the Arduino.

According to specs the Arduino Mega can handle voltages up to 20v

That refers to the power supply input, before the voltage regulator. The input pin voltage limits are -0.5V to VCC+0.5V.

is the -12v(negative 12) a problem?

Yes.

I got the 40A-1000-ABN-G24-K2, and I connect it to an oscilloscope to see what comes out and I am getting square waves in range +/- 12v.

Are you sure it's -12V to +12V and not 0V to 12V?

The G05 variant (40A-1000-ABN-G05-K2) of this encoder appears to be 5V supply and TTL level output so better suited to arduino.

My oscilloscope shows +/- 12v.
If I limit the voltage to +/- 5v... will it then be abel to work with Arduino?

And yes.. the G05 is 5v TTL, but sadly I have a different model. My is G24.

If I limit the voltage to +/- 5v... will it then be abel to work with Arduino?

No. No negative voltages.

If this is a square wave and you can get it down to -5V to 5V wouldn't a diode be able to clip that negative voltage out for you and get it to 0V to 5V? Obviously test the output of that circuit with the oscope before feeding it to your Mega.

A MAX485 chip would bring the +/- 12V to 0-5V.

Thanks for all the feedback guys!!

I measured 1 of the unused leads on the encoder and found out that 1 lead give 0-10v square waves, since I need only 1 direction, this should be fine.
MAX485 I will look into that, I guess with it I should be abel to feed the arduino :slight_smile:

Thanks again for the answers!!