Laser Doppler Velocimetry Using a Modified Computer Mouse

A computer mouse has been modified for use as a low-cost laser Doppler interferometer and applied to measure the two-component fluid velocity of a flowing soap film. The mouse sensor contains two vertical cavity surface emitting lasers, photodiodes, and signal processing hardware integrated into a single package, approximately 1 cm2, and interfaces to a host computer via a standard USB port. Using the principle of self-mixing interferometry, whereby laser light re-enters the laser cavity after being scattered from a moving target, the Doppler shift and velocity of scatterers dispersed in the flow is measured. Observations of the boundary layer in a turbulent soap film channel flow demonstrate the capabilities of the sensor.


I. INTRODUCTION
As a Physical Oceanographer who primarily uses satellite observations to study transport and energetics of ocean circulation, the author became interested in laboratory-scale systems which could be used to interest undergraduates in the study of environmental fluid dynamics.One dynamically significant attribute of both the ocean and atmosphere is that the large-scale motion occurs in shallow layers.For example, compared to the diameter of the Earth, the atmosphere consists of a very thin layer of air.Large-scale motions within the atmosphere, e.g., the mid-latitude cyclones and anti-cyclones visible in satellite images as swirls of clouds, typically have horizontal sizes of 1000 km, but they are confined within, roughly, a 10 km vertical extent 1 .Similarly, the ocean is roughly 5 km deep, but most of the large-scale eddying motion has a typical horizontal size of 100 km to 200 km and occurs in the upper 500 m of the ocean 2 .Representing geometrically similar flows at laboratory-scale is challenging; however, the turbulent flow in a soap bubble is surprisingly relevant.Eddies visible in a large soap bubble may be a few centimeters wide and are confined to the 10µm thickness of the film 3 .The geometric aspect ratio in each case is roughly 100 to 1000, which leads to similarities in the dynamics of eddies in these systems (Figure 1).
Since the 1980's, flowing soap films have been used in laboratory experiments to understand the characteristics of shallow, approximately two-dimensional, fluid systems 4,5 , and have recently led to surprising insights into the nature of turbulent drag 6,7 .The films are comprised essentially of a soap bubble stretched between two vertical guide wires, a setup which is much more amenable to study than an individual soap bubble.
The flowing soap film apparatus is relatively straightforward to set up, and it permits many interesting demonstrations of fluid phenomena 8 ; however, it is challenging to devise measurement techniques which provide useful accuracy at reasonable cost.For example, particle imaging velocimetry requires relatively sophisticated cameras, lighting, and data processing capabilities to measure the relatively high speed, 2 to 4 m/s, soap flows.Likewise, laser-Doppler systems are commonly used in the literature, but capable systems are costly and require attention to laser-safety which may make them inappropriate for use with undergraduates.
It is the context described above that provided the impetus to experiment with a novel laser-Doppler sensor available commercially as a high-end computer gaming mouse.After learning about the ways in which computer mice measure motion, the author and several students experimented with optical mice to see if any were capable of measuring the motion in the soap film.Only mice employing the laser-Doppler sensor described below were capable of measuring the velocity of a soap film, and the particular model used proved to be easiest to work with because it did not spontaneously enter sleep mode when it stopped detecting a signal.

