taranis lua

Taranis LUA Script : Tune PIDs from your Taranis

In Build by Mike Tseng24 Comments

Taranis LUA Script : Tune PIDs from your Taranis

 

The Taranis lua scrip is a super cool feature you can run on your Taranis.  It lets you tune PIDs and change vtx settings right from your Taranis.  If you are using a TBS Unify Pro or ImmersionRC Tramp VTX you can change your band, channel and even power output.

Learn how to tune your PIDs in this post.

Requirements for the Taranis LUA script
  • Taranis must be running at least firmware 2.2.0
  • A spare UART port on your flight controller that’s is at least F3.  Two spare ports if you are setting up the VTX controls.
  • RX that has a SmartPort wire like the XSR or X4R-SB
  • If setting up VTX, TBS Unify Pro or ImmersionRC Tramp
Parts Used in this Post

See how to build a Tokio X

Download and Prepare

First step is flash your Taranis to a compatible firmware.  You’ll need OpenTX Companion 2.2.0.  This is the program needed to connect your Taranis to the computer and flash the firmware.

Go to OpenTX and click OpenTX 2.2.0.  Scroll down to the bottom and download the OpenTX Companion 2.2.0 for your system.  I’m using Mac so I download the Mac version.

taranis luaClick the “SDCard content for 2.2.0″.  Make sure you download the correct file for your radio.

Download the lua scrips for the Taranis.  Get the downloads HERE.  Make sure you download the correct file for your radio.  I’m using the Taranis X9D+, BFSetup-X9-v0.3-0-g4cd7539.zip.

In the zip file there are two folders BF and TELEMETRY.  Go into the new SD card folder for the Taranis card.  Drag the BF folder into the SCRIPTS folder.  In the TELEMETRY folder there is a file BF.lua, drag that into the SCRIPTS/TELEMETRY folder inside the sd card.

Flash the Taranis

Put your Taranis into boot loader mode by pressing both the left and right horizontal trims towards the center and powering on.  It’s the same for the QX7.  Now plug your USB into your Taranis and computer.

Click the Settings Icon.  In the settings windows make sure you have the correct Radio Type set and the Build Options set.  Select the location where you downloaded the new SD card structure you downloaded earlier.

taranis lua

taranis lua

Extras

Spash Screen: If you want a different splash screen (the image that shows up when you first turn on your radio) this is where you add it.  Choose the location of the file on your computer.  The splash screen must be a .bmp file format and 212×64 pixels.  You can download the FlightClub splash image if you want :p

Welcome Audio:  To change the default audio sound when you first turn on your radio.   In the Sounds folder sdcard-taranis-x9-2.2V0010/SOUNDS/en/SYSTEM, change the hello.wav file to the sound file you want.  The audio file must be a .wav file.  You can use a free program like Audacity to convert .mp3 to .wav.  Export the wav file 32khz, 16bit, mono and uncompressed.  Save as hello.wav and replace your new file to the existing file in the SYSTEM folder.  The Taranis will play whatever file you named hello.wav

Next go to Application Settings and select the options you want.  Click OK.

taranis lua

Next download the new firmware for the Taranis.  Click the Download Icon.  In the popup click “Check for updates” then “Download FW”.  Click OK.  Then click the Write Firmware to Radio icon.

taranis lua
Flight Controller and RX Setup for Taranis LUA

All you have to do is connect the yellow SmartPort wire from the RX to any free UART port on your flight controller.  If you followed the Tokio X build, there’s nothing you need to do.  The Smartport wire is connected to UART 5 on the LUX v2.  It’s already set up.

For VTX channel/band/power control.  On the TBS Unify Pro, connect the SmartAudio wire from the VTX at any spare UART on the FC.

In Betaflight on the Ports tab, enable SmartPort for the UART you connected the yellow Smartport wire on your flight controller.

best race dronetaranis lua

For the SmartAudio wire, for the UART you connected, under Peripherals enable “TBS SmartAudio”.

In the configurations tab, make sure Telemetry is enabled.

Taranis LUA Setup

Go to DISPLAY 14/14 screen in the Taranis and setup a screen for the scrips.  Select Scripts / BF.  Done!

To get to the PID tuning screen, press and hold the PAGE button on the Taranis.  The first page is the PIDS, 2nd is Rates and third is the VTX channel and power if you are using the TBS Unify Pro or ImmersionRC Tramp.  Press menu to scroll through the pages.  Press and hold MENU to save your new PIDS.  Done.  Go rip!

If you found this post helpful, it would be super cool if you purchased the components from my store or purchase items from my Amazon links.  These posts are expensive and take a loooong time to make so the purchases make it possible for me to keep making them.  Thanks in advance, I greatly appreciate it 🙂

 

