Multiplex M-Link support for OpenXVario

Development & General Chat for the superb openxvario project.

Moderator: rainer

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Multiplex M-Link support for OpenXVario

Post by aduncan » Thu Jan 15, 2015 9:46 am

I've noticed mention of adding Multiplex M-link code to OpenXVario, has this been done yet?


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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Thu Jan 15, 2015 10:58 am

aduncan wrote:I've noticed mention of adding Multiplex M-link code to OpenXVario, has this been done yet?
It is done since a few days.
I tested it as far I could but I had no Multiplex Hardware to test it 100%.

It is planned that a member tests it in the comming days using Multiplex hardware.

Otherwise, you can test it yourself and provide me feedback.

The latest version is available here in attachement or at this link:
https://code.google.com/p/openxsensor/s ... 253Dclosed

Note: the configurator is not yet adapted; so please edit manually the config.h based on your preferences.
Attachments
openXsensor.rar
(74.88 KiB) Downloaded 166 times

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Re: Multiplex M-Link support for OpenXVario

Post by aduncan » Thu Jan 15, 2015 11:30 am

Thank you for that. I have 2 Arduino arrived yesterday, and 2 pressure sensors due tomorrow. When I have the parts, I will build them and try one on an M-link system. Happy days.

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Re: Multiplex M-Link support for OpenXVario

Post by aduncan » Fri Jan 16, 2015 7:19 pm

My gy-63 have not arrived yet, but I was given my friends Evo9 and a M-Link 5 telemetry receiver to try. I loaded openXsensor.rar to my original vario without checking any parameters, and it just worked! Perfectly! Using just the Evo9, there are tones for climbing, but very faint tones for descending. This is exactly the same behaviour as my Unisen-e, and is a shortcoming of the Evo9.

I then bound the rx to my old Evo9, which has a telemetry display, and tried it again. Even better! The telemetry display has sound built in, and it gives lovely tones both for climbing and descending.

Had a look at config.h, and found the section showing the telemetry addresses for Multiplex. I changed some of them and reloaded it again. The Evo9 telemetry display then showed the values in the altered addresses. I was even so bold as to put a "//" at the beginning of the line for Cell_total, and it disappeared!!

Due to the weather I can't try flying it, but bench tests seem fine.

Thank you for doing the software. Can I assume that this is now the current version, and that I can alter it to match the file I used for Frsky?

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Sat Jan 17, 2015 8:58 am

aduncan wrote:My gy-63 have not arrived yet, but I was given my friends Evo9 and a M-Link 5 telemetry receiver to try. I loaded openXsensor.rar to my original vario without checking any parameters, and it just worked! Perfectly! Using just the Evo9, there are tones for climbing, but very faint tones for descending. This is exactly the same behaviour as my Unisen-e, and is a shortcoming of the Evo9.

I then bound the rx to my old Evo9, which has a telemetry display, and tried it again. Even better! The telemetry display has sound built in, and it gives lovely tones both for climbing and descending.

Had a look at config.h, and found the section showing the telemetry addresses for Multiplex. I changed some of them and reloaded it again. The Evo9 telemetry display then showed the values in the altered addresses. I was even so bold as to put a "//" at the beginning of the line for Cell_total, and it disappeared!!

Due to the weather I can't try flying it, but bench tests seem fine.

Thank you for doing the software. Can I assume that this is now the current version, and that I can alter it to match the file I used for Frsky?
Fine that it seems to work.
Currently the latest version is at this link
https://code.google.com/p/openxsensor/s ... iplex_v3.0
(I added the possibility having to 2 baro sensors in order to reduce reaction time; still to be tested).


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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa » Sat Jan 17, 2015 9:19 am

Guys please avoid quoting the post immediately above yours unless you are quoting only a relevant part of it.
Thank you :)

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
kalle123
Posts: 861
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Sat Jan 17, 2015 2:42 pm

So, just plugged things together here.

MS 5611 sensor, arduino uno and a MPX RX-7 M-Link.

Used your last code. Did not make any adjustments.

Looks good :)

Values on address 3, 5 and 6

Value on address 6 changes, when raising and lowering the MS 5611. TX beeps.
DSCF3685.JPG
DSCF3684.JPG
br KH - Have to clean my desk here, it looks a mess :D

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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa » Sat Jan 17, 2015 5:19 pm

If that desk looks a mess, you should see mine :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

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Sat Jan 17, 2015 6:45 pm

João, I did clear up the area of the photo, but you don't see what is right or left of the pic ... :roll:

br

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Re: Multiplex M-Link support for OpenXVario

Post by aduncan » Sat Jan 17, 2015 7:03 pm

The Multiplex vario has a field for Max altitude. I know its simple in frsky, Alt+, but would it be easy to add it to show in Multiplex telemetry?

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Sat Jan 17, 2015 7:06 pm

Ok, I will try to add the alt max it in the next version.
Is it ok that it is the max value of relative altitude since the reset (= power on) of arduino?

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Sat Jan 17, 2015 7:36 pm

I just added an oXs measurement ALTIMETER_MAX for the Multiplex protocol.
The version is at this link:
https://code.google.com/p/openxsensor/s ... iplex_v3.0

To be tested

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Re: Multiplex M-Link support for OpenXVario

Post by aduncan » Sat Jan 17, 2015 8:05 pm

Excellent, thank you. Yes max altitude relative to switch on. Now, I'm a novice here, how do I download it?

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Sat Jan 17, 2015 8:13 pm

Normally you can download all the directly files from google using a software like Tortoise SVN
To make it easier, here in attachment an archive with all the files.
Attachments
openXsensor.rar
(75.39 KiB) Downloaded 132 times

aduncan
Posts: 59
Joined: Fri Dec 30, 2011 8:15 pm
Country: -
Location: Strathaven, Scotland

Re: Multiplex M-Link support for OpenXVario

Post by aduncan » Sat Jan 17, 2015 9:20 pm

I've downloaded Tortoise SVN, but I'll have to read the manual. In the meantime I've downloaded your .rar file and flashed it. Pleased to say it works perfectly.

Interestingly, I had a problem at first. I did not realize how temperature sensitive these barometer chips are. After about 5 minutes outside I went back into a warm workshop, and after several minutes the altitude crept up by about 10 meters. I think a nice warm foam covering in a glider fuselage would be a good thing, as long as it does not restrict the air pressure.

Many thanks again, and I'll get peace from my Multiplex mate!!

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Sat Jan 17, 2015 9:37 pm

The barometer chips are also very sensitive to light.
So, it is important to avoid direct light on it.

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Wed Jan 21, 2015 5:04 pm

M-Link support in v3 looks really good!

Disconnected my frsky rx and connected m-link rx. Put my hand on the oXs_config.h and got this result.
5.jpg
#3,#4 and #8,#9and #10 make sense. MS 5611 lying on my desk here, 3S lipo is on storage.

But #7 is showing nothing. It is for sure my mistake.

Using that config at the moment:

#define SETUP_MULTIPLEX_DATA_TO_SEND \
3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
4 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 , \
7 , CELL_TOT , 1 , 1 , 0 , -16384 , 16383 , \
8 , VOLT1 , 1 , 1 , 0 , -16384 , 16383 , \
9 , VOLT2 , 1 , 1 , 0 , -16384 , 16383 , \
10 , VOLT3 , 1 , 1 , 0 , -16384 , 16383


What is advisable for battery monitoring with m-link? So much to choose from ...


* VOLT1 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_1 NOT allowed
* VOLT2 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_2 NOT allowed
* VOLT3 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_3 NOT allowed
* VOLT4 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_4 NOT allowed
* VOLT5 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_5 NOT allowed
* VOLT6 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_6 NOT allowed
* CELLS_1_2 special Volt of cells 1 & 2 Mandatory Cell & Cells
* CELLS_3_4 special Volt of cells 3 & 4 Mandatory Cell & Cells
* CELLS_5_6 special Volt of cells 5 & 6 Mandatory Cell & Cells
.
.
.
* CELL_1 mV(5) Value based on (milli)Volt on PIN_VOLTAGE_1 Not implemented in FRSKY protocol 0.1V
* CELL_2 mV(5) Value based on mVolt on PIN_VOLTAGE_1 & 2 Not implemented in FRSKY protocol 0.1V
* CELL_3 mV(5) Value based on mVolt on PIN_VOLTAGE_2 & 3 Not implemented in FRSKY protocol 0.1V
* CELL_4 mV(5) Value based on mVolt on PIN_VOLTAGE_3 & 4 Not implemented in FRSKY protocol 0.1V
* CELL_5 mV(5) Value based on mVolt on PIN_VOLTAGE_4 & 5 Not implemented in FRSKY protocol 0.1V
* CELL_6 mV(5) Value based on mVolt on PIN_VOLTAGE_5 & 6 Not implemented in FRSKY protocol 0.1V
* CELL_MIN mV(5) Value based on CELL_1 ... CELL_6 Not implemented in FRSKY protocol 0.1V
* CELL_TOT mV(5) Value based on VOLT1...VOLT6 Not implemented in FRSKY protocol 0.1V


br KH

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Wed Jan 21, 2015 5:42 pm

Your setup seems me ok.
So, it is not normal that CELL_TOT is not displayed on line 7.
This is probably a bug. I will look at this.

Indeed there is a lot of choice for lipo monitoring.
Still, I think that VOLT1 up to VOLT6 makes no sense (better to use CELL1...CELL6) and CELLs_1_2 up to CELLS_5_6 are not supported in Mlink.