II. PRINCIPLE OF OPERATION
A computer mouse is a computer input device which operates by sensing the lateral motion of the mouse over a surface and translating that motion into the movement of a cursor on the computer display.There are several principles of operation for mouse sensors, but the device employed in this study (the Philips Semiconductor Twin-Eye sensor, PLN2020 9 , as incorporated in the Mad Catz R.A.T.5 Gaming Mouse, item number D23-MCB4370500B2, http://madcatz.com)uses two self-mixing laser Doppler interferometers and data processing hardware integrated into a single package of approximate size 1 cm × 1 cm × 3 mm.
The principle of operation of the PLN2020 chip relies on a vertical cavity surface emitting laser to generate a single-mode laser beam suitable for self-mixing interferometry 10 .Selfmixing interferometry refers to measurement techniques which rely on laser light reflected from a target re-entering the laser cavity and modulating the beam intensity by constructive or destructive interference within the resonant cavity 11 .If the target is moving, then the reflected light is Doppler shifted by a frequency, ω D = −4πu/λ, where λ is the wavelength of the light and u is the speed of the scatterer in the direction of the beam.Upon re-entering the laser cavity the intensity modulations caused by the Doppler shifted light can be measured by a photodiode that monitors the output of the laser, and the Doppler frequency can be determined with a frequency counter.
The measurement just described is sufficient to determine the component of velocity parallel to the laser beam, but the same absolute frequency shift, |ω D |, is observed whether the target is moving toward or away from the sensor because only the beat frequency is measured.To explain how the PLN2020 obtains directional information it is useful to think about what happens if the laser frequency is intentionally modulated before being scattered from a stationary target.If the wavelength is changed at a rate, r = dλ/dt, the number of wavelengths that can fit within the distance to the target and back, 2d/λ, changes at a rate, ω o = −2dr/λ 2 .Upon re-entering the the laser cavity this light would cause a modulation at the same frequency, which, incidentally, provides a means to measure the range from laser to the target.When the target is moving parallel to the light beam, the Doppler effect combines with the imposed modulation frequency and permits the up-or down-shift of the Doppler frequency to be determined.In practice, the PLN2020 modulates the laser frequency by periodically changing the drive current, and the integrated signal processor computes the target velocity from the photodiode power measurements.The two lasers on the PLN2020 operate independently, thus permitting the measurement of the two-component velocity vector of the target relative to the sensor 9,12 .The R.A.T.5 mouse houses the PLN2020 together with a microcontroller enabling the two-component velocity to be sent over a USB interface at a maximum rate of 1 kHz.The computer operating system would normally integrate this signal in time to render the cursor on the computer display.To utilize the mouse for velocimetry, a simple device driver was written in the Tool Command Language 13 (TCL) to average the readings over desired intervals and compute variance and cross-covariance statistics of the two velocity components.The syntax of TCL is relatively simple, and the entire driver, display, and recording program is comprised of less than 300 lines of code and is available from the author's website (http://web.cecs.pdx.edu/~zaron/pub/LDVmouse.html).
The mouse reports data in instrument units in the range of ±512, depending on the dotsper-inch (dpi) resolution setting of the mouse, which roughly corresponds to ±3 m/s velocity.
To transform instrument values into physical values the sensor was calibrated by measuring the speed of a known reference.In order to make the calibration technique understandable to 7th-grade students, a speed reference was constructed from a variable speed motor with a rotating shaft of known diameter with a visible marking on it.Using a stopwatch, the students counted the number of rotations in a known time period, and, given the diameter of the shaft, a 3.175 cm drill chuck, they computed the linear velocity of the shaft as it rotated in front of the sensor.Using this method, a calibration factor of 0.6 ± 0.2 cm/s was determined.The large uncertainty of the calibration is caused by differences in the relative positioning of the sensor and shaft between calibration runs.For a given position of the sensor the calibration was observed to be stable within a few percent.

III. APPLICATION: VELOCIMETRY OF A FLOWING SOAP FILM
In order to demonstrate that the components of the R.A.T.5 mouse may be used as an inexpensive laser Doppler velocimeter, the system was used to measure the mean and turbulent velocity of a flowing soap film, a laboratory-scale analogue of some large-scale turbulent flows in the environment.The apparatus for studying these flows is shown in Figure 2 and follows the basic setup described in the literature 3,8 .
To make a workable laser-Doppler velocimeter the circuit board containing the PLN2020 sensor must be removed from the mouse and positioned approximately 2 mm from the soap film.Originally, the sensor was mounted on a rudimentary stage improvised from corrugated plastic obtained from a hobby supply store.This setup permitted movement of the sensor in axes perpendicular and transverse to the flowing soap water film.Eventually this setup was replaced with a commercial two-axis stage, which, at $220, was the most expensive single component of the apparatus, but it was well worth the investment as it provided reproducible positioning of the sensor with micrometer precision.
Disassembly of the mouse can be performed with a set of small screw drivers.Remounting the circuit board is necessary to prevent the sensor from being damaged by contact with soapy water and to achieve mechanical stability.The present design employs a simple plastic shroud over the circuit board, sealed with epoxy around the PLN2020 sensor (Figure 2, lower right), and mounted on an acrylic box.Contact between the electronic components and the soap water solution quickly causes the mouse to fail, so care is needed in designing the mount for the sensor.
Because the sensor operates by scattering laser illumination, it is necessary to seed the flow with light-scattering particles.Acceptable results have been obtained by preparing a soap solution from 125 mL Dawn Dish Soap, 1000 mL tap water, and about 150 mL of Artist Acrylic Titanium White paint.Paint containing zinc oxide particles has also been employed.The mixture contains a high density of scatterers and has the bulk appearance of blue-tinged milk.The stability of the soap film is not noticeably altered by the addition of acrylic paint, and the flowing film itself is very slightly visibly cloudy.The soap solution should be stirred before making observations in order to re-suspend particles which settle out over time.Once prepared, the soap-water-pigment mixture may be reused, adding fresh water as needed to compensate for evaporation.
Figure 3 illustrates velocity measurements from a transect across the turbulent flow in a 2.5 cm-wide film, flowing downward with a velocity of approximately 220 cm/s.The downward velocity in the channel deviates strongly from a parabolic profile having the same maximum speed as the observed flow (laminar Poiseuille flow).Instead, at distances of 1 mm to 10 mm from the side of the channel, the observations display law-of-the-wall scaling characteristic of a turbulent boundary layer 14 .The viscous sublayer is resolved within 1 mm of the boundary.Measurements with the device have so far been used to reproduce drag coefficients measured in the literature 6 , and demonstrate spectral power laws describing two-dimensional turbulence 15 .

IV. SUMMARY
A computer mouse has been modified for use as a low-cost laser-Doppler velocimeter and applied to measure the flow of a soap water film.The circuitry of the mouse, comprised of a Philips Photonics PLN2020 laser sensor and a microcontroller, is unmodified; instead, software modifications to the device driver are used to convert the mouse readings into useful velocity measurements.The instrument is capable of measuring the two components of velocity in the plane parallel to the sensor within a small volume, less than 1 mm 3 , at a distance of approximately 2 mm from the sensor.The dynamic range of the sensor is approximately ±4 m/s at 1 kHz sample rate.
The availability of this instrument facilitates a variety of quantitative fluid dynamics experiments with the soap film apparatus and it may have other applications as well.Work is ongoing to better define the instrument response characteristics such as the precision of individual measurements and sensitivity to distance between the target and the sensor.An undergraduate student is currently exploring the feasibility of mounting the instrument in a submergeable enclosure to develop a low-cost sensor for streamflow measurements.A new version of the laser sensor, the PLN2037, is also being investigated to see if it is feasible to develop our own microcontroller interface and obtain measurements without the mouse's circuit board.axis) highlights the agreement with "law-of-the-wall" scaling between x = 1 mm and x = 10 mm (theoretical line given in red for friction velocity of 20 cm/s and roughness length of 0.1 mm).For x < 1 mm a viscous sublayer is observed (dashed blue line).The observed profile differs greatly from the laminar Poiseuille profile (dashed black line).

FIG. 3 .
FIG. 3. Measurements of mean flow in a 25 mm-wide channel (crosses) illustrate the characteristics of turbulent boundary layer flow.The use of log-scaling for distance from the channel edge (x-