How to create a "sticky" throttle hold.

More
02 Jul 2013 23:27 - 23 Jul 2014 20:23 #11791 by mwm
A sticky throttle hold is a safety feature. It keeps the throttle output at minimum until you've turned off throttle hold and and set the throttle all the way down. You should retain the habit of setting the throttle all the way down before toggling throttle hold, as things will still work as you expect, and you won't develop bad habits for controllers without a sticky throttle hold. However, should you forget to do that, or should someone toggle throttle hold accidentally, your motor won't start spinning possibly sending your craft flying uncontrolled.

Model setup

This has been updated to use Fabian's nifty single virtual channel version with domcars0 fix for 3d flight modes.

Doing this currently requires the advanced mixer settings. Plane or heli doesn't matter, but you do need the advanced mixer setting. The source setting in mixer 2 is the throttle output channel (ch3 here).

Mixer

Virtual channel (Virt1 for me) = Complex Mix - 3 pages
  1. Page 1:
    1. Switch = None
    2. Src = this virtual channel (Virt1 for me)
    3. Curve = Min/Max
    4. Scale = 100
    5. Offset = 0
    6. Mux = replace

  2. Page 2:
    1. Switch = None
    2. Src = CH3
    3. Curve = 1-to-1
    4. Scale = 100
    5. Offset = -1
    6. Mux = add

  3. Page 3:
    1. Switch = the switch who enable the throttle cut (RUD DR0 for me)
    2. Src = none
    3. Curve = Fixed
    4. Scale = 100
    5. Offset = 0
    6. Mux = replace

Depending on your calibration, you may need to tweak the offset a litle. To check this, use your virtual channel as the source for an output channel with a 1-1 curve, then use a channel monitor to verify that it's less than or equal to zero unless the throttle stick is all the way down, in which case it's one.


Throttle output mix

You now need to apply the new sticky throttle hold switch to your throttle. If you're not sure how to configure a throttle hold, see +sbstnp's writeup . Where he has selected !HOLD0 for the safety switch, you should select your virtual channel - so for me, Virt1. Note that his selection starts with a !, whereas this one does not!

Testing

Without binding an aircraft to the controller, go to the channel output monitor, and find your throttle output. Set the throttle stick to somewhere in the middle, and then throw your throttle hold switch. The throttle output should go to -110. Now throw the throttle hold switch the other way, and verify that the throttle output stays at -110. Finally, pull the throttle stick all the way down, after which throttle output should start tracking normally.

The attached th-example.ini file implements this as described. It also sets Toggle 1 to display a Th emblem whenever the throttle is being held, and finally adds a countdown timer that pauses when there is no throttle output.

Fabian's example config can be found here .

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.
Last edit: 23 Jul 2014 20:23 by mwm. Reason: Note that source in mixer two is throttle output, not input.

Please Log in or Create an account to join the conversation.

More
03 Jul 2013 05:24 #11800 by richardclli
Replied by richardclli on topic How to create a "sticky" throttle hold.
It works, thanks. Great!! From your inspiration, I think the virtual channels are very powerful that can be used to setup as a register that stores a state.

Please Log in or Create an account to join the conversation.

More
03 Jul 2013 21:20 #11823 by myxiplx
Replied by myxiplx on topic How to create a "sticky" throttle hold.
Wow, and to think I was impressed with myself just for working out how to use complex mixers and an aux knob to create a tail mix for gyro practice.

Amazing work, still trying to get my head around the logic!

Please Log in or Create an account to join the conversation.

More
03 Jul 2013 21:34 #11824 by victzh
Replied by victzh on topic How to create a "sticky" throttle hold.
Could you attach the example model file for those who better edit files than operates settings?

This is a very nice gem, I'm thinking of making a collection of such tricks. Another one is automatic timer start-stop when throttle is active.

Please Log in or Create an account to join the conversation.

More
04 Jul 2013 03:17 #11838 by mwm
Replied by mwm on topic How to create a "sticky" throttle hold.

victzh wrote: Could you attach the example model file for those who better edit files than operates settings?


Never occurred to me that anyone might want such. I've added it to the first post.

victzh wrote: This is a very nice gem, I'm thinking of making a collection of such tricks. Another one is automatic timer start-stop when throttle is active.


That's in the example as well - for timer 1.

This also sets up Toggle 1 on the main screen to display a Th symbol whenever the throttle is being held.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
04 Jul 2013 11:17 #11864 by richardclli
Replied by richardclli on topic How to create a "sticky" throttle hold.
Add some screen shots about the settings.

Please Log in or Create an account to join the conversation.

More
04 Jul 2013 22:25 #11915 by mwm
Replied by mwm on topic How to create a "sticky" throttle hold.

richardclli wrote: Add some screen shots about the settings.


Thanks richard. I've got a 7E and a 10, and figured that text would be better than greyscale screenshots of those. Color works nicely for illustrations, but I'm not sold on color touchscreens for a Tx yet.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
06 Jul 2013 18:41 - 06 Jul 2013 18:42 #12021 by mwm
If your model has inverted flight modes, the sticky throttle hold here doesn't have quite the right effect if you're in one of those modes when you disable it, as the throttle stick being full down means the throttle is set to 100. Not good.

