[Study] “Retro-Engineering” of an optical computer mouse.

Cover by Kevin Collins – FLICKR –

Hi everyone o/

For the ones who follows me on Mastodon (Ozellius@mastodon.xyz), you are probably aware that I am interested about retro-engineering.

I’ve never had the chance to try it and I’m glad that I cloud share my first RE study with you.

The subject of this experiment is a broken HP Computer Optical Mouse that I brought in a super market 2 years ago. The goal is to understand how it’s made and what can we learn from it.

Some dismantling after we got our mouse opened on the “electronic surgery table” or the connoisseur “the wooden plate”.

The Computer Optical Mouse opened

First thing to notice : WHAT THE FUCK IS THIS PCB.

I agree, in the maker community making PCB with everything is common but for industry, especially that one of my specialty (EMC, PCB Conception, etc..), finding one of this “axe-cut” PCB is quite surprising ( I’ve bought it 15 € T_T ).

But no need to judge it quickly, we still have to find the secrets of this little thing 😉

Quick stop at the mouse buttons. Interesting to see that scroll-button is activated by the scroll axis on a push button (strange but works well) and the two L/R clicks are managed by to commutators.

The tree buttons of the optical mouse

It’s one of the explanation of the choice to have only Trough Holes components on this design. The main elements are back-soldered so no need to slow-down the worker with a different method of conception.

Other stop at the optical system : [Quick reminder/explanation] laser or infrared mouse use a light source reflected on an usable surface. The change of the lightened area will be “noticed” by the sensor (CMOS DSP), who will calculate the direction of the shift and send it to the computer.

The optical system for this data processing is mainly LED -> Surface > Sensor. But it’s interesting to observe the reflecting prism who allow a good re-direction and a good focal for the light beam from A to Z.

Optical Elevator with two lenses

Back to electronics.

Before studying the electronic routing, we can notice, already, some basic information, as the Resistor – LED couple (1), or the fact that the scroll wheel is linked to a 3 pins component (2) which probably mean that is a variable resistor.

Furthermore, the large capacitor next to the large chip are probably for decoupling (3) and the 4 wires (4) will certainly help us to find where is the ground and where is the supply.


Now to the routing !

We need to link the different parts by coupling copper traces with chip references or identified comp.

Back Layer of the PCB , with easy/understandable copper trace. Sorry for the blur 😥

As the DSP chip the only complex system of this device, so it’s the only data-sheet we need to find. Then, we will follow the traces, gather the values and reconstruct the electrical schematic !

The chip is a low cost USB Mouse Chip from PixArt referenced at PAW3512DK (base version).

Here’s the datasheet : http://pdf1.alldatasheet.com/datasheet-pdf/view/558659/PIXART/PAW3512DK.html

As all the CMOS, it uses 5v supply, have an 10mA normal use current and a correct sensibility.

The PinOut table indicate us that this chip, obviously, is also an USB-Mouse interface by gathering the laserbeam , the buttons , the scroll wheel value and sending the data by USB.

The 12 – 11 pins are for analog value of Z, and are linked to 2 of the 3 pins scroll-wheel comp. As the third pin connected to GND (easily noticeable by the shape of the pin, the ground-wire USB-color and the anode of the diode) we can agree the first hypothesis : it’s a variable resistor.

The 9-10 pins are buttons assigned pins and their traces lead to … buttons. And those button are soldered on a plane to the blue wire.

So we already know that the Grey wire is GND and the Blue wire is +5v

The 8-7 must confirm our theory because there are USB-Data pins and their routes lead to … green and white wire. All the connections are identified.

On the other side of the chip, we have 6-5 for the supply pins. There are soldered to a plane with, aside, one capacitor each + one more for the analog reference.

This plane is , at first , not connected to the supply plane, but when we look closer, we notice that the metal wire use to keep the IR LED straight is actually used as a link to bring power to this plane. That’s a old-school technique to avoid the use of an another layer of copper (and cost x2).

So those two pins are supplied in 5v and decoupled by a capacitor of 1µF for the digital and 10µF // (parallelized) with and 10nF for the analog (parallelizing two capacitor is for adding the effect of decoupling + noise filter).


BONUS : those capacitor are placed aside the pins, instead of before this situation disrupt the effect of decoupling / filtering and it’s not very smart. If you’re curious about ECM, transients,etc.. my advice is to read the studies by TI or Cypress on the subject. It could chage your life ! (for exemple : http://www.cypress.com/file/138636/download)


4 pins left !

The 4 is the ground and is identified. Next !

The 3 is the Input/output voltage reference, so 5v decoupled with a 1µF. Trace is OK.

The 1 is link to the button. Ok too.

The 2 is routed to the resistor, and the resistor routed to the LED + 10nF [5v-GND] Capacitor. Bingo, our expectations became true.

Interesting point : The led is fit in a black ring.

This is for reducing the effect of large spot emissions. The IR LED shine onto everything and if you want less optical pollution you need to cover them up (even black plastic is only 50% intensity reduction)

Now that we have all our pins, the PCB still have empty slots for other components and i guess that is a standardized conception for many models of Optical Mouse (with 16 pin DSP instead of 12).

So the final schematic :

Screenshot from 2017-05-25 15-41-23

Hope that first try of RE was interesting, I will try to post shorter/efficient version of other electronics on the future for those who are interested.

Thought of the day : the more you hide to your customer, the more money you do on  shitty conception 😀

Enjoy your day !


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s