Sunday, 30 June 2013

Air speed from two MS5611

Some time ago on this blog I promised an experimenters version of the BlueFlyVario. Earlier today I posted details of it on the blog. My first project with this version was to add an additional two MS5611 pressure sensors so I could rig up a custom airspeed sensor. It seems to be working ok, even though I have not tested it in flight. 

The setup

I got some little boards made up that use that pick up the VDD and GND on the bottom, link to the SPI MOSI, MISO and SCLK lines, and just use two additional IO pins for cable select. The headers are designed to line up with the headers on the experimenters board.

The picture below shows a spare board in the middle, and the made up one slightly lower left. Over the top of the MS5611 I put some neoprene like my standard v6. The small pcb tangs that contain the sensors are designed so that 7mm inner diameter vinyl tubing fits over the top. The header ends of these tubes are sealed with a bit of hot melt glue. I was quite amazed how well hot melt sticks to vinyl tubing. I had thought it would just peal off, but no; it's really sticky. 

The 7mm id vinyl tubing then has some 5mm id vinyl tubing to extend to the custom pitot tube. I made this up from some brass tubing from a hobby shop, with a few holes drilled in the right place and some hot melt to seal stuff up. There is actually a thin brass tube through the middle of the main one, with appropriate connectors to pitot and static sensors. Wikipedia shows a little theory of pitot-static tube design.

Determining the air speed

The micro controller code was altered to measure the pressure from each of the three sensors. It outputs PRS N1 N2 N3, where N1 to N3 is the pressure in pascals in hexidecimal of the form XXXXX. N2 and N3 are connected to the pressure sensors on the tangs. This gives us a dynamic and static pressure measurement, 50 times a second. To translate this to m/s is as simple as

Velocity (m/s) = sqrt(2 * (N2- N3) / airdensity).

I just used the standard air density in kg/m3 in my simple testing. This gives Indicated Air Speed. The conversion to True Air Speed should be easy enough given our slow speeds and some simple assumptions about atmospheric density based on pressure. Also, it will be important to put the pitot tube in really clear airflow.

I did a few calculations on the theoretical error. If we assume the error in the differential pressure is about the same as double the error in the sensors (RMS of 20 pascals), then the error in airspeed is very low (less than 1%) for speeds over 3 km/hr. In practice there are many other errors, but a quick 'blow on pitot' test seems to be able to produce reliable results given a 'constant' amount of blowing.

My next steps will involve more extensive testing and calibration. Then maybe a total energy compensated vario.


  1. Fantastic piece of kit. Could this work with one sensor in front of the risers and one behind (instead of the pitot), or would that be too crude? If it worked well enough it could be very low profile - maybe Bluetooth it to the phone / tablet. I used to carry a trailing speed probe but kept treading on it :-(

    1. I think that would be a bit crude. I can't think of a good configuration that would work for pg that does not take a fair amount of setting up. But, there is a chance that a sensor inside the wing could work. It would need to be calibrated to the wing and pilot weight. This raises the potential for collapse notification... To many ideas.

  2. Check out MS4525DO differential pressure sensor, it has pretty much the same interface as MS5611. I am going to connect it via IOIO to XCSoar to use it as an air speed sensor when flying hang glider. I am also gonna connect the MS5611 via IOIO.
    If I am not happy with the response time on the audio from XCSoar, I might buy your vario. Does your vario have a wired interface? I don't need wireless since I am building all this into a pod. I will also have my own battery for the whole setup.
    Keep up the good work, it is an awesome vario!

    1. Thanks for the pointer to the sensor. I could not find the datasheet so am not sure if it provides sufficient resolution to provide a good vario response.

      The BlueFlyVario prototype version 6 does not have a wired interface. However, The experimenters version I link to in the first sentence of the post has a few spare IO pins if you are willing to code up an interface and reprogram the PIC micro controller. The data pins on the USB connector are not connected to anything. There are some little holes in the board for a bypass power source (bypassing the battery charger IC). You could also just power via the micro USB if you left the battery in place. This will just keep the inbuilt battery topped up the whole time.

      I have considered wired interface options. I am currently experimenting with a FT230X. However, Bluetooth is much more widely supported (on target platforms) than any wired interface.

    2. Datasheet:

      No, the MS5611 is the best choice for vario. I meant that the MS4525DO is better suited for air speed and pitot tube since it is differential and have connectors for tubes :)

      If I'm not happy with the audio response with the MS5611 connected to XCSoar via IOIO, I will have a look at your vario :)

      Yes, it is maybe smart to have the battery on there, so at least I have a vario if the other battery runs out..

  3. Al, are you planning on continuing development of the pitot tube? Quite a few fellas in our hang gliding club asking me about this.

    1. I do intend to, but so many things on the list of todo's right now.