How to Change PID and VTX Settings with Taranis with Betaflight

You can now adjust PID, rates and VTX settings right from your Taranis menu with Betaflight using LUA script and Smart Port. In this tutorial we are going to show you how.

This article is written by Artur Banach, edited by Oscar.

PID tuning has been made extremely convenient by the developers. It’s possible to do so with MinimOSD, your goggles and your radio transmitter, and now you can do it just using your TX with the PID values displayed on your TX screen! You can even adjust VTX settings such as channel and power with Tramp or Unify Pro.

This guide is written specifically for Betaflight firmware, however you can do the same with Raceflight and KISS.

Hardware Requirement

  • Taranis X9D or QX7 TX
  • X4R-SB or XSR RX (Smart Port required)
  • F3/F4 Flight Controller with Betaflight 3.1.X installed and spare serial ports (For F4 FC, find out if Smart Port is supported natively. Some F4 might require inversion hack in order to get S.Port working)
  • TBS Unify Pro VTX or ImmersionRC Tramp – Only needed if you want to be able to change VTX settings from Taranis

Hardware Connection

To allow PID tuning from Taranis, simply connect S.PORT from X4R-SB or XSR RX to any UART TX pin on the flight controller. It’s completely up to you which UART TX you want to use as long as it’s free.

For changing VTX settings, SmartAudio port from TBS Unify Pro (or Telemetry port from Tramp) also needs to be connected to one of the unused UART TX

This following image is an example connection of the Betaflight F3 flight controller.

Update Taranis OpenTX Firmware

Your Taranis TX has to be updated to the latest OpenTX firmware (we tested V2.2 RC14 successfully). The process is simple, and it’s covered here: https://oscarliang.com/flash-opentx-firmware-taranis/.

Download LUA Script for Betaflight

The LUA script for Betaflight can be downloaded here: https://github.com/betaflight/betaflight-tx-lua-scripts/releases

Please be aware that the LUA script files are different for Frsky X9D, QX7 and the Horus. Download the latest version available for your transmitter model.

The zip file contains 2 folders: BF and TELEMETRY, and the files needs to be copied to the SD card in your Taranis.

 

  1. Copy BF.lua file in TELEMETRY folder to the /SCRIPTS/TELEMETRY/ folder in your Taranis SD Card.
  2. And copy the whole BF folder to /SCRIPTS/ folder in the SD card. These are the script interface files needed to make it work.

Betaflight Configurator Settings

First of all, make sure SmartPort is setup properly:

  1. In Betaflight configurator, PORTS tab, find the UART where you have connected S.PORT to, then select SmartPort as the Telemetry Output
  2. Enable option TELEMETRY in Configuration tab

Extra Steps for Unify Pro and Tramp

If you have TBS Unify Pro or ImmersionRC Tramp, go to PORTS tab, find the UART you connected the VTX to, and choose which VTX you have under Peripherals.

For example on my LUX V2 FC (screenshot below), I am using SmartPort in UART1, TBS SmartAudio in UART2, and SBUS in UART4.

Choice of VTX, and Blackbox logging under Peripherals.

Don’t forget to hit “Save and Reboot” when you finish.

Setting up LUA script on telemetry page

We are almost there!

Once you have SmartPort set up, and you have copied the BF.lua file to /SCRIPTS/TELEMETRY/ folder on the Taranis SD card, we can proceed to the final step.

Go to page 13 DISPLAY in your Taranis. Here you can configure which telemetry screen to execute the LUA script. In Screen 1, choose Script as the first option, and then select the BF Lua script in the 2nd option.

You should be able to activate BF LUA script now by holding down the PAGE button (LUA script is triggered by entering Telemetry Screen 1).

Page 1 of the script is for VTX settings.

2nd page is for PID.

Last page of the script is for RC Rate, Super Rate and RC Expo.

After making PID or VTX setting changes on your Taranis, you can save it by long press MENU button.

That’s it!! I hope you enjoyed it, and have fun playing with PID tuning and changing VTX channels from your Taranis in the field! :)

