At 11:49 29/04/2003 +0200, Jan-erik Soderholm (QAC) wrote: >Hi. >I just scraped an old mouse (a Logitech wheel mouse) >to see what optical components they used. >I noticed that the wheel had one LED (IR?) and one >3 pin "receiver" mounted. Now, the wheel just have a row >of spokes, but someway, the unit must not only detect >spoke/nospoke, but also the direction the wheel is turning. >Anyone know how these receivers work ? There are actually two sensors on each of those receivers. These will receive the same signal but with a phase shift. e.g.: "Forward" movement: sensor 1 - 1111000011110000111100001111 sensor 2 - 0011110000111100001111000011 "Backwards" movement: sensor 1 - 0011110000111100001111000011 sensor 2 - 1111000011110000111100001111 By looking at the phase shift you can find out the direction the wheel is turning. G. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.