please dont rip this site

Input sensors for position change

Gray Code / Single Track Grey Code Encoders

Another interesting system is Single Track Gray Code, which combines verner measurement with position encoding. As the name implies, there is only one track but the mask is broken up between light and dark around the ring, and the sensors are arranged around the shaft at different positions on that single track.

Imagine a standard multi-track gray code encoder; all the sensors at one angular position:

Now rotate the inner track 90' clockwise so that it lines up with the middle track. Obviously, you need to rotate the track sensor so that it still returns the same data. But now, since the inner and middle tracks exactly match, and the sensors for those tracks aren't at the same angle anymore, you can simply eliminate one track and move the sensors onto the one remaining track.

If you can continue to do this, you can have a single track and all sensors at the same distance from the center of the shaft. Unfortunately, you will notice that the outer track is not the same. To move beyond a 2 sensor, 4 positions per rotation, one needs to find a pattern for the track so that only one sensor changes at each rotational position. This was long considered impossible, but in 1994 N. B. Spedding published NZ Patent 264738 (Cache 20141016) with several examples which do work, but are not very efficient,  e.g. 9 sensors for only 36 positions.

It turns out that n sensors can apparently distinguish as many as 2n-2 positions. So 4 sensors can encode 8 positions, 5 encodes 30 positions, and 8 sensors can encode 240 positions. Hiltgen and Paterson published a paper in 2001 exhibiting a single-track gray code with exactly 360 angular positions, constructed using 9 sensors (actually, with a different track, one could encode 494 positions).

Mask for 240 position, 8 sensor, Single Track Grey Code. The sensors are placed 15 positions apart.

This was developed from "Single-Track Gray Codes" by Alain P. Hiltgen, Kenneth G. Paterson, and Marco Brandestini (appendix) It was developed by using the Javascript program at STGC Explorer This is development code that makes the mask sequence (0 and 1 represent white and black) for the encoder disk or track, and then shows all possible readings and what position that reading represents.+

Another advantage of this system is that most of the masks avoid patterns like 010 or 101 where a tab or slot must be one sensor wide. This allows lower resolution masks with greater physical strength to be cut or 3D printed. For example, the original 2 sensor 4 position example uses the simplest possible half circle mask. And the Spedding masks start with only 1 or 2 lobes.

STGC Explorer Verifies the "initial codeword" and "coordinate sequence" from the papers below for each STGC found, then makes the mask sequence for an encoder track (needs to be expanded to support disks with e.g. SVG) and finally shows all possible sensor readings and what position that reading represents.


See Also:

file: /Techref/io/sensor/pos/enc/greycodes.htm, 8KB, , updated: 2017/9/25 14:47, local time: 2024/7/24 00:07,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> Input sensors for position change, Grey Code / Single Track Grey Code Encoders</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?


Welcome to!


Welcome to!