27 thoughts on “How to Change PID and VTX Settings with Taranis with Betaflight

  1. Martin

    Hi, I get — on all values in Taranis. Telemetry showing many sensors VFAS etc. XSR receiver, F3 flightcontroller, Taranis X9D+

    Reply
  2. ZeLaus

    Hoi,
    I’m using an R-XSR Receiver and get no PID, RATES and VTX on LUA. Telemetry is working as I’ve got 10 sensors showing up.
    Runnig X9D+ with OpenTX 2.2.0, LUA X9 from BetaFlight github.
    FC is an Omnibus F4 with SoftSerial set to Telemetry/Smartport.
    There’s only one FW for that receiver.

    Any help appreciated.

    greetz,
    ZeLaus

    Reply
      1. ZeLaus

        Everything working with newest firmware on normal XSR. OmnibusF3 AND F4 (with SoftSerial)
        Not even to wire anything different…

        I believe, it’s a firmware thing with the R-XSR.

    1. Oscar Post author

      Unfortunately I don’t have a R-XSR to test this yet. But I guess it could be the RX that is causing this problem. Hopefully a future firmware release might fix this.

      Reply
  3. Ruben

    Hi Oscar,

    Just to let it known: the Betaflight Lua script also worked in following situation:

    – Naze32 (rev5) FC flashed with CLEANFLIGHT 2.1.0.
    – X4R-SB receiver (with SBus and Smart Port) –> thx to your other post (https://oscarliang.com/sbus-smartport-telemetry-naze32/#f1)*
    – Taranis XD9+ with 2.2.0 (RC18)

    * I have noticed that for Cleanflight 2.1.0. the setting “tlm_inversion” is not present any more. Instead you will find “tlm_inverted”. I had to set tlm_inverted = OFF to get telemetry working.

    Reply
  4. Manish

    I was able to resolve the issue of no PID or VTX values on the FrSky Taranis Q X7 screen. If you are using the TBS Unify Pro HV VTX along with the FrSky XSR receiver and Betaflight F3 board, here is what you need to do.

    Flash the “Beta” firmware for the XSR receiver onto the XSR.

    frsky-rc.com/download/view.php?sort=&down=313&file=Beta%20Firmware-XSR

    Then download the latest firmware version of Betaflight (3.1.7) onto your Betaflight F3 board. Ensure you have the LUA script running on your X7 after you flash the new firmware and it should work.

    Reply
  5. Manish

    I’m getting PID value’s on screen but no VTX values. I am using TBS Unify Pro HV VTX, Betaflight F3 board and Taranis XSR receiver. Could this be a problem with the firmware in the receiver?

    Reply
  6. J. V brecht

    Same problem as number if people above.
    Just — in the screen. Latest version Betaflight and latest version taranis x9d+ firmware. When i power up the flightcontroller i get values 1time. It wont refresh or load the other scripts. Any suggestions?

    Reply
  7. Jodi

    Did somebody try it with final opentx 2.2? I have a final 2.2 in my taranis and I’m not able to read / set values. Telemetry works, but script does not show any value. Just “–” and also I’m not able to switch next page (rates or vtx).

    Reply
    1. Oscar Post author

      This is only possible with OpenTX 2.2 or newer, so it should work.
      According to your info, it sounds like your FC side isn’t working. Do you have the latest Betafilght installed? Or maybe the script hasn’t been installed properly, please repeat the process again and follow instruction carefully.

      Reply
      1. Jodi

        I have latest BF 3.1.7 on both copters. I think wiring is OK, because telemetry works fine. Using XSR with s.port connected to TX on UART.2. I already tried v2 and v3 of that script, but with same result. It worked for me, I think, month ago, but not now. I think it was on some 2.2 RC version.

      2. Jodi

        Oh I remembered, I also updated XSR FW to newest version 170605. There could be also problem.

  8. Brad

    I recently installed a xsr on my Martian. And I can’t for the life of me get this script to work with my taranis qx7. Fury f3 flight controller, smart port on uart tx enabled on betaflight. Sbus on sbus pins. When I discover new sensors I only see three show up. Any thoughts, ideas? Thank you in advance.

    Reply
  9. maciek

    hi,

    i used OTX 2.2 GA release (the latest)

    i get Script Syntax Error message when going the to Screen1

    Reply
  10. Curtis Farr

    Is there any way to default pit mode to off.? I am getting tired of having to reset pit mode to off every time I unplug the battery

    Reply
  11. Supe

    i get the pids page up but cant get any values…i am running a a hyperlite f4…i get all my other telem data but not values for the pids….any ideas running a taranis 9

    Reply
      1. Marcin

        I have exactly the same situation.
        My setup:
        – FC F3,
        – receiver XSR-M with NON-EU FW, but in D16 mode,
        – Taranis 9D with FW 2.2-RC14 with LUA,
        I see RSSI, A2, RxBT sensors but not telem from FW, UART set, telemetry enabled, I can see some data when connecting logic analyze to uart connected with smart port.

        BTW instruciont is not complete, there is no information that I need to discover any sensors, but in LUA code there is check that when there is no RSSI discovered then screen will show mesage “No telemetry”.

      2. Theo

        Just received a new XSR-M receiver. Replaced an old X4r-sb on a quad with Betaflight F3 FC and Tramp HV, where everything worked, telemetry, lua script, including PID and VTX settings. Latest betaflight and opentx.
        With the new XSR-M telemetry did not work at all initially until I flashed the latest firmware (dated 06-09). However, the lua script does not work any more. Only dashes are displayed, for both PID and VTX settings. I am starting to think that it is related to that particular receiver?

  12. Brad

    I still can’t get this to work in Betaflight using a revolt V2. Can’t seem to find the 3rd UART (UART 6 in BF). Any idea?

    Reply
    1. Artur

      Yes, all works as normal. You can set another screen to show the telemetry values. If you set up alarms it will remain exactly the same.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum IntoFPV.com... You might get a faster response from me there (multirotor related only).