Multiplex M-Link support for OpenXVario

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

@mstrens.

Did just a short test here. Using FrSky X6R RX.

Screenshot of debug
1.jpeg
Only touched oXs-config.h
oXs_config.h.zip
(2.56 KiB) Downloaded 484 times
Alt and vario on Taranis both 0 and no movement ...

br KH

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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa »

I meant the BMP280, but I've just read the post above again and it seems that is still not available?

Sorry

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
Erni
Posts: 27
Joined: Wed Jun 04, 2014 3:41 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by Erni »

I just did a test with a FrSky FVS-01 , which I believe is a BMP085.
I just changed the address to 0x77 and it worked, with a X6R
Did the test in a plastic bag and blew in it :D

BTW: is this not a 3.3V device only? For safety I used a 3.3V Arduino
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

jhsa wrote:I meant the BMP280, but I've just read the post above again and it seems that is still not available?

Sorry

João
João, see my posting here Sat Apr 25, 2015 9:47 am.

The BMP280 is too fresh, I think.

br KH
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

Erni wrote:I just changed the address to 0x77 and it worked, with a X6R
Did the test in a plastic bag and blew in it :D
I'll check here Erni.

br KH

Changed to 0x77 but no luck ...
3.jpeg

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

You are right: I2C address should be 0x77 instead of 0xEE because the I2C library makes a left shift (adding 1 or 0 while sending the byte)
Erni
Posts: 27
Joined: Wed Jun 04, 2014 3:41 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by Erni »

You are right: I2C address should be 0x77 instead of 0xEE because the I2C library makes a left shift
I didn't know that . I just used the Arduino I2C scanner to find the address since my sensor is BMP085 and not BMP180.
I2C scanner

Here is my debug output

Code: Select all

openXsensor starting..
 milli=0
freeRam=1191
Vario Sensor:BMP180  
 milli=1
calibration data #1 = 8124 error= 0
calibration data #2 = 64416 error= 0
calibration data #3 = 51027 error= 0
calibration data #4 = 33059 error= 0
calibration data #5 = 25013 error= 0
calibration data #6 = 19108 error= 0
calibration data #7 = 5498 error= 0
calibration data #8 = 59 error= 0
calibration data #9 = 32768 error= 0
calibration data #10 = 54461 error= 0
calibration data #11 = 2432 error= 0
setup vario done.
FRSky Output Module: TX Pin=2
Sport protocol= 1
 milli=34
FRSky Output Module: Setup!
Number of fields to send = 2
0 , 1 , 1 , 1 , 0
0 , 2 , 1 , 1 , 0
End of general set up
User avatar
Klausi
Posts: 6
Joined: Sun Jan 25, 2015 7:51 am
Country: Germany
Location: Achim
Contact:

Re: Multiplex M-Link support for OpenXVario

Post by Klausi »

After modification of the oXs_bmp180.h and oXs_config.h every thing works fine.
Michel, you are great.
rp01.jpg
Klaus
Attachments
oXs_config.h
(7.83 KiB) Downloaded 419 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

Hardware trouble. :roll:

First BMP180 sensor soldered to the pro mini seems to be dead. No result doing a I2C scan ...

So I took my second BMP180 with a fresh arduino. Address 0x77 with openXsensor_for bmp180 WORKING!!
DSCF3833.JPG
DSCF3834.JPG
br KH
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

I think, the problem * with the oXs BMP180 was with me :roll:

But good thing, learned to desolder the components with out having to throw those in the bin.

oXs Sensor BEFORE and AFTER
Unbenannt.JPG
* I did not solder a 6pin connector to the pro mini and only held the UART during flashing. Think, that was causing those issues. Fixed that and both parts work fine with new sketch.

br KH
Erni
Posts: 27
Joined: Wed Jun 04, 2014 3:41 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by Erni »

I finally tried the BMP180 vario in real flight conditions in my EasyGlider.
It works pretty good
Without a direct comparison with both this and a ms5611 sensor, I can not judge the accuracy or sensitivity
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

His would you rate the vario in particular , I am not too bothered about height accuracy but the vario tones from the vspeed using the 5611 sensor are very good using the taranis.
Is the code for the bmp180 available for the frsky RX's like d8r or x8r?
If so I might just order a bmp180 to compare with the ms5611.
I've seen them on aliexpress for less then £1 each posted!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

Code for bmp180 works with the 2 Frsky protocols and with the multiplex protocol.
It is even possible to use one BMP180 + one MS5611 on the same device (and to switch - for vertical speed - from the one to the other from the Tx using a ppm signal).
This would be the best solutionin order to compare both sensors.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

Great thanks,
I have ordered a bmp180 then, aliexpress have them at 86 pence each posted for free if you want any yourself, I'll let you know if it works well enough to be of use as a vario, i am sure it wont be as good as the ms5611 and they are chewp enough really, the ones on ebay i have been getting for £5.70 http://www.ebay.co.uk/itm/1pc-New-MS561 ... 5af565b0f8 from accecity-ca have worked perfectly so far rthe bmp280 looks a better bet then the 180 but I can't see that for sale as a cheap break out board as yet.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

ok i just received my bmp180, can i use this on a 5v arduino or does it need to be 3.3v?
it the smaller version with just one transistor, the sensor and a few resistors.
can i just upload opensensor 4.0 as it is or do it need to set anything in the config?
I just want the vario tones and altitude for testing.
tia.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

http://www.aliexpress.com/item/B39-hot- ... 02322.html

reading this it seems up to 6v should be ok.

this looks just like the one i have.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

I am afraid that the current version of OXS should not be used with your BMP180 board.
It is because the current version of oXS activates the internal (inside AVR328P) pullup resistors for the SDA and SCL signal. So those signals can reach 5v (=Arduino Vcc).
Your board does not have 5v-3.3V level converters for the SDA and SCL signals and so, BMP180 would normally be damaged when voltage exceed 3.3 volt.
The board GY63 (with MS5611) has such level converters and so there is no issue with this board.

Still, it is possible to modify the code of OXS in order to deactivate the internal pullup resistors when there is no level converters. If the code is modified in this way, then the maximum voltage on SDA and SCL will be set only by the resistors on your BMP180 board and so it should not exceed 3.3 volt (= regulated voltage provided by your BMP180 board from the 5 volt Arduino Vcc).

The modification to the code of OXS is quite easy. It has to be done in file I2C.cpp.

At lines 88/89 (in function "begin"), you currently have:
sbi(PORTC, 4);
sbi(PORTC, 5);

It should be replaced by
cbi(PORTC, 4);
cbi(PORTC, 5);
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

@nigelsheffield
You have to set up the oXs_config.h file according to your needs (see the file oXs_config_description.h for detailed explanations).
I presume that you want to use your oXs with the multiplex protocol.
So, you must activate this line (remove the "//" at start): #define MULTIPLEX

In order to activate the BMP180 sensor you must activate the 2 following lines
#define VARIO // set as comment if there is no vario
#define SENSOR_IS_BMP180 // set as comment if baro sensor is MS5611

For the fields to be transmitted, I presume that you could use this set up (perhaps you have to change the first parameter on each line if you want to display the field on another line of your Multiplex display):
#define SETUP_MULTIPLEX_DATA_TO_SEND \
3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
6 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 , \
5 , REL_ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
6 , ALTIMETER_MAX , 1 , 1 , 0 , -16384 , 16383

I think that the other lines in current oXs_config.h file can remain unchanged.

If this is not clear enough, just let me know.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

Thanks for the heads up on the pull up resistors setting in arduino, I would not have known that and damaged the sensor.
It is for frsky taranis, I was just trying it out to compare with the 5611 sensor which I have a few and happy with.
So the pull up resistors on the sensor board will pull up to 3.3v but if the arduino pull is set that would simply pull it up to 5v?
I'm glad I asked before going ahead.
Thanks again!
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

OK I've changed that,
I've changed defiine vario secondary to 1 as it was set to 2, vario primary is set to zero as per my 2.5 working version, not sure if this is right?
Do I need to put // in front of define setup multiplex data to send? As I only need frsky data.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

nigelsheffield wrote:OK I've changed that,
I've changed defiine vario secondary to 1 as it was set to 2, vario primary is set to zero as per my 2.5 working version, not sure if this is right?
Do I need to put // in front of define setup multiplex data to send? As I only need frsky data.
I presume that you do not use PPM to select which fields is transmitted as vertical speed. Then the value in vario secondary does not matter. It is just discarded.

As you use Frsky protocol, you must put // in front of #define MULTIPLEX (so that MULTIPLEX is not activated).

For the Frsky protocol, you must set up the fields to transmit using following lines ( I think the lines are already difined in this way in version 4):
#define SETUP_FRSKY_DATA_TO_SEND \
DEFAULTFIELD , ALTIMETER , 1 , 1 , 0 ,\
DEFAULTFIELD , VERTICAL_SPEED , 1 , 1 , 0

