openXvario development

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

Re: openXvario development

Post by rainer »

hopefully yes... i don't have any new type of receiver/transmitter yet, so i can only say that i hope to get it working.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

DHDSP
Posts: 62
Joined: Mon Apr 23, 2012 12:48 pm
Country: -
Location: Germany

Re: openXvario development

Post by DHDSP »

Hi Rainer,

I have now built and programmed ovx. After I put on debug I get the following (no change in CRetc.):
....
Error when sending command: 48
Error when sending command: 0
Error: raw data not available
Error when sending command: 50
Error when sending command: 0
Error: raw data not available
Pressure:131066 AveragePressure:1310.6600341796 Altitude:-1919.5782470703 ClimbRate:0 K_R:300.00 Temp:-12906 VCC:4728
....

What could that mean ? I did not connect the ovx to the receiver, just at the computer.

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

Re: openXvario development

Post by rainer »

Hi Peter,
There is a problem in the connection between the Arduino and the MS5611 module
the arduino is trying to send I2C commands to the MS5611 and fails in doing so.
check the 4 connections to the MS5611 ( and the I2C address in case you use a module where you can configure it)
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/)
DHDSP
Posts: 62
Joined: Mon Apr 23, 2012 12:48 pm
Country: -
Location: Germany

Re: openXvario development

Post by DHDSP »

Problem solved: RTFM.

I just looked at the wiring PICTURE and did not read the connection table.
Now I just need to connect to A4 and A5 not A2 A3...
maca55
Posts: 10
Joined: Wed May 16, 2012 12:14 pm
Country: -

openXvario is awesome

Post by maca55 »

For the past 12 months I have been flying, battling to find and stay in lift, with the noisy low precision FrSky Vario.
Now I'm very excited to say that I'm flying with a home built Vario with 10cm resolution and an adjustable noise filter all for under $25, less than the cost of the 'crappy-by-comparison' FrSky Hub+Vario combo!

Thank you very much Rainer for openXvario!!

My sensor arrived late last week (after a long wait) so I rushed to get it assembled, tested and into my plane before the weekend. Everything went together beautifully. The build instructions were excellent, and the programming couldn't have been easier. It is SOOOO refreshing to have something as seemingly complex as this just WORK, and WORK first time! It is a testament to the quality of Rainer's code and also, dare I say it, the quality of the 'cheap ebay electronics'! I will not forget the first time I powered up my very own openXvario and saw how incredibly sensitive it is to MINUTE pressure changes!

User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXvario development

Post by Flaps 30 »

Great to hear that :).. Yes it does give good results. I look forward to a report in the flight report section,when you have played with it a bit and maybe altered the Kalman filter value to suit you.
DHDSP
Posts: 62
Joined: Mon Apr 23, 2012 12:48 pm
Country: -
Location: Germany

Re: openXvario development

Post by DHDSP »

So... The OVX seems to be working, the altitude in debug output seems ok (I still have to programm my Sky9x board).
The only thing I notice is the climb rate changing, while the vario is just lying on the table. Is this normal ? If so, what variation is normal?
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 development

Post by Rob Thomson »

Technically no movement (on the table) is an indication of lift. If you where 'sinking' that would be normal flight.
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: openXvario development

Post by rainer »

the normal variation depends very much on the configured sensitivity. lower values for kalman_r result in a more sensitive behavior with faster reaction speed and more sensor noise => more variation in altitude/pressure/vertical Speed

but in general the variation is around -5 to +5 cm/s with peaks of up to +/-10cm
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
DHDSP
Posts: 62
Joined: Mon Apr 23, 2012 12:48 pm
Country: -
Location: Germany

Re: openXvario development

Post by DHDSP »

Everything is working perfectly ! Now I just need to take it out to fly :)
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: openXvario development

Post by Kilrah »

Just built one too, took me all of 15 mins. Alt stays within 1m over half an hour and a 4°C temperature difference, and Vspd noise is indeed within 0.1m/s with default settings. I.e. perfect :)
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 development

Post by Rob Thomson »

They are remarkably good!

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: openXvario development

Post by rainer »

wow.. 15 minutes
i'm slower... ;-)

