An Open Source Frsky Telemetry Script for the Horus X10,X12 and Taranis X9D,X9E and QX7 radios

Great job Alex!!! Gongrats!!!

and you must tick them in the telemetry screen in companion as well or they will not Log

1 Like

indeed I missed that part, thanks Colin for pointing it out!

your welcome buddy you have a enough on your plate just helping out

1 Like

Alex, this is cool! Yes, I will test it. Where it says krpm, can that come from the internal ArduPilot rpm library as well as a FrySky sensor? I don’t remember if that is one of the passthru sensors or not.

Hi Chris,
at the time only from frsky sensors.
Getting rpm from the ardupilot stack would require a library change on the ardupilot side!

If you could test all this it would be great!
I’ve been looking for flexible solution for quite some time now :slight_smile:

Sensor numbering is
1 - 2
3 - 4
5 - 6
Sensors 1 and 2 have fixed font (small)

The configuration file is quite easy to deal with, for instance the krpm config section is

  -- Sensor 3
[3] = {
    "ENG",    -- label is ignored on taranis
    "RPM",    -- OpenTX sensor name
    1,        -- precision: number of decimals 0,1,2
    "krpm",   -- label for unit of measure, on taranis is appended to the value
    0.001,    -- multiplier if < 1 than divides
    "+",      -- "+" track max values, "-" track min values with
    2,        -- font size 1=small, 2=big
    110000,     -- warning level
    120000,     -- critical value
  },

You can use the same sensor twice, one for engine rpm and one for head rpm by using different multipliers.

Alex

Cool. This is what I do in my own custom script. So this should work great! I’ll report back.

Great job.

If I have a MLVSS, can I output on the 2nd screen each cell voltage !? Got some older packs that need asessment now-and-then…

Cheers,
Para.

This actually is a very good idea, I’ll try it myself!
All you have to do is manually define the cell sensors

Hi @ThePara,
I tried with a 4s battery, your idea works great :slight_smile:

image

or using a bigger font for the “font size” attribute

image

this is the config file

----------------------------------------
-- custom sensors configuration file
----------------------------------------
local sensors = {
  -- Sensor 1
[1]=  {
    "Celm",   -- label
    "Celm",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "Vmin",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 2
[2]=  {
    "Celd",   -- label
    "Celd",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "Vdelta",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "+",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    0.2,        -- warning level (nil is do not use feature)
    0.4,        -- critical level (nil is do not use feature)
  },

  -- Sensor 3
[3]=  {
    "Cel1",   -- label
    "Cel1",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V1",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 4
[4]=  {
    "Cel2",   -- label
    "Cel2",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V2",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 5
[5]=  {
    "Cel3",   -- label
    "Cel3",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V3",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 6
[6]=  {
    "Cel4",   -- label
    "Cel4",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V4",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },
}
------------------------------------------------------
-- the script can optionally look up values here
-- for each sensor and display the corresponding text instead
-- as an example to associate a lookup table to sensor 3 declare it like
--
--local lookups = {
-- [3] = {
--     [-10] = "ERR",
--     [0] = "OK",
--     [10] = "CRIT",
--   }
-- }
-- this would display the sensor value except when the value corresponds to one
-- of entered above
-- 
local lookups = {
}

collectgarbage()

return {
  sensors=sensors,lookups=lookups
}

I had to create these sensors after discovering the Cels one

Got the sensors showing values, modified the script for 6S and saved as 6S_batt.lua
Do I load it as 2nd telemetry screen ? And where do I need to modify script to show CURR instead of HDOP in top left corner, to be able to asess voltage sag per cell at a single glance ?

Cheers,
Para.

No, go the script menu screen, exit and look at the .cfg file the script creates in the /model folder
The sensor file needs to be placed in the same folder and named like the cfg file but with _sensors.lua

If your cfg file is modelname.cfg your sensor file should be modelname_sensors.lua

You can’t unless you change source code and recompile, btw current is 3rd line on the right 142Amps in the screenshots

@yaapu Well, Alex it looks like everything works. I have to figure out my FrSky sensors yet. But with the engine idling I get rpm reading. My engine temp and OAT sensors work (have been changed to F instead of C, but have to change the label yet).

Everything on the ArduPilot side appears to work fine, including the Dreaded Bad Logging :sunglasses:

100_0080

You will notice I have the improved fonts in my radio, which makes the display look a lot nicer.

BTW, is there a way to display four digits on the krpm? I’m gonna put a multiplier in there for headspeed instead of engine rpm and want it to display all four digits. I’m guessing there’s a multiplier in the script someplace (I haven’t looked at the code yet).

I don’t know what the 0.00V is on the top left yet.

I have a generator on this helicopter so it draws zero amps from the battery when the engine is running. So the amp-hours don’t mean much. What are the three values on the HUD? The left must the VSI, the right must be altitude AGL, which I changed to feet in the sensors. Is the bottom one Ground Speed? I usually select kts for that. And I’d like feet/min on the VSI, but all these things use m/s or (ArduPilot’s kinda dumb system) kts if you select to use kts in the GCS :unamused:

It got close to dark here so couldn’t actually fly this yet to try it out in the air.

I see you have everything working for 4s, does 6s work alright too? What about multiple instances of the M/FVLSS sensor for 12s?

Just throwing out ideas. I often have dual 6s batteries on-board my aircraft.

After getting everything configured it works fine on a ground test. I set the speed to knots and VSI to ft/min, etc. in the config menu. And manually edited the models config for the display I wanted, including even the governor status.

Pretty impressive, actually.

100_0081

1 Like

Hi Chris,
this is great news, really glad this solution fits your use cases!

I see you figured out pretty much everything, including the unit of measure menu settings.

Chris the font you have is slightly bigger and some of the alignments fail, where did you get it, I’d like to do some testing on my own?

Hi Nathan,
In the “custom 6 sensors grid”, well 6 is less than 12 and right now there would be no room for all 12 cells but
a 6s setup should display fine, I tried it in companion

As for 12s setup, the script should be able to detect it and display it on screen as avg cell + aggregate voltage( if autodetection fails you can still force cell count from the config menu), it has been tested with a power monitor, so with voltage monitoring from the FC.

I do not support FLVSS chained in series for 12s individual cell monitoring, the script would probably freak out and identify the setup as having dual parallel battery :slight_smile:
Did you try this setup with my script?

I fixed the alignment issues, now should be ok even with your larger font