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.
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.
|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
|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.