?????? how do I use this Rotary Encoder ???? (Solved)

Hi all
Went through the forum and net but can not find anything in the lines of using an encoder like this with arduino?

Not only can I not find something like this used with Arduino but can't find a data sheet for it either. I have conteacted the seller and requested it......no joy
Please help would be appreciated, I have watched the tutorials on the other encoders and so on.

If the leads you are showing belong to the encoder, I would guess that the red and black leads are +5V and ground, respectively, while green and white could be the A and B output lines or pulse and index mark.

If you got it for free and can't find any info, the only way to know is to power it up and see what signals appear on the green and white wires when you spin the shaft. You might need 10K pullup resistors to +5V on the green and white wires to see a signal. An oscilloscope would be very helpful.

Hi Jremington
The wires are indeed for the encoder. You got the wire colors correct. Why are their 2 black wires? The second could be the wire-shield. Do I connect this to the Arduino ground(the same ground as the other black wire).

Item Description?
600 p/r (Single-phase 600 pulses /R,Two phase 4 frequency doubling to 2400 pulses)
Power source: 5-24 VDC
Output :AB 2phase output rectangular orthogonal pulse circuit, the output for the NPN open collector output type
Maximum mechanical speed: 6000 R / min
response frequency: 0-20KHz
Notice:AB 2phase output must not be directly connected with VCC, otherwise, will burn the output triode.
connection:
Green = A phase, white = B phase, red = power +, black = power -

Where can i find a wiring diagram for an encoder similar to this one?
And maybe some tutorial somewhere?
PS. do not have a scope
Please

Then you do have a perfectly standard quadrature shaft encoder. You will need pullup resistors (10K ohm should work) from +5 V to each of the A and B output lines to see the signal. Connect both black wires to ground (one is the cable shield). Google will certainly help to find tutorials.

Thanks Mate
After surfing the net for a tutorial with no real success. I just got on with it.
Downloaded a library for encoders into Arduino IDE,,, :slight_smile: now i know how to do that
Connected the encoder to the arduino pins 2,3(A,B) and the other to 5v & ground respectively. :smiley: NO SMOKE XD
Wrote some code ..... :stuck_out_tongue: not the best keep missing counts
Then I used the example code and that works great.

I just purchased what appears to be the exact same rotary encoder and would be interested in knowing more about the library and code you used to get it working with your arduino.

I'm planning on using this to record incremental distance in two directions for an art project. All I need is a consistent stream of data for forward and reverse directions. Thanks in advance for any assistance or tips you can provide.

Cheers!

Hi,

I'm also in the same problem, could you please share the working example code?

Thanks a lot

Hi!
I am also trying to get this same encoder to work. I also have a a small Keyes 20p/r encoder that works perfectly using the same demo code from the Encoder Library, for Measuring Quadarature Encoded Position or Rotation Signals library so I don't think it's the software. I have connected the red wire to the +5V VCC and the black wire to the ground. The green and the white are connected the the pins 2 and 3 of my Arduino nano with 10k pull-ups.
I have also tried building a LED test circuit with two (blue) LEDs (VCC-LED-220R-A/B wires). Both LEDs blink briefly (together) when I connect the power but there is no blinking while turning the encoder.

I don't have a oscilloscope but checking the pins 2 and 3 (with a 10k pull-ups) with my multimeter gives a constant ~3.5V on both pins. Is my encoder defective or is there anything else I could try?
Please help!

The problem was that, contrary to the ebay description, the encoder does not work with 5V Vcc. I've tried connecting it to a 9V battery and it now works perfectly.