Energy compensated vario with two MS5611 - how to configure

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
onki
Posts: 40
Joined: Tue May 14, 2013 8:34 am
Country: -

Energy compensated vario with two MS5611 - how to configure

Post by onki »

Hi,

I'd like to make a Vario for my glider using two MS 5611sensors. The first sensor is equipped with a DIY tube connector and connects to the probe mounted at the tail of the fuselage for energy compensation. How do I configure this combination?

Best regards
Onki

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by mstrens »

To build an energy compensated vario with MS5611 you need to connect a TEK probe to the MS5611.
So you will get a pneumatically compensated vario.

This MS5611 can also provide the altitude but the reported altitude will be sligthly off ( perhaps 10 to 20 m) because it will be impacted by the compensation.

If you want to get the altitude and avoid an error on the reported altitude, you can use 2 MS5611.
Then the first one may not be connected to the TEK probe and the second one has to be connected to TEK probe.

Second MS5611 must have the MS5611 CE (chip enable) pin connected to VDD. So it gets automatically an I2C address 0x76.

So the first one will automatically send the altitude and in order to get the compensated vspeed , in the config file, you must have

#define SECOND_BARO_SENSOR_USE MS5611 // select between NO_BARO , MS5611

#define VSPEED_SOURCE SECOND_BARO // select between FIRST_BARO, BARO_AND_IMU, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED or PPM_SELECTION

With this config, you will not get uncompensated vspeed (the one provided by the first MS5611).

If you want, it is also possible to select which Vspeed will be sent by oXs if you implement the PPM option. See oxs_config_description.h file for more information about this option.

If it is still not clear enough, just ask here.
onki
Posts: 40
Joined: Tue May 14, 2013 8:34 am
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by onki »

Hi,

many thanks for the info.
Since the first sensor seems to be used for height measurement only I could use a less precise BMP280 as well as first sensor and use the MS5611 with tubing connection as second sensor?
TEK Probe (Braunschweiger Düse) is already at the plane as I am using a LinkVario at the moment with the probe

Best regards
Onki
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by mstrens »

Yes you can use a bmp280 as first sensor to get altitude and MS5611 as second sensor to get vspeed.
User avatar
marswolf
Posts: 5
Joined: Wed Jan 03, 2018 12:23 pm
Country: Germany
Location: Freiburg, BW

Re: Energy compensated vario with two MS5611 - how to configure

Post by marswolf »

Hi there,
I am also currently thinking of advancing my oXs Vario to a TEK probe. So I have two GY-63 boards. But I do not know, what to do to make the first sensor to address 0x77 and the second one to 0x76. I know: it is explained, that the CE pin has to be connected to VCC or VDD.
I assume the following:
I need not to change anything on the first barometer GY-63 MS5611 on the hardware side. It is already working with 0x77 (I built many varios like that and all are working well).
I need to connect the CSB pin of second baro (which seems to be the CE pin on GY63?) to VCC → but VCC is coming from the Arduino, that delivers 5V.....
Thanks for any help in advance!
Marcel

Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Energy compensated vario with two MS5611 - how to configure

Post by Carbo »

marswolf wrote: Wed Jan 03, 2018 12:29 pmI need to connect the CSB pin of second baro (which seems to be the CE pin on GY63?) to VCC → but VCC is coming from the Arduino, that delivers 5V....
Presumably the GY63 handles this, i did not care about :roll: and it worked.

viewtopic.php?f=48&t=5632&hilit=TEK&start=30#p82320
onki
Posts: 40
Joined: Tue May 14, 2013 8:34 am
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by onki »

Hi Marcel,

You can use PIN "PS" as this is the mode selector (high = I2C) and this is internally connected to 3V3 using a 2k2 resistor.
So just connect CSB with PS and it will use the secondary address.

Best regards
Onki
User avatar
marswolf
Posts: 5
Joined: Wed Jan 03, 2018 12:23 pm
Country: Germany
Location: Freiburg, BW

Re: Energy compensated vario with two MS5611 - how to configure

Post by marswolf »

Thanks a lot for your replies!
OK, just for my understanding:
The pin connector called "CSB" on the GY-63 IS the CE pin.
This CSB/CE pin has to be connected to VCC or VDD, doesn't matter. Carbo says: connection to the 5V works, if I want to run it with 3,3V I just connect it internally to the PS pin like Onki says.
Did I understand this correctly? I would go with the connection to 3,3V then.
Thanks a lot so far,
Marcel
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by mstrens »