Btw. i am currently implementing current sensor support. so (hopefully) soon we will be able to connect various current sensors directly to the openXvario.
i am using the AC712 ( 5,20,30A ranges) for testing here. >These and all other ranges should be supported as long as they output a linear voltage relative to a defined min/max current.
in the code you will be able to define the the min max currents in milliamps. the voltage from the acs712 will be measured an mapped according to these values and send via ID 0x28
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: openXvario development

Post by jhsa »

is the acs758 supported too? also is the 712 unidirectional or bi directional?
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 development

Post by rainer »

should work as well. Uni or bidirectional... all fine.

you will have some parameters where you define Milliampere at 0v and Milliampere at 5v (or better the "supply voltage" from arduino to the current sensor)

i've got one ACS712 that supposed to be a -5A to +5A module.
i had to take mV/A value from the sensor description and calculate the value to put in as min/max

5V /2 = 2.5V will be 0A
the desxcription states that the voltage changes by 185mV per Amp.

0v would then be -2500mV / 185mV/A ==> -13.513A ==> -13513mA

so i use these min+max values:
#define MinCurrentMilliamps -13513 // the lowest measured current (=0v input voltage)
#define MaxCurrentMilliamps 13513 // the hioghest measured current (= input voltage= vRef)

and the internal calculated current is the same as measured using my Multimeter.

the same way you can do it for all bidirectional sensors.


Unidirectional would be: (e.g. 185mV/A)
5000mV / 185mV/A =27,02702703A => 27027mA

#define MinCurrentMilliamps 0 // the lowest measured current (=0v input voltage)
#define MaxCurrentMilliamps 27027mA // the highest measured current (= input voltage= vRef)
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: openXvario development

Post by jhsa »

My sensor has a voltage of 0.6V at 0A and then 40mV / A for a voltage supply of 5V. so at 100A will read a voltage of 4.6V, or so it should :D

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 development

Post by rainer »

no problem..
just treat it as "bidirectional" ( due to the 0,6v Offset )
600mV / 40mV/A ==> 15A => MinMilliamps= -15000
5-.6=4.4V =4400/40 = 110A => MaxMilliamps= 110000
and your sensor should work fine.
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: openXvario development

Post by jhsa »

hmm, I'm having problems with mine.. when setting it on A2 I need to set the range to around 140A for it to display the correct current.. But I'm running it through a divider.. will be interesting to test it with the openXvario. I have here a wattmeter that I borrowed from a friend and can compare. the wattmeter shows the same readings as my multimeter, at least till 10A. I have another arduino, or make another one :D and will run your code on it, even without the pressure sensor.. Hmmm individual cell reading just came to my mind :D :P

Another question. Any chance of your code running on a atmega8 at 16Mhz? I think I have the old arduino NG bootloader on my m8.. only asking because they are cheaper and have the same number of ports as the 328.. difference are 2 analog inputs, right? the atmega 8 is also pin compatible with the 328/ 168, etc, I think.. Hence the question ;)

Thanks for this project again Rainer.. It's fun.. :) even got me into gliders... well, into crashing them :D

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 development

Post by rainer »

No idea if it will run on an atmega8... never tested it on anything else than atmega328.
But you could use your existing oXv. you just need to connect gnd, vcc and the signal from the acs goes to pin A2.
if you want, add a small female 3 pin header and you can disconnect if it is not needed.
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: openXvario development

Post by jhsa »

I will build my own arduino this time.. I like to build things.. as it goes in bigger models weight is not a problem ;)

I just asked about the m8 because I have more ;)
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 development

Post by rainer »

prepare your solder irons... Grab some cheap chinese current modules and connect them to your oXv
The new functionality for Current sensor modules seems to work fine. it currently not released to the main branch, but a test version available in my developmens(play) branch.
i just did a test with a ACS712 +-30A module in my old easyglider and a 2s 5000mAh Lipo which gave me

motor runtime: 11:49
current with motor on: 19-23.9A
consumed capacity of 4012 mAh. (Edit: this value was consumed current from the openTX internal calculation, not the oXv internal one)

I stopped the test at 6.85 volts.
The lipo is now on the charger... lets see how much has to be refilled...
@edit: charge complete. 4136 mAh went in.
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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXvario development

Post by jhsa »

Great work Rainer.. will test it later today with the ACS758..
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
dumbthumbs
Posts: 13
Joined: Thu Apr 11, 2013 12:29 am
Country: -

Re: openXvario development

Post by dumbthumbs »

