Using Taranis logical switches to set up reliable voltage alarm

If you use Telemetry and voltage warning on your Taranis TX, you might notice the frequent false alarms due to voltage fluctuation, i.e. sudden drop in voltage in punch outs. In this tutorial we will show you how to set up Logical switches to make a more reliable voltage alarm.

Background and Why

Telemetry via the Taranis (or any other OpenTX transmitters) allows the user to receive real-time flight information, and alerts when certain conditions are met. One of the more common uses of telemetry is the voltage monitoring, and warnings when your LiPo battery is running low.

A common way to set up a battery warning in the OpenTX firmware is to configure a basic logical switch to play a track when the voltage drops below a certain level. Whilst this method works, the results are not always predictable and ideal. Especially when considering voltage drops due to punch outs.

It is however possible to make a script consists of several logical switches, that ensures your Taranis will consistently warn you when the voltage drops below a certain level, but ignoring any short term voltage fluctuations due to punch outs.

Requirements – Reading Battery Voltage

In order to make this work, you’ll need a way to feed voltage information to your Taranis. The best way to do this is to hook up your battery to the VBAT pin on your flight controller, and then connect the telemetry port (or Smart Port) on your FC to your receiver. This will allow the RX to send all the flight information including battery voltage to the Taranis.

It is however also possible to use analogue voltage information (using the analogue sensor in the D4R-II for instance). Using analogue voltage will only work when you’re using batteries with the same amount of cells.

Tutorial

For the tutorial part of this post I will assume that you receive voltage information via Betaflight (2.7). Since Betaflight provides cell voltage (virtual)  we will use this information to trigger the warning on your Taranis. Again, it is possible to use any other source of voltage information.

For VFAS check out this modified documentation.

You can also use absolute pack voltage rather than cell voltage if you want, it’s absolutely fine. I’ve tested both methods and the results are identical.

Step 1 – Setting up the Logical Switches

Logical switches activate when certain conditions are met. We can use these switches to create audio and visual feedback both on the Taranis and on your quad.

You can find the switches by pushing [MENU] and by selecting the correct page by pressing [PAGE]. The logical switches tab is on the 10th page.

The image shows the logical switches on the screen of my Taranis. The table below provides an explanation for each switch.

Logical switches to set up a reliable voltage alarm 1

Logical Switch Conditions Info
L1 a<x A4 3.64V  This is the first logical switch. This will activate when A4 (the voltage source) gets below the value defined (3.64V)
L2 a>x A4 3.69V  Logical Switch 2 is activated when the A4 voltage value is above 3.69V. This switch will act as a reset when a full lipo is attached.
L3 Edge L1 [3,5:–]  The edge switch acts as a delay. It will only activate after a certain time (set by the 3,5 seconds). Edge checks if Logical switch 1 is active and activates L3 after 3,5 seconds have passed. The switch will not activate when L1 is deactivated. Thus ensuring that voltage drops will not trigger the alarm.
L4 Stcky L3 L2  The sticky function activates the switch when the first parameter is activated (L3) and disables it when the second one is met (L2). Therefore, L4 is activated when the voltage drops below 3,64V for more than 3,5 seconds (L3) and is disabled when the voltage rises (a new lipo is attached) and the L2 switch is activated.
L5 Timer 0,5 0,2 L4 This is a basic timer. In this configuration it is used to provide feedback on the quad (buzzer, leds etc). the function will activate L5 for 0,5 seconds disable it for 0,2 seconds and then start again. This will only happen when L4 is active.You can change the times depending on the functions you have available on your quad and/or leave this function out if you don’t need it.

Step 2 – Setting up the warnings

The correct switches have been set to trigger the warnings. When L4 is active all parameters have been met and a warning should be played. Moreover, L5 should trigger feedback on the quad.

The image below shows the special functions I’ve set up. The table below provides an explanation for each function

Logical switches to set up a reliable voltage alarm 2

