Biking Headwind Monitor

5,706

31

12

Introduction: Biking Headwind Monitor

How to measure your wind resistance while cycling, so that you can see how hard you're really working!

The Arduino reads the real-time airspeed as measured by a compact Pitot tube + airspeed sensor connected to analog input 0, and reports it back to the iOS app using Bluetooth LE. When the Pitot tube is carefully mounted on a bicycle (on or near the headtube) such that it's pointed directly forward and will receive an unimpeded air flow as the cyclist moves forward, the measured airspeed, when compared to the groundspeed as measured by the GPS of the iPhone, can be used as a proxy for wind resistance.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Get the Parts

For this project, you'll need:

  • Arduino Uno (it will probably work with other variants, but I've only tested it with the Uno) and 9V battery
  • RedBearLab's BLE shield
  • Airspeed Pitot tube kit
  • Bluetooth LE-capable iOS device (iPhone 4S or later)
  • Curved piece of foam (a chunk of foam that's used for keeping water hot in copper pipes works well)
  • Old water bottle
  • Old two-piece iPhone case

Note: you also need the ability to program an Arduino (using the free development environment) and build/install iPhone apps using Xcode. I've tested this on OS X El Capitan (10.11.4) using Arduino 1.5.8 and Xcode 7.3.

Step 2: Wire Up the Pitot Tube and Airspeed Sensor to the Arduino

The airspeed sensor in this project has 3 connections - power (5V), ground, and analog output. With some wire (you need 1 foot or less of 3 color-coded wires), a 6-pin header (to attach the wires to the Arduino), and a soldering iron, you can make a simple cable to connect it to the +5V, GND, and A0 pins of an Arduino Uno (which has a BLE shield mounted on top of it). It's a good idea to use some heat-shrink tubing when soldering wires to a header to prevent adjacent pins from accidentally touching.

In this photo, the bottom of the airspeed sensor's mini circuit board has some velcro on it as I experimented with different ways of attaching it to my bicycle's frame so that I could increase the distance from the Pitot tube to the Arduino. In the end, I put it just inside the top lip of the water bottle which is where the Arduino lives too.

Step 3: Program the Arduino and Build/install the IPhone App

Download the code for the Arduino sketch and iPhone app from github. You'll need a Mac because the XCode development environment for building iPhone apps only runs on Macs.

Step 4: Attach the Stuff to Your Bike

Wrap the curved piece of foam around the top of your bike's down tube or head tube and use a couple of cable ties to secure it.

Remove the top of the water bottle and place the Arduino with 9V battery and airspeed sensor inside of it. You might want to insert another piece of foam (or two) inside the bottle first, so that things won't move around too much. Then put the water bottle into the cage and carefully insert the Pitot tube through the foam it so that it is parallel to the ground; make sure that the front of it faces forward and is not blocked by any cables or other parts of your bike. Ensure that the side holes on the Pitot tube are not covered by the foam.

Drill two (or more) holes in the bottom of the two-piece iPhone case and attach it to your handlebars using cable ties. When you have an iPhone in it, it's a good idea to use a mini-bungee cord around it (or just some tape) to make sure that it doesn't fall out while riding!

Step 5: Go for a Ride!

The screen on the left is the data capture mode. The total gain, effort speed and effort distance values are not currently populated.

The one on the right is the view of a captured ride. On this screen, three colors are used to estimate the wind resistance: high (red), medium (yellow) and low (green). The current simplistic calculation simply compares the measured airspeed to several constants (i.e. does not take the ground speed into account) - based on my observations of what seemed like "high", "medium" and "low" in-your-face headwinds while cycling on flat surfaces in San Francisco. This particular route was captured while riding (mostly) east-to-west from downtown SF, over the Golden Gate bridge and up Hawk Hill. The red part through the Marina district, which is relatively flat, accurately reflects a higher LOE due to the typical westerly winds that are present on that stretch.

The captured raw CSV data (in .biker files) can be extracted from the phone's filesystem using a tool such as iExplorer for further analysis.

Bicycle Contest 2016

Participated in the
Bicycle Contest 2016

Sensors Contest 2016

Participated in the
Sensors Contest 2016

Be the First to Share

    Recommendations

    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020
    • First Time Author Contest

      First Time Author Contest

    12 Discussions

    0
    jchr
    jchr

    Question 1 year ago

    hey DaleL17,
    we want to calculate the speed with the same hardware (pitot sensor )
    we edited your code to make it simple (just calculate the speed : https://pastebin.com/wwvETMtD ).
    but calculated speed is to slow (a human that are walking at 6km/h get 2km/h ) .
    How did you calibrate your pitot sensor ?
    We are using this pitot tube (and sensor ) :https://www.amazon.fr/Z-Standby-Ardupilot-Arduplan...
    Thank you very mush
    Jc
    PS: you did a amazing job , thank you for sharing !

    0
    DaleL17
    DaleL17

    Answer 1 year ago

    Hi Jc,

    I'm glad to hear that you found this project useful. It's been a while, so I don't really remember calibrating the pitot sensor other than the "auto-calibration" that happens in setup() where g_reference_pressure is calculated. I suggest that you manually calibrate your sensor by taking multiple readings in a wind-free environment when the actual speed is known or can be calculated and then adjusting kAirspeedRatio until the real and calculated speeds are close.

    Good luck!

    Dale

    0
    JulianP4
    JulianP4

    Reply 1 year ago

    The pressure at low velocity is very small and subject to gross errors

    0
    contarinifamily
    contarinifamily

    2 years ago

    Well Done.

    I'd like to build one with an audio tone rather than a phone to the output.

    0
    DaleL17
    DaleL17

    Reply 1 year ago

    Hi, sorry I didn't see this comment until recently. What do you mean by an audio tone?

    0
    contarinifamily
    contarinifamily

    Reply 1 year ago

    Varying audible to tone that changes with wind speed.

    0
    AnthonyD13
    AnthonyD13

    4 years ago

    This seems like a very interesting project. I am pleased to say im going to have to try this for myself

    0
    DaleL17
    DaleL17

    Reply 4 years ago

    Great. Apparently 3D Robotics no longer carries the Airspeed kit, but it looks like it can be found elsewhere on the internet. Let me know if you have any questions.

    0
    DIY Hacks and How Tos

    Great tracking system. You should enter this in the Sensors contest.

    0
    DaleL17
    DaleL17

    Reply 4 years ago

    Good idea - I just did.