Introduction to the openx vario/altimeter

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Introduction to the openx vario/altimeter

Post by rainer »

I think its my time to give something back to the community.
Image

An Arduino based vario and sensor hub for open9X and more...
== Build your Own openXvario ==
I started this project in order to use the MS5611 barometric sensor to send data via FR-Sky to open9x.

The main Idea behind this project is: Keep it SIMPLE
Everybody with some basic experience in electronics and some basic soldering skills should be able to put this thing together at one evening. You do NOT have to etch PCB´s or solder together huge amount of tiny SMD components. Instead you just buy 2 ready made modules, a suitable programmer and put it all together with the information in the Wiki and in this forum.

I of course do not take any warranty whatsoever for the instructions below. Do it at your own risk. Read and understand all of the information below before you begin.

== LINKS ==
[*]The Project Homepage on google code: https://code.google.com/p/openxvario/
[*]The build instructions https://code.google.com/p/openxvario/wiki/Main

=== Arduino Variometer / Altimeter over FR-Sky telemetry for open9x ===

Image
Image
Image
  • ALT => the relative altitude
  • VSpd => the vertical speed
  • Dist => 279.22 the absolute height as calculated form air pressure+temp
  • Cels => the input voltage of the arduino
  • RPM => 1056 mbar = the current air pressure (not the best resolution in this field...)
  • T1 => 25C the temperature measured by the ms5611
This is just one example of how the output vlaues of openXvario can be assigned to the temeletry fields in open9x. You can configure a lot of this in the code before uploading the porogram to your device.

=== Sensor data send to open9x ===
  • absolute altitude ( ID 0x10 and 0x21)
  • vertical speed ( ID 0x38 )
  • supply voltage as cell 0 in id 0x06
  • temperature (from MS5611) as T1 ID 0x02
  • 6 single voltage values connected to the pins as configured as cell 1-6 in id 0x06
[*]lots of other possibilities for testing and playing around with the vario

=== The wiring diagram ===
Image

=== Remote Control your vario ===
You can (optionaly) use a servo channel to control the sensitivity of the vario from your transmitter. Just map a potentiometer from your 9X to the channel used to power up the openXvario and include the option in the configuration section of the source code. (see CompileOptions for details on how to enable this feature)

It is all work in progress. It would be fairly easy to add in additional sensors if we stuff in the needed code. you could even try to get a 11DOF module working if you fancy all the data.


Have fun, relax and keep the smoke inside of your electronics....

rainer
Last edited by rainer on Sun Feb 03, 2013 3:03 pm, edited 16 times in total.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by jhsa »

Thank you.. what a great project.. One thing though. I might have missed it.. I have an arduino Pro Mini 5V 16Mhz.. Will it work?

Thanks

João

EDIT: The stupid here didn't see that in your picture you say arduino pro mini 5V. :mrgreen:

Anyway, I'm a beginner with this microcontroller stuff.. I suppose we don't need any kind of level converter if we use a 5V sensor and a 5V pro mini, right?
Last edited by jhsa on Thu Jan 24, 2013 12:21 pm, edited 1 time in total.
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by rainer »

sure,i'm uisng the same arduino board above..
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by Rob Thomson »

So... We are really looking at two parts... And some servo leads?

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by rainer »

yepp
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by rainer »

jhsa wrote:Anyway, I'm a beginner with this microcontroller stuff.. I suppose we don't need any kind of level converter if we use a 5V sensor and a 5V pro mini, right?
no, should work right away. i´ve got a setup here with 5v arduino mini pro and 5v ms5611 and another one using an arduino nano together with a 3.3v version of the sensor module.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by jhsa »

thanks..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by Rob Thomson »

I have just ordered 4 boards and barometers.

Rather looking forward to getting this one working. Will be my first time using Arduino... So something to learn too:-)

Sent from my Nexus 7 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by rainer »

Which Arduino did you order? if you order the arduino Pro Mini, remember to get a programmer as well. it´s the smallest arduino board, but it´s lacking the USB support.
something like this would probably do the job: http://www.ebay.de/itm/221180129870?ssP ... 1439.l2649
( ordered one myself today as i fried my other one with a short circuit..... should realy clean my desk ;-) )

If you ordered the arduino nano, its a tiny bit bigger, but it has a builtin mini usb port
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by Rob Thomson »

Thanks.. just ordered the programmer!

Rob
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by Rob Thomson »

Lol... I am looking for something to build to learn a bit about Arduino!

Maybe I will have a play after I have built my first vario!

Any suggestions for a good starter kit to learn off?
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: DIY arduino variometer/altimeter/hub for open9x+FR-Sky

Post by rainer »

this is a good place to start: http://www.ladyada.net/learn/arduino/
this one as well: http://arduino.cc/en/Tutorial/HomePage
most of the starter kits are not really good value for money. it really depends what kind of stuff you allready have at your place. you´ll need a couple of breadboards enough jumper wires , an arduino UNO , maybe an arduino nano (which is really breadboard friendly if you solder in some 2.54mm pin headers) a full resistor kit, a elec.capacitopr kit some led, switches. and whatever else you can think of. just get yourself stocked with that stuff, do some of the tutorials and find some nice projects to start. there´s enough input in the web. the components you really need are then totaly dependend on the project you like to build.
you might have a look at dx.com and have a look there for the resistor / capacitor kits.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Promix »

Rainer,
I can offer you a calibrated vacuum/pressure chamber we have at work for altimeter calibration. In case you will squeeze out all precision out of it :)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openxvario arduino based variometer/altimeter/hub for op

Post by rainer »

Hi Promix,
thanks for the offer!
the MS5611 sensor comes pre-calibrated from the factory. each of the sensors get´s it own calibration data stored internally. So calibrattion would only be valid for that single sensor. And as we just need relative changes in pressure /height an exact calibration is probably not that important.
The more difficult part here is to eliminate the jitter in the readings without sacrificing the speed, which is mainly a software problem.

What might be interesting is to test if the relative height change gets calculated properly. so that we know the altitude of our plane in the air is displayed correctly.
e.g. placen an openxvario together with a receiver and a battery in the test chamber and do a perform an exact change in air pressure in order to see if the results gets displayed correctly.

have you got an open9x telemetry receiver there? If i get my next sensors from china we might give it at a try, i could do a SW change in order to get the measured air pressure displayed in an other telemetry value ( like displaying it in 2 of the cell voltages ==> 1090.52mbar=> 1.09v , 0.52v )

but as i said, this would only calibrate /verify one specific sensor.

Rainer.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Promix »

Hi Rainer,
I always assume your project is able to send out altitude in ref to field elevation as a side product.
But to check the exact calculation of air pressure change is a good point anyway.

My Frsky combo still laying 25km away at customs office gathering dust :evil: I`am waiting for other stuff from China to pick it up in one ride.

However, let me know if you need some assistance for test.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jhsa »

Funny, I also have to drive 25 Km when I go to the customs.. I wonder if we are neighbours :mrgreen: :mrgreen: :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Promix »

He he , I don`t think so. Trust me, this is the calibrated distance that all customs have calculated to annoying us for sure ! :mrgreen:
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by ReSt »

Promix wrote:
My Frsky combo still laying 25km away at customs office gathering dust :evil: I`am waiting for other stuff from China to pick it up in one ride.
Are you aware, that customs may charge you a fee for the time they stock your parts?

I know not every office may do it, but worth a try: call them and ask if they can send the items to you.
They really can !! It depends on who is at the phone. They may request some papers e.g. PayPal bill that they can accept as PDF file attached to an email. And even if you have to pay some tax, they can send it to you and you have to pay it immediately when it is delivered/you get it; without additional cost !

Reinhard

btw I have 40 km
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Promix »

Rainhard,
thanks for your advice. Yes, I heard about it a while ago and I`am wondering that I never tried it this way.
Well, I will give it try now :)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jhsa »

where I live, they give us a knife and tell us to open the parcel.. Don't know if they would send it to me..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openxvario arduino based variometer/altimeter/hub for op

Post by ReSt »

That happened to me also at the same office when I was there personally to get my Turnigy9x. Nad the officer was working for me at least a quarter of an hour to finally get around 12 Euro fee. :P

The case where it worked was with a FlySky CT6B.

Reinhard
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jhsa »

yeah, it's a pain having to spend some expensive petrol to go and get the stuff.. oh well.. ;)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jhsa »

Sensor ordered. I hope it is the right one ;)

http://www.ebay.de/itm/400343424531?ssP ... 1439.l2649

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openxvario arduino based variometer/altimeter/hub for op

Post by rainer »

yes. the sensor is the right one. i've got one like that as well.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openxvario arduino based variometer/altimeter/hub for op

Post by rainer »

i added some info to the wiki. if you want to learn a bit about the possible ways of customisation to openxvarion have a look here: https://code.google.com/p/openxvario/wi ... ileOptions
all these values will be in the next version of openxvarion.

rainer.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jbeebo »

Super cool project.

Rainer, Bertrand you guys have worked some really cool majik here! Porting those analog ports thru Arduino to RS232 to FrSky telemetry is slick, possibilities are endless! Rainer, nice job commenting the code, it is perfectly understandable.

Rob, I like your idea for true vario but think you'd need some airspeed indication for highest accuracy because you're trading potential energy (AGL) vs. kinetic energy (velocity; airspeed). Think accelerometer or GPS would need a lot of transformation and adjustments. Thinking out loud...a second air pressure sensor connected to a pitot tube will give you airspeed. Can interface both pressure sensors to Arduino via SPI protocol (as implemented by Rainer). Math in arduino, send adjusted vario.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Flaps 30 »

Brilliant work Rainer. I'm sure that this little project will go far. :)

I have been tempted into tackling this project, although I really have no inclination into learning all the ins and outs of how to program this up or learn about coding. So from my point of view, it would be great to have a simplistic guide on how to get up and running. I have looked at the Wiki article and I left finding wanting of some more information.

(1) No schematic of how the modules are wired up.

(2) Details of how to program the Arduino unit using the FTDI unit including information on what to use on the computer to put the code into it.

(3) No code 'bundle' in a format that can be fed into the Arduino. I'm assuming that a 'txt' format will not work. :)

So any idiots guide would be most welcome by this idiot. Adding it to the Wiki would be great IMO :)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openxvario arduino based variometer/altimeter/hub for op

Post by rainer »

Flaps 30 wrote: (1) No schematic of how the modules are wired up.
currently it´s only in the text of the wiki. 4 lines to hook up the ms5611, gnd and +5v from receiver and pin 10 from arduino to rx on receiver. it´s really not that complicated. the pins are all labeled on th MS5611 module with the names like in the wiki
Flaps 30 wrote: (2) Details of how to program the Arduino unit using the FTDI unit including information on what to use on the computer to put the code into it.
the easiest way would be to use an arduino nano instead of the pro mini. it has a mini usb connector builtin and is only slightly bigger.

but: yes, you are right we could use an easy guide for non arduino users.. anybody willing to jump in here?
Flaps 30 wrote: (3) No code 'bundle' in a format that can be fed into the Arduino. I'm assuming that a 'txt' format will not work. :)
the file ".INO" file you can get here: https://code.google.com/p/openxvario/so ... xvario.ino is the file you need to load into the arduino UI and programm into to the arduino board:

as soon as i get my next sensors, i´ll build a couple of extra varios and i´ll try to create a build instruction with some more pictures.
If anyone else wants to create some instructions, go ahead. ;-)

rainer
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: openxvario arduino based variometer/altimeter/hub for op

Post by Rob Thomson »

I am expecting my parts in the next week or two. In will also add docs and info.

I am a non arduino user to a learning curve for me too.

Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openxvario arduino based variometer/altimeter/hub for op

Post by jhsa »

I ordered a sensor but it's still on the slow boat from China.. Hopefully was not caught by the Chinese new year celebrations :(
That means I won't be able to do anything this month maybe.. I still have some unfinished projects to work on as soon as I get rid of this cold that I have since last year.. :)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”