Mouse Cam
Use an optical mouse for low resolution imaging. The picture is that of an "e" under the mouse.
The Inspiration for the Project
I was looking at this page: optical mouse cam and the comments of people who wanted to do it but was unsure how to proceed.
When I was gifted a failed optical mouse I opened it up and found that it had the same sensor as in the web page above. So I could repeat his work, and use the software he had developed.
The picture shows the board inside the mouse without modification.
When I was gifted a failed optical mouse I opened it up and found that it had the same sensor as in the web page above. So I could repeat his work, and use the software he had developed.
The picture shows the board inside the mouse without modification.
Remove the Controller Chip
When you get your mouse, open it. The optical sensor can be distinguished by it being just above the lens. It should have eight pins, and have a sort of sun logo on it, and also the inscription "A2610". In that case, it is the Agilent ADNS2610 optical mouse sensor, the same as used by spritemods, and (later) by me. If it has more than eight legs, or a different part number, these instructions might not work.
Here, I have removed the controller chip and connected two links so that the signals from the sensor pass straight through.
The three pushbutton switches were removed to be used in some other project. The aluminium electrolytic capacitors were replaced with tantalum capacitors of the same values, but smaller.
Here, I have removed the controller chip and connected two links so that the signals from the sensor pass straight through.
The three pushbutton switches were removed to be used in some other project. The aluminium electrolytic capacitors were replaced with tantalum capacitors of the same values, but smaller.
The Sensor
The picture shows a closeup of the sensor chip and I have labelled the pins according to the datasheet.
The writing on my mouse sensor says "A2610 C0517C" the first being the part number, and the second maybe the date and mfg code.
We have to connect to the Vdd, Gnd, sck and sdio pins (click on the image to view it full size).
The writing on my mouse sensor says "A2610 C0517C" the first being the part number, and the second maybe the date and mfg code.
We have to connect to the Vdd, Gnd, sck and sdio pins (click on the image to view it full size).
The Underside of the Board
The picture shows the underside of the board. The optical sensor has been protected with a bit of tape.
I have labelled the two signal lines. The gnd area is the largest copper area on the board. The Vdd can be recognized by there being an electrolytic capacitor directly across it and gnd.
I have labelled the two signal lines. The gnd area is the largest copper area on the board. The Vdd can be recognized by there being an electrolytic capacitor directly across it and gnd.
The Printer Connector
Over to the other side, you need a parallel (centronics) port, commonly called a printer port, on your computer. That is a 25 pin D connector, of which four lines are used.
On the figure, I have marked the four lines which are used. If you look closely, you will see that the pins are labelled with numbers.
On the figure, I have marked the four lines which are used. If you look closely, you will see that the pins are labelled with numbers.
Construction - Fit the Diode
You need a diode, for example the 1N4148. Solder it with the end with the band to pin 5 of the connector. That is, the cathode of the diode goes to pin 5.
The Other End of the Diode
Now solder a wire (or use the lead of the diode itself) and connect the other end of the diode to pin 12. That is, the anode of the diode connects to pin 12.
Now check it. Pin 12 is at the very end but one, and there are six free pins between it and pin 5, where the other end of the diode is fixed.
Now check it. Pin 12 is at the very end but one, and there are six free pins between it and pin 5, where the other end of the diode is fixed.
Connect the Cable
I used a piece of flatcable from a hard drive cable to connect the mouse board to the printer connector. The numbers in the figure below refer to the pin numbers of the optical sensor chip.
It is best to identify those wires using a multimeter, or some sort of continuity tester which will not damage the sensor chip.
Pin 3 of the sensor is the data in/out pin. It goes to the connector pin 12 directly, and to pin 5 via the diode.
Pin 4 of the sensor is the clock input. It goes directly to pin 9 of the connector.
Pin 6 of the sensor is ground. It connects to the large area of copper on the board, and to pin 25 of the connector.
Pin 7 of the sensor is the supply pin. It has to be supplied with +5 volts for the sensor to work. In the figure, this is the yellow wire, running back to a hard drive connector. If you have the original cable of the mouse, whether USB or PS/2, the five volt line will be present at the end. Just identify that and connect to it.
It is best to identify those wires using a multimeter, or some sort of continuity tester which will not damage the sensor chip.
Pin 3 of the sensor is the data in/out pin. It goes to the connector pin 12 directly, and to pin 5 via the diode.
Pin 4 of the sensor is the clock input. It goes directly to pin 9 of the connector.
Pin 6 of the sensor is ground. It connects to the large area of copper on the board, and to pin 25 of the connector.
Pin 7 of the sensor is the supply pin. It has to be supplied with +5 volts for the sensor to work. In the figure, this is the yellow wire, running back to a hard drive connector. If you have the original cable of the mouse, whether USB or PS/2, the five volt line will be present at the end. Just identify that and connect to it.
Make It Work
Once it is connected up to the parallel port, the software has to be downloaded and run in order to see the output on the computer screen. The program is called "Readmouse" and is available here. It is a zip archive which has to be downloaded, unzipped, and then follow the instructions in the readme files.
The sourcecode of the program is included in that archive. The datasheet of the sensor is available here in case you get a different sensor and wish to modify the program to work with that.
The figure shows the output of my mouse camera when used as a scanner on a page containing some printed matter.
I think I shall continue to use my regular scanner, after all.
The sourcecode of the program is included in that archive. The datasheet of the sensor is available here in case you get a different sensor and wish to modify the program to work with that.
The figure shows the output of my mouse camera when used as a scanner on a page containing some printed matter.
I think I shall continue to use my regular scanner, after all.