Wednesday, 9 May 2012

arduino thermal anemometer

This is my first blog post to talk about a thermal anemometer for Arduino. There is some background reading herehere, and here, and a finally a really excellent report by Johan Liljencrants. There is also a good description of the basics of thermal anemometry from the University of Cambrdge here. You could also use the information on this website to perform a much better calibration than I did...

I needed a very small, portable, data logging anemometer to use for a school project. After a few miserable attempts with heated transistors and thermistors I stumbled upon the IST FS5 "thermal mass flow" sensor. I basically used the circuit from the data sheet, using a different op-amp and transistor (and excluding the calibration resistor) and was reasonably happy with the initial performance. I added a second op-amp acting as a difference amplifier (using a 7805 voltage regulator as a 5V reference, because I had one lying around) to match the input range of the Arduino analog in.

The circuit diagram, modified from the data sheet, and a photo of the finished anemometer are shown below. The sensor itself was mounted in a protective 3D printed housing because of the application. In the photo the arduino is mounted inside the tupperware case with the power and USB connector wires visible. I also built a version of this circuit that was portable using a Seeeduino Stalker and rechargeable batteries. The code for  both versions is quite simple, printing the analog input value to either the USB port or the SD card, examples of which can be found elsewhere.





I calibrated my sensor using a TSI transducer anemometer between 25 and 30 degrees Celsius. In all likelihood, if you plan to use such a sensor you will need to calibrate it specifically for the application at an appropriate temperature (since the rate of heat transfer is dependent on the temperature difference between the probe and the fluid). My calibration data and the derived empirical relationship are shown below.



The purpose of this post is really to show the potential of this particular flow sensor and the Arduino to make air speed measurements with a solid state device. To make such a sensor really useful much more rigorous calibration would probably be required. Other interesting possibilities are a PWM constant temperature anemometer (I tried this briefly but I think the existing PID libraries for Arduino are a bit slow, maybe an integer version would work) or the combination of two or more sensors to measure both the air speed and direction.


19 comments:

  1. Hi HornBlower,

    Thanks for sharing your ideas on this anemometer. You have mentioned 'Code' in your article, could you specify where is the code? Could I take a look at the code?

    Regards,

    ReplyDelete
    Replies
    1. Hi Myounki,

      Actually since this was quite a few years ago I fear I have lost the arduino code. Anyway, it was just logging the analog input to an SD card, no fancy filters or anything.

      Then I used a matlab script that used the calibration data to convert the raw data into airflow in m/s.

      Thanks for your interest!

      Delete
  2. Nice article. I was looking for info on thermal anemometers and possible DIY implementation. I did found the flow sensor a while ago but I had no clear idea of how to use it so thanks. My application would be an outdoor anemometer. This would probably be tricky because I would need calibraion data for a wide range of temperatures. But I saw a similar application in a commercial product, so it should be possible.

    ReplyDelete
    Replies
    1. Hi Antiath, thanks for your comments. I think it should definitely be possible, probably the hardest part is getting hold of a good reference anemometer. There is a much nicer implementation of a flow sensor here - http://hydraraptor.blogspot.co.uk/2016/01/quantifying-cooling.html. Some of these ideas combined with the IST sensor would certainly result in a nice flow sensor.

      Delete
  3. Hello


    Great post, I would like to know how you did to convert the analog read (AD) data into airflow, in m / s. Could you explain how you did the calibration?


    Thank you very much in advance.

    ReplyDelete
    Replies
    1. Hi there, glad it could be of some use to you! I was lucky to have a certified anemometer (TSI 8455).

      As well as the display the TSI anemometer also has a voltage out, so I could just read this on one of the other Arduino analog inputs and make a text file comparing the two sensors.

      I made a small "wind tunnel" out of wood and used a 120 mm computer fan where I incrementally increased the voltage at some time interval to get up to the 1 m/s I needed.

      Hope that helps! - by the way I would not be at all surprised if there is a better way to do this!!

      Delete
    2. Hello,


      Thanks for answering. The calibration procedure for this sensor is the same, but my intention is to use this sensor to measure the flow of liquids in a micro-tubing. But I must first calibrate it.


      Did the resistance values you used on the difference amplifier calculate? As you came to the conclusion that it would be 100K ohms. Can you explain me ?

      Thanks in advance.

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Hi! Actually I can't exactly remember why I used these values for the 2nd diff amp... I guess I used something like this - https://www.allaboutcircuits.com/tools/op-amp-voltage-and-gain-calculator/

      Delete
  4. Hello

    Thank you for sharing this great post.
    I have been trying to wire up the flow sensor base on your diagram, but I did not use a second op amp as a differential amp. Instead I directly measure the signal from the BJT emitter(where you connected to a second op amp). However as I blow through the flow sensor, there is completely no response in the signal. Would it be possible for you to suggest what's wrong with my circuit?

    Thank you
    Danny

    ReplyDelete
    Replies
    1. Hi Danny,

      Glad you liked it! I have to admit, I'm not really knowledgeable enough in electronics to tell you why your version doesn't work - I just used the suggested circuit in the datasheet for the flow sensor, so I can only really recommend to use that - it works! Sorry!

      Delete
  5. Hello,

    Thanks for sharing your results.
    I've been trying to assemble the circuit as shown in the datasheet but there's no response in the signal (no voltage difference) as in Danny Chen's model. I would like to know how much voltage did you apply to the circuit.

    I'm not really knowledgeable in electronics, just like you

    Thanks in advance,
    Oscar.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hello Oscar,


      I am also using this sensor, the circuit proposed by the manufacturer is composed of a Wheatstone bridge connected to a conditioning circuit that performs temperature compensation (CTA). On my circuit, I'm using an external 10V source, and on the output I'm getting a signal that varies around 2.4 ~ 6V. Check your circuit.

      Delete
    3. Thanks for the reply,

      Can you show me a picture of your circuit?, I am pretty sure mine is well connected in accordance to the one on the datasheet.

      I'm using this one: http://www.farnell.com/datasheets/1674304.pdf

      Thanks,

      Delete
    4. hello Oscar,


      Could do you contact me?
      My email address: xavierconect@gmail.com

      Delete
    5. Hi Oscar - maybe you have it working by now but in case you need it, I can email you my original schematic, which I just found. I was using a 12V source according to the schematic..

      Delete
    6. Hello

      Can you give me this schema too?

      Thanks in advance

      Delete
    7. That would be very useful. I have another question, is the schematic the same for the FS7 sensor?

      Send me the schematic to my email address: oave222@g.uky.edu

      Warm Regards,

      Delete