S PECIAL F EATURE: DIY P HYSICS
Design and calibration of an inexpensive digital anemometer
R 
HernandezWalls´ 
^{1} , E RojasMayoral ^{2} , L BaezCastillo´ 
^{3} and 
B 
RojasMayoral ^{4} 
^{1} Facultad de Ciencias Marinas, UABC, Ensenada Baja California, Mexico
^{2} Centro de Investigaci´on Cient´ıﬁca y Superior de Ensenada, Ensenada, Baja California, Mexico
^{3} Facultad de Ciencias, UABC, Ensenada, Baja California, Mexico
^{4} Facultad de Ciencias Naturales y Exactas, Unison, Sonora, Mexico
Email: rwalls@uabc.mx
Abstract An inexpensive and easily implemented device to measure wind velocity is proposed. This prototype has the advantage of being able to measure both the speed and the direction of the wind in two dimensions. The device utilizes a computational interface commonly referred to as a mouse. The mouse proposed for this prototype contains an optical sensor which allows it to situate itself in space. The prototype utilizes a pendulum with an attached drag body. The pendulum’s drag body interacts with the ﬂuid in motion, causing an angle with respect to the vertical. The mouse measures the displacement of a sphere attached to the pendulum and calculates the angle. The resulting angle determines the relationship between the drag force and the wind speed, thereby allowing the mouse to calculate the velocity. A MATLAB script was written to process the data received from the mouse. After calibration, the program determines the relationship between the pixels measured and the pendulum’s angle, and so obtains information about the wind. This system (device and software) eliminates human error in data collection and storage, thereby considerably reducing the time and cost associated with measuring wind velocity.
S Supplementary data are available from stacks.iop.org/physed/43/593
Introduction
One problem in meteorology is that of obtaining reliable data in an autonomous way. In general, meteorological instruments are expensive and difﬁcult to maintain. This problem can be solved with a personal computer system. Any computer system will contain input and output devices, such as a mouse and a monitor. It has been shown that a computer mouse can be used as an input device for information [1–5]. The use of the
computer mouse as an electronic interface is an alternative that avoids the design and construction of an interface card between the computer and a sensor [4]. In this article, a prototype of an anemometer is proposed that utilizes an optic sensor. Even though this prototype is similar to a onedimensional current meter, it has the advantage of being able to measure the wind’s speed as well as its direction [4]. This article is structured as follows. The next section contains the physical preliminaries
00319120/08/060593+06$30.00
© 2008 IOP Publishing Ltd
P HYSICS E DUCATION
43 (6)
593
R HernandezWalls´ et al
for obtaining an equation used to calculate the speed and direction of the ﬂuid in motion with the proposed device. The following section describes the assembly of the anemometer, consisting of an optical mouse, a sphere and a pendulum. Later, the calibration of the proposed device is examined, followed by a description of how the computer script captures the information. Finally, the advantages, disadvantages and conclusions are discussed.
Physical preliminaries
If we consider the case of a pendulum with weight
(W ), that, upon interacting with ﬂuid in motion, produces an angle with respect to the vertical (θ ), resulting from the drag force (F _{a} ) that the ﬂuid exercises over the pendulum, then the resulting opposing force is the tension (T ). This can be described with a diagram of a free body, where a balance of forces is obtained, as is shown in ﬁgure 1. Using the trigonometric relationship between the angles and sides of a right triangle, the following equation is obtained:
tan θ =
^{F} ^{a}
_{W} .
(1)
Solving for the drag force in equation (1),
F _{a} = W tan θ.
(2)
The drag force of an object surrounded by
a stationary ﬂow is deﬁned by the following equation [6]:
F _{a} = 
_{2} 1 C _{d} Aρv ^{2} 
(3) 