Between, the others, it is up to you to choice.
I think that CELL_TOT is usefull.
Then if you want a lot of details, you can decide to display each CELL_1...CELL...6; if you only want a summary, it is easier to ask CELL_MIN which gives the voltage of the lowest cell.

Please note that there is a small difference between VOLTx and CELL_TOT. I will try to explain:
Imagine that you build an oXs that is able to read a 4S lipo.
If you connect a 4S lipo to this oXs, VOLT4 should be equal to CELL_TOT.
Still if you connect a 3S lipo to the same device, VOLT4 will be read as 0 volt because it is not connected. Still in this case, oXs should report the highest voltage (so VOLT3) as CELL_TOT.
This has been foreseen in order to let an oXs device being used with less cells that the maximum defined.

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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa » Wed Jan 21, 2015 5:48 pm

Good thinking my dear Watson :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

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Wed Jan 21, 2015 6:15 pm

Hi mstrens, thanx. Now it is finish for today. ;)

I'll go through your advises tomorrow morning and for sure there will be more of my stupid question.

Thinking of connection a current sensor. Somewhere her in my mess there should be a 5A and a 20A sensor. Should do for a demonstration ...

br KH

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Wed Jan 21, 2015 6:21 pm

@kalle123,
in config file, you can define this parameter:
#define NUMBEROFCELLS 2 // keep this line but set value to 0 (zero) if you do not want to transmit cell voltage.

Could you transmit me the value being used is your set up.
Please note that if value is set on "0" or if the line is as comment (with // before), oXs will discard all parameters regarding CELL.
This could explain that nothing is displayed on line 7.

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Wed Jan 21, 2015 6:26 pm

@kalle123,
If you set up was right (meaning that the line was "#define NUMBEROFCELLS 3"), could you also make some tests sending other CELL data (e.g. CELL_1, CELL_2, CELL_3 , CELL_MIN, CELL_TOT).
So, if there are several bugs, we will know it immediately.
Thanks in advance.

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

Re: Multiplex M-Link support for OpenXVario

Post by mstrens » Wed Jan 21, 2015 7:19 pm

@kalle123,
I think that I solved a bug regarding CELL_TOT.
I uploaded a new version on google.
Here an archive with the fix.
Please let me know if it is OK.
Attachments
openXsensor.rar
(75.4 KiB) Downloaded 97 times

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Thu Jan 22, 2015 9:51 am

Hi. YOU ARE TO FAST FOR ME!

Did the test, you advised, but now I see, you but a revised version online.

So first I place my results here ...

Changed the configuration like that

#define SETUP_MULTIPLEX_DATA_TO_SEND \
3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
4 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 , \
7 , CELL_TOT , 1 , 1 , 0 , -16384 , 16383 , \
8 , CELL_1 , 1 , 1 , 0 , -16384 , 16383 , \
9 , CELL_2 , 1 , 1 , 0 , -16384 , 16383 , \
10 , CELL_3 , 1 , 1 , 0 , -16384 , 16383 , \
11 , CELL_MIN , 1 , 1 , 0 , -16384 , 16383


but still CELL_TOT is not showing up.
Unbenannt.jpg
NOW I will do the test with your revised version. Please give me a moment, come back then ...

br KH

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Thu Jan 22, 2015 10:16 am

CELL_TOT is now showing up, but ...

Look yourself.
Unbenannt.JPG
Enclose
oXs_config.h.zip
(2.1 KiB) Downloaded 112 times
Glad to to give a hand ...

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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa » Thu Jan 22, 2015 10:32 am

That LiPo is dead :D

Oh shut up João :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

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Thu Jan 22, 2015 10:44 am

jhsa wrote:That LiPo is dead :D

Oh shut up João :mrgreen:

João
I might check :D

User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: Multiplex M-Link support for OpenXVario

Post by KAL » Thu Jan 22, 2015 10:46 am

Looks like you used external reference ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

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

Re: Multiplex M-Link support for OpenXVario

Post by kalle123 » Thu Jan 22, 2015 11:43 am

KAL wrote:Looks like you used external reference ...

Klaus
You are right Klaus.

Missed to uncomment that here

// ***** 6.1 - Voltage Reference selection (VCC or 1.1V internal) *****
//#define USE_INTERNAL_REFERENCE


... but now I have to walk the dog ;)

br KH

@João. Don't worry about my Lipo batteries, they are fine!

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

Re: Multiplex M-Link support for OpenXVario

Post by jhsa » Thu Jan 22, 2015 1:50 pm

kalle123 wrote:
@João. Don't worry about my Lipo batteries, they are fine!
Gott sei Dank.. :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


Post Reply

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