Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!krukar From: krukar@pprg.unm.edu (Richard Krukar [CHTM]) Newsgroups: comp.robotics Subject: Re: velocity sensing for robotic joints Message-ID: <28373@pprg.unm.edu> Date: 9 Aug 90 22:49:56 GMT References: <1990Aug7.205751.21206@ecf.utoronto.ca> <19481@well.sf.ca.us> Reply-To: krukar@pprg.unm.edu (Richard Krukar [CHTM]) Followup-To: comp.robotics Organization: U. of New Mexico, Albuquerque Lines: 26 To sense velocity from an incremental optical encoder, you only need a little digital circuitry. There are two functions to consider, speed and direction. First, direction because it is easy. Use some edge triggered flip-flops. At the positive or negative going edge of one of the quadrature signals, the other signal's state will indicate direction. Next, speed. A low resolution method would be to feed one of the signals into a counter. Use a crystal and another counter to esablish an "integration time". Example: a 100 kHz crystal ( clock chip ) feeding a counter doing a divide by 500 function yields a .005 second integration time. So every .005 seconds ( on every tick ) latch the frequency counter output into a register and then reset the frequency counter. Changes to the basic theme can yeild better resolution. For instance, create a state machine to read the quadrature outputs. Note the the output is a grey code ( 0-1-3-2-0-1-3-2 ) indicative of four states. If the last state was three, and the inputs indicate you have entered state one, then you know the direction of rotation. Also, on each state transition send a pulse to the frequency counter. Now you have a full blown quadrature detector/speed measurement capability. Did you specify what this sucker needs to interface to? Richard Krukar ( krukar@chtm.unm.edu )