Good point, John, thanks for expanding on the issue... - Chuck > -----Original Message----- > From: John Payson [SMTP:supercat@MCS.NET] > Sent: Tuesday, January 27, 1998 3:14 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Counting encoder pulses > > > The reason I ask, is that depending on the above, entirely different > > processing is needed. In the mouse biz, the encoders are not > detented, > > and as a result, the mouse can be "parked" at the transition point > of > > the shaft encoders (the photodetectors (darlingtons) drive the uC > pins > > directly). So, jittery or "creeping" cursor motion became a problem > in > > early designs. The way around this was to throw away a valid > transition > > on direction reversal - this is essentially firmware hysteresis . > But, > > in your case, I suspect that you never want to lose a count on > direction > > change in order to isolate noise... > > While it would seem nice not to have the encoder be "off" by a count > on dir- > ectional changes the effect is non-cumulative and in fact may in some > cases > be a GOOD thing depending upon how the encoder is located relative to > the > object in question and its driving force. If your encoder is on a > motor which > is moving the telescope, the backlash of the encoder's hysteresis will > work > to counteract mechanical backlash in the system. This is the only way > of > mounting which can be made reliable around direction changes, and even > here > you may still have to take measurements of mechanical backlash (which > will > probably be greater than one encoder pulse) and compensate. > Alternatively, > you could always approach target positions from the same direction, > analagous > to the way many musical instruments are tuned (e.g. on a violin, you > always > tune by raising a string to the correct pitch; if the pitch is too > high, you > loosen the string below the correct pitch and then tighten it to raise > the > pitch). In this case, the one-count offset on direction changes will > be a > non-issue.