SMALL - Telemetry SMALL - Radio
Thread Tools
Old Aug 16, 2012, 02:59 PM
Jstjern is online now
Find More Posts by Jstjern
Registered User
Suomi, Espoo
Joined Sep 2011
203 Posts
Build Log
Solution to getting RSSI out of Multiplex M-Link receivers

All M-Link receivers from Multiplex transmit LQI (link quality indicator) down to the transmitter through the telemetry return channel as a value between 0 and 100%, in increments of 10%. That's very useful, but comes with two limitations:

a) You cannot set an alarm treshold (i.e. sound the alarm if link quality <60%), so you would have to take your eyes off the plane if flying far, just to check the LQI (unless you have a souffleur to speak the value, of course...)

b) You cannot get an RSSI signal out to connect to an OSD if you, like me, fly FPV.

Conveniently, all RX's with M-Link capability transmit LQI and receiver voltage values on the MSB (Multiplex Sensor Bus, semiduplex UART bus with a normal servo-style connector on the RX). I took a PIC and programmed it to read this value. Now I've set it up so the PIC reads the LQI value on the MSB bus, adds the alarm bit if the value quals 60% or less and writes it back on another MSB channel (#7 incidentally). So I get the LQI value on my transmitter display on both default M-Link channel 1 and my copy with possible alarm bit on channel 7. That solves my issue (a).

Next up is to use the built-in DAC in the PIC18F1823 to convert the LQI value in analog form (0-5V) and simulate RSSI. I'll get back when it's done. This will solve issue (b) and allow me to hook the "RSSI" up to my EagleTree OSDPro.

If someone is interested in this, please comment, and I will package the C-code for the free PIC C-compiler and post here along with instructions. The PIC is only 14-pin, and the wrap-board PCB almost single-chip, meaning small form factor.

Cheers
Jonas
Jstjern is online now Find More Posts by Jstjern
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 20, 2012, 08:58 AM
i3dm is offline
Find More Posts by i3dm
RC pilot by soul
Israel
Joined Apr 2005
2,590 Posts
Can you advise where do you get the LQI signal from the M-Link Rx's ?

a pic would be helpful.
i3dm is offline Find More Posts by i3dm
Reply With Quote
Old Sep 20, 2012, 11:16 AM
Jstjern is online now
Find More Posts by Jstjern
Registered User
Suomi, Espoo
Joined Sep 2011
203 Posts
Quote:
Originally Posted by i3dm View Post
Can you advise where do you get the LQI signal from the M-Link Rx's ?
a pic would be helpful.
Hi,
You can find a pic here: http://www.rcgroups.com/forums/showp...&postcount=170. The connection is a simple 3-wire servo style plug to the MSB port of the RX.

The LQI _value_ (0-100% 15bit signed integer value) is transmitted digitally on the MSB bus of the RX, so you need to read this value using a microcontroller and convert the value to an analog signal using a DAC (digital-to-analog converter) or RC network. In other words, you need to know how to construct your own electronic circuit to accomplish this. If you know how to do that, and have a PIC programmer, I can supply you with the required C-code for PIC16F1823.

Hope this helps!
Jstjern is online now Find More Posts by Jstjern
Reply With Quote
Old Sep 20, 2012, 03:41 PM
ltc is online now
ltc
Find More Posts by ltc
ltc
AMA 97737
ltc's Avatar
United States, MA, Mendon
Joined Mar 2010
3,293 Posts
Hi,
I would be interested in seeing the C code.
Thanks for doing this, sounds very interesting.
ltc is online now Find More Posts by ltc
RCG Plus Member
Reply With Quote
Old Sep 22, 2012, 01:16 AM
yurip is offline
Find More Posts by yurip
Registered User
Moscow, Russia
Joined Dec 2006
35 Posts
Thank you, very interesting solution, a lot of people would like to use your solution to this problem on the Russian aircraft modeling forum
yurip is offline Find More Posts by yurip
Reply With Quote
Old Sep 22, 2012, 11:34 AM
Jstjern is online now
Find More Posts by Jstjern
Registered User
Suomi, Espoo
Joined Sep 2011
203 Posts
C code for translating LQI to RSSI, and more...

Here's the Hi-Tech C-code for the PIC16F1823:

8Mhz internal oscillator selected. The processor supports 16MHz and 32MHz. Some buffer overruns
occur reading the I2C from the eLogger at 8MHz. These overruns could be ironed out by increasing
the processor speed, but then the timing constants have to be recalculated.

The SW does two separate things:
1) Read four parameter values from EagleTree eLogger by simulating an LCD PowerPanel. The parameters
you define using EagleTree PC software to display on the PowerPanel will be transferred over to
the M-link for telemetry transmission to your TX in real-time
2) Read the LQI value from the RX and translate it to an analog voltage using the built in DAC.
This simulates an RSSI signal. I wrote it to be able to feed an RSSI signal to the eLogger
to display on the OSDpro - works great!

