Laser Mouse Sub-Revolution Tachometer
I have made a simple tachometer using old roller ball mouse parts. I
record the output using a soundcard. Works well. What I want to do now is print a ribbon, attach it to the rim of a disk, and point a laser mouse at the vertical lines running around the rim. Basically I hope to sample the speed of the disk as often as practical. I have been thus far stymied in finding out about the data stream of the mouse - both inside the mouse (DSP chip), and external to the mouse (USB). Anybody got any ideas? |
Laser Mouse Sub-Revolution Tachometer
On 2009-01-21, nickec wrote:
I have made a simple tachometer using old roller ball mouse parts. I record the output using a soundcard. Works well. What I want to do now is print a ribbon, attach it to the rim of a disk, and point a laser mouse at the vertical lines running around the rim. Basically I hope to sample the speed of the disk as often as practical. I have been thus far stymied in finding out about the data stream of the mouse - both inside the mouse (DSP chip), and external to the mouse (USB). Anybody got any ideas? you could look up the HID standard, or you could get a PS/2 compatable mouse, which has a much simpler data stream. |
Laser Mouse Sub-Revolution Tachometer
nickec wrote:
I have made a simple tachometer using old roller ball mouse parts. I record the output using a soundcard. Works well. What I want to do now is print a ribbon, attach it to the rim of a disk, and point a laser mouse at the vertical lines running around the rim. Basically I hope to sample the speed of the disk as often as practical. I have been thus far stymied in finding out about the data stream of the mouse - both inside the mouse (DSP chip), and external to the mouse (USB). Anybody got any ideas? Go to the Avago website, there are datasheets for the chips there. Avago was formerly the Agilent Semiconductor division, which was formerly part of HP before they specialised in ink cartridge and their accessories. Unfortunately, the Avago mouse chips seem to be not quite what one would like for a rotary or linear encoder. The chip does not know that the pattern of lines is repeating and regularly spaced. If you make a large movement, it does not count the lines and then multiply by the line spacing, but instead it measures how far each line moves past, and then adds up these movements, getting the result somewhat wrong. Remember, you never got to tell it what the spacing of the lines was in the first place. If the lens is a little bit closer to the pattern, the image will appear to move faster because of the greater magnification, and the result will be a larger apparent movement. There are graphs of that effect in the datasheet. You could just use the mouse chip as a camera (image sensor) since it is possible to read images out of the chip in a debug mode, but then you would have to do the processing in another microcontroller or FPGA, with a more suitable algorithm that knows that the pattern is regularly spaced. I suspect that the main problem with this approach is speed: I am not sure that it is possible to read data out of the mouse chip at the full frame rate, and even if it is possible, the external image processing chip will need to be pretty fast at processing the data if you want it to work as fast as it does in the mouse. A more attractive option would be for someone to reverse engineer the firmware of the Avago mouse chips. It is possible to upload new firmware to these mouse chips, according to the Avago website. If the hardware is flexible enough, then someone could re-write the firmware so that the chip understands that the pattern you will be putting in front of it is regularly spaced, so it can work out large distances much more exactly by counting the lines, and only interpolate the fine movement between the lines. This way it would be a useful encoder. These devices would be particularly useful as 2-D encoders, because it is relatively easy to buy a 1-D rotary or linear encoder, but then if you want 2-D you need two 1-D encoders as well as a way of making them move at exactly 90 degrees (or another known angle). If you started out with a 2-D pattern, then there would be no further mechanical linkages with associated backlash, angle errors etc. This could be used for example on the X-Y table of a hobby CNC mill. You could also make a two dimensional linear motor stage with neodymium magnets and supported by aerostatic bearings, and the mouse chip would be a nice feedback encoder (maybe not quite as fast as one would like, but very convenient). Chris |
All times are GMT +1. The time now is 12:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter