Dave Tweed wrote: > Kerry Wentworth wrote: > =20 >> slippyr4 wrote: >> =20 >>> I currently have a circuit which counts teeth on a gear (with a hall ef= fect >>> switch). If I were to add another sensor on the same gear, but half a = tooth >>> apart, would the output from the two sensors then be grey code? and thu= s all >>> the above apply? >>> =20 >> Yes. Actually, N+1/2 gear apart, so they don't need to be close to each= =20 >> other. >> =20 > > Actually, the sensors need to be an odd multiple of 1/4 tooth apart; e.g.= , > 2.75 teeth or 4.25 teeth. Half a tooth would give you signals 180 degrees > out of phase, not nearly as useful. > > -- Dave Tweed > =20 Well, 1/4 of tooth+gap, anyway. That is assuming tooth=3Dgap, which may=20 not be true. One should be on the edge of a tooth when the other is in=20 the middle of a tooth. Or one on the edge of a gap when the other is in=20 the middle of a gap, if the gap is smaller than a tooth. Kerry --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .