DIY Telemetry and Control

telnar1236

Elite member
Looks really neat. I like the testbed setup. Any plans on taking a static pressure reading, or just looking at stagnation pressure?
 

Inq

Elite member
Data
This data is just me blowing toward the straw opening. The red line is the static sensor and the green with three pulses in the middle are shown... ready for the drive test.
1677024286698.png
 

Inq

Elite member
Looks really neat. I like the testbed setup. Any plans on taking a static pressure reading, or just looking at stagnation pressure?
  • we need a stagnation one anyway for altitude.
  • we need the dynamic (ram affect coffee straw)
  • a static port would entail a third pressure sensor and a full blown pitot tube side port at which point, I don't believe it could keep scale looks.
I think needing a static port will depend on what I find out from the drive tests. It is my assumption (ahead of that) that historically, a two port (dynamic : static) pitot tube was mainly for conveyance and analog devices of the day to make it near linear. Since there is plenty of CPU power/memory in the microcontroller, it'll be pretty trivial to handle a non-linear mapping function. If that is achievable, then a dynamic : stagnation system should be universal while a dynamic : static system would need to be calibrated on every plane. We'll see.

At some point, I'll need to add an on plane GPS sensor that can be used to calibrate and validate the air speed sensor.
 

Inq

Elite member
For tomorrow's testing - I've tweaked the web UI to display (real time 25 Hz) a calculated speed.
1677056421574.png


Basically, I'll be assuming that the test rig will be close to using the equation:

1677055637766.png


Basically, I've simplified it to...

speed = FM * sqrt(dynamic - stagnate) + FB

...with factors that can be changed while testing. FM = multiplier that incorporates the constants in the above equation sqrt(2/rho) and the factor to convert meters/second to mph so I can compare it to my truck's speedometer. The FB factor is to account for the variability between pressure sensors. As can be seen in the Web UI the pressures for my two sensors are different even though they're sitting next to each other.

I should be able to tweak the factors and see the same speed as the truck's speedometer. I can then run at different speeds and see if they need to be tweaked for each speed tested. If they're different then a mapping function will be written.

The point being... I believe... that once done for the test rig, it should be universal no matter what plane it's in as long a true stagnation location can be found in the plane. IOW, if someone else wanted to recreate this, they should not have to go through all this hassle.
 

Power_Broker

Active member
At some point, I'll need to add an on plane GPS sensor that can be used to calibrate and validate the air speed sensor.

How do you plan to do this? Are you planning on using something like an extended Kalman filter?

Edit: it's also important to note that airspeed from the pressure sensors and speed over ground from the GPS will likely be different due to both wind effects and the fact that the airplane will not always be flying with exactly 0 degrees of pitch
 

Inq

Elite member
The first run's data is in. I'll need to study it, but it at least is showing the correct trends. The green range was running at a steady state of 55 mph. There was no noticeable wind, but how would I know inside the truck? ;) I'll just have to run both directions and average once I start getting the procedure and data nailed down. Elevation rose about 8 feet according to Google Earth. The Purple range was at a constant of 25 mph with an elevation gain of 310 feet.

1677100877259.png
 
Last edited:

Inq

Elite member
I assume you're using 3 BMP280s? It might be easier to use 1 BMP280 for altitude estimation and 1 MP3V5004DP differential pressure sensor for airspeed estimation

No, 2 BMP280. Please read the posts above and you'll see the logic I am first experimenting. I may resort to 3. Until significant data is available to study, talking about filtering methods is premature. I will consider Kalman when I get to that point. I am sure everyone here understands the difference between GPS speed and airspeed. It was more for ballpark reality checking.
 

Inq

Elite member
I'm thinking I need to back up and get a more consistent, controlled air flow to start out. Maybe a box fan and a long tube to straiten out the flow... an impromptu wind tunnel. :sneaky: I have a handheld sailboat anemometer of unknown accuracy, but it would allow me to get relative speeds between fan settings. In a more controlled situation, I could also study AOA issues. I believe @telnar1236 pointed out that the coffee stir straw may have issues. I'd like to quantify that a little better. It is almost impossible to ensure I have it pointed strait ahead when on the truck.
 

telnar1236

Elite member
For tomorrow's testing - I've tweaked the web UI to display (real time 25 Hz) a calculated speed.
View attachment 235347

Basically, I'll be assuming that the test rig will be close to using the equation:

View attachment 235346

Basically, I've simplified it to...

speed = FM * sqrt(dynamic - stagnate) + FB

...with factors that can be changed while testing. FM = multiplier that incorporates the constants in the above equation sqrt(2/rho) and the factor to convert meters/second to mph so I can compare it to my truck's speedometer. The FB factor is to account for the variability between pressure sensors. As can be seen in the Web UI the pressures for my two sensors are different even though they're sitting next to each other.

