Arduino Variometer

Arduino variometer for those who fly RC Gliders, DLGs, and other motorized and non-motorized RC sailplanes, as well as ‘big brothers’ – ‘manned’ gliders and parachutes, indicating whether there is thermal or not, or better known as “vertical speed indicator“, or simple Vario (this one is simplified version, without any display):

No radio? Direct audio mode:

Someone contacted me and asked if it is possible to use this vario without need for RF chip – for direct use. Answer is yes. Simply by adding crude audio amplifier to passive buzzer, which is actually speaker (loudspeaker). Sorry for ugly drawing.


If you have small “magnetic” buzzer, as Banggood describes, and if it is passive, then capacitor is 100 nF (0.1 uF), because low frequency sounds will reproduce badly anyway of such small membrane of the speaker. If you use some bigger speaker, then consider to use 1 uF or more, the best value is 100 uF, but it is maybe overkill because any small loudspeaker that can fit in your hand has actually bad low tone reproduction. Passive buzzer on Banggood: BUZZER 1-5V

Alternative option is to use 1W GPS (General Purpose Speaker) on eBay: 1W GPS loudspeaker


If you are sure that output on pin PD2 (or just 2 on Arudino pro mini V3) will not remain HIGH or digital 1, then you can omit this capacitor. DO NOT attach directly loudspeaker on the PD2 pin, because it has very low impedance and can ruin your Arduino. Although there is overcurent protection, I will not gamble with that. If sound is too loud, then add 1-500 Ohm resistor in series with loudspeaker. This way it will save power if you have battery powered device.

Schematic, for those who are lazy to visit RCgroups forum: variometer Note that on MS5611, there are used only four wires of seven. That is because other three wires are used in the case of SPI connection instead I2C as is on this schematic. Those ‘extra’ three wires leave not connected (NC). Arduino sketch, hover with mouse over the top of the code, click on “copy”, then CTRL+C for copy to buffer, and CTRL+V to paste into your Arduino IDE:

Debug option: ‘Serial.println’

This code by default has excluded serial print of temperature and pressure. For testing and debug of variometer – your circuit on serial monitor, remove ‘//’ tags before command lines, highlighted yellow on this picture: Arduino sketch variometer This Variometer is intended for RC models, as is DLGs, where ‘downlink’ is provided by TX and RX on 433 MHz, but if you wish to hear sound directly – without the need to ‘broadcast’ radio signal on 433 MHz, you may add capacitor of say 100 nF (or more for better low frequency reproduction) between pin ‘D2’ on Arduino nano and the audio amplifier. This capacitor serve for galvanic deoupling for protection of Arduino and amplifier. Use small audio amlifier, something like this one: LM386 audio amplifier This amplifier is proven to work on low voltage, ranging from 4 to 12 Volts. The amplifier ($2.11 US): LM386 audio amplifier on Banggood Also, aside eBay -you may find other parts on Banggood. What is the difference – Banggood is more secure and reliable seller, unlike uncertain sellers on eBay (many sellers are okay, but this is a ‘gamble’ – sometimes frusttrating and wasting time).

25 thoughts on “Arduino Variometer”

  1. Hi. I am noob. What mean this code

    while (millis() < time); //loop frequency timer
    time += 20;

    I think millis() allways larger then time

    When i am not right?

    1. ‘millis’ I think it is time from start of the process, or start from the beginning of power on. Not sure right now, should look in arduino help forum. Thank you for the comment.

  2. Nice work, tested and works like a charm! Can you please help me porting this code to an Attiny85, just with the bmp180 and buzzer, to use with paraglider, my Fox still fliyng, but now is my turn…lol

    1. Tried to convert it on Attiny85, but there is a problem with sound (tone command) – it does not works as good as with ‘Big Brothers’ as is Arduino nano, Pro, Uno or Mega. For a while I am busy with my house, and then will back. There are chance to use manchester code and send signal over 433 MHZ or other frequencies to the ‘ground’ station. This way, it will be transmitted not only variation in altitude, but also current altitude (and if needed, temperature) state. Then ground station will transfer data to sound, some screen (LCD, TFT…) and tone. With some hope, it can be stored to some SD or microSD card (I havent yet bought RTC timer… will do it soon). I don’t know how soon I will be able to do anything around Arduino codes, but hope soon. Thank you for interest.

  3. Wow!! Really thanks for your prompt reply and best wishes for this new year!!
    I found this
    And they have a video on youtube doing exactly what I want, but I have stucked to put their libraries onto my IDE 1.6.7, I made a comment today and hope they can help.
    On arduino nano using the standard libraries I can madded the vario work, just the bmp180 and buzzer, but I want so much to reduce the size and using a coin cell battery. Oh and sorry about my english, I am writing from Brazil and do not have much fluency…
    Thanks for the advice about the sensor, I will buying some of this.

    1. Tell me, do you want to make variometer for ‘big’ planes or small gliders? If small gliders, then BMP180 is NOT your choice – it has error of 1 meter. That is noise produced by piezo sensor amplifier. MS5611 has noise of only 0.1 meter – ten times better than BMP180, but does not cost 10 times as much. Earlier day, price was about 10 times, but no more. I hope very soon to ‘back on track’ on Arduino projects. Quadcopters can be addictive, but I should to force myself to back to other unfinished projects as well. Your English is perfect to me, I am not fluent in it as well. Happy New Year!

  4. Hello,

    I just purchased Arduino Nano v3, MS5611 module and piezo buzzer. I do not need wireless transmission.
    This is my first time doing this. I should to learn to code first but but already so itching to get this working.
    Can you help to modify your code to get beeps with what I have ?

    Thank you!

    1. Hello.

      Thanks for post. Which type of buzzer you have? Active or passive? If active (that means buzzer operate on some voltage by itself – whistling when connected to power supply), then there is no hope – it will produce sound all the time. If passive (just make click when on some voltage), then it can be used for this circuit. The simple circuit… okay… I will make the fastest diagram possible now. Just hand draw. One capacitor and one transistor is needed to do what you want exactly.

        1. Hi
          I wired my board as in your drawing and added 0.1uF cap to base of transistor. Then copy paste the code from your link and now it has continuous beep.
          Anyidea ?

  5. Hi, I did not know about the buzzer being active or passive on mine. Then I replaced the buzzer with the speaker I received from amazon. It does make the right sound but volume is so low that I can barely hear it. It needs to be next to my ear. Also the speaker heat up very quickly.
    I am going to try passive buzzer and see how it goes.

    1. I did not get my hands on passive buzzer today. I came home and looking at the drawing, D2 is for switching and I can only imagine speaker getting pulse from 5v source. Don’t I need an amp or something to supply sinusoidal wave for speaker to play ?

    2. Please fiddle for a bit with some resistor – put it parallel to this capacitor. It is also possible to add 1 MOhm resistor between base and collector of the transistor.
      In first case of some 1 kOhm resistor parallel (or completely replacing capacitor) – signal is directly feed to the base of the transistor. DO NOT connect directly base of the transistor to the output pin. I am just suggesting, because can’t find time to experiment with all of this. Sorry. I hope you will find the solution for you.

      1. Hi, Thanks for the suggestions again. As I put in 100kohm (did not have 1Mohm on hand) between base and collector, it got louder that I can hear. But not so loud. now sure how loud this speaker is supposed to me. When I replaced the cap with 1k, it made it worse.
        But this is great starting point and thanks for your time during busy hours. .

        1. I am glad you are close to what you want. Now, when you have too loud thing, just put some resistor (10 or 100 Ohms, maybe more, depend – the more – the silent it should be) in series with loudspeaker. It should decrease current, thus decreasing volume. 1Mohm may make it even louder, but if you put below 10 kOhm, it may heat transistor and destroy loudspeaker. So, 100 kOhm seems okay. Just connect in series some resistor so that meet your requirement and wanted volume. Thank you for visiting my web pages.

  6. Hello wildman
    I’m trying to make the vario but while looking at your video in YouTube, I’ve realised that te vario will sound with any minimum climb or sink. I’m a paraglider pilot and the varios we usually use, don’t make any beep until we sink -1,5m/s or we climb more than +0.5 m/s and will be annoying to hear the vario beeping all the time when we are not climbing nor sinking too much.
    So, do you think will it be some way to silence the vario when the ammount of pressure difference is small specially when the sink is minimum. Think that in still air or when there is no lift the paragliders usually glide at -1m/s

    Thank you very much for sharing your knowledge


    1. Hi Jaime.

      This program is made by Rolf R Bakke, and I can try to modify it, but not sure how to do it on top of my head. By ‘silencing’ vario – total absence of any sound, or just not responding that fast? I should change program, but not sure how soon I will be able to do that, various sh*t happening here.

      1. I meant total absence of sound until the sink is grater than the normal sink of a powerless aircraft that is gliding (in this case -1m/s) -not sure of the amount of drop in pressure is that-. Don’t worry about it, you are doing more than enough just replying to our comments. Thanks again and stay strong!

  7. Hello, I have the same problem as Jaime. I have compiled a project according to instructions. It works perfectly. Amazing. For paragliding but unfortunately useless. Threatens the destruction of my head. Because of the constant whistling.
    I can not be programmed. Please Ask how to change the program. I want to be able to change the bandwidth of silence. For example, -1.5 m / s – 0 m / s.
    thank you for everything

    1. Oh, okay. Now I see that more people have the same issue… so I should to kick myself into lazy ass and inspect arduino sketch and see what can be done. Thanks for the reminder.

      1. Hi,
        Same here. I am using it for paragliding. And very excited about your project. I really thank you for it and looking forward for the parts to arrive.
        Maybe you can make one skript for paragliders:
        – without transmitting to ground; only sound connected to Arduino
        – silence during this movement: -1.5 m / s – 0 m / s

        And one for RC pilots which you have here already.

        Only if possible of course and if you have enough time.
        If you have a donation button. I would use it 🙂


Leave a Reply to Felipe Cancel reply

Your email address will not be published. Required fields are marked *