NB: the lines to set up the fields to transmit for Multiplex protocol do not matter when using the Frsky protocols. So you can just discard my comment about those lines in my previous post.

Note:
I presume that that you will only have one baro sensor (a bmp180) on your oXs but if you would like to compare in real time a BMP180 with a MS5611 you could in theory have 2 baro sensors on the same oXs. You could then e.g. let oXs calculates 2 vertical speeds and compare them looking at the taranis log file. Still, I am afraid that this would not be possible if you bmp180 board have no level converters because I presume that the GY-63 board (with the MS5611) have pullup resistor connected to the 5volt VCC. Those resistors should be unsoldered then.
An alternative could be to use 2 different oXs (one with BMP180 and one with MS5611) connected to the same Rx (using SPORT). Take care in this case to use 2 different device Id and a set up that avoid transmitting twice the same field. One oXs could transmit e.g. the vertical speed as vertical speed and the other as T1, T2 or ...
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

Thanks, by comparing the 2 I just meant trying one at a time to see how well the vertical speed works for vario tones, exactly how accurate it is is not as important as how responsive it is to indicate lift.
I just realised I don't have a spare RX at hand to test this so I will have to shuffle some RX around in my gliders, I needed to do this anyway to test the s.bus decoder in my foamy minimoa..
Will try to sort it all out tommorow.
Thanks again.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

I just tested the bmp180 with the taranis , using the settings on openxsensor 4 the tones were working and altitude worked but the accuracy was pretty far off compared to the 5611,
Main problem was it jumps around a fair bit making lots of false lif and sink tones,
I will try covering the sensor better next time and have a play with the settings for hyserysis etc, though I'm not sure what I am doing but will have a play around to see if I can get it acceptable, if not then the 5611 is fine anyway and for 80 pence it was worth a shot..
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by mstrens »

In order to reduce false lift and sink tone, I suggest that you reduce the sensitivity.
By default, it is defined by this line in the config:
#define SENSITIVITY_MIN 50

You can try changing 50 by 20 or even 10.
Still there is a drawback with a change: it will increase the reaction time. So e.g. when there is a real lift, it will increase the delay to get it back in the vario tone and a small lift aera could be masked.

Increasing the hysteresis could perhaps help too but it can be set to a too high value. Vario tone will change only when (internal) vertical speed calculated by oXs will change by more than the hysteresis.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

this is what the settings are in 4.0,
// ***** 4.2 - Sensitivity predefined by program *****
#define SENSITIVITY_MIN 50
#define SENSITIVITY_MAX 300
#define SENSITIVITY_MIN_AT 100
#define SENSITIVITY_MAX_AT 1000

I tried changing them but in the end i just put them back as above and adjusted the taranis sensitivity as I could not make much sense of it. the tones are usable now but just not quite as good as the 5611 but only to be expected.
they are however much better then then frsky normal precision vario so I will test in a glider at some point as I have just been testing by holding in my hand and moving up and down by 6ft or so.
Maybe with a bit more tuning on taranis settings I can get them better.
Thanks for your help.
Nigel.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Multiplex M-Link support for OpenXVario

Post by jhsa »

nigelsheffield wrote: I have just been testing by holding in my hand and moving up and down by 6ft or so.
Nigel, when I'm testing my varios the same exact way you're describing, my wife always asks me which song am I dancing to :mrgreen: :mrgreen:

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
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by nigelsheffield »

My wife thinks I am playing the gameboy games crossed with the Wii.. . :D :D
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Multiplex M-Link support for OpenXVario

Post by jhsa »

: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
FrankS
Posts: 4
Joined: Sat Mar 26, 2016 10:21 am
Country: -

Re: Multiplex M-Link support for OpenXVario

Post by FrankS »

I've got the bits and I'm just about to start building a Vario for use with my Multiplex M Link system, am I correct that the OpenxSensor program if for use with the Frsky telemetry system only or is it used to set the vario up with the M Link system too. Sorry if this is a very basic question, I'm new to all this.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 »

Hi FrankS. No problem.

Can use it for both systems. But oXs_config.h has to be set to the system used.

This is a combined oXs vario/GPS with oXs_config.h set for FrSky. (red dot)

If I want to use that oXs for MPX, I have to reconfigure oXs_config.h and flash the firmware to that sensor and place the dot at MPX. ;)
screenshot_35.jpeg

Post Reply

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