Inside a Mouse

The main goal of any mouse is to translate the motion of your hand into signals that the computer can use. Almost all mice today do the translation using five components:


The guts of a mouse


  1. A ball inside the mouse touches the desktop and rolls when the mouse moves.


    The underside of the mouse's logic board. The exposed
    portion of the ball touches the desktop

  2. Two rollers inside the mouse touch the ball. One of the rollers is oriented so that it detects motion in the X direction, and the other is oriented 90 degrees to the first roller so it detects motion in the Y direction. When the ball rolls, one or both of these rollers roll as well. The following image shows the two white rollers on this mouse:


    The rollers that touch the ball and detect X and Y motion


    A typical optical encoding disk. This disk
    has 36 holes around its outer edge.


    A close-up of one of the optical encoders that track
    mouse motion. There is an infrared LED (clear) on one side of the
    disk and an infrared sensor (red) on the other.


    The logic section of a mouse is dominated by an encoder chip,
    a small processor that reads the pulses coming from the
    infrared sensors and turns them into bytes sent to the computer.
    You can also see the two buttons that detect clicks
    (on either side of the wire connector).

    Almost all mice used on personal computers use this optomechanical arrangement. The disk moves mechanically, and an optical system counts pulses of light. On this mouse, the ball is 21 mm in diameter. The roller is 7 mm in diameter. The encoding disk has 36 holes. So if the mouse moves 25.4 mm (1 inch), the encoder chip detects 41 pulses of light.

    You might have noticed that each encoder disk has 2 infrared LEDs and 2 infrared sensors, one on each side of the disk (so there are four LED/sensor pairs inside a mouse). This arrangement allows the processor to detect the disk's direction of rotation. There is a piece of plastic with a small, precisely located hole that sits between the encoder disk and each infrared sensor. It is visible in this photo:


    A close-up of one of the optical encoders that track mouse motion.
    Note the piece of plastic between the infrared sensor (red) and the encoding disk

    This piece of plastic provides a window through which the infrared sensor can "see". The window on one side of the disk is located slightly higher than it is on the other -- one half the height of one of the holes in the encoder disk, to be exact. That difference causes the two infrared sensors to see pulses of light at slightly different times. There are times when one of the sensors will see a pulse of light when the other does not, and vice versa.

     

      1