I should be able to tweak the factors and see the same speed as the truck's speedometer. I can then run at different speeds and see if they need to be tweaked for each speed tested. If they're different then a mapping function will be written.

The point being... I believe... that once done for the test rig, it should be universal no matter what plane it's in as long a true stagnation location can be found in the plane. IOW, if someone else wanted to recreate this, they should not have to go through all this hassle.
I think you've got some of the names swapped with the pressures. If I'm understanding correctly, your sensors just measure ambient pressure, not a differential across them. This should make it impossible to measure just dynamic pressure, so your sensor on the pitot tube would measure the stagnation pressure of the flow and your second sensor should be measuring a static pressure at its location. More conventional pitot static tubes work by measuring the difference between the static and stagnation pressures, but that requires a measurement of a pressure differential. It seems like all your math is right, as far as I can tell, and just the names are swapped though. You want your static pressure to be measured in as clean of air as possible so if you can stick a second port off the top of pitot tube at 90 degrees or similar, that would probably be the easiest location and the one involving the least calibration. The simplest approach, to me, seems like it would just involve assuming that pressure variation with altitude and time is much smaller than with speed (which should be true if you stay under 400 ft. altitude) and only using the sensor in the pitot tube that measures stagnation pressure. You could just measure static pressure from the sensor each time the system starts up and then use that as a constant value for the rest of the time the system is operating.
 

Inq

Elite member
I think you've got some of the names swapped with the pressures. If I'm understanding correctly, your sensors just measure ambient pressure, not a differential across them.

This is entirely possible as I'm coming at it from first principles and a Physicist's standpoint and not from convention by the way it has been done since the Wright Brothers. As a baseline, the sensor most common in electronic usage... Arduino and every cell phone in the World uses absolute sensors, not the differential sensors that used diaphragms from the 1900's. Let's start with the sensors and what I'm conventions I was using.

For altitude, we must have the sensor reading the atmospheric pressure as if the plane is not moving. The sensor has to be in a location that can't have any air ramming into it (causing a pressure increase) or air escaping from it (causing a pressure decrease)... but it must have air transfer to measure the altitude gain/loss. We must have this anyway for altitude determination. I was calling this stagnation as the air is assumed to be stagnate (except what is causes by altitude loss/gain).

Let's take advantage of this for speed as well...

The second sensor only measures the ramming affect of air coming into it. The pressure sensor will see a pressure increase as a function of speed (see data graph above). I was calling this Dynamic pressure as it changes as a result of dynamics on the airplane.

The benefits of this technique are:
  1. It require only two cheap sensors ~$1 a piece.
  2. We get altitude and speed for that price.
  3. The "pitot" tube equivalent does not need the expensive, double wall machined structure. It might be possible to use a simple straw. It will be cheaper for the builders and easier to integrate into a design and less of a burden when buried into the ground. :p
The liability of this technique is:
  1. It's non-linear as a function of altitude and speed. This requires the use of a mapping function in a microprocessor. Fortunately, we are using one and not some metal diaphragm connected to a lever and a gauge needle
Moving forward... what would you call these two pressure sensors based on how they're being used?

If this can be achieved... we have (1) battery monitoring, (2) airplane altitude and (3) airplane speed for less than $6!
 
Last edited:

telnar1236

Elite member
This is entirely possible as I'm coming at it from first principles and a Physicist's standpoint and not from convention by the way it has been done since the Wright Brothers. As a baseline, the sensor most common in electronic usage... Arduino and every cell phone in the World uses absolute sensors, not the differential sensors that used diaphragms from the 1900's. Let's start with the sensors and what I'm conventions I was using.

For altitude, we must have the sensor reading the atmospheric pressure as if the plane is not moving. The sensor has to be in a location that can't have any air ramming into it (causing a pressure increase) or air escaping from it (causing a pressure decrease)... but it must have air transfer to measure the altitude gain/loss. We must have this anyway for altitude determination. I was calling this stagnation as the air is assumed to be stagnate (except what is causes by altitude loss/gain).

Let's take advantage of this for speed as well...

The second sensor only measures the ramming affect of air coming into it. The pressure sensor will see a pressure increase as a function of speed (see data graph above). I was calling this Dynamic pressure as it changes as a result of dynamics on the airplane.

The benefits of this technique are:
  1. It require only two cheap sensors ~$1 a piece.
  2. We get altitude and speed for that price.
  3. The "pitot" tube equivalent does not need the expensive, double wall machined structure. It might be possible to use a simple straw. It will be cheaper for the builders and easier to integrate into a design and less of a burden when buried into the ground. :p
The liability of this technique is:
  1. It's non-linear as a function of altitude and speed. The requires the use of a mapping function in a microprocessor. Fortunately, we're are using one and not some metal diaphragm connected to a lever and a gauge needle
