Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Electronics Support > OpenTX Radios


OpenTX Radios OpenTX Radios Discussion and Support Forum


Like Tree2Likes
  • 1 Post By xoexoe
Reply
 
LinkBack Thread Tools Display Modes
Old 12-31-2019, 06:42 PM   #1 (permalink)
Registered Users
 
Posts: 6,218
 

Join Date: Sep 2018
Location: Snohomish, WA
Default Tutorial for 3 different methods of Throttle Hold + Head Speeds with OpenTX

It's often said there's more than one way to accomplish a given task in OpenTX. So true. For the beginners out there, I put together this mini show-and-tell that demonstrates several different ways of setting up a throttle hold switch along with 3 different head speeds. Along the way I'll mention some useful advice and warnings.

I used Open TX 2.2.4 and a Horus X10S, but all of what I do is probably very similar no matter your semi-recent OpenTX version or TX model.

(Several months ago I did make a similar thread, but that was just showing one way to do a complete set up, not multiple ways of doing Throttle Hold + Throttle Curves.)

Since this post is a bit long, here is the organization of it:

• Preliminary: Trims, End points, and Overrides
• Method 1: Using INPUTS with CURVES
• An Aside: Enabling a Secondary SAFETY SWITCH
• Method 2: Method 2: Using MIXERS with CURVES
• Method 3a: Using FLIGHT MODES and CURVES
• Method 3b: Using FLIGHT MODES and GLOBAL VARIABLES

Preliminary: Trims, End points, and Overrides

Before we get to the different methods, I want to mention three basic things that will annoy you if you aren't already aware of them.

1. Do yourself a favor and disable trims. You can do this in the Flight Mode page. Just set the first six trims to "--" rather than ":0".



2. Also make sure the TX end points are set correctly for your FBL. For Spirit I needed something around +-83 or +-84. (I forget what it was exactly.) For iKON I need +-106.2. Also mind your center points. Some need 1520 and others need 1500. Just experiment while viewing your FBL's live view of TX inputs.

You can see that I set it for the CH3 thottle output (but not for others just for simplicity).



3. And it's probably worth saying this here because it's such a common mistake. If you are going to use Channel Overrides at all (explained later), make sure your override value matches the Output value you want and verify it works correctly by looking at your FBL screen. I'll go into detail later, but notice in the next pic I am overriding my CH3 output with –106 and not –100. When in doubt, verify by looking at your FBL screen.





Method 1: Using INPUTS with CURVES

I consider this the simplest and most easily understood method. It is also fairly flexible because if you want to change from a flat throttle curve to a V curve there is really only a single setting you need to change.

Here is the Inputs page:



With OpenTX only one line for a given input type can be active at a time. OpenTX will enable the first matching input line and ignore the rest.

The "SH down" and "SE up" fields are the switch positions that will enable a given line. So if switch H is down (which is my throttle hold enable position) the first line will be active and the rest won't, regardless of switch E's position. But if switch H isn't down while switch E is in the middle (which is my middle head speed), then that line will be active instead.

If there are no matching inputs, then OpenTX will just use the bottommost input line. I personally don't like depending on that feature, not because I don't trust the underlying code of OpenTX but because I don't trust myself to remember that in the future and it's too easy to make a mistake when setting up input lines in such a way that there won't actually be a match. So what I do is add a dummy line on the bottom that doesn't require any switch to become active. In other words, if there are no matches in any of the lines above it, then the bottom line that doesn't have a switch requirement gets enabled. I like doing that, but if you're careful to make sure there is always a match it isn't really necessary.

Looking back up at the most recent picture above, the "hol," "low," "med," and "hig" fields are the names of Curves that I have set up on the Curves page. Here is my "hol" curve, which is for my throttle hold:



And here is my "low" curve which is for enabling the lowest head speed.



It is indeed VERY low! I must be thinking about enabling maybe a Castle ESC gov or an iKON FBL gov (where you set the head speed explicitly), and I'm not thinking about Hobbywing ESC gov or Spirit FBL gov (where there is a linear relationship between the throttle percentage and the governed head speed).

Some might be wondering why we don't just use a different "Weight" for each line rather than choosing a flat curve. My reasoning is that in the future if you want to do a V-curve or something specialized, it's much easier to already have the machinery in place that can do true curves rather than change your weights and then enable curves later.

Speaking of V curves, they are useful if you don't want to use a governor for some reason but still desire a semi-constant head speed. To set up a V curve, you first have to define some new curves like this:







Then once that's done you just select the curves in your Input page (or Mixer page if you're using Mixers instead. More on that later.) Here's what it would look like for the Input page:





