Sonsivri

Electronics => Hardware and Tools => Topic started by: dezso on February 23, 2016, 04:09:25 04:09



Title: AliExpress rotary encode
Post by: dezso on February 23, 2016, 04:09:25 04:09
I'm not saying I'm expert on rotary encoders but haven't run in to this problem before.
Got a whole bag of 25 from Aliex $20, for some reason this encoders produce different waveform compare to any other encoder I have used.
Its not the standard 2 bit gray-code, more like 2 bit phase differentiate pulse, the Arduino library what I have used many time with Grayhill's encoder cant read this properly, every tic "detent" is counted as 4 pulse in either direction instead of 1, also both bit always return to high unlike ordinary encoders.

Any of you have worked with this before, what would be the best way to read this encoder?

2nd pic is the aliex waveform
3rd pic is the ordinary encoder waveform

(http://s29.postimg.org/y2nmbdklj/10x_12mm_Rotary_Encoder_Push_Button_Switch_Keysw.jpg)
(http://s30.postimg.org/55grt5zpd/Aliex_rotary.png)
(http://s22.postimg.org/gdf71mpqp/True_rotary.png)

(http://s13.postimg.org/ipcwuuumv/1odn51zh.png)
(http://s17.postimg.org/hngql1hhr/cvmn17cd.png)


Title: Re: AliExpress rotary encode
Post by: dezso on February 25, 2016, 02:31:22 02:31
I have searched mane part number to see if I just had a bad batch or this kind of encoder outputs are normal, finally found one similar but not exactly same.
I want to buy another batch of 20-25 but want to be sure I'm getting the right one this time. If you have purchased from Aliex or eBay send me a link please..

(http://s12.postimg.org/btggl1ixp/EC11_EH_EC20_A.png)


Title: Re: AliExpress rotary encode
Post by: Signal on February 26, 2016, 02:31:29 14:31
I do not see any problem. Encoders you received are functional. Even if you prefer to use existing library (Arduino) that generates 4 times more events, all you need is a simple wrapper-counter, perhaps with smarter threshold.


Title: Re: AliExpress rotary encode
Post by: solutions on March 06, 2016, 04:10:45 04:10
These are not "grey code".

Look up "quadrature encoder" - that's what you have.

That top waveform is classical Chinese garbage and is from sloppy manufacturing. The lower one is what is "normal".

You need to pray to your favorite deity that they didn't send you 24 units with the upper waveform or else you just paid $25 for one unit.