Moving forward... what would you call these two pressure sensors based on how they're being used?

If this can be achieved... we have (1) battery monitoring, (2) airplane altitude and (3) airplane speed for less than $6!
I hadn't caught quite how cheap those sensors are. That's definitely a big plus for this approach. I think I have a broken quadcopter with a barometric pressure sensor so I might need to pull it off that and see if I can get usable readings from it. You might be able to make a pitot static tube by putting a coffee stir straw inside of a normal straw with some 3D printed adapters? Not sure how feasible that is.

As for the conventions your math seems right, just the names seem off. Static pressure is the component of the pressure that the air would have when still, dynamic pressure is the component of the pressure that comes from exclusively the motion of the air, and stagnation, or total, pressure is the sum of the two and represents the pressure the air would have if it was brought to a standstill from moving with no losses. In the Bernoulli equation (P0 = 1/2 rho*u^2 + Pstatic) P0 is the total pressure, 1/2 rho * u^2 is the dynamic pressure, and Pstatic is the static pressure. In a lossless (potential) flow, P0 stays constant. So in a pitot tube, when you slow the air to a stop before the pressure sensor P0 = Pstatic and that gets measured. If you can then measure the static pressure (the component of the pressure that does not come from the movement of the air) you can get the dynamic pressure by subtracting the two, which is what you're already doing.

A common misconception on positioning the static pressure port is that it should be somewhere the air is still, but in reality you want it as close as possible to being in the free stream and to just have the openings at 90 degrees to the flow. If you have one opening at 90 degrees, it will be affected by AOA/sideslip angle, but if you have a few then you can eliminate that. The reason for this is that if you don't have the ram air effect from incoming air, just the static pressure gets measured (so if the sensor is in the free stream at 90 degrees) where if you slow the air to a stop first, the pressure does unpredictable things and you can end up with a part of the dynamic pressure. Without knowing where your static pressure sensor was, I'm not 100% sure, but I would guess this was a big contributor to the variability in your readings.

Finally, as you said, modern sensors enable much more flexibility, but even modern pitot tubes mostly use a differential sensor since having just one sensor eliminates the cumulative error between taking two readings. However, as you said, your approach gives you a few additional parameters, so it definitely has its advantages too.
 

Inq

Elite member
As for the conventions your math seems right, just the names seem off. Static pressure is the component of the pressure that the air would have when still, dynamic pressure is the component of the pressure that comes from exclusively the motion of the air, and stagnation, or total, pressure is the sum of the two and represents the pressure the air would have if it was brought to a standstill from moving with no losses.

Thank you.
  1. The sensor that we are attempting to get altitude and are also using as the baseline for airspeed is more appropriately called the static sensor instead of stagnant. I'll go with this moving forward.
  2. The other sensor is just getting the ram (my term) affected pressure. Is not the dynamic pressure the combination of that and the pressure measured in the side ports of a standard pitot tube???
The side tube pressure measurement should show partial vacuum. https://en.wikipedia.org/wiki/Venturi_effect
This component doesn't exist. I'm trying to avoid having to get this with a third sensor. I recognize that convention is against my premise, but I'm experimenting anyway (and having fun with the DIY lab rigs :sneaky:)

A common misconception on positioning the static pressure port is that it should be somewhere the air is still, but in reality you want it as close as possible to being in the free stream and to just have the openings at 90 degrees to the flow.

By the same venturi effect (air blowing across a port) would this not cause a partial vacuum and thus show an inflated altitude AND affect the speed calculation?

Without knowing where your static pressure sensor was, I'm not 100% sure, but I would guess this was a big contributor to the variability in your readings.

All the electronics were inside the truck. The tube is 10 feet long from the modeled radome/venturi tube. Note that the noise was not bad in the 25 mph section (purple in graph above). This drive is in a heavily wooded area and I expect that there was no wind. On the other hand, the 55 mph portion has several unknown contributors.
  1. It's on a state highway with far more clearance to the tree line. Although I noted no wind before/after the test, I can't rule it out.
  2. The large spike is likely the 18 wheeler blowing by because I was only doing the speed limit.
  3. Also I noted more buffeting of the probe out front. The PVC arm is rather flimsy and moved around quite a bit. On the 25 mph section, it was not bothered.
Anyway, those things are conspiring for me to make a make-shift wind tunnel. I want to explore the off angle aspects you mention earlier and I can control that more accurately. I'll get on that March 1st after FTFC23 is over... and I"m not flying. :)
 

Tench745

Master member
I have a question that is not immediately relevant: Is the reporting altitude going to be absolute or relative, ie. above sea level or above ground level (ASL or AGL)?
 

Inq