That's it! Done! We have 3 throttle curves that are selected by switch E and a throttle hold feature on switch H that will take precedent, disabling the motor. Using inputs like this is nice and easy for the throttle because only one input can be active at a time, so the logic is fairly easy to follow. You just have to remember about what happens if there's not a match.

By the way, using inputs doesn't preclude you from using mixers for other things later on. But since I'm only showing you the flight mode and throttle hold set up, I don't have anything in Mixer, as you can see:





An Aside: Enabling a Secondary SAFETY SWITCH

Sometimes throttle hold switches can accidentally get bumped by your or by something next to your TX. To help prevent these accidents from causing your heli to spool up, it's common to enable some type of secondary safety switch such that BOTH the throttle hold and the safety switch need to be disengaged (in certain positions) in order to enable spool up.

I'll demonstrate two methods to do this.

Safety switch using an OVERRIDE

This first method is the simplest way and uses a Channel Override in the Special Functions page, as shown here:




Here I want switch D, a 3-position switch, to be the secondary safety switch. If the switch is down or in the middle, then I want safety engaged. If the switch is up, I want safety disengaged. The line labeled SF1 will override my channel 3 with a value of –106 if switch D isn't in the up position. In other word's switch D being up disengages the safety switch.

Why did I choose a value of –106? If you scroll back toward the top of this post you'll see that in my Throttle Outputs to an end point of +- 106.2 so that my iKON FBL would read 0–100%. Now channel override in OpenTX is a true override... it will skip your Input, Mixer, and even your Output endpoints!! (I don't recall and didn't test whether it skips your channel reversal.) If I had chosen a channel override value of –100 then the FBL would be seeing a throttle value that is slightly more than 0%.


Safety switch using a LOGICAL SWITCH

Here is another way to get a secondary safety switch that uses a Logical Switch instead of an Override.

There are actually two changes that you'd need to make, one in the Logical Switch page and another to your Input page (or Mixer page if you're doing Mixers instead of Inputs for your throttle management).

Here is the Logical Switch page I set up.




The logical switch labeled "L01" will be true if either switch H is in the down position (my usual throttle hold switch) or if switch D isn't in the up position. (Yes, it's a bit weird to have one be a negation and the other not, but OpenTX won't let you do a negation of a two-position switch, and I wanted two safety position for switch D, not one. Whatever.)


Now that L01 will be true if I want throttle hold to be active (either through my main physical throttle hold switch or my safety switch), I need to go into my Inputs page (or Mixer page depending on where you are enabling throttle hold) and let "L01" activate throttle hold. Here I happen to be using Inputs to control my throttle value, so I make the activating switch L01:



Ta da! Now you are more safe than you were before.

Okay, that's enough of an aside. Let's use Mixers instead of Inputs now....



Method 2: Using MIXERS only

Instead of using Inputs, you can do everything in Mixers. It takes a bit more care to do this because many mixer lines can be active at any given time and it's up to you to decide if a given line will be added to, multiplied by, or simply replace the "running total" of the lines above it. But for these reasons Mixers can also be more flexible if you're doing something fancy.

First, here is my Input page to show you that there isn't anything special going on:



And here is the Mixer page where all the magic happens.



The weird "circle colon" on the far left of each line means replace; I'm not adding and I'm not multiplying a given line by the ones above it, I'm simply replacing. The net effect is that only one line is active at a time. OpenTX will read these from the top to bottom, so that's why I have my throttle hold line at the bottommost position. If my throttle hold switch is active, I don't want it to be replaced by anything below it. Make sense?

(Notice I'm using a simple switch for throttle hold rather than a Logical Switch just for simplicity here. Hopefully I'm also using a Channel Override with the proper end point value for safety.)



Method 3a: Using FLIGHT MODES and CURVES

In the examples above, particular switch positions (or combinations of switches) enabled particular lines in either the Input or Mixer pages. An alternative method, and the one shown here, is to have a certain combination switches enable certain "Flight Modes" in OpenTX, then use whatever Flight Mode is active to do the dirty work in either the Input or Mixer page.

Sounds complicated, but it's not as bad as it seems. Think of it as a dedicated set of Logical Switches where ONE and ONLY ONE flight mode can be active at a time. Let's see how it works...