Comments

  1. I have this setup on one build with no issues. In another build I am using an SP Racing F3 and XSR rx and it’s not fully working. I have the smart port wire going to UART1 tx (i think, might be rx but I’m not home to check) and I can see my PID values on the Taranis but only while Armed. Also I can not save the values at all. Any ideas where I messed up on this one? My KISS FC running betaflight with an xsr works perfectly.

     
  2. Does this work for all video transmitters? The fx799t to be specific?

     
    1. Author

      no right now the VTX settings only work with the unify pro and immersionrc tramp.

       
  3. Just fyi I spent far to much time trying to get a wav file for my new hello.wav (used to be the tada.wav) as the welcome file to work only to find out it had to do with the sound settings so far any one following Mike’s vid, make sure you audio files at set like this (if using Audacity).

    In Audacity:
    – Open your file
    – Tracks -> Stereo track to mono
    – Set Project Rate to 32000Hz at the bottom left of the window
    – File -> Export, Wav Signed 16 bit PCM
    – Click “clear” on the metadata screen that appears

     
    1. Author

      No it needs a smartport wire which the d4r doesn’t have

       
  4. Mike this is a Very nice option to have when on the go Great Video as always Will you be doing A DTF version with this in mind the current version isnt and was wondering

     
    1. Author

      yes I will have some DTF builds of this soon. thanks!

       
  5. I tried to do what you said. Tx firmware is updated and the models are all there but I’m getting an “SD Card Warning Expected version 2.2:V0010” on start up and at page 14/14 it says “No Scripts on SD” when I try to setup page 2 for the PIDS. Oh well. Thought I had it made but don’t know what to try next besides a complete redo. I’ll do that tomorrow if no one has any advice. I am using the 16 gb card that came with the Tx. My models transferred over.

     
    1. Author

      did you put the new card hierarchy on the card? the new firmware has different folders. it’s all in the post

       
  6. First: Thank you for this tutorial. But now I have the dreaded start up message “SD Card Warning Expected version:2.2V0010” even though I have that version loaded on the SD card. Note that when I view the SD card outside of the Taranis Tx it comes up as “No Name” but all the files are in there and in place as shown on your video. Then when I try to select the Lua script on Screen 2 I get a message “No Scripts on SD”. I spent a few hours today messing with this but I’m out of my league. Maybe you could recommend a way to simply go back to a stable set up on my Taranis X9D+. I did get the radio updated to V2.2.0 and it works fine. It is just the SD card has issues. Thanks for your time.

     
  7. Hi Mike, Good news! I was able to get rid of the SD card error screens and I now have the PID screen on page 2. It was a lot of trial and error and watching youtube but I think the issue was the SD card did not get a complete overwrite when I followed your instructions. I finally removed the SD Card from the transmitter and deleted its entire contents. Then I downloaded a fresh copy of the SD Card contents from Open Tx 2.2 and loaded that without the extras. That solved the SD Card error problem. Then I dragged the BF and BF.lua files into the correct spots on the SD Card. Now everything is good. I don’t expect to see my posts here since I got it sorted. Just delete them. But it may be helpful for you to know what happened to me. Thanks again for giving me a lot of the tools I needed to try this.

     
  8. Having a blast flying my Tokio X with your setup! But (there’s always a but!) I don’t have some of the setup/sound/switch things you have in your Taranis. For instance there’s no tracks for “engine off” and in special functions I only have L01 to L03 where you have many more. I’ll go back and look at the sound files stuff in your video but it looks very personal. I don’t want to put little sound bites into my Taranis but if there is a whole folder of stock sounds to drop into the Tx somewhere that would be cool.
    Thanks again, I can’t wait to play around with PID settings at the field someday.

     
      1. Hmm, thanks, I thought I did download those! The SD card one for 2.2… I’ll have a look at the files when I get a chance. To me it looks like I still have the older Taranis files from before the upgrade. Plenty of You Tube videos on this subject Thought.

         
  9. No you need “smartaudio” that the TBS vtx have or whatever thing the tramp vtx have.

     
  10. I wish I understood last post but I will try to figure out what you said… Thanks!

     
  11. Are you willing to provide the wav file for your “welcome to flight club” greeting?

     
  12. Hi, thanks for all your guidelines and products !!! Last weekend I got in trouble with this configuration . My Taranis gone mad with strange sounds on the left stick and completely inoperative on Betaflight Configurator. (3.1.7) .
    I had to install the old firmware (2.1.9) back, but I don’t want give up for this issue because LUA Script it’s a great feature!
    Do you have any hint?
    Thanks!

    Taranis x9d+
    frskyX4R-SB
    FC : Lumenier Lux V1

    Luc B

     
    1. Author

      i don’t know. i would flash it with 2.2 because this is the version needed for the LUA script.

       

Leave a Reply