NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Basic Electronics » Rotary Encoder pinout (and other questions I am sure)
March 01, 2012 by Ralphxyz |
Darn I got some rotary encoders off ebay but they do not have any documentation (surprise surprise). Does anyone recognize these ? I do not even know operating voltage. That lone center pin is obviously ground. But that leaves three pins on one side and two on the other. Posible the two pins are +/- and the three pins are for grey code (it would sure help if I knew what I was talking about). Of course I'll be asking about "grey code" de-coding once I can get a signal. Ralph |
---|---|
March 01, 2012 by Rick_S |
If they have push button switches, the two could be the switch and the other three the encoder out. Like These from sparkfun. Rick |
March 01, 2012 by SpaceGhost |
They could be binary coded switches? One pin would be the common of course, and the other pins would connect to the common based on a four-bit binary output relative to switch position (hope I'm explaining it right)? How many positions do your switches have? Have you tried checking the continuity (to common) per switch position? If you have, maybe you could sketch something up an show us what pins have continuity with each other in what positions. That might help us figure these out. |
March 01, 2012 by SpaceGhost |
Oh yeah, and do they turn like a clicky pot or do they click to a solid position like a regular rotary selector switch? |
March 01, 2012 by Ralphxyz |
I have not tested any of the pins yet. There is a on/off switch so that would account for two of the pins. That leaves three with ground. I need to look at grey code to see what that does. Thanks, Ralph |
March 01, 2012 by Ralphxyz |
Ok I have determined the two pins on the side are for the switch. So that leaves me with three pins. There is no continuity between the three pins or between the three pins and ground!! So I asssume there is a power pin and two pins for the grey code, does that sound right? Ralph |
March 01, 2012 by mongo |
Here is the sequence for 4 bit gray code. The pattern is different than the binary pattern but there is a sequence to it. Each progressive step changes only one bit from the previous one. There are still 16 numbers but they look different. Gray code is used mostly for error correction in things like communications and telemetry. It's also used in digital TV transmission. 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000 |
March 02, 2012 by Ralphxyz |
This Encoder from SparkFun looks just like mine. Mine have 20 detents instead of 12. A Google of AVR Rotary Encoder turns up a lot of examples so I should be able to work this out. Mongo your grey code sequence actually makes sense, thanks. Thanks everyone for the help. Ralph |
Please log in to post a reply.
Did you know that spinning a permanent magnet motor makes a voltage? Learn more...
|