> >I am working on a project to count the revolutions on a rotating > >wheel/disc.The sensor is going to be an optically coupled interrupter > >module. > > > >I intend using the 16F84 pic to convert the pulses from the opto > >interrupter to a velocity figure and distance travelled for display on > >an LCD readout. > > > >If anybody has some info on this type of circuitrysoftware, I would be > >most appreciative. My two cents, About calibration; ------------------ Make the software in some way that you can install a jumper or via keyboard start a calibration process. This routine will zero the counter and count pulses until you press that key or remove the jumper, after travelling a very known and exact distance. The software then will calculate by itself the relation between distance/count and store it into an eeprom. That same information would be used later to display the travelled distance, by simply multiplying that factor by the counted pulses. This is easier than go into the "rodeo" with wheels sizes and other factors, and allows the user to recalibrate the unit at any time. About Pulse Counting: --------------------- A debouncing routine is easier to do for optical devices. Just calculate what is the shortest pulse the sensor can generate, in other words, what is the highest rpm of the wheel, the window size of the sensor and so on. Now calculate the same for blocked sensor timming. Suppose you find out this minimum pulse width to be 2ms and the minimum blocked sensor time is 4ms. As soon the opto disc sensor receives light, this pulse starts your interrupt routine, the software will read that pin during 1.5 ms as fast as possible and can not reads other level than the valid "lighted sensor". If this happens, than your software will count one pulse and then will enter in a routine to measure the blocked pulse for at least 3ms... then you will be sure you counted it right.