Special Function Conditions Info
SF1 L4 Play Track Batcrit 1x This function will play the “Batcrit”track once when logical switch L4 is activated. You can increase the frequency by adjusting “1x” and even set it so that it will play the track after x amount of seconds.
SF2 L5 OverrideCH9 -100 This is very specific to your configuration. On Channel 9 I have my buzzer configured. When the value is -100 it will be activated. This function is active when the L5 Switch is activated. My buzzer will beep 0,5 seconds, switch off for 0,2 seconds and start over.

If you have any questions, feedback or improvements to this script feel free to share them in the comments.Thanks to /u/GoldenShadowGS for providing the insights necessary to make this post.

Author: Salih Ergezen
Join us as a guest writer and help move the hobby forward.

17 thoughts on “Using Taranis logical switches to set up reliable voltage alarm

  1. cahe

    This doesn’t work anymore. Please update according to changes to Edge switch in recent opentx releases.

    Reply
  2. Rigo Torres

    Hi Oscar,

    Thanks for the writeup, very useful. I’m new to the Taranis, got it last night. Everything is set up but I did find the voltage warnings annoying on punchouts.

    Quick question though, what if we wanted to add two warnings one for battery low and one for battery critical? Would it be a matter of copying the first 4 switches again with different values?

    I think I’m missing a step somewhere so that it stops giving me low battery and to just give me battery critical after it drops under a certain threshold.

    Thanks Oscar :)

    Reply
  3. Edgar

    Thanks
    I added one more switch that there is no alarm if the voltage is below 1V. I did this to avoid the annoying warnings if my main battery is not connected i.e. if I configure CleanFlight.

    Reply
  4. Aaron

    Wow gonna try this. Im wondering why my Taranis warns me at the right time battery is critical . Battery voltage is reading back correctly on the screen . But she says 3volts all the time 3v , 3v, 3v. no matter what the voltage is.

    Reply
    1. Mark

      Sounds like you have updated your firmware on your taranis. Believe it or not you need to download a new sound pack. I had this problem, i also have a custom sound pack, I solved it by getting the new pack and looking at the differences and found the sound files for decimal numbers and added those to the radio, works as advertised now.

      Reply
      1. TomDrone

        Mark,

        It doesn’t really work in my case. I have all new sound pack (including sounds for decimal numbers) but it doesn’t work as you write. I’m facing the same problem as Aaron when amber is saying 3 volts all the time.

        Whichever forum or facegruup I ask the question about it I got the same answer – update sound pack to newest one which is not really a solution.

        Oscar – this might be something for you ;-)

  5. Adriano

    Liked your solutuon! And learned some new functions, thanks!
    Just sharing how Its mine…
    I use only one function (like yours L1), addind the seconds on duration and delay columns (last 2 columns)…
    This function triggers a playtrack like you do.
    I don’t use feedback to the quad, as the tx is always near (and “singing”). I also have a channel/switch to activate beep on flight control (used only as a beacon when crash).

    Reply
    1. Mark

      Yeah i’m not sure if i’m missing a benefit to using “edge” over the delay feature in every single logical switch!

      Reply
  6. David Kyjovský

    I use a similar system – except instead of using a delay, I suppress the alarm IF my throttle is above certain threshold (like 20% above mid throttle). Works great.

    Reply
  7. Sketch

    I used the throttle stick to avoid false battery warnings on punch outs, a lot less complicated. Instructions in this video.

    //youtu.be/tdPvKhuMXSk

    Reply
  8. Paullex

    Hi Oscar, your Battery source is A4? If I am using X4r-sb, using smartport, should I be using Vfas as source and instead of individual cells (3.6 etc) I use the full pack voltage (ex. 14.6)?

    Reply

Leave a Reply

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

Are you Robot? *

I don't look at blog comments very often (maybe once or twice a week), so if you have any questions related to multirotor please post it on this forum IntoFPV.com... You're likely to get a response from me faster on there.