How to connect this encoder ?

Hi. Am using standard rotary encoder for arduino but it's not appropriate for my setup ( its loosing steps ).
At the installation place i have one encoder that i can reuse for my needs, but i dont know how to connect it to arduino and how to program it..

0.) This encoder is connected to existing machine and i can not pull it down but would it possible that i connect myself in parallel with this encoder ( signal lines and GND ) ?

1.) Is this absolute encoder ?

2.) According to diagram, white and yellow are signal lines and brown gnd. Can i connect it like this to arduino ? Do i need external power supply or can i pull 5V i GND directly from arduino ?

3.) Is there any library for it ?

A.

arnix:
Hi. Am using standard rotary encoder for arduino but it's not appropriate for my setup ( its loosing steps ).
At the installation place i have one encoder that i can reuse for my needs, but i dont know how to connect it to arduino and how to program it..

https://i.ebayimg.com/images/g/jokAAOSwdgxcI7cf/s-l1600.jpg

0.) This encoder is connected to existing machine and i can not pull it down but would it possible that i connect myself in parallel with this encoder ( signal lines and GND ) ?

possibly but it depends on what voltage it is operating at. According to the datasheet it can take 5-24V and the picture seems to indicate 5-15V. You will have to measure what voltage it is currently using since an Arduino can not take >12V on input and can not tolerate more than 5V on any input pins.

1.) Is this absolute encoder ?

According to the datasheet, no

2.) According to diagram, white and yellow are signal lines and brown gnd. Can i connect it like this to arduino ? Do i need external power supply or can i pull 5V i GND directly from arduino ?

Depends on how much current is being used

3.) Is there any library for it ?

Yes, there is an encoder library. You can install it from the IDE (Sketch->Include Library->Manage Libraries... and then search for encoder)

The imaged indicates that the encoder outputs are open collector, so they need to be connected to Arduino 5V using a pullup resistor. The internal pullups may be adequate, i.e. use something like:

pinMode(encoderA, INPUT_PULLUP);

but it's not appropriate for my setup ( its loosing steps ).

Very likely, it is appropriate but you are wiring or using it incorrectly.

it is appropriate but you are wiring or using it incorrectly.
** hmmm, i do not agree because of all the tests that we have made. I have tested on two of them and college was using the one from ada. The resolution is 60 rpm and its loosing steps regardless if i turn it slowly, or fast. E.g. motor is spinning at speed of one turn per second ( directly on shaft ) and the problem with this arduino encoder is start/stop , slow / fast changes. Another example is that i can measure lets say, 10 turns without any problems but then it starts to loose steps. Nevertheless, main problem is that there is no special position or time when this happens. It's fully random.

But, you are correct that this encoder can be used for some other applications.

For testing purposses i have used newencoder lib and this setup:
NewEncoder encoder(2, 3, -20, 20, 0, FULL_PULSE);

Regarding the setup on machine....
This industrial grade encoder has 600 RPM resolution so i must find something in this range..

A.

Hi;
OPs encoder;

Tom... :slight_smile:

The data sheet is as cryptic as can be. The outputs can be npn, pnp or totem pole, leaving much room for guessing. A multimeter or better a scope could reveal eventual circuit problems.

The resolution is 60 rpm

Encoder resolution is measured in counts per revolution.

its loosing steps regardless if i turn it slowly, or fast

Most likely, the code is wrong (for example, use of delay statements) but bad contacts, a wiring problem or inadequate pullup resistors could also lead to missing counts.

DrDiettrich:
The data sheet is as cryptic as can be. The outputs can be npn, pnp or totem pole, leaving much room for guessing. A multimeter or better a scope could reveal eventual circuit problems.

If the image on the actual encoder is to be believed, it appears to be a totem pole configuration

The image of the output circuitry on the encoder actually makes no sense as a schematic, but I interpret it to indicate open collector outputs.

The actual configuration would be trivial to determine using a multimeter.