The fix is to change the first virtual mix. Set up and test the initial post. Then, in your first virtual mix (Virt1 in the example):

Change the type from simple to complex.
Set it to two mixers.
The scale will have been reset to 0. Change it back to -49.

Set up the second page:
Curve type is fixed.
Scale is -100.
Switch is the same one you use for inverted flight modes.

If you use FMODE0 for normal and all other flight modes for inverted, set the switch to !FMODE0. If you use FMODE0 and FMODE1 for normal flight and FMODE2 for inverted, set the switch to FMODE2.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.
Last edit: 06 Jul 2013 18:42 by mwm. Reason: Get the right flight modes!

Please Log in or Create an account to join the conversation.

More
06 Jul 2013 23:02 - 06 Jul 2013 23:30 #12022 by domcars0
Replied by domcars0 on topic How to create a "sticky" throttle hold.
I think that if you use Inverted Flight mode it's enough to replace THR by CH3 (or CH1 depending on which channel is used for the throttle) as SRC in the first (here Virt1) mixer? No ?
Anyway, thanks for this great idea mwm.

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 06 Jul 2013 23:30 by domcars0.

Please Log in or Create an account to join the conversation.

More
12 Jul 2013 15:24 #12218 by fabien
Replied by fabien on topic How to create a "sticky" throttle hold.
I managed to do the same as you but with only one virtual channel, so I decide to post my version here rather than opening a new topic.

Virtual channel (Virt1 for me) = Complex Mix - 3 pages
  1. Page 1:
    • Switch = None
    • Src = this virtual channel (Virt1 for me)
    • Curve = Min/Max
    • Scale = 100
    • Offset = 0
    • Mux = replace
  2. Page 2:
    • Switch = None
    • Src = THR
    • Curve = 1-to-1
    • Scale = 100
    • Offset = -1
    • Mux = add
  3. Page 3:
    • Switch = the switch who enable the throttle cut (RUD DR0 for me)
    • Src = none
    • Curve = Fixed
    • Scale = 100
    • Offset = 0
    • Mux = replace
Now you can use the virtual channel as safety switch for THR. You can find an example of use in the model config I share for the Blade Nano QX here .
Attachments:

Please Log in or Create an account to join the conversation.

More
23 Jul 2013 20:34 - 23 Jul 2013 20:37 #12458 by domcars0
Replied by domcars0 on topic How to create a "sticky" throttle hold.
Very good Fabien! It's faster to program and it works (also with Ch3 or Ch1 as the page 2 SRC) ;) Thank's

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 23 Jul 2013 20:37 by domcars0.

Please Log in or Create an account to join the conversation.

More
31 Jul 2013 01:22 #12631 by gordonzo
Replied by gordonzo on topic How to create a "sticky" throttle hold.
@fabien:

That is a very slick little subroutine! Simple and effective.

I added it to the Hisky FBL 70 and 80 configurations on my Devo 10 and it works great! A few things to note for the more nooby-ish like myself:

1. On page 3 you can't change the SRC until you change CURVE to FIXED, and then it automatically sets SRC to NONE.
2. Don't forget to change your THR SAFETY to the VIRT channel you used or it will not work.

Again, superb! I will be adding this to all of my configs.

regards . . . g

Different fly for different guy.

Please Log in or Create an account to join the conversation.

More
01 Aug 2013 05:17 - 01 Aug 2013 05:23 #12680 by vlad_vy
Replied by vlad_vy on topic How to create a "sticky" throttle hold.
Possible there is the bug with renamed virtual channels. If I rename virtual channel (e.g. 'TH') next time I will try to use model (after Tx reboot), switch with renamed virtual channel is 'None' and 'sticky' throttle hold doesn't work. I seen that when I used 'sticky' throttle hold at 4 page of complex mixer for throttle channel.
Last edit: 01 Aug 2013 05:23 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
01 Aug 2013 23:01 #12709 by Drexz
Replied by Drexz on topic How to create a "sticky" throttle hold.
I can confirm that as well Vlad.
Renamed mine to Sticky_TH and it would work fine until i rebooted my Devo12s.

Please Log in or Create an account to join the conversation.

More
03 Aug 2013 03:10 #12736 by mwm
Replied by mwm on topic How to create a "sticky" throttle hold.

domcars0 wrote: I think that if you use Inverted Flight mode it's enough to replace THR by CH3 (or CH1 depending on which channel is used for the throttle) as SRC in the first (here Virt1) mixer? No ?


That should actually work both with and without inverted flight modes, as it's the actual output that you're worried about. It should also work with +Fabien's trick of adding the channel in.

I do worry that checking the output instead of the stick position might cause it to trigger when you don't want to if you're mixing the throttle position in strange ways on the way to being output, but I suspect that it's not worth worrying about until it happens.

