Gray codes (so-called, despite having been used by Émile Baudot in the original Baudot code and its evolution, the International Telegraph Alphabet No. 1, many decades prior to Gray's patent) are good for many encoding applications because any two adjacent positions differ by exactly one bit, and the encoder wheels are trivial to construct by binary reflection. However, you can do better — by using a specially chosen sensor arrangement one can use a single encoder wheel which is sensed simultaneously at several points and decodes to a Gray code. The particular case where all the heads are evenly radially spaced is is called a single-track Gray code with evenly spaced heads — see Moshe Schwartz and Tuvi Etzion's The Structure of Single-Track Gray Codes for a good discussion and definition of this term.
Anyhow, I became curious about these codes yesterday, and wrote and refined a Python program to find them. ( Here are some of the codes I foundCollapse )
(Yes, I have written about Gray codes previously.)
edit: updated the program with a further heuristic and added results for 36 and 48 positions; also, the Gray code page at quirkfactory includes a 7-head, 126-position single-track Gray code.
edit: updated with an even better heuristic; results can now be computed even for 126-position single-track Gray codes in reasonable time. |