Purchased my first Rotary Encoders. faulty or not?

Hello:
I have purchased 10 rotary encoders on ebay.
20 steps per rotation. with detents. Includes tact switch function.
Three pins on one side, for the rotary encoder and Two pins on the other side, for the switch.

Lets focus on the three pins.
I assume the central pin has to be connected to GND.
And the other two pins are outputs A and B, right?
Okay, doing a continuity test with a multimeter, when I test continuity between A and middle(GND), I get no continuity (no beep), no matter how many times I rotate the knob. I only get a transient beep on each click.
Same goes between output B and GND.

I have tested several encoders of the pack, and it seems all are the same.
Are these faulty, or maybe I didn't understand the theory of these devices?

The seller has no clue.

Nick Gammon (click !) (where are you ?) will help you out.

Thank you MAS. I am from Spain.
I did read several articles similar to this one pointed by you.
But I think these rotary encoders don't play with the standard rules. Or they are simply faulty.
Because no matter in what position is the knob resting. there is never closed circuit between A and GND pins,
nor between B and GND.
In other words, A and B are both always in "open circuit" state.
Only transiently, then the encoder rotates from one detent to the next, the multimeter briefly beeps,
indicating contact. But then, it stays silent.

I have a few of such encoders over here, they are exactly like that, tested it an hour or so ago for you.
The indents seem to be at an idle spot.
The beeps you hear, are not in phase, but you'll have a hard time checking that this way.
You have a period (where the indent is) where both contacts are open, and you need this third logic level for this.
How else would you be able to find out which contact closed first or second, indicating the direction you are rotating ?

I just reconfirmed it.
I have a knob fitted on the shaft, so i have a bit more control over the rotation (the larger the knob, the better you can control it).
If i rotate right, the left pin immediately beeps at the beginning of the rotation.
The right pin beeps at the end, just before the rotation stops at the next indent.
Turning left reverses this of course.

yep, mines behave exactly as you describe.
Using two multimeters: one between A and GND, and the other between B and GND.
One channel beeps first, then the other channel joins, then the first channel mutes, then the second channel mutes.
the sequence is reversed if the way of rotation is reversed.
This means the detents are located at the AB=11 values (1 meaning open circuit, not GND).
And the AB value changes 80 times per rotation.

makes sense.
the encoders are not faulty then.
the seller will be happy because I won't claim a refund. :slight_smile:
and I am happy too. :slight_smile:
Thanks man, you have saved me some time of trouble. :slight_smile:

now my question is, are all rotary encoders like these?
I thought there would be one detent each time AB changed.

I think most rotary encoders used for user-interface purposes like this use quadrature code like yours do. I have two different encoders that I got from SParkfun and Mouser and they work the same as yours.

taxi_driver:
Okay, doing a continuity test with a multimeter, when I test continuity between A and middle(GND), I get no continuity (no beep), no matter how many times I rotate the knob. I only get a transient beep on each click.
Same goes between output B and GND.

Yes, that's correct.

@jiggy:
but are yours exactly like mines? I mean, in the resting position (detent) do you always get open circuit in both outputs?
ie. do they always rest in the A=B=open circuit positions?
I would prefer it resting in any AB value, not just in the AB=oc+oc.
ie. resting after any change in A or B.

saludos@fungus.

taxi_driver:
@jiggy:
but are yours exactly like mines? I mean, in the resting position (detent) do you always get open circuit in both outputs?
ie. do they always rest in the A=B=open circuit positions?

Yes.

For each click the switches will close and open. A and B are offset from each other so you can tell which way it turned (look at which one closed first).

If you hold the control in between two detents you'll see the switches close.

fungus:

taxi_driver:
@jiggy:
but are yours exactly like mines? I mean, in the resting position (detent) do you always get open circuit in both outputs?
ie. do they always rest in the A=B=open circuit positions?

Yes.

For each click the switches will close and open. A and B are offset from each other so you can tell which way it turned (look at which one closed first).

If you hold the control in between two detents you'll see the switches close.

yes, fungus, that is what happens with my rotary encoders, that is clear, but I want to know if this is the behaviour of all rotary encoders. I would prefer a "click" (ie. a detent) each time there is a change in A or B.
00->01->11->10->00 (4 clicks, 4 detents)

taxi_driver:
I want to know if this is the behaviour of all rotary encoders.

Yes.

(well.. "rotary encoders" covers a lot of devices, but the ones like yours all work that way)

fungus:

taxi_driver:
I want to know if this is the behaviour of all rotary encoders.

Yes.

(well.. "rotary encoders" covers a lot of devices, but the ones like yours all work that way)

okay, I think I will be able to adapt to these. thanks!

taxi_driver:
@jiggy:
but are yours exactly like mines? I mean, in the resting position (detent) do you always get open circuit in both outputs?
ie. do they always rest in the A=B=open circuit positions?
I would prefer it resting in any AB value, not just in the AB=oc+oc.
ie. resting after any change in A or B.

saludos@fungus.

Correct, both different kinds are open circuit at a resting position.

If you want an absolute encoder, those are generally more expensive and need more pins. A 2-bit code will only give you 4 positions. You'd need 5 pins + GND to cover 20 detent positions.

Since people usually don't care about the absolute position of a rotary encoder and only want to know what direction it was turned, quadrature code works fine for the majority of applications.

Jiggy-Ninja:

taxi_driver:
@jiggy:
but are yours exactly like mines? I mean, in the resting position (detent) do you always get open circuit in both outputs?
ie. do they always rest in the A=B=open circuit positions?
I would prefer it resting in any AB value, not just in the AB=oc+oc.
ie. resting after any change in A or B.

saludos@fungus.

Correct, both different kinds are open circuit at a resting position.

If you want an absolute encoder, those are generally more expensive and need more pins. A 2-bit code will only give you 4 positions. You'd need 5 pins + GND to cover 20 detent positions.

Since people usually don't care about the absolute position of a rotary encoder and only want to know what direction it was turned, quadrature code works fine for the majority of applications.

no, I don't want an absolute encoder. Just 4 positions is enough for me.
I just would want 4 detents, one detent in each position.
20 detents per turn, and also 20 AB positions per turn.