Be interesting to see if these show up in templates in the next release.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 14:07 - 24 Aug 2013 14:08 #13212 by Rollmops67
Replied by Rollmops67 on topic How to create a "sticky" throttle hold.

domcars0 wrote: I think that if you use Inverted Flight mode it's enough to replace THR by CH3 (or CH1 depending on which channel is used for the throttle) as SRC in the first (here Virt1) mixer? No ?
Anyway, thanks for this great idea mwm.

I just set Fabien's settings in my heli.
In fact with THR as source, the Virtual Throttle Hold was reset when the throttle stick went to -100, even in FMOD1 and FMOD2, where at these positions of the stick the motor runs with negative pitch. :(

I tried domcars0's advice and replace THR as source with CH3 wich is indeed my throttle output.

And voilĂ , now to go out of the throttle hold I have to put the throttle stick at -100 AND having the FMOD switch in position 0.
That's the only point on my 3 throttle curves where my throttle output is at -100 (rotor stopped)
Fantastic ! :)

Thank you all !

Roland
Last edit: 24 Aug 2013 14:08 by Rollmops67.

Please Log in or Create an account to join the conversation.

More
17 Feb 2014 04:29 #20422 by esklarski
Replied by esklarski on topic How to create a "sticky" throttle hold.

fabien wrote: I managed to do the same as you but with only one virtual channel, so I decide to post my version here rather than opening a new topic.

Virtual channel (Virt1 for me) = Complex Mix - 3 pages

  1. Page 1:
    • Switch = None
    • Src = this virtual channel (Virt1 for me)
    • Curve = Min/Max
    • Scale = 100
    • Offset = 0
    • Mux = replace
  2. Page 2:
    • Switch = None
    • Src = THR
    • Curve = 1-to-1
    • Scale = 100
    • Offset = -1
    • Mux = add
  3. Page 3:
    • Switch = the switch who enable the throttle cut (RUD DR0 for me)
    • Src = none
    • Curve = Fixed
    • Scale = 100
    • Offset = 0
    • Mux = replace
Now you can use the virtual channel as safety switch for THR. You can find an example of use in the model config I share for the Blade Nano QX here .


I don't mean to drag up an old topic but I'm trying to learn from this example. I programed this in last night and think it is super slick.

Trouble is I don't understand how this works... at all. Anyone able to put this in english for a newbie?

Please Log in or Create an account to join the conversation.

More
17 Feb 2014 13:23 #20438 by mwm
Replied by mwm on topic How to create a "sticky" throttle hold.
Sure, why not.

Ok, Page 1 is the real magic. That's what makes it "sticky". It takes the previous output value of this virtual channel, and does a Min/Max process on it, meaning the output of this page is 100 if the input was non-negative, and -100 if it was negative.

Page two takes clever advantage of the fact that an analog value treated as a switch is ON if the value is non-negative, and OFF otherwise. It uses the Mux setting of add to add the value of the throttle setting (or output, as noted later) - a curve of 1-1 and scale of 100 is unmodified - with an offset of -1 to the output of page 1. So if Page 1 output -100, the value is at most -1, still off. If Page 1 output 100, then the value goes from -1 to 199. If the throttle is all the way down, you get -1 and the switch for this virtual channel is off. Any other throttle setting makes the output value 0 or greater, and the switch is on. This is how the virtual switch gets turned off.

Page 3 is a stock switch-controlled mixer. If the physical switch in the switch setting is on, the fixed output of 100 is used, turning on the switch for this virtual channel. If the physical switch is off, then the output of Page 2 is used unchanged. This is how the virtual switch gets turned on.

That explains how the switch gets it's value. You then use this virtual channel as the switch value for "Safety" in the throttle channel. That causes the software to set the throttle output to 0 if the switch is on.

If something isn't clear, feel free to ask.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
18 Feb 2014 05:21 #20509 by esklarski
Replied by esklarski on topic How to create a "sticky" throttle hold.
Awsome!

I puzzeled over your post today and I understand now. Thank you thank you.


For others out there learning, here is the short-hand I ended up with as I worked the math.


Page1 (on/off switch)
-Min/Max : 100(ON) if output >=0, or -100(OFF) if <0

Page2 (turn OFF)
-Mux: add THR to Virt1
offset= -1 (range: -101 to 99)
so:
- If Page1=100 then 100%THR [199] to -99%THR [0]-> ON
- If THR=-100 then Page1=-1 -> OFF

Page3 (switch-controlled turn ON)
- If switch=ON output=100 -> Page1 ON
- If switch=OFF, Virt1=Page1+Page2

Please Log in or Create an account to join the conversation.

More
11 Mar 2014 03:52 #21440 by hexfet
Replied by hexfet on topic How to create a "sticky" throttle hold.
Very nice! Thanks much for posting the mix and the explanations. Learning my first CP heli and this will definitely save me.

Instead of using CH3 as the src in page 2 I set the switch to FMODE0 (I read the thread bottom up). This also keeps the hold in effect until both throttle stick is at -100 and FMOD switch is at 0.

Please Log in or Create an account to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum