Maker Portal

View Original

Arduino Pitot Tube Wind Speed and Airspeed Indicator - Theory and Experiments

See this content in the original post

Pitot Tube in the foreground and the velocity plot in the background


See this content in the original post

For fluid mechanics problems involving incompressible, frictionless flow; Bernoulli’s principle is a valid place to start. Bernoulli’s principle can be written as a pressure balance between two sections:

See this content in the original post

where ρ, v, P, h are the fluid density, velocity, pressure, and height of the flow section, respectively. The subscripts a,b represent two differing sections of the flow section. In our case, we need the stagnation pressure, which is the pressure due to the static pressure and the pressure incident on the bend in the pitot tube. A setup of this can be seen below:

Assuming no change due to gravity and no velocity at the stagnation point, we can see how the pitot tube can measure both velocity and static pressure:

See this content in the original post

Additionally, we have a separate section that allows only static pressure to be measured via ports perpendicular to the flow direction (static ports). We can now measure the stagnation pressure and the static pressure separately:

See this content in the original post

subtracting the two:

See this content in the original post

and if we solve for velocity as a function of the pressure differential:

See this content in the original post

See this content in the original post

This experiment consists of a pitot tube and pressure differential sensor combination and an Arduino board. The method of testing the pitot tube is up to the user - for example, I will be using a small DC fan and a 0.5 inch tube to measure the efficiency of the fan. However, the user may want to measure a different parameter such as: drone airspeed, wind speed, or car velocity. Below is a list of parts both necessary and particular to this experiment:

  1. Pitot Tube and MLXV7002DP - $32.99 [Amazon] or $48.89 [Amazon]

    • NOTE: these appear to be unavailable at the moment, but users can buy a similar differential pressure sensor and pitot tube from our store: Pitot Tube Airspeed Sensor for Arduino and Raspberry Pi - $45.00 [Our Store]

  2. Arduino Uno - $13.00 [Our Store]

  3. 5V DC Fan - $7.98 (4 pcs) [Amazon]

  4. 0.5 inch Tubing - $12.39 (10 ft.) [Amazon]

  5. Jumper Wires (male-to-male) - $0.45 (3pcs) [Our Store]

  6. Breadboard - $3.00 [Our Store]

See this content in the original post

The wiring for the Arduino and pressure sensor is simple: we wire the analog output from the MPXV7002DP sensor to one of the analog inputs on the Arduino board.

Since the MPXV7002DP handles the pressure differential calculation and the pitot tube handles the pressure measurement of both stagnation pressure and static pressure - a lot of the work to be done is in the calculation of velocity, not in the electrical wiring. Therefore, the electronics portion of this tutorial is quite simple. In the next and following sections, the conversion from voltage reading to pressure differential, and subsequently to velocity is covered.


See this content in the original post

The MPXV7002DP is a sensor that relates the pressure differential between its two inputs. In the datasheet, the manufacturer provides the calibration relationship between the output voltage and pressure difference. This plot is shown below:

A few notes on the plot above:

  1. The bounds on pressure don't change despite the supply voltage - meaning we can use either 3.3V or 5.0V
  2. The pressure maximum and minimum put the velocity limits around 65 m/s
  3. The raw Arduino 5.0V supply is quite noisy, which results in high error

Since the transfer function is not quite right, I will use a point-slope method to re-derive the transfer function and then re-plot below. To start, we use the linear slope equation:

See this content in the original post

where m, b are the slope and y-intercept of the line, respectively. And y is the voltage reading, and x is the pressure difference between the input pressures (stagnation pressure and static pressure in our case). By selecting two points on the line above, we can solve for m and b:

See this content in the original post

which can be written in equation form as:

See this content in the original post

This is the relation for converting pressure to voltage, and if we solve for x , we can get the equation for going from voltage to pressure:

See this content in the original post

MPXV7002DP Conversion Table

See this content in the original post

The table above is a summary ofthe conversion between pressure and voltage and vice-versa. Above, Vr is the voltage reading from the Arduino, and Vs is the supply voltage (Arduino either 3.3V or 5.0V - or some other external supply below 5.0V). The pressure, P, is in either kPa or Pa depending on the conversion direction. When going from pressure to voltage, we want to use kPa to match the plot units. When going from voltage to pressure, we convert to Pa so that we can match the units of the pitot tube equation.