Details:
1) The SW reads 4 fields from the elogger LCD display and writes them onto MSB (M-Link) channels 2-6
Supports mAh, Amps, Volts, Temp, rpm, Altitude (m), speed (km/h), and Watts
(using TANK% to signify Watts, as M-link does not support "Watts"

2) Last modification Aug'12: reads LQI value and retransmits it on M-Link channel 7, including alarm
bit if LQI <= 50% (defined at compile by "#define LQI_ALARM_TRESHOLD"
Jstjern is online now Find More Posts by Jstjern
Reply With Quote
Old Apr 02, 2015, 08:42 AM
b5commander is offline
Find More Posts by b5commander
Registered User
Joined Dec 2014
3 Posts
Does this work?

Hi Jstjern,

Thank you for sharing your Project with others. I would like to use your programm to convert the M-Link LQI signal to an RSSI signal so i can connect the RSSI to my Eagle tree Vector. Therefore i have 2 Questions:

1.) The Wiring: I plan the follwing Connections with the PIC16F1823:

PIC VDD to MSB +
PIC VSS to MSB -
PIC RC 5 (called RX in your program) to MSB Signal

PIC Ra0 (RSSI out) to EagleTree Vector RSSI IN (Signal)
(here iīm not shure because you also seem to connect RC4 TX to the MSB signal through a resistor, do i need this too?)

May this work as i only want to use the conversion of the LQi signal without the remaining programm with the reading of elogger values? Or will the missing connection to the other Pins (e.g RC4 TX) cause errors?

2.) Can you recommend a free C-Compiler for your code as HiTech C seems not to be available anymore? I want to use a PICKit 2 for getting the program on the PIC...

Thank You !

Best Regards
Christian
b5commander is offline Find More Posts by b5commander
Last edited by b5commander; Apr 02, 2015 at 09:02 AM.
Reply With Quote
Old Apr 03, 2015, 08:53 AM
Jstjern is online now
Find More Posts by Jstjern
Registered User
Suomi, Espoo
Joined Sep 2011
203 Posts
Hi Christian,

Sorry for not getting back earlier. What you propose looks ok to me. You will not need to connect the TX pin if you do not intend to send anything on the MSB bus. You van safely take out all lcd code, as well as transmission related code. When I get back next week from my travels i will look in my home pc have the hitech compiler installation file and email it to you.

One thing, though. I discovered that LQI is almost always at 100% and when it drops, the drop is very quick, so it is not a proper RSSI which tells you the strength of then radio signal, instead LQI tells you how well the digital signal can be decoded. It also seems LQI is an average over a second or so, since when you turn your rx on, LQI will rise from. 0 to 100% slowly, and not just jump to 100%.

jonas
Jstjern is online now Find More Posts by Jstjern
Reply With Quote
Old Apr 04, 2015, 09:23 AM
b5commander is offline
Find More Posts by b5commander
Registered User
Joined Dec 2014
3 Posts
Hi Jonas,

No Problem! Thank You for you reply. As my Picīs arrived today, i`ll try to flash them with the whole C-Code first because i have problems differing the both functons in your code. Concerning the software i meanwhile found MPLab X and the so called XC8 Compiler for C-Code.

Christian
b5commander is offline Find More Posts by b5commander
Reply With Quote
Old Apr 14, 2015, 03:10 PM
b5commander is offline
Find More Posts by b5commander
Registered User
Joined Dec 2014
3 Posts
Hi Jonas,

Unfortunately my attemt to compile your Program with MPLab X and the so called XC8 Compiler failed, as i can't get an analog RSSI voltage
(0-3Volt, right ?) on the output pin of the microcontroller. I meaured with a voltmeter using ground as reference.
Instead i got an voltage of 0,028 Volt on the output when connecting the microcontroller to my receiver and sometimes an alarm on my transmitter (your bad signal alarm threshold).

So some parts of your programm seem to work while others don't. I guess that i created some problems through using a different compiler than yours. It would be great if you could send me your HiTech C Compiler.

Best Regards
Christian
b5commander is offline Find More Posts by b5commander
Reply With Quote


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold Lawmate 1.2GHz Receiver with upgraded SAW filter and RSSI out kingiggy262 FPV Equipment (FS/W) 8 Aug 01, 2012 08:11 PM
Sold Racewood 1.3GHz Receiver with upgraded SAW filter and RSSI out kingiggy262 FPV Equipment (FS/W) 11 Jul 27, 2012 10:47 AM
Sold Corona RP8D1 Long Range Receiver w/RSSI out turbodriven FPV Equipment (FS/W) 2 May 29, 2012 06:52 PM
Discussion Multiplex m-link receiver low connection quality Monhty Radios 3 May 08, 2012 07:59 AM
Discussion Any experience with Multiplex M-link RX-6 light micro receiver? csocso Hand Launch 3 Sep 28, 2011 01:24 PM