Experimental Characterization of the Twin-Eye Laser Mouse Sensor

This paper proposes the experimental characterization of a laser mouse sensor used in some optical mouse devices. The sensor characterized is called twin-eye laser mouse sensor and uses the Doppler effect to measure displacement as an alternative to optical flow-based mouse sensors. The experimental characterization showed similar measurement performances to optical flow sensors except in the sensitivity to height changes and whenmeasuring nonlinear displacements, where the twin-eye sensor offered better performance.The measurement principle of this optical sensor can be applied to the development of alternative inexpensive applications that require planar displacement measurement and poor sensitivity to z-axis changes such as mobile robotics.


Introduction
The computer mouse, introduced in the 1960s, is currently the main human computer interface device. It is an electronic device held with one hand that is displaced over a supporting surface and translates these displacements into cursor displacements on a computer screen. In the first device implementations, the displacement of the surface under the mouse was measured by using mechanical wheels and the rotation of a ball whereas current versions measure surface displacement by using integrated optical sensors, such as optical flow sensors and Doppler sensors.
The optical flow sensors [1,2] measure displacement by using an imaging device pointed at the supporting surface and a digital signal processing (DSP) unit that computes the optical flow of the images acquired. These sensors also incorporate an external or internal LED (or laser LED) device to provide custom and controlled illumination to the supporting surface under the sensor.
There are a huge number of research works related to the analysis and application of optical flow sensors. In [3][4][5], some specific optical flow sensors were evaluated as a two-dimensional displacement sensor, in [6] as a trajectory tracking, and in [5,[7][8][9][10][11] as odometry sensors for robotics. In [3], an optical flow sensor was tested as a displacement sensor with good linearity over opaque objects. In [5], a linear displacement was measured with a coefficient of determination, 2 , of 0.99 but obtaining an error of 1% in the measurement in the case of an offset of 0.1 mm in the relative height of the sensor and also inaccuracies in circular displacements which prone its direct application as trajectory sensor in mobile robotics [12]. In [9], the effect of lateral illumination was analyzed as an error source in odometry applications. In [10], differential optical navigation by using two optical flow sensors was proposed to improve the error in the variation of the height, obtaining a maximum error of 1.38% for a height offset of 20 mm. In [11], multiple optical flow sensors were proposed to improve odometry accuracy when measuring circular displacements. Similarly, a localization system for microaerial vehicles is proposed in [13] combining an optical flow sensor with an inertial navigation system and a magnetometer. Additionally, the image acquired by the optical flow sensor was used in [14][15][16][17][18][19] to develop specific low-cost image-based applications.  For example, in [20], an optical mouse sensor was used to perform Optical Coherence Tomography for manual image scanning. Doppler sensors [21][22][23][24][25] measure displacement based on the Doppler effect by comparing the shifted phase modulation of the reflected light relative to the original laser light [25][26][27]. The velocity of the motion is proportional to the Doppler shift and the displacement is obtained by integrating the velocity into a plane movement over time. In the twin-eye optical sensor, two independent self-mixing lasers are used to measure displacement in both -axis and -axis [23].
The new contribution of this work is the experimental characterization of the optical twin-eye laser sensor as a twoaxis displacement sensor. The results obtained are compared with the performances of optical flow-based sensors.

The Twin-Eye Laser Sensor
The twin-eye laser sensor provided by Philips ( Figure 1) [28] is a compact motion sensor (6.86 mm square and 3.86 mm high) based on two independent self-mixing Vertical-Cavity-Surface-Emitting Lasers [27] (VCSELs) for surface tracking [24,25] on two axes; each laser is used to emit and receive the reflected light. The sensor device includes a DSP, two solidstate lasers, and plastic lenses integrated into the same chip [24].
The working principle of the twin-eye sensor is based on sensing the small portion of scattered infrared light emitted by the laser that is reflected back (into the same emitting cavity) by the surface (Figure 2). When the device is moved along the surface, a shift in the frequency of the returning laser light compared with the original light is generated for each independent laser [25][26][27]. This effect, called the Doppler effect, produces a periodic variation at a constant emitted frequency, defined as the Doppler frequency: where Doppler is the Doppler frequency, is the relative angular orientation of the laser (fixed by the package), V is the velocity component along the direction of the laser beam, and is the wavelength of the laser. An internal DSP converts the Doppler frequency into instantaneous velocity and then the displacement is obtained by integrating this velocity over time.
The Doppler shift frequency does not yield information about the motion direction. To this end, the emitted light is modulated with a low-frequency triangular waveform and then the direction of the displacement is obtained by comparing the Doppler shift in the rising and falling slopes of the triangular modulation [22].
The sensor analyzed in this work is the PLN3032 model that, according to the manufacturer, is a high precision sensor with an independent resolution programming for theaxis and -axis. The main characteristics are a configured resolution from 125 up to 4,000 counts per inch (CPI) in steps of 125 CPI, maximum supported speed of 1.5 m/s, maximum acceleration of 50 g, and recommended distance to the surface of 2.3 mm (Figure 2) (the height range is from 2.1 to 2.5 mm). The sensor can be accessed by reading and writing the internal registers through the Serial Peripheral Interface (SPI) bus.
The main internal registers are the Status, Delta , and Delta , all with 16 bits. The Delta registers have 16 bits but only 10 bits are used to represent the displacement in both and axes since the last reading using a two's complement representation. The Status register has several bits indicating if an internal error has occurred during operation, if an overflow in the Delta registers has occurred, if a movement has been detected, and if the sensor has been lifted. Finally, there is a register to configure the resolution of the displacement for each independent axis. Figure 3: Description of the twin-eye sensor placement and trajectories tested: 1 , -axis forward displacement, 2 , diagonal displacement, and 3 , arc displacement.

Experimental Setup
The experimental setup used in this work was based on a PLN2031 twin-eye mouse laser sensor, a Microstick Microchip evaluation board with the dsPIC33FJ128MC802 microcontroller to read the displacement measured with the optical sensor, and a mechanical placement system that allowed precise relative sensor displacement ( Figure 3) over a predefined surface (in this work, a standard Formica desk). During the experiments, the package of the sensor was placed at 45 ∘ to have the two orthogonal lasers measuring on the and displacement axes.
This measurement setup ( Figure 3) and the predefined trajectories 1 , 2 , and 3 allowed the following experiments: forward and backward displacement, sensitivity measured at different resolutions, arc displacement, diagonal displacement, sensitivity to height, and speed dependence.

Forward and Backward Displacements.
In the experiment performed to estimate the sensitivity to forward and backward displacement, the optical sensor was displaced a variable distance, , along the -axis, labelled as trajectory 1 in Figure 3. The optical sensor was internally configured at 4,000 CPI in both axes (157.4 pulses per millimeter or 6.35 m per pulse) and placed at the recommended height (2.3 mm). Figure 4 shows the average counts measured when displacing the sensor forward (circles) and backward (triangles) 10 times per experiment. Figure 5 shows the same results obtained when displacing the optical sensor along the -axis. In general there were very few differences when measuring forward and backward displacements.
In both cases, a good linear correlation was obtained with a coefficient of determination of 2 = 0.99996 and 2 = 0.99998 for the -axis and -axis, respectively. The linear relationship between the displacement and the counts can be expressed as where and are the displacements in millimeters along the -axis and -axis and and are the counts measured  by the sensor in both axes. Figure 6 shows the standard deviation evaluated for each distance measured. In general, the standard deviation did not increase with the distance and was always in a range between 5 and 25 counts (or from 31.75 to 158.75 m).
Finally, Figure 7 illustrates the average, minimum, and maximum sensitivity obtained for each distance measured. On one hand, these results and the linear regression shown in (2) present a small misalignment in the sensitivity of theaxis and -axis that may require individual calibration prior to any precise use. However, on the other hand, the average sensitivity changed by less than 2 counts in a distance range from 15 to 50 mm.

Sensitivity at Different
Resolution. The twin-eye laser sensor used in this work has 5 bits per axis to configure the resolution of the motion displacement (from 125 CPI to 4,000 CPI, in 125-CPI steps). Figure 8 shows the averaged counts obtained in a forward displacement (Figure 3   Sensor counts x-axis y-axis Figure 6: Evolution of the standard deviation for each distance measured along the -axis and -axis. the optical sensor along the -axis when using four different resolutions: 1,000, 2,000, 3,000, and 4,000 CPI. Figure 9 summarizes the sensitivity measured for a wide range of sensor resolutions. The relationship between the sensitivity and the resolution is very lineal with a coefficient of determination of 2 = 0.99998 and can be expressed as where res is the resolution of the optical sensor in CPI and res is the sensitivity of the sensor at that resolution. Then, the displacement in millimeters, , generated in a forward movement can be estimated by using   where is the number of counts measured and b is the constant term of the linear relationship. Figure 10 shows the value of this constant term measured along the -axis and different optical sensor resolutions. This constant term, , has values in a narrow range between 3 and 4.5 mm with an average value of 3.6 mm.

Sensitivity to Speed.
In the experiment to estimate the sensitivity to the speed of the motion, the optical sensor was displaced along the -axis, labelled as trajectory 1 in Figure 3, for 1 second. The optical sensor was internally configured at 4,000 CPI in both axes and placed at the recommended height (2.3 mm). Each measurement was repeated 10 times. Figure 11 presents the averaged sensor counts measured during 1 second while the sensor was moving forward at  Figure 11 show a very good linearity in the relationship with a coefficient of correlation, 2 , of 0.99998. Therefore the distance measured with the twin-eye sensor is not sensitive to the speed of displacement. More specifically, Figure 12 shows the average, maximum, and minimum sensitivity of the displacement of the sensor relative to the linear speeds considered. In all cases considered, the average sensitivity to displacement was very close to 150 counts/mm, a value that coincides with sensitivities obtained previously with the same resolution.

Sensitivity to Height.
In the experiment performed to evaluate the sensitivity to height, the optical sensor was displaced a fixed distance of 50 mm along the -axis. The optical sensor was internally configured at 4,000 CPI in both axes and placed at the recommended height of 2.3 mm from the surface (the operational height range defined by the manufacturer was from 2.1 to 2.5 mm). Figure 13 shows the counts measured in both axes by the sensor relative to the height offset applied (height offset 0 mm corresponds to the recommended height of 2.3 mm). The offset was increased up to 8 mm in 0.1 mm steps. The results in Figure 13 show that the sensor measured the motion up to a height offset of 5.5 mm correctly, after which the values of the displacement were incorrect. When the height offset was above 7.7 mm, the sensor failed to detect any motion. Figure 14 shows details of the relative error obtained in the forward displacement relative to the height offset. The average relative error increased very slowly as the height offset increased, reaching 2% at an offset height of 4 mm. This distance error represents an improvement compared with optical flow mouse sensors. In [5], the maximum relative error obtained for a height offset of 1 mm in an optical flow mouse sensor was 14.37%, while it is lower than 0.2% with the twin-eye sensor, which represents a great improvement.

Diagonal Displacement.
The following experiment was designed to evaluate the behavior of the sensor when it is displaced a fixed distance of 50 mm diagonally (labelled as trajectory 2 in Figure 3) using a fixed inclination angle . The optical sensor was internally configured at 4,000 CPI in both axes and placed at the recommended height (2.3 mm), and each measure was repeated 8 times. The angle of the displacement was from 0 ∘ (displacement along the -axis) to 90 ∘ (displacement along the -axis). Figure 15 shows the counts measured by the sensor for both the -axis andaxis and also the evaluation of the Euclidean distance for both values (labelled as diagonal distance). Figure 15 shows that the angle of the diagonal displacement of the sensor had very little effect on the counts measured by the sensor. Figure 16 shows details of these results expressed as the relative error in the measurement of the displacement relative to the angle of the diagonal displacement. In Figure 16, the counts measured by the sensor were converted into distance by using the calibration curves defined in (2) and then the Euclidean distance was computed and compared with the real 50 mm of the diagonal displacement performed. As could be expected, the average relative error for angles 0 ∘ and 90 ∘ was zero because the calibration curves applied to the sensor were obtained in a forward displacement along the -axis (0 ∘ ) and -axis (90 ∘ ). Alternatively, the relative error grew symmetrically from 0 ∘ to 45 ∘ and from 90 ∘ to 45 ∘ . The maximum average relative error was 2.49% at an angular inclination of 45 ∘ .
These results are not an improvement over those obtained with optical flow sensors. In [5], the maximum relative error obtained measuring a diagonal displacement with an optical flow mouse sensor was 2%, a very similar result.
3.6. Arc Displacement. Some applications for this sensor, such as trajectory measurement in mobile robots, require detecting and measuring rotation. The following experiment was designed to evaluate the behavior of the sensor when it is displaced following 45 ∘ of an arc, labelled as trajectory 3 in Figure 3. The optical sensor was internally configured at 4,000 CPI in both axes and placed at the recommended height (2.3 mm) and each measurement was repeated 10 times. Figure 17 shows the average, maximum, and minimum sensor displacement measured by using the calibration curves defined in (4) and the expected distance (perimeter) relative to the radius of the arc (from 100 to 400 mm). The results in Figure 17 show very few differences between the measurements obtained and the expected values. Figure 18 shows details of these results expressed as the relative error in the displacement relative to the radius of the arc. The average relative error increased from −1.3% to −2.0% as the radius increased. These results represent a larger improvement over optical flow mouse sensors. In [5], the relative error obtained when measuring a displacement in arc with an optical flow mouse sensor was 66%, while it was always lower than 3% for this twin-eye sensor.

Conclusions
This work presents the experimental characterization of the twin-eye laser mouse sensor. The sensor specifically analyzed in this work was the PLN3032 model manufactured by Philips. This sensor uses a laser light to measure displacement based on the Doppler effect by comparing the shifted phase modulation of the reflected light. The displacement is then obtained by integrating the velocity into a plane movement over time and is returned as discrete displacement counts. This measurement methodology represents an alternative to the widely used optical flow sensors in optical mouse devices. The conclusions of the experimental characterization performed are that the counts measured in one displacement axis during a forward and a backward motion are very linear ( 2 > 0.99) and very similar but require individual calibration in both measurement axes for precise motion measurement. The relationship between the motion sensitivity and the resolution is very linear ( 2 > 0.99), and this linear model can be used to estimate the distance of the motion through the counts measured by the sensor. Additionally, the motion sensitivity is not affected by the speed of the displacement in a range up to 1 m/s. The twin-eye sensor is less sensitive to the height than the optical flow sensors which is an advantage; the relative error was 2% for an offset of 4 mm, whereas an offset of 1 mm generated an error of 14% in optical flow sensors. Alternatively, the relative error obtained when measuring a diagonal displacement was very similar in both cases. The main differences between the twin-eye and the optical flow sensors appeared when measuring a circular displacement (following an arc). In the case of the twin-eye sensor the error was lower than 3%, an acceptable value compared with the 66% obtained in the case of an optical flow sensor.
The better performance in the measurement of nonlinear displacements combined with less sensitivity to changes in the sensor's height makes the twin-eye sensor a candidate for applications, such as mobile robots, that require trajectory measurement over flat floor surfaces and poor sensitivity to -axis changes.