| Electronics Forum |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| frogeraie |
Posted: May 01, 2010 12:13 pm
|
|
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. |
| Village Idiot |
Posted: May 01, 2010 01:33 pm
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Trusted Members Posts: 1,399 Member No.: 11,398 Joined: October 08, 2007 |
Do you have pull-up resistors connected? Do you have terminal C grounded?
|
| kellys_eye |
Posted: May 01, 2010 05:43 pm
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 9,981 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.
![]() 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
|
| GPG |
Posted: May 02, 2010 04:57 am
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 6,166 Member No.: 792 Joined: April 25, 2004 |
|
| frogeraie |
Posted: May 06, 2010 04:22 pm
|
|
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! |
| kellys_eye |
Posted: May 06, 2010 08:35 pm
|
![]() Forum Addict ++ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Spamminator Taskforce Posts: 9,981 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
|
![]() |
![]() ![]() ![]() |
:: support us ::