Powered by Invision Power Board


Forum Rules Forum Rules (please read before posting)
  Reply to this topicStart new topicStart Poll

> Incremental Encoder, how does it work?
frogeraie
Posted: May 01, 2010 12:13 pm
Reply to this postQuote Post


Newbie
*

Group: Members+
Posts: 3
Member No.: 10,571
Joined: August 15, 2007




I intend to use an incremental encoder from Alps:
http://www.alps.com/WebObjects/catalog.woa...2E1220406.shtml
but I don't understand how this component works!
From the schematic shown on the site quoted above it seems to me that on pin A and B I should get alternatively, as the shaft is rotating, 0 and 5 V. However it is not what I get: it is always 5V. I am confused, I need some help. Thanks.
PMEmail Poster
Top
Village Idiot
Posted: May 01, 2010 01:33 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Trusted Members
Posts: 1,517
Member No.: 11,398
Joined: October 08, 2007




Do you have pull-up resistors connected? Do you have terminal C grounded?
PM
Top
kellys_eye
Posted: May 01, 2010 05:43 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 10,365
Member No.: 2,735
Joined: June 21, 2005




In it's usual mode you have to 'decode' the A-B output to give 'direction' (CW or CCW) and 'pulses' to determine how far around the dial (so to speak) the knob is.

user posted image

the schematic above shows an encoder connected to IC2 and IC1 (part of each).

IC2 pin 1 will be high/low depending on the direction (CW or CCW) and IC1 pin 3 will have the pulsed signal output.



--------------------
May contain nuts
PMEmail PosterYahoo
Top
GPG
Posted: May 02, 2010 04:57 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 6,201
Member No.: 792
Joined: April 25, 2004




^ Sets and resets floating IC2,3.
Here's another one.
http://sharesend.com/v8y8i
PMEmail Poster
Top
frogeraie
Posted: May 06, 2010 04:22 pm
Reply to this postQuote Post


Newbie
*

Group: Members+
Posts: 3
Member No.: 10,571
Joined: August 15, 2007




Yes, "Village Idiot" I have done exactly what is shown on the Alps' schematic I attached to my previous message, I've included two pull-up resistors on A and B and grounded C.
Thanks to kellys_eye and GPG for their schematics, but I do not have any problem decoding A and B output since I am using the code described here:
encoder
which works well with other encoders (Nubotics).
My question is: how does an incremental encoder work?
I thought it is similar to an old PC mouse with some kind of mask alternatively stopping or letting the light of some led reach 2 phototransistors as the knob is rotated. Then each phototransistor is periodically conducting, so I should have at A and B altenatively 0 or 5 V , which I don't!
Is my clumsy description of an encoder functioning completely wrong?
Can someone explain it to me correctly?
Thanks!
PMEmail Poster
Top
kellys_eye
Posted: May 06, 2010 08:35 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 10,365
Member No.: 2,735
Joined: June 21, 2005




Not 'alternately' at A and B - the waveform 'overlaps' so A and B can bth be at logic 1 at times.

The datasheet for the encoder should illustrate this principle.



--------------------
May contain nuts
PMEmail PosterYahoo
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 


:: support us ::




ElectronicsSkin by DutchDork & The-Force