I had a look at some photos of the GY63.
I think there is a 2.2k resistor on board connecting CSB to ground. This force the adress 0x77 by default.
If so, you could you put a resistor of about 1.5k between CSB and VCC (5 volt) and you should get a voltage of about 3 volt which is safe.
onki
Posts: 40
Joined: Tue May 14, 2013 8:34 am
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by onki »

Hi,

just a quick question. I have finished my sensor with GPS, 2 MS5611 (secondary with TEK connection), current sensor and RPM sensor.
This sensor is in my Alpina 4001 which is used as a trainer model for our youth. I want to use the PPM-Signal to switch compensated vario and uncompensated.
Am I right to use this setting:

Code: Select all

// ***** 4.6 - Vertical speeds calculations based on PPM *****
#define VARIO_PRIMARY       FIRST_BARO          // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
#define VARIO_SECONDARY     SECOND_BARO          // select between FIRST_BARO, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED , BARO_AND_IMU
#define SWITCH_VARIO_MIN_AT_PPM 10
#define SWITCH_VARIO_MAX_AT_PPM 90
I think "airspeed compensated" only applies when a native airspeed sensor such as a MPX... is used.

Best regards and a Happy New Year

Onki
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Energy compensated vario with two MS5611 - how to configure

Post by Carbo »

Correct. PWM is valid for this purpose between -90 to -10 and +10 to +90. The sign (+/-) switches between the varios. The value (default 10-40) still adjusts vario sensitivity.
User avatar
marswolf
Posts: 5
Joined: Wed Jan 03, 2018 12:23 pm
Country: Germany
Location: Freiburg, BW

Re: Energy compensated vario with two MS5611 - how to configure

Post by marswolf »

Hello again,

I'm nearly finished with building my TEK oXs Sensor with two MS5611 (GY63-boards).
Thanks everybody so far for answering my questions before and for the nice and kind replies. :)

I built also his TEK probe exactly by his manual linked here: :arrow:
http://openrcforums.com/forum/viewtopic.php?t=5856

I have seen a great video on YT from Carbo how is setup is working flawlessly: :arrow:
https://www.youtube.com/watch?v=KXN8sJ1 ... e=youtu.be

Carbo writes in the description of the video: :arrow:
OpenXSensor sensitivity 80 [...]
So I ask where I have to setup this sensitivity. I only found this in the advanced tab under 4.3: :arrow:

Code: Select all

// ***** 4.3 - Sensitivity predefined by program *****
#define SENSITIVITY_MIN 20
#define SENSITIVITY_MAX 300
#define SENSITIVITY_MIN_AT 100
#define SENSITIVITY_MAX_AT 1000
So what settings are to make to get the TEK working like Carbos?

Thanks a lot,

Marcel
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Energy compensated vario with two MS5611 - how to configure

Post by mstrens »

In order to get a sensitivity of 80, set SENSITIVITY_MIN to 80

So, first line should become:
#define SENSITIVITY_MIN 80
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Energy compensated vario with two MS5611 - how to configure

Post by Carbo »

marswolf wrote: Sat Jan 20, 2018 6:22 am So what settings are to make to get the TEK working like Carbos?
The remark on sensitivity is unfortunately misleading. Sensitvity has no influence on TEK. It only influences the reaction time, i wrote it, to make clear, the vario in the video is very sensitive and not "filtered to death" ;) (But this is only true for pneumatically compensated vario, airspeed compensated vario needs sensitivity 50, to achieve a matching timing.)

But it is always a good idea, to make sensitivity adjustable and switch between uncompensated (circling) and compensated (searching) vario. The range preset is here:

Code: Select all

// ***** 4.4 - Sensitivity adjusted from the TX *****
#define SENSITIVITY_MIN_AT_PPM 10    // sensitivity will be changed by OXS only when PPM signal is between the specified range enlarged by -5 / +5
#define SENSITIVITY_MAX_AT_PPM 40
#define SENSITIVITY_PPM_MIN  50      // common value for vario is 20
#define SENSITIVITY_PPM_MAX 200      // common value for vario is 100
Mstrens uses conservative default values to prevent a noisy vario in every case. Depending on the glider size, individual MS5611 noise and personal preference you will find your favourite adjustment. I found this parameters useful too:

Code: Select all

// ***** 4.5 - Hysteresis parameter & Alt compensation based on sensor temp *****
#define VARIOHYSTERESIS 0
#define ALT_TEMP_COMPENSATION 850
It is a lot of fun, to make a note of the position of next thermal, while flying acrobatics to reduce altitude. Only DTE makes this possible.

While i was typing, mstrens pointed out the alternative possibility, to adjust minimum sensitivity defined by program to a value of 80.

Post Reply

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