Here is my Flight Mode page. (I have disabled trims on all flight modes that will be used, but I actually suspect that you only need to disable it on the FM0... I didn't experiment.)




The "TH" and "IU1" labels are names I created to help keep me organized. How OpenTX deals with Flight Modes is that beginning at "FM1" it will just go down the list and look for the first line that has a TRUE switch field next to it. This can be a physical switch, a logical switch, or probably something else. As you see, FM1 will be active if L01 is true, FM2 will be active if L02 is true, etc.

But what if none of the required switches are true? In this case OpenTX will default to FM0. That's why there is an "N/A" next to the required switch for FM0.

It is best practice in my opinion to have FM0 to be your throttle hold flight mode while FM1–FM3 are for your different in-flight modes.

Let's now take a look at how L01, etc. are defined.



I used an AND function so that, for example, L01 is true only if BOTH my throttle hold switch is in the up position (disengaged) and my flight mode selector is in the up position (low head speed). Similarly for the other two logical switches.

(By the way, there is a secret third field/switch that you can enable in the AND line so that you can have an additional safety switch build right in to this screen. I chose not to do this for simplicity.)


Okay, we have logical switches that are turned true depending on our physical switches, and Flight Modes that are active depending on which logical switch is true. But how do we use the actual active Flight Modes to do something like select a head speed? You can do this in the Input or Mixer page just like the examples before. I personally did it in the Mixer page because I find the Mixer more flexible than the Input page.

Here is my Input page to show you it's nothing special.



And here is my Mixer page for using Flight Modes:



As you see, each Replace line is active only if a particular flight mode is selected. Order isn't as crucial here because ONLY ONE of the flight modes can be active at a time, so I didn't have to put throttle hold (FM0) at the bottom position. I bet you can even get away with using the default ADD function instead of replace, but it doesn't hurt to be cautious.

I suspect Flight Modes are underused in OpenTX. So I wanted to show what it looks like when you go into the EDIT details for the the Mixer line for FM1 (low head speed):




In the "Mode" line I selected only FM1 and selected the "low" flat throttle curve.




Method 3b: Using FLIGHT MODES and GLOBAL VARIABLES

If you are absolutely sure that you will never need and never want a V curve, meaning that you will and only need and only want flat throttle curves, then you can use Global Variables instead of Curves for you throttle setup.

Global Variables are a set of variables ("GV1", "GV2", etc.) that have a Flight-Mode dependent value assigned by you, the user. If you've ever done any actual programming, you can think of GV1 (and each of the other global variables) as an array of numbers whose active index depends on the Flight Mode you have selected.

If you want to go this route then here is the Global Variable page:



Each row is a different global variable while the different columns correspond to the different Flight Modes discussed earlier. GV1, which I labeled HS for convenience, will be the global variable that stores my desired flat throttle values. The different columns correspond to the different Flight Modes. The leftmost is Flight Mode 0 which for me is throttle hold, so I put –100% here. (Not –106% since these values will eventually be run through the Output page and given a proper endpoint.) The next column is for Flight Mode 1, then Flight Mode 2, then Flight Mode 3.

What about the next column (Flight Mode 4) that has a value of "FM0"? In this case, if Flight Mode 4 becomes active somehow, then GV1 will have whatever value we stored in the FM0.

Now that the actual Flight Mode values are assigned, we can set up our Input and Mixer page.

Somewhere early in the Input --> Mixer flow you must put MAX as the throttle value, not the throttle (pitch) stick. The value "MAX" is just 100%. So what we're going to do is take 100% (which is called MAX), then multiply it by our Global Variable. I chose to put the MAX value the Input page. Here's what my Input page looks like:



And then that 100% value gets sent to the Mixer page, which looks like this:



The GV1 you see on the CH3 line is the Weight, as you can see if I edit the details for CH3:



(Alternatively, we could have not messed with the Inputs page at all, then in the Mixer Throttle details set the Source to "MAX" instead of the "Thr" input.)

That's it! It's very, very clean looking because you don't have multiple lines where you connect flight mode to curve; that messy work was done in the Global Variable page.

In case you're wondering, if we had left the throttle line on the Input page as the throttle stick instead of changing it to MAX, then we would have gotten different channel outputs depending on the stick position. It would have given us some type of linear throttle curve, but weighted by some amount (unless your GV1 value was at 100%). Try it if you're curious.
Attached Thumbnails
Click image for larger version

Name:	disable_trims_FM0.jpg
Views:	135
Size:	114.7 KB
ID:	833265   Click image for larger version

Name:	output.jpg
Views:	141
Size:	126.3 KB
ID:	833267   Click image for larger version

Name:	override_CH3.jpg
Views:	137
Size:	97.7 KB
ID:	833269   Click image for larger version

Name:	input_input.jpg
Views:	133
Size:	120.5 KB
ID:	833271   Click image for larger version

Name:	input_CVhold.jpg
Views:	116
Size:	105.5 KB
ID:	833273  

Click image for larger version

Name:	input_CVlow.jpg
Views:	114
Size:	106.7 KB
ID:	833275   Click image for larger version

Name:	v_v1.jpg
Views:	113
Size:	105.6 KB
ID:	833277   Click image for larger version

Name:	v_v3.jpg
Views:	115
Size:	107.2 KB
ID:	833279   Click image for larger version

Name:	v_input.jpg
Views:	113
Size:	120.7 KB
ID:	833281   Click image for larger version

Name:	input_mixer.jpg
Views:	110
Size:	103.8 KB
ID:	833283  

Click image for larger version

Name:	inputLS_LS.jpg
Views:	112
Size:	97.5 KB
ID:	833285   Click image for larger version

Name:	inputLS_input.jpg
Views:	109
Size:	117.6 KB
ID:	833287   Click image for larger version

Name:	mixer_input.jpg
Views:	109
Size:	105.3 KB
ID:	833289   Click image for larger version

Name:	mixer_mixer.jpg
Views:	108
Size:	112.7 KB
ID:	833291   Click image for larger version

Name:	FM_FM.jpg
Views:	254
Size:	113.0 KB
ID:	833293  

Click image for larger version

Name:	FM_LS.jpg
Views:	251
Size:	102.7 KB
ID:	833295   Click image for larger version

Name:	FM_mixer.jpg
Views:	246
Size:	111.0 KB
ID:	833297   Click image for larger version

Name:	FM_mixer_mode1.jpg
Views:	247
Size:	100.2 KB
ID:	833299   Click image for larger version

Name:	FM_input.jpg
Views:	245
Size:	100.5 KB
ID:	833301   Click image for larger version

Name:	GV_GV.jpg
Views:	111
Size:	140.3 KB
ID:	833303  

Click image for larger version

Name:	GV_input.jpg
Views:	109
Size:	103.7 KB
ID:	833305   Click image for larger version

Name:	GV_mixer.jpg
Views:	109
Size:	103.3 KB
ID:	833307   Click image for larger version

Name:	GV_mixer_details.jpg
Views:	109
Size:	98.0 KB
ID:	833309  
__________________
Brian — Oxy 2 & 4 Max — S2 & CP X — 150X — iK2N/Brain2/Spirit — Horus X10S — OpenTX — AccuRC —

Last edited by xoexoe; 12-31-2019 at 09:09 PM..
xoexoe is online now        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 01-01-2020, 03:47 AM   #2 (permalink)
Registered Users
 
Posts: 2,048
 

Join Date: Feb 2013
Location: Perth, Western Australia (the most isolated capital city on earth!)
Default DIsbaling Trims under v2.3

Hi Brian,
I checked my trims and they weren't disabled. Under Companion 2.3 it's done this way yes?



Paolo
Attached Thumbnails
Click image for larger version

Name:	Trim Disabled.png
Views:	93
Size:	4.0 KB
ID:	833355  
__________________
(building) XLPower 700, ALIGN 550L (beater), Prτtos MAX V2 Leggero 700 & Evoluzione 800 (RCHN #803 - joined just before they shut up shop!)
PaoloFCantoni is offline        Reply With Quote Quick reply to this message
Old 01-01-2020, 09:43 AM   #3 (permalink)
Registered Users
 
Posts: 6,218
Thread Starter Thread Starter
 

Join Date: Sep 2018
Location: Snohomish, WA
Default

I wouldn’t know, I barely use Companion at all, sorry. But that does look reasonable.
xoexoe is online now        Reply With Quote Quick reply to this message
Old 01-01-2020, 05:02 PM   #4 (permalink)
Registered Users
 
Posts: 6,218
Thread Starter Thread Starter
 

Join Date: Sep 2018
Location: Snohomish, WA
Default

Quote:
Originally Posted by PaoloFCantoni View Post
Hi Brian,
I checked my trims and they weren't disabled. Under Companion 2.3 it's done this way yes?

Paolo
I just opened my own Companion software. Yes, that is the correct place, Paolo. Just make sure that on the same panel you're looking at, all your other Flight Mode tabs (FM1, FM2, etc.) say "Use trim from Flight mode 0" so that you only have to disable once.

--Brian
PaoloFCantoni likes this.
__________________
Brian — Oxy 2 & 4 Max — S2 & CP X — 150X — iK2N/Brain2/Spirit — Horus X10S — OpenTX — AccuRC —
xoexoe is online now        Reply With Quote Quick reply to this message
Reply




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1