Elite member
I have a question that is not immediately relevant: Is the reporting altitude going to be absolute or relative, ie. above sea level or above ground level (ASL or AGL)?

That one I can tackle from what I know so far. The Altitude that the sensor gives is relative to sea level. I haven't researched it, but without having a weather offset, I'm not sure how they arrive at that. It must assume the "average" day or something.

However, I was thinking I would have it get the current altitude at every boot-up and then do a relative so it would report above ground level of the boot location. It's simple enough to have it configurable so if anyone one cares to recreate this project, they could have a configurable choice.
 

telnar1236

Elite member
The other sensor is just getting the ram (my term) affected pressure. Is not the dynamic pressure the combination of that and the pressure measured in the side ports of a standard pitot tube???
The dynamic pressure is the difference between the stagnation pressure (ram pressure) and the static pressure. In a pitot-static tube the static pressure is measured by the side ports and the stagnation pressure by the port in the front. The difference between the two is measured by the sensor. In addition, the static pressure can be used for barometric altitude.

The side tube pressure measurement should show partial vacuum. https://en.wikipedia.org/wiki/Venturi_effect
This component doesn't exist. I'm trying to avoid having to get this with a third sensor. I recognize that convention is against my premise, but I'm experimenting anyway (and having fun with the DIY lab rigs :sneaky:)



By the same venturi effect (air blowing across a port) would this not cause a partial vacuum and thus show an inflated altitude AND affect the speed calculation?
The venturi effect is caused by the flow constriction, not by the air moving across the port. Because stagnation pressure remains constant, an increase in flow speed (and therefore dynamic pressure) results in a drop in static pressure in the venturi effect. Since you're trying to measure the free stream conditions, you want to have the smallest change possible in the flow speed when measuring the dynamic pressure or you will end up with something other than the dynamic pressure. There is a small drop in pressure caused by the air accelerating around the sides of the pitot tube on real ones and you sometimes see geometry meant to avoid that, but with how thin the walls of a straw are, that shouldn't be an issue for you. Unless you mount it on top of the wing you shouldn't see too large a negative change in static pressure. I'm not suggesting mounting a second straw at 90 degrees to the first since that would have its own problems, but plugging the end of a straw parallel to the first and poking some holes in the walls would definitely work and let it get clean air. A number of real aircraft also use static pressure ports on the side of the fuselage, but that runs into issues with the boundary layer and sideslip and typically requires additional calibration.
 

telnar1236

Elite member
I just found this picture on Google, but it is a pretty good illustration of how static pressure is best measured. The pointy end goes into the flow in all of the cases.
1677195100489.png
 

Inq

Elite member
The venturi effect is caused by the flow constriction, not by the air moving across the port.

Sorry, but that is not correct. Look at any venturi. The air flow crosses the port. I have created impromptu vacuum pumps using this technique. A pitot tube has the same issue but takes account of it in the Mathematics.
1677195753815.png


 

telnar1236

Elite member
Sorry, but that is not correct. Look at any venturi. The air flow crosses the port. I have created impromptu vacuum pumps using this technique. A pitot tube has the same issue but takes account of it in the Mathematics.
View attachment 235398

The first sentence of the Wikipedia article states "The Venturi effect is the reduction in fluid pressure that results when a fluid flows through a constricted section (or choke) of a pipe."

The equation in the Wikipedia article also works off the principle of having constant stagnation pressure with a decrease in static pressure caused by an increase in the speed of the flow caused by a reduction in area.
Basic Equations:
P0a = 1/2 rho*u_a^2 + Pstatic_a
P0b = 1/2 rho*u_b^2 + Pstatic_b
P0a = P0b
Derivation:
1/2 rho*u_a^2 + Pstatic_a = 1/2 rho*u_b^2 + Pstatic_b
Pstatic_a - Pstatic_b = 1/2 rho*u_b^2 - 1/2 rho*u_a^2
Pstatic_a - Pstatic_b = 1/2 rho*(u_b^2 - u_a^2)
Which is this equation from the article.
1677197403530.png

You are correct that the flow crosses the port, but what the decrease in pressure on the port measures is the change in static pressure caused by the reduction in flow area. The same decrease in pressure would happen regardless of if the tube at 90 degrees was there or not.

The waterbed pump also works by the same principle of a constriction in the tube causing an increased flow speed. The water exiting the tube will have a similar static pressure to the ambient air. Since the venturi has a smaller cross-sectional area, the water flows faster and has a lower static pressure. Since the water bed is exposed to the air, the water in it also has a similar static pressure to the air. Therefore, the water in the venturi has a lower static pressure than the water in the waterbed and it draws water from the waterbed into it.

I don't know precisely how the vacuum pumps you built were designed, but I suspect they also had a flow restriction that decreased the static or had the flow expand after a restricted section.
 
  • Like
Reactions: Inq