where C _{d} is the drag coefﬁcient, 
A 
is the 
area of the projection of the object on a plane perpendicular to the direction of motion, ρ is the density of the ﬂuid, and v is the ﬂow speed.
Setting equations (2) and (3) equal to each other, the following equation is obtained:
W tan θ =
1
_{2}
C _{d} Aρv ^{2} .
(4)
Solving for the velocity, we ﬁnd
_{v}
_{=} 2W tan θ C _{d} Aρ
^{.}
^{(}^{5}^{)}
If we consider that the ﬂuid and the object do
not change with time, it can be supposed that the
594 P HYSICS E DUCATION
W
Figure 1. Right triangle representing the balance of forces obtained by modifying the freebody diagram.
following parameters can be considered constants, and that they may all be included in a constant:
K ≡
2W
C _{d} Aρ ^{.}
^{(}^{6}^{)}
Then equation for the velocity is
v
= K ^{√} tan θ.
(7)
If the value of the constant K is known, then only the deviation of the angle with respect to the vertical is necessary to obtain a measurement of the velocity of the ﬂow.
Experimental device
The main purpose of this project is to measure the drag angle with an optical computer mouse. The mouse is positioned on the upper portion of a sphere, which has free movement, while a pendulum is attached to the lower portion of the sphere. When the pendulum interacts with ﬂuid in
motion, it changes its alignment, thereby causing
the attached sphere to rotate. The mouse detects the rotation of the sphere, as shown in ﬁgure 2. It was necessary to build a device that ﬁrst allowed the free movement of the sphere when
the drag object was interacting with the ﬂuid, and second, allowed the mouse to detect the movement of the sphere. The device is mounted on a triangular frame, inside which a sphere is
November 2008
Design and calibration of an inexpensive digital anemometer
supported by skate bearings that allow the free movement of the sphere without changing its relative position with respect to the mouse. A board with a circular hole in the centre is afﬁxed to the top of the frame. The mouse is attached to the board so that it can detect the movement of the sphere through the hole in the board.
Since the mouse detects any displacement of the surface below it by optical means, the mouse has to be ﬁxed to the upper part of the structure in such a way that it stays within a small and constant distance to the sphere without making any contact. A pendulum is attached to the bottom of the sphere. A vane is used as a drag body and is attached to the opposite end of the pendulum. When the vane interacts with the ﬂuid, the movement is transmitted to the sphere by the pendulum. The mouse then detects the movement (ﬁgure 3). The optical mouse is capable of measuring the pixels of the rotating surface of the sphere, but not the angle (θ ) resulting from the sphere’s rotation. It is necessary to determine the relationship between the measured pixels and the drag angle of the pendulum.
Pixel–angle relation
For the rotation of the sphere, caused by an angle (θ ), there exists a speciﬁc quantity of pixels. Therefore the angle (θ ) can be deﬁned as
θ = α · pixels.
(8)
November 2008
P HYSICS E DUCATION
595
R HernandezWalls´
et al
tan 1/2 (θ)
Figure 5. Calibration of the prototype with a protractor.
Equation (8) describes a straight line with slope α. Substituting equation (8) in (7):
v = ^{} tan(α · pixels) · K .
For the components:
v _{x} = ^{} tan(α _{x} · pixels _{x} ) · K
(9)
(9.1)
v _{y} = tan(α _{y} · pixels _{y} ) · K .
The following section contains a description of how the estimation of the constant K was carried out.
(9.2)
Calibration
A commercial weather gauge (SELLOCRAFT Sheboygan) was used for the calibration of the
596 P HYSICS E DUCATION
pixels _{x}
Figure 6. Angles plotted against the horizontal displacement of the cursor in pixels.
proposed device. The weather gauge measures wind speed based on the same physical principles. The angles with respect to the vertical (θ ) were measured and the corresponding wind speeds obtained via the weather gauge were plotted with velocity (miles per hour) on the vertical axis and ^{√} tan θ on the horizontal axis (ﬁgure 4). A linear regression with a correlation coefﬁcient of 0.993 produced the following equation:
v = 15.179 ^{√} tan θ.
(10)
The experimental device was calibrated to measure the velocity of the air with K (equation (7)) equal to the slope of equation (10). The drag body must have the same weight (W ) and area (A) as the drag body of the weather gauge. For obtaining the pixel–angle relationship, a protractor was placed on the base of the
cage assembly (ﬁgure 5), and for each angle of inclination (θ ) the movement of the surface of the sphere was measured in pixels by the mouse in both the xaxis and the yaxis. The measurements of the pixels against the angles are shown in ﬁgures 6 and 7. The equation obtained from the linear regression, with a correlation coefﬁcient of 0.995, for the xaxis was
θ _{x} = 4.16 × 10 ^{−}^{2} · pixels.
For the yaxis, with a correlation coefﬁcient of 0.998, the equation obtained was
θ _{y} = 5.09 × 10 ^{−}^{2} · pixels.
November 2008
Design and calibration of an inexpensive digital anemometer
Figure 7. Angles plotted against the vertical displacement of the cursor in pixels.
Therefore the value of the constant in equa
tion (9.1) is α _{x} = 4.16 × 10 ^{−}^{2} , while in equa
tion (9.2), α _{y} = 5.09 × 10 ^{−}^{2} .
Algorithm and script
The computer program for the calibration of the prototype was written in MATLAB, since it offers functions to obtain information from input devices such as the mouse. The script is shown in box 1. In order to obtain the coordinates of the position of the cursor, it is necessary to obtain the dimensions of the monitor. For this the function get is utilized, as follows:
get(0, ‘screensize’).
In order to start using the prototype it is necessary to set the initial position of the cursor. The following function is utilized:
set(0, ‘PointerLocation’, ^{} [x, y]).
The function that obtains the position of the cursor when the prototype is in operation is
get(0, ‘PointerLocation’).
Advantages and disadvantages
The materials of the proposed digital anemometer are available at low cost. The software was designed with elementary programming concepts, making the reading and storage of the measured digital data and its subsequent processing efﬁcient.
November 2008
Box 1. MATLAB script for calculating wind velocity with a mouse. This script is also available as a supplementary data ﬁle in the online version of the journal at stacks.iop.org/physed/43/593.
The calibration of the prototype is simple. The high correlation coefﬁcients obtained suggest that the measurement of the wind velocity is reliable. This system can be easily adapted for other environments, such as marine coastal zones or ﬂuid mechanics laboratories. It is possible to measure the velocity in two dimensions of almost
P HYSICS E DUCATION
597
R HernandezWalls´ et al
any ﬂow by calibrating the prototype for that speciﬁc ﬂuid. The main disadvantage of this prototype is that the mouse must be kept dry.
Conclusions
The measurement range depends on the drag body and the precision depends on the volume of the sphere: the bigger the sphere, the greater the precision. It has been shown that an optical mouse can be used as an inexpensive sensor of geophysical variables: in this case, the velocity of the wind (speed and direction).
Acknowledgments
The authors acknowledge Andrea Li´evanaMac Tavish for her suggestions and comments. The ﬁrst author also acknowledges support from SNI, UABC and from SEPCONACYT (M´exico) under grants UABC325 and SEP2004C0147285.
Received 14 May 2008, in ﬁnal form 30 July 2008
References
[1] Ochoa O R and Kolp N F 1997 The computer mouse as a data acquisition interface:
application to harmonic oscillators Am. J. Phys. 65 1115–8 [2] Yang Z and Maeda R 2000 Automatic micro ﬂow rate measurement using a modiﬁed computer mouse device 1st Annual Int. IEEEEMBS Special Conf. on Microtechnology in Medicine and Biology (France) pp 288–91
[3] ModestoOrtiz M, Mart´ınez Y and Gonz´alez J I 2003 Observaciones De Nivel Del Mar Con Instrumentos De Bajo Costo. Reuni´on Anual De Geof´ısica (Mexico: UGM) p 159
[4] 
Hern´andezWalls R, LunaHern´andez J R, RojasMayoral E and NavarroOlache L F 2004 Dispositivo electr´onico, de f´acil construcci´on, para medir la velocidad de un ﬂuido Rev. Ing. Hidr´aulica M´exico 19 121–8 
598 
P HYSICS E DUCATION 
[5] Ng T W 2003 The optical mouse as an inexpensive device SPIE Proc. ETuF4 (San Diego, CA) (Bellingham, WA: SPIE Optical Engineering Press) pp 1–3 [6] Roberson J A 1980 Engineering Fluid Mechanics (Boston, MA: Houghton Mifﬂin)
Rafael HernandezWalls´
received his
PhD in optics from CICESE, Ensenada, Mexico. He currently works as a professor and researcher at the School of Marine Sciences of the Universidad Aut´onoma de Baja California (UABC) where he teaches physics and computation, focusing on the development of new technologies for use in marine sciences.
Evaristo RojasMayoral is a student currently working to obtain his Master’s degree in physical oceanography from CICESE, Ensenada, Mexico. In 2005, he earned his Bachelor’s degree in oceanography from the Universidad Aut´onoma de Baja California. Since 2001, he has worked on the design and implementation of new methods and technologies for measuring different properties of geophysical ﬂuids.
Leonardo BaezCastillo´
is a student
working to obtain his Bachelor’s degree in physics from the Universidad Aut´onoma de Baja California, Ensenada, Mexico. During his academic career, he has participated in the design and construction of instrumentation for both physics and oceanographic laboratories. He is currently in the process of completing his thesis in biophysics, carrying out his research in the laboratory of Animal Reproduction and Immunology.
Braulio RojasMayoral is a student working to obtain his Bachelor’s degree in physics from the Universidad de Sonora, Hermosillo, Mexico. His principal interest is in numerical modelling and the realization of applied experiments.
November 2008
Molto più che documenti.
Scopri tutto ciò che Scribd ha da offrire, inclusi libri e audiolibri dei maggiori editori.
Annulla in qualsiasi momento.