Has anyone added functionality to the openXvario to make it work as a stand alone altimeter? In the introduction thread it was pointed out that an microSD serial logger could easily be added. I was thinking of something simpler, similar to how the how-high altimetery works. Basically, after I come back down the ground, I would push a button, and the LED blinks out the highest altitude reached (i.e. it blinks out the 1's place, then the 10's place, then the 100's place).

If nobody's done this, I might take a stab at it, if I can get any time in the near future.

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

Re: openXvario development

Post by rainer »

Hi Heath,
i don't think anybody did that yet. those who build it probably use it with the 9X or Jeti telemetry, in 9x you have the ALT+ showing you the max Alt.
So this would be helpfull if you use it without Telemetry. Implementing should be quite easy, but i am rewriting the code currently in order to make it more "modular" and have more statistic data held internally ( including alt+,alt-,...) so it will get easier to implement it.

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/)
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXvario development

Post by ReSt »

Thanks for this well documented project :D

My sensor finally arrived (after 2 full months).

As I do not have FrSky gear, but use the NMEA versions (hardware wise) of Er9X or OpenTx (with 2 x APC200 modems as transmission links), I assembled the sensor with an arduino nano v3 with usb chip and an APC200.

I updated frsky.cpp with my latest N2F (compile parameter) code that allows to decode the native FrSky sensor module protocoll (less overhead than the receiver protocol) and let the existing radio code do the rest.

After changing the serial port direction from inversed to normal, I have the expected values on the radio screen.

The only restriction is the poor vario sound, as I have the Emartee voice module and the original beeper. (Tried with a crystal beeper, but that was no real improvement.) I only tried it with moving the vario by hand. The sound for positive lift is acceptable, but negative lift is twitching back and forth between different pitches.

Is there a chance to improve the stock audio sounds for the vario ?

Another question, how much support does the vario have in ER9x ?



Reinhard

VARIO1.JPG
VARIO1.JPG (12.73 KiB) Viewed 14300 times
VARIO2.JPG
VARIO3.JPG
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: openXvario development

Post by MikeB »

ReSt wrote:Another question, how much support does the vario have in ER9x ?
I haven't got round to sounds yet, but I believe this project uses the same ID values as FrSky, so altitude and vertical speed should work. I'm trying to find time to get the parts and build one. In the meantime I do have pre-production FrSky varios I'm testing. I'll try to see what is needed to get the vario sounds working, just need to find the code in openTx, hopefully, and copy it.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXvario development

Post by jhsa »

Thanks Mike that would be super..

João

By the way, I have the same problem with the negative lift sounds. I'm using the new sound module.. no beeper.. The positive lift sounds are acceptable.. the others sometimes sound like an old gameboy. No steady sound at a certain frequency.. :(
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: openXvario development

Post by Rob Thomson »

rainer wrote:prepare your solder irons... Grab some cheap chinese current modules and connect them to your oXv
The new functionality for Current sensor modules seems to work fine. it currently not released to the main branch, but a test version available in my developmens(play) branch.
i just did a test with a ACS712 +-30A module in my old easyglider and a 2s 5000mAh Lipo which gave me

motor runtime: 11:49
current with motor on: 19-23.9A
consumed capacity of 4012 mAh. (Edit: this value was consumed current from the openTX internal calculation, not the oXv internal one)

I stopped the test at 6.85 volts.
The lipo is now on the charger... lets see how much has to be refilled...
@edit: charge complete. 4136 mAh went in.
Rainer

Can you post a link to a suitable current sensor module?

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: openXvario development

Post by rainer »

you can use any of the ACS712 sensors like e.g.:
30A:
http://www.ebay.com/itm/New-High-Qualit ... 19dc3e047b
or 5A ( for small gliders like DLG's )
http://www.ebay.com/itm/5A-range-Curren ... 2ec7dd7234

the ACS712 is bidirectional and available in +/- 5A,20A,30A

i ordered additional some ACS713 30A unidirectional smd chips and will try to exchange the chip on one of the ACS712 modules to make use of the higher resolution.

If you need more than 30A, you might want to wait for Joao's test results. He wanted to test the 50A types together with the oXv... and as it is going to be raining the next days, we might have a chance that he gets some results in the near future ;-)
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: openXvario development

Post by jhsa »

i have the 100A sensors. Two more arriving this week hopefully.
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!!”