Sei sulla pagina 1di 6

S PECIAL F EATURE: DIY P HYSICS

Design and calibration of an inexpensive digital anemometer

R

Hernandez-Walls´

1 , E Rojas-Mayoral 2 , L Baez-Castillo´

3 and

B

Rojas-Mayoral 4

1 Facultad de Ciencias Marinas, UABC, Ensenada Baja California, Mexico

2 Centro de Investigaci´on Cient´ıfica 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

E-mail: 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 fluid 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.

the time and cost associated with measuring wind velocity. S Supplementary data are available from

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 difficult 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 one-dimensional 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

0031-9120/08/060593+06$30.00

© 2008 IOP Publishing Ltd

P HYSICS E DUCATION

43 (6)

593

R Hernandez-Walls´ et al

for obtaining an equation used to calculate the speed and direction of the fluid 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 fluid in motion, produces an angle with respect to the vertical (θ ), resulting from the drag force (F a ) that the fluid 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 figure 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 flow is defined by the following equation [6]:

F a =

2 1 C d Aρv 2

(3)

where C d is the drag coefficient,

A

is the

area of the projection of the object on a plane perpendicular to the direction of motion, ρ is the density of the fluid, and v is the flow 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 find

v

= 2W tan θ C d Aρ

.

(5)

If we consider that the fluid and the object do

not change with time, it can be supposed that the

594 P HYSICS E DUCATION

W

θ T F a
θ
T
F a

Figure 1. Right triangle representing the balance of forces obtained by modifying the free-body 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 flow.

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 fluid in

motion, it changes its alignment, thereby causing

the attached sphere to rotate. The mouse detects the rotation of the sphere, as shown in figure 2. It was necessary to build a device that first allowed the free movement of the sphere when

the drag object was interacting with the fluid, 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

mouse sphere pendulum flow drag body Figure 2. Effect of the drag force on the
mouse
sphere
pendulum
flow
drag body
Figure 2. Effect of the drag force on the pendulum.

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 affixed 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 fixed 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 fluid, the movement is transmitted to the sphere by the pendulum. The mouse then detects the movement (figure 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 specific quantity of pixels. Therefore the angle (θ ) can be defined as

θ = α · pixels.

(8)

Figure 3. 3D model of the prototype.
Figure 3. 3D model of the prototype.

November 2008

P HYSICS E DUCATION

595

R Hernandez-Walls´

et al

55 50 45 40 35 30 25 20 15 10 0 0 0.5 1.0 1.5
55
50
45
40
35
30
25
20
15
10
0
0 0.5
1.0
1.5
2.0
2.5
3.0
3.5
speed (mph)

tan 1/2 (θ)

55 50 45 40 35 30 25 20 15 10 0 0 0.5 1.0 1.5 2.0
1.5 2.0 2.5 3.0 3.5 speed (mph) tan 1/2 ( θ ) Figure 5. Calibration of

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 = tanx · pixels x ) · K

(9)

(9.1)

v y = tany · 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 (SELL-O-CRAFT Sheboygan) was used for the calibration of the

596 P HYSICS E DUCATION

16 14 12 10 8 6 4 2 0 0 50 100 150 200 250
16
14
12
10
8
6
4
2
0
0
50
100
150
200
250
300
350
400

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 (figure 4). A linear regression with a correlation coefficient 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 (figure 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 x-axis and the y-axis. The measurements of the pixels against the angles are shown in figures 6 and 7. The equation obtained from the linear regression, with a correlation coefficient of 0.995, for the x-axis was

θ x = 4.16 × 10 2 · pixels.

For the y-axis, with a correlation coefficient of 0.998, the equation obtained was

θ y = 5.09 × 10 2 · pixels.

November 2008

Design and calibration of an inexpensive digital anemometer

16 14 12 10 8 6 4 2 0 0 50 100 150 200 250
16
14
12
10
8
6
4
2
0
0
50
100
150
200
250
300
pixels y

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 efficient.

November 2008

data and its subsequent processing efficient. November 2008 Box 1. MATLAB script for calculating wind velocity
data and its subsequent processing efficient. November 2008 Box 1. MATLAB script for calculating wind velocity
data and its subsequent processing efficient. November 2008 Box 1. MATLAB script for calculating wind velocity

Box 1. MATLAB script for calculating wind velocity with a mouse. This script is also available as a supplementary data file in the online version of the journal at stacks.iop.org/physed/43/593.

The calibration of the prototype is simple. The high correlation coefficients 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 fluid mechanics laboratories. It is possible to measure the velocity in two dimensions of almost

P HYSICS E DUCATION

597

R Hernandez-Walls´ et al

any flow by calibrating the prototype for that specific fluid. 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´evana-Mac Tavish for her suggestions and comments. The first author also acknowledges support from SNI, UABC and from SEP-CONACYT (M´exico) under grants UABC-325 and SEP-2004-C01-47285.

Received 14 May 2008, in final 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 flow rate measurement using a modified computer mouse device 1st Annual Int. IEEE-EMBS Special Conf. on Microtechnology in Medicine and Biology (France) pp 288–91

[3] Modesto-Ortiz 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´andez-Walls R, Luna-Hern´andez J R, Rojas-Mayoral E and Navarro-Olache L F 2004 Dispositivo electr´onico, de f´acil construcci´on, para medir la velocidad de un fluido 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 Mifflin)

Rafael Hernandez-Walls´

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.MA: Houghton Mifflin) Rafael Hernandez-Walls´ received his Evaristo Rojas-Mayoral is a student currently working to

Evaristo Rojas-Mayoral 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 fluids.Evaristo Rojas-Mayoral

Leonardo Baez-Castillo´

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. carrying out his research in the laboratory of Animal Reproduction and Immunology.

Braulio Rojas-Mayoral is a student working to obtain his Bachelor’s degree in physics from the Universidad de Braulio Rojas-Mayoral Sonora, Hermosillo, Mexico. His principal interest is in numerical modelling and the realization of Sonora, Hermosillo, Mexico. His principal interest is in numerical modelling and the realization of applied experiments.

November 2008