You can now adjust a lot of Betaflight settings from your Taranis TX with Betaflight using LUA script and Smart Port, including PID, rates, looptime, filters and VTX settings . In this tutorial we are going to show you how to set it up.
This article is originally created by guest writer Artur Banach, last updated by Oscar.
- F3/F4 Flight Controller with Betaflight 3.2 or later installed
- Frsky Taranis X9D-Plus or QX7 transmitter with OpenTX 2.2 or newer
- X4R-SR, XSR or R-XSR receivers (Smart Port required)
- A spare UART ports for SmartPort
First of all, set up SmartPort. Here is a tutorial on how to setup Smart Port in Betaflight. How do I know if SmartPort is working? Check if you get the value for VFAS (battery voltage on your quad).
For VTX control, SmartAudio port from TBS Unify Pro (or Telemetry port from Tramp) also needs to be connected to one of the spare UART TX. Here is a detailed tutorial on how to setup VTX Control. If you don’t need VTX control you can simply ignore it.
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/.
Access the SD card in Your Taranis
To gain access to the SD card inside the Taranis TX, you can use one of the following 2 methods:
- Put Taranis in Bootloader mode, then plug in the USB cable
- Or simply take the SD card out of the Taranis
I prefer the first way because I am lazy :) To put Taranis in Bootloader mode, simply push both of the Yaw and Roll trim buttons towards the centre, and power on the TX, the screen should now say it’s in bootloader mode.
Now if you connect the USB cable, an external drive should appear on your computer, that’s the SD card in the Taranis.
Download LUA Script for Betaflight
The latest LUA script for Betaflight can be downloaded here: https://github.com/betaflight/betaflight-tx-lua-scripts/releases
The zip file contains 2 folders: BF and SCRIPTS. Open the folder SCRIPTS.
Now you have two folders inside: BF and TELEMETRY:
- Copy bf.lua file in TELEMETRY folder to /SCRIPTS/TELEMETRY/ folder in your Taranis SD Card
- Copy the whole BF folder to /SCRIPTS/ folder in the SD card. These are the script interface files needed to make it work (there are scripts for different TX models, don’t worry just copy the whole folder, your Taranis will pick the correct script automatically)
Betaflight Configurator Settings
Many settings in the LUA script only works properly in Betaflight 3.2 or newer firmware, so make sure you update your FC too.
First of all, make sure SmartPort is setup properly:
- In Betaflight configurator, PORTS tab, find the UART where you have connected S.PORT to, then select SmartPort as the Telemetry Output
- Enable option TELEMETRY in Configuration tab
Extra Steps for VTX Control (Ignore if you don’t use VTX Control)
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!
Go to page 13, DISPLAY in your Taranis.
Here you can configure which telemetry screen to execute the LUA script we just copied over. In Screen 1, choose Script as the first parameter value, and then select the bf Lua script in the 2nd parameter value.
Now, you should be able to activate the BF LUA script by holding down the PAGE button.
Page 1 of the script is for PID settings.
2nd and 3rd pages are for rates, expo, TPA, Anti-Gravity gain, DTerm Set point etc…
4th page is for filters.
5th page is for PWM settings, ESC protocol and even Looptime!
6th page is for RX receiver settings.
And finally the last page is for VTX settings.
To save the changes, hold down the MENU button for 3 seconds, a dropdown list should appear, and you can select “Save Settings”.
That’s it!! I hope you find it useful. Have fun tuning PID and changing FC settings from your Taranis in the field! :)
“Script Syntax Error”
Your OpenTX version is probably too old, try updating it to the latest OpenTX firmware.
- 06 Apr 2017 – Tutorial created.
- 03 Dec 2017 – Updated instructions for Betaflight TX Lua Script V1.01