See this content in the original post

See this content in the original post

At this stage, the user must connect their pitot tube to the pressure differential sensor. Be sure that the tubes are not bend or pinched in any area, otherwise results may be misleading due to friction or turbulence. Below is a drawing of the pitot tube connected to the MPXV7002DP, which is subsequently wired to the Arduino board:

Wiring the pitot tube to the MPXV7002DP sensor, which is wired to the Arduino uno board.

Now in order to properly approximate velocity, we need to relate the pitot tube velocity equation to the pressure differential read as a voltage by the MPXV7002DP sensor. We can do this by citing the velocity equation:

See this content in the original post

and the pressure differential from the voltage readout:

See this content in the original post

and recognizing that ΔP = Pstagnation − Pstatic , we can make the following relation between our input parameters, our voltage readout, and the resulting velocity approximated by the pitot tube:

See this content in the original post

One final note: don’t forget the conversion from bits to voltage:

See this content in the original post

Finally, one unified equation for converting from ADC values to velocity can be written as:

See this content in the original post

where R is the reading from the Arduino analog pin, ρ is the density of the fluid (air in this case), and (210-1) is the 10-bit resolution of the Arduino's ADC (there's a -1 because we include 0).

See this content in the original post

See this content in the original post

Once the pitot tube and MPXV7002DP are connected and wired to the Arduino board, the user should take some basic analog readings to test the system and its response. You can do this by blowing into the pitot tube or using a fan. The first thing to note is the baseline value. It should be 1023/2 = 511.5, however, this value is not an integer - so we can blindly assume either 511 or 512 are the expected baseline values. Now, in my case, the baseline was a bit higher (534), so I implemented an offset average in the setup portion of the Arduino code. This also means that when starting up the Arduino, there should be no flow such that the code can configure the baseline.

The full Arduino code is shown below, also with an averaging loop which is meant to stabilize the output value (though there is still a lot of noise in the velocity measurements):

See this content in the original post

See this content in the original post

As stated earlier, this experiment uses a 0.5 inch cylindrical pipe and a 5V blower fan (which I ran at 12V) to analyze the volumetric flow rate through the pipe using a pitot tube. This will allow us to both test the pitot tube and quantify the efficiency of a cooling fan. Below is a series of photos of the setup:

Below is a video of the pitot tube measuring velocity in real-time. The pitot tube measures the velocity around 14.5 m/s within the tube.

See this content in the original post

Now that we know the velocity within the tube, we calculate the volumetric flow rate of the fan and compare it to the manufacturer’s value. To start, we can assume that the velocity is uniform due to the shortness of the pipe, which means the velocity profile hasn’t developed in the tube (in the presence of friction). So we measured the velocity at the center of the tube and can invoke conservation of energy:

See this content in the original post

as stated before, the inner diameter of the acrylic pipe is 0.5 in. (0.0127 m) so we can quantify the volumetric flow rate:

See this content in the original post

and previously we found the velocity in the tube to be about 14.5 m/s

See this content in the original post

And to compare with the manufacturer’s value, we convert to CFM (cubic feet per minute):

See this content in the original post

This leads to our actual volumetric flow rate:

See this content in the original post

and this is quite a satisfying result, because the manufacturer cites the maximum flow rate as 5 CFM, which is not too far off. Not to mention the fact that the areas between the outlet of the fan and the pipe aren’t identical, the tube is slightly bent, and our measurements are quite noisy.


See this content in the original post

Tip of pitot tube used in this experiment

The pitot tube is an instrument widely used to measure the speed of a flowing fluid. I started the tutorial by deriving the pitot tube velocity approximation from Bernoulli’s principle. I also introduced the conversion from voltage to pressure differential from the MPXV7002DP sensor, and the subsequent conversion from pressure differential to flow velocity. Lastly, I used the pitot tube to measure the volumetric flow rate of a DC fan. The result was about 80% of the manufacturer’s cited efficiency (we measured 15.6 CFM, the datasheet cites 20 CFM). This tutorial was meant to introduce the user to the pitot tube by using a real-world example, while also exploring a classic engineering experiment that utilizes classic fluid mechanics techniques for solving problems.

See this content in the original post

See More in Engineering:

See this content in the original post