Documente Academic
Documente Profesional
Documente Cultură
a r t i c l e i n f o a b s t r a c t
Article history: In this paper, a new application and capabilities of the sensor of the optical mouse are presented. An
Received 3 February 2009 inexpensive incremental rotary encoder is built based on a mechanical assembly where the sensor is at a
Received in revised form 18 May 2009 fixed distance from a rotary white surface onto which a reference black line is drawn. The optical mouse
Accepted 4 August 2009
sensor measures changes in position by optically acquiring sequential surface images and mathematically
Available online 8 August 2009
determining the direction and magnitude of movement. The optical sensor uses the information of the
images acquired and an attached light source in a closed control loop to keep an average illumination
Keywords:
level in the images. In this paper, the registers involved in this control loop are used to detect high
Optical mouse
Mouse sensor
contrast marks without any dedicated image-processing procedure. The detection of this reference mark
Rotary encoder in a rotary white surface allows the correction of long term cumulative errors originated in displacement
Displacement sensor measurements performed by the optical sensor and enables the use of the rotary encoder in precision
measurements close to 1900 counts per revolution.
© 2009 Elsevier B.V. All rights reserved.
0924-4247/$ – see front matter © 2009 Elsevier B.V. All rights reserved.
doi:10.1016/j.sna.2009.08.003
74 M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81
Table 1
Paper types analyzed.
Fig. 3. Image of the experiment performed to evaluate the effect of one transversal
black line in some internal registers of the optical mouse sensor.
Fig. 5. Dynamic evolution of the SHUTTER register when moving the optical mouse
sensor over white paper with three transversal black lines of width: 1.2, 3.2 and
sured indirectly through the shadows enhanced by the lateral 5.2 mm, elapsed 25.4 mm.
illumination applied. The SQUAL register has values from 0 to 169;
a high value means that the image-processing algorithm used to 3.2. Detecting marks using SHUTTER
detect motion will have more points to compare and the motion
will be measured more accurately. As a reference, Table 1 shows The SHUTTER register is an indication of the intensity applied to
the value of the SQUAL register when placing the optical mouse the LED, and then of the emitted light. When the image becomes
sensor over some standard paper for office use. The optical sen- dark, an internal control loop increases the intensity applied to the
sor does not work properly in the case of fine and reflecting white LED to keep an average illumination on the image. The SHUTTER has
paper and, in general, SQUAL values greater than 30 ensure good 16 bits of resolution and a high and a low register value; in each
detection of the displacement. step, the intensity applied to the LED changes 1/16. Fig. 5 shows
Fig. 4 shows the dynamic evolution of the SQUAL register in a the dynamic evolution of the SHUTTER register when repeating the
forward displacement of the optical sensor (parallel to the y-axis) displacement over the same surface and lines as in the previous
over an adhesive white surface (see Table 1) with three transver- paragraph. Fig. 5 shows that the SHUTTER register has values from
sal black lines, 1.2, 3.2 and 5.2 mm wide respectively, and elapsed 20 to 25 for the white paper but increases to 40 for a width of
25.4 mm (1 in.) (Fig. 3); the lines where printed on a standard laser 1.2 mm, 100 for a width of 3.2 mm and up to 270 for a width of
printer. Fig. 4 shows that the SQUAL register has values from 50 to 5.2 mm (see Fig. 3).
68 for the white paper but has two positive peaks when the sensor The results shown in Fig. 5 were obtained with a linear move-
reaches the beginning and end of the lines and one or two negative ment at a fixed speed and the height of the peak is proportional
peaks depending on the width of the line. The number of features to the line width. Fig. 6 shows the minimum and maximum value
detected varies very little in the white paper, increases suddenly in (peak) of the SHUTTER for a set of experiments with black lines of
the border of the lines, decreases suddenly when the line is com- different widths. The linear speed of the displacement was fixed and
pletely under the sensor (the image becomes almost black and no constant and lines were isolated with at least 20 mm of unmarked
features are detected). white surface. The most interesting result is that the minimum
value is always the same (surface dependent) whereas the height
of the peak increases as the width of the line increases, although it
Fig. 4. Dynamic evolution of the SQUAL register when moving the optical mouse
sensor over white paper with three transversal black lines of width: 1.2, 3.2 and Fig. 6. Maximum and minimum value of the SHUTTER register for different line
5.2 mm, elapsed 25.4 mm. widths.
76 M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81
Fig. 7. Dynamic evolution of the PIXELSUM register when moving the optical mouse Fig. 8. Maximum, average and minimum value of the PIXELSUM register for differ-
sensor over white paper with three transversal black lines of width: 1.2, 3.2 and ent line widths.
5.2 mm, elapsed 25.4 mm.
Fig. 9. Image (right) and drawing (left) of the parameters and parts of the rotary encoder.
M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81 77
Fig. 10. Dynamic evolution of the SHUTTER, PIXELSUM and SQUAL registers when Fig. 12. Average counts of both measurement axes in the allowed resolutions
moving the optical sensor linearly over white paper with three black lines of width: depending on the placement radius of the sensor.
1.2, 3.2 and 5.2 mm, elapsed 25.4 mm.
Fig. 11. Images from the ADNS-3088 used to locate the center of rotation of the wheel of the rotary encoder; the line has a width of 0.2 mm.
78 M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81
Fig. 14. Relative error of the counts measured in one complete turn over the y-axis
Fig. 17. Standard deviation of the counts measured in one complete turn with the
depending on the placement radius of the sensor.
optical sensor placed at a radius of 10 mm.
lar speeds from 5 to 100 rpm with the sensor placed at a radius of
10 mm, an angular orientation of 0◦ , and height of 2.4 mm. Fig. 16
shows that the average value measured decreases linearly with
speed, and the standard deviation of the measurements increases
linearly with speed (Fig. 17), although the average relative error in
the counts measured is always lower than 1.5%, which can be an
acceptable value in the context of inexpensive sensors.
There are no problems detecting the reference line in this speed
range. Fig. 18 shows the maximum, average and minimum values
Fig. 15. Histograms of the absolute error obtained in the counts measured in one of the register PIXELSUM, which are almost constant when using
turn at a fixed angular speed of 15 rpm and the optical sensor placed at a radius of a 0.2 mm wide line in a range of angular speed up to 100 rpm.
10 mm for resolutions of 400 and 800 cpi. The results in Fig. 18 agree with the results also shown in Fig. 8,
therefore the detection of the reference line can be done at very
different angular speeds with a simple threshold in the values of
the analytical value expected; the sensor was placed at a radius of
the PIXELSUM register. In theory, considering only the measure-
10 mm and the angular speed was 15 rpm. The standard deviation of
ment limitations of the optical sensor, and the time spent reading
the measurements was 1.04 counts for 400 cpi and 1.70 counts for
the PIXELSUM, DELTA X, and DELTA Y registers sequentially, the
800 cpi, that is the resolution finally chosen for the optical mouse
maximum allowable speed when the sensor is placed at a radius
sensor of the rotary encoder because the resolution was improved
of 10 mm is 490 rpm, although the mechanical design of the rotary
100% and the standard deviation of the measurements is only 62%
encoder used in this paper did not allow this limit to be verified.
worse.
Fig. 19 repeats the previous experiment for line widths of 0.2,
The second parameter analyzed is the sensitivity to the angular
1.2, and 2 mm (see Fig. 20) with the sensor placed at a radius of
speed, ω. Fig. 16 shows the counts measured in the y-axis for angu-
Fig. 16. Maximum, average and minimum counts measured in one complete turn Fig. 18. Maximum, average and minimum value of the PIXELSUM register for dif-
with the optical sensor placed at a radius of 10 mm. ferent angular speeds with the optical sensor placed at a radius of 10 mm.
M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81 79
Fig. 19. Maximum, average and minimum counts measured in one complete turn
for different angular speeds with the optical sensor placed at a radius of 10 mm. Fig. 21. Average relative error in the counts measured in one complete turn for
different angles of orientation with the optical sensor placed at a radius of 10 mm.
9.8, 10 and 10.2 mm. In all cases, the behavior is very similar; the
counts measured in one revolution slightly decreases as the speed
increases. The sensitivity to speed combined with the deviation of
the measurements precludes direct use of this rotary encoder in
applications where precision measurements are needed. However,
the reference line combined with an initial calibration of the rotary
encoder can be used to improve the precision of the measurements,
as stated in the validation section.
Another important factor in the design of the rotary encoder
is the sensitivity to errors in its angle of orientation, ˛. Fig. 21
shows the average of the relative error in the counts measured in
one revolution depending on the angle of orientation of the sen-
sor (0◦ corresponds to a perfect tangential orientation) obtained
with a 0.2 mm line, a radius of 10 mm and a fixed angular speed
of 15 rpm. In general, the average relative error is below 1% for an
orientation in a range from −2.5◦ (to the center) to +1◦ . In his case,
this asymmetry is probably originated by the way that the opti-
cal flow algorithm implemented in the optical sensor averages the
Fig. 22. Average relative error in the counts measured in one complete turn for
displacement detected in the image. Fortunately, this error in the
different relative height offsets with the optical sensor placed at a radius of 10 mm.
orientation originates large displacement measurements in the x-
axis and so can be automatically detected and corrected in an initial
mechanical calibration operation. cal sensor in the case of the recommended height and for an offset
The last experiment of this section is used to confirm the sensi- of 1.2 mm where the sensor fails in the measurements.
tivity of the optical mouse sensor to changes in its relative height.
Starting at the height recommended by the manufacturer (2.4 mm), 5. Use and validation of the rotary encoder
Fig. 22 shows the average relative error in the counts measured in
one complete revolution depending on relative changes of height. The definitive design of the rotary encoder has a 100 mm-radius
The experiment was performed with the optical sensor placed at a wheel and the sensor placed at its recommended height at a radius
radius of 10 mm and an angular speed of 15 rpm. of 10 mm from the center of the wheel. The use of the rotary encoder
Fig. 22 shows that an offset of 0.3 mm in the height originates a requires an initial calibration prior to any measurement operation.
relative error in the measurements of −5.4%. Additionally, Fig. 23 As happens in the conventional mouse, it is supposed that the opti-
shows the image of the reference line (0.2 mm) viewed by the opti- cal sensor will work with a dedicated microprocessor as a bridge to
Fig. 20. Lines of 0.2 (left), 1.2 (center) and 2 mm (right) viewed by the ADNS-3088.
80 M. Tresanchez et al. / Sensors and Actuators A 155 (2009) 73–81
Fig. 23. Lines of 0.2 mm viewed by the ADNS-3088 at the nominal height (left) and
with a relative offset of 1.2 mm (right).
sive rotary encoder was primarily designed for odometry in low [11] T.W. Ng, K.T. Ang, The optical mouse for vibratory motion sensing, Sens. Actu-
cost mobile robot applications but can be used in a wide range of ators A SA-116 (2004) 205–208.
[12] M.K. Chmarra, N.H. Bakker, C.A. Grimbergen, J. Dankelman, TrEndo, a device
applications to measure rotation or displacement. for tracking minimally invasive surgical instruments in training setups, Sens.
Actuators A SA–126 (2006) 328–334.
Acknowledgements [13] G.K. Lott, M.J. Rosen, R.R. Hoy, An inexpensive sub-millisecond system for
walking measurements of small animals based on optical computer mouse
technology, J. Neurosci. Methods JNM-161 (2007) 55–61.
With the support of the Government of Catalonia (Comissionat [14] S. Matsuda, Measurement of solid circulation rate in a circulating fluidized bed,
per a Universitats i Recerca, Departament d’Innovació, Universitats Powder Technol. PT-187 (2008) 200–204.
[15] N.N.A. Charniya, S.V. Dudul, Sensor for classification of material type and its
i Empresa) and the European Social Fund. surface properties using radial basis networks, IEEE Sens. J. SJ-8 (2008) 1981–
1991.
References [16] N.N.A. Charniya, S.V. Dudul, Investigations into the effects of illumination and
acceleration on optical mouse sensors as contact-free 2D measurement devices,
Sens. Actuators A SA-149 (2009) 87–92.
[1] T.W. Ng, The optical mouse as a two-dimensional displacement sensor, Sens.
[17] Avago, ADNS-3080 and ADNS-3088 High Performance Optical Mouse Sensor,
Actuators A SA–107 (2003) 21–25.
http://www.avagotech.com (2008).
[2] U. Minoni, A. Signorini, Low-cost optical motion sensor: an experimental char-
acterization, Sens. Actuators A SA–128 (2006) 402–408.
[3] J. Palacin, I. Valganon, R. Pernia, The optical mouse for indoor mobile robot Biographies
odometry measurement, Sens. Actuators A SA–126 (2006) 141–147.
[4] J.A. Cooney, W.L. Xu, G. Bright, Visual dead-reckoning for motion con-
Marcel Tresanchez received the BSc and MSc degrees in engineering from the Uni-
trol of a mecanum-wheeled mobile robot, Mechatronics M–14 (2004) 623–
637. versity of Lleida (UdL), Spain in 2005 and 2007, respectively. He is currently a Ph.D.
[5] S. Lee, Mobile robot localization using optical mice, in: IEEE Int. Conf. Robotics, student in the robotics laboratory of the UdL and his research interests include
Automation and Mechatronics, Singapore, December 1–3, vol. 2, 2004, pp. mobile robots, precision agriculture and the educational application of robotics.
1192–1197.
Tomas Palleja received the BSc and MSc degrees in engineering from the Univer-
[6] D. Sekimori, F. Miyazaki, Self-localization for indoor mobile robots based on
optical mouse sensor values and simple global camera information, in: IEEE sity of Lleida (UdL), Spain in 2004 and 2006, respectively. He is currently a Ph.D.
Int. Conf. Robotics and Biomimetics, Hong Kong and Macau, June 29–July 3, student in the robotics laboratory of the UdL and his research interests include pre-
2005, pp. 605–610. cision agriculture, mobile robots, human system interaction and the educational
[7] A. Bonarini, M. Matteucci, M. Restelli, Automatic error detection and reduction application of robotics.
for an odometric sensor based on two optical mice, in: IEEE Int. Conf. Robotics
and Automation, Barcelona, Spain, April 18–22, 2005, pp. 1675–1680. Merce Teixido received the BSc and MSc degrees in engineering from the University
[8] J. Hu, Y. Chang, Y. Hsu, Calibration and on-line data selection of multiple optical of Lleida (UdL), Spain in 2006 and 2008, respectively. She is currently a Ph.D. stu-
flow sensors for mobile robot localization, in: IEEE Int. Conf. Intelligent Robots dent in the robotics laboratory of the UdL and her research interests include human
and Systems, Nice, France, September 22–26, 2008, pp. 987–992. computer interaction, avatar modeling and the educational application of robotics.
[9] S. Kim, S. Lee, Robust mobile robot velocity estimation using redundant num-
ber of optical mice, in: IEEE Int. Conf. Information and Automation, Zhangjiaje, Jordi Palacin received the BSc and MSc degrees in electronics from the Polytechnic
China, June 20–23, 2008, pp. 107–112. University of Catalonia in 1990 and University of Barcelona (UB), Spain in 1997. He
[10] S. Hengstler, H. Aghajan, MeshEye: a hybrid-resolution smart camera mote for received the Ph.D. degree in electronics from the UB in 2005. In 1992, he joined the
applications in distributed intelligent surveillance, in: 6th Int. Symp. Informa- Department of Computer Science and Industrial Engineering at the University of
tion Processing in Sensor Networks, Cambridge, MA, April 25–27, 2007, pp. Lleida (UdL), Spain leading the robotics group. His research area involves compact
360–369. modeling, data fusion and signal processing applications in robotics.