How to set up a complex mixer or complex template

More
08 Jun 2014 11:22 #23965 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
As soon as you were successful with your experiments you may also try different curves.

Rather than adding an OFFSET to a "1 to 1" curve, try a "3 point" curve.
Set its scale to 100%.
Then set the points as follows:

Point 1: 0 This will always give you a minimum of 50% throttle when toggling to "Rudder D/R 1"
Point 2: 50%
Point 3: 100%

Or any other values you like...

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

More
08 Jun 2014 13:44 #23967 by seaholic
Well I definitely did not calibrate the potentiometers.
I did change the second have of the mixer to 2 and page 2.
The scale values I was just stabbing in he dark just to see what shows up on Box 1.
Ok let me try the calibration first, and go over settings again.

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

More
08 Jun 2014 15:09 #23968 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Okay, playing around with different values and the boxes is always a good idea :dry:

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

More
08 Jun 2014 15:21 #23969 by seaholic
Rats
I cant find the stick mode calibration to calibrate the potentiometers? I know I saw them some were? Must be my short turm memory.

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

More
08 Jun 2014 16:14 #23970 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Go to "Transmitter menu", then "Transmitter config" and then select "Sticks, Calibrate".

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

More
08 Jun 2014 16:31 #23971 by seaholic
Matthias,
Here is the 2 models
Model 28 KK2 (from Tom Z)and a similar model is what I have been flying with for the past year. (This is or should be the basic quad set up)

Model 21 is the one I am experimenting with. I think I am close. the DR1 switch is now cutting off the throttle, hopefully wants I get the calibration completed it should work.
Attachments:

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

More
08 Jun 2014 16:51 #23972 by seaholic
Calibration was embarrassingly easy'
looks like everything works now. I can`t believe I could not find the stick calibration menu, if it was a snake I would be bitten.
Thanks Professor

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

More
08 Jun 2014 17:22 #23973 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Great everything is working now!

Well, sometimes the easiest part can be the hardest :angry:

Thanks for the model files.
I will have a look at them later.

Have fun now with your "new" multicopter!

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

More
09 Jul 2014 22:45 #24512 by unclecrash
Replied by unclecrash on topic How to set up a complex mixer or complex template
Wow glad I finally found this thread. I was about to sell my 12s off until Mitchie explained how to do a elev slave to elev and I finally got it going using servo;s hooked to my reciever. So Im going to keep reading. Then hopefully my Nephew can help me make a new library to install the templates thaat herskerhaus has made. Thanks for the great work guys.

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

More
11 Aug 2014 10:35 #25138 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
To all my German readers: I published a very detailed article on Deviation here: walkera-fans.de/deviation-die-bessere-fi...st-alle-devo-sender/
Please also read the comments...

Für meine deutschen Leser: hier gibt es einen sehr umfangreichen Artikel von mir zu Deviation: walkera-fans.de/deviation-die-bessere-fi...st-alle-devo-sender/
Bitte auch die Informationen in den Kommentaren beachten...

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

More
11 Nov 2014 17:25 #26354 by override
I have bookmarked this thread (and saved the PDF attached) it is a great lot of information! Thank you both Matthias and Robert for the back and forth Q & A, this thread should be a sticky!

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

More
13 Nov 2014 07:38 #26382 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Many thanks for your kind words, override!

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

More
29 Nov 2014 08:37 #26643 by override
Your welcome...Although now that I understand basic mixing and have successfully made a few things work, lately I have been trying to figure out "point" curves. Ok so this is what I am trying to accomplish, I want to make a switch cycle a stick sequence for Example: stick input is left, right, left to engage motors. I want to assign say "RUDDR1" so that it will cycle the rudder left, right, left to engage my motors at the flick of that switch.

I figured getting this setup would be easy using a "3 point" and/or a "5 point" curve. So for example in complex mixer for rudder I will add a page, page 1 will contain source "RUD" "1-TO-1" Scale 100%. Page 2 will contain Switch "RUDDR1" Src "RUD" and either point curve 100,0,-100 or 100,0,-100,0,100 at Scale 100 and then MUX I have tried on add, replace, max. I also tried a "9 Point" curve and MUX "add" for a 0,100,100,100,0,-100,-100,-100,0 and nothing will cycle the Rudder in the left, right, left sequence.

I downloaded Fabiens Blade 350qx .ini and he set it up to accomplish this. He also set it up in a VERY confusing and Complicated way. He used Virtual Channels to achieve all of this and well I still have not even figured out the purpose of virtual channels or even how and when to use them. Also don't get me wrong, Fabien has a vast knowledge of setups on these TX's but it also seems as thought his .ini file has a lot of slop in it that is not needed. For example I notice that when switching from "RUDDR1" after you engage motors back to "RUDDR0" that he has added a virtual channel to give a single input of 100% throttle and then back to -100% throttle in a quick sec. I think this was part of his slop and was not actually intended so it's hard for me to follow his .ini to learn because I don't want to teach myself the incorrect way.

Alright now to complicate and confuse things even more.....This can be addressed later as this is even more complex and I feel I need to get the simple part down first. Ok so one day I was flying a quad on a simulator at the LHS (Local Hobby Shop) and noticed the way it's setup is -100% throttle disengages the motors and as soon as you give it -99% throttle they engage again and obviously this goes the same for in the air. Now realistically I am sure this can be setup using a bunch of complicated stuff I will never understand but It got me to thinking. Some day I would like to figure out how to setup things like this. For aerial stunts I bet it would be pretty sweet to be able to allow your quad to free fall and then reengage motors with just throttle input and take off into a stunt.

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

More
29 Nov 2014 12:10 #26646 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Hi override,
Many thanks for your detailed post and questions.
Wow! What a complicated - and sophisticated - approach to arm the motor.
To be honest, I never really even thought about such a possibility. I am pretty sure I would never be able to arm the motor this way because I´d move the stick either too often or not often enough. :cheer: LOL.

Okay...
Even though I like things simple, did you read the "sticky throttle" thread?
www.deviationtx.com/forum/how-to/1953-ho...imitstart=0&start=20
This, in my view, is a very useful and elegant safety feature. It would also give you some valuable insight into the use of virtual channels.
Virtual channels are, as their name tells you, channels not actually present on the receiver. Therefore, they are not able to control anything DIRECTLY.
They can, however, be used to accomplish mixing tasks themselves and thus produce an OUTPUT VALUE which can then be used in a real channel to be further mixed (i. e., manipulated) and thus alter the output value of the real - receiver - channel.
To accomplish the mixing task you desire, curves alone cannot help you.
Why not?
A curve always alters the output value in a DIRECTLY proportional way according to stick movement. If you move the stick by only 1 mm, the output value will change ACCORDING to stick position AND the values set in that curve. However, in order to achieve your motor arming setup you will need a "classical" binary, i. e., one - zero, SWITCH output: stick moved fully left once will result in an e.g. 100% output and REMAIN there irrespective of any consecutive stick movement. This is achieved by the "sticky throttle" setup.
Please look at this thread and mainly its steps 1 and 2 and "meditate about them.
Or, simpler :), rebuild it on your Tx.
This setup "reflects back" the virtual channel to itself and sets it to a 100% value NOT CHANGING, irrespective of any stick movement, UNLESS stick is moved FULLY DOWN. This is achieved by different OFFSETS on page 1 and 2 of this mixer.
To understand how this works we need to have a look at the definition given in the Devo Manual: "Min/Max: Output is -100 if input is less than the specified value and 100 otherwise."
Now WHAT is the "specified value"???
Well, it´s simply the value set at SCALE. This is set to 100 at page 1 of the mixer. Therefore, ANY VALUE SMALLER than 100 will immediately flip this Min/Max value to -100 rather than +100 and keep it at -100. Under NORMAL CIRCUMSTANCES :ohmy:
Okay... The switch on page THREE REPLACES any value by 100 when set to its "throttle cut" position which will flip the Min/Max value of page 1 to +100.
Page TWO defines a linear 1 to 1 throttle curve with a MAXIMUM VALUE of 99! due to the OFFSET of -1.
Let us now look at how these 3 pages interact:
You set your safety SWITCH (which is a PHYSICAL switch) to the safety position, defining and REPLACING any other value to +100, switching the Min/Max output to +100 as well. And now comes the HUGE and ingenious TRICK:
Because page 1 uses ITS OWN VIRTUAL CHANNEL AS INPUT SOURCE this "reflects back" any value of Virtual Channel 1 to itself UNTIL the MINIMUM VALUE OF Virtual Channel 1 (Zero) is undercut which is ONLY the case when - after toggling the safety switch to its ZERO position - the throttle stick is moved FULLY DOWN because ONLY THEN will the minimum value of page 1 (zero) be UNDERCUT by the OFFSET of page 2 which is -1 rather than zero. In this case, the Min/Max value of page 1 will flip to -100 and remain there "forever" because moving the trottle stick - due to its OFFSET of -1 (or any smaller value: -2 etc you like) - will NEVER again reach the "specified value" of 100 of the Min/Max settings at page 1 again.
Even moving the trottle stick fully UP will only result in an output value of 99 (100 + offset of -1) which is NOT SUFFICIENT to trigger switching the Min/Max value back to +100 again.
If this sounds complicated to you then it´s now getting even more complicated :P

With this setup of virtual channel mixing you MIGHT find a way to trigger any Min/Max value of a virtual channel to +100 once you move the rudder stick to FULL LEFT. Reflecting back the virtual channel to itself will have it keep this +100 value even if you move the rudder stick back to neutral again.
You will then have to find a way to create another +100 Min/Max value upon moving the rudder stick to full right and a third one when moving back to full left again. You need to create three virtual SWITCHES (which may be set up any way you may think of) which will ONLY trigger the motor when ALL THREE are set to a certain position. And these - VIRTUAL - switches must be created by STICK MOVEMENT alone.
Adding - or "somehow" mixing - all these values must then trigger arming/engaging the motor.

This alone is complicated enough. But it gets even more complicated: would you allow arming the motor also when e. g. moving the rudder stick right, left, left?
If your answer is "Yes" you might solve this task like it obviously already has been solved by someone else.
If, however, your answer is "No" you would have to find a way to DELETE ANYTHING by one wrong rudder stick movement ALONE.

Although performing such a setup somehow B) sounds challenging to me, I always prefer simpler ways.
Did you see my "two safety switches" setup on page 1 of this thread? It is ridiculously simple when compared to your desired approach.
And to me it is completely sufficient. I use it for a helicopter which, in my view, is fare more dangerous - due to its much larger rotor diameter as compared to a copter of similar size - than any copter might be.
You have to toggle two PHYSICAL switches to arm the motor and EACH of them ALONE will immediately stop the motor again when toggled back to their safety position.

Now, regarding the simpler part two of your question...
I quote what I do not understand here: "noticed the way it's setup is -100% throttle disengages the motors and as soon as you give it -99% throttle they engage again and obviously this goes the same for in the air."
What do you mean with "the same for in the air"?
This to me sounds pretty much like the most basic throttle arming/disarming setup imaginable: a "1 to 1" curve interacting with the ESC. The ESC detects a certain OUTPUT value coming from the receiver and will arm the motor (-99%). Below this value (-100%) it will disarm and shut down the motor. This - due to the most simple "1 to 1" curve - will ALWAYS work, regardless of the copter being "on ground" or in the air...

Therefore, my advice is: combine, if you like, my "two safety switches" setup with the "sticky throttle" setup described elsewhere here in this forum and you are on the safest side you may imagine. PLUS you will be able to shut down the motor by simply moving throttle to its lowest position...
Safe AND simple and convenient.

However, if you are talking about flipping the copter to its back you will have to find a way to INVERT motor spinning which mostly - at least by helicopter pilots like me and all others I know of :dry: - is achieved by COMPLETELY UNCOUPLING motor direction (copter)/rotor blade pitch angle (helicopter) from controlling motor rpm via "throttle" stick movement. All "expert" heli pilots use a GOVERNOR to control motor rpm AUTONOMOUSLY - basically we heli pilots like constant motor rpms - and use the "throttle stick" ONLY to control pitch angle.
Of course a copter needs to REVERT motor spinning in order to enable backward flying and, to be honest, I do not know how this is technically achieved.
What I would like to stress, though, is the following:
IF you want to control motor spinning via the throttle stick you CANNOT shut down the motor via throttle stick anymore because throttle stick minimum position in THIS CASE means motor spinning reversely at full power whereas maximum throttle stick position means motor spinning normally at full speed...
You will either have to use different flight modes where Mode 1 does NOT allow flipping but DOES allow shutting down the motor via throttle stick minimum (and Mode 2 allows ONLY FLIPPING but NOT disengaging the motor via throttle stick) OR you use a completely different setup where the motor is ONLY disengaged via physical switches...
Performing stunts in a way you suggest would require the motor to be shut down at MID STICK position.
And this, again, can only be achieved by an appropriate interaction between throttle output and ESC.
The ESC must recognize throttle stick output and decide whether to stop the motor, rotate it normally, or in a reverse manner. Of course such ESCs do exist on the market.
This has NOTHING to do with "complicated" Deviation setups ;-)
On a heli, mid stick results in zero pitch angle which of course lets the heli "fall freely" like you suggest...

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

More
29 Nov 2014 15:20 #26650 by override
Matthias,

Ooooooo Myyyyy....You just raised the technicality bar x10 for me...lol Thank you very much for such a long thought out reply man. I can't imagine how long that took you to write, but for sure I will gain some insight from it.

Ok so I thought about it last night after I wrote my post that I should of explained also what I am flying and how the throttle and motor engage is setup on that machine. I am going to have to check out what you linked and read through your post a few times to try and grasp everything. Hopefully between both threads I can start to learn and understand the virtual channels and how min/max coupled with virtual channels will create polar opposites.

So what I have is a Blade 350QX which is a Quad copter. The way the flightboard is designed when you turn the Quad on stick inputs must be at neutral values for it to sound the "ready to arm" beeps/lights. At that point you must input rudder left,right,left and the motors will engage and spin up to an idle speed. They do not spin fast enough to lift the quad off the ground. In order to make the motors disengage you have to trim down beyond -100% throttle to about -115%. I have setup a switch in the complex mixer that will take the throttle down to -125% and immediately disengage the motors or I can still use trim if I want.

Now the way Quads throttle input is designed (as this quad is not designed to fly inverted) you set your throttle up for High-Rate "1-to-1" Scale 100 so that you have a range of -100% through to +100% where the middle is 0%. Now depending on what fmode your in on the quad you either have (safe mode) altitude control, kinda similar to your helis pitch control, or (stability mode) throttle control. In altitude control the quad is set to have a governed altitude of like 350ft. SO if I put the throttle stick at 0% its going to hover at about 175ft. In throttle control 0% throttle would not determine how high my quad is flying persay but how much thrust I am giving it to keep it in the air. So if I am just hovering up and down then 0% throttle input will probably keep me hovering around 75ft in the air or so but if I input ail or elev then I will need to increase throttle beyond 0% now going toward +100% to maintain or increase my altitude. In agility mode (nothing is limited) you can flip the quad or roll the quad in full circles but if you try to invert fly you have no variable pitch and the quad will quickly land into a billion pieces (trust me I've done it, lol)

To answer your question about "the same in the air" what I meant to say by that is that the throttle engaging and disengaging the motors is the way the quad was setup so you toggled no switches or safety values. Just from the time the quad is turned on to the time it is turned off if you give it any kind of throttle input past -100% the motors spin up and it will fly and then once you go back to -100% the motors will stop spinning but will spin up again with just a 1% input of the throttle.

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

More
29 Nov 2014 21:10 - 29 Nov 2014 21:14 #26652 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Override,

Okay, I now see I misunderstood your previous post...
I thought you wanted to set up Deviation in a way that would only engage your motor when moving the rudder stick left-right-left.
But now I understand that you want to program a switch to mimic that movement.
(I now even saw you actually wrote that before :ohmy: )

Okay....
Here´s a very simple approach. I CANNOT guarantee, though, that it works. The critical point is the difference in "delays" between three virtual mixers.

Anyway, even if you do not get it to work, it might help you to understand what Virtual Channels are and how they work.

I suggests you use an EMPTY model.ini file to test this.
I might add the model.ini file but I think it is easier to understand when you see the values set on different pages in different mixers.

Let us first turn to the Virtual Channels. The switch I set is "Gear". You may of course use any other switch you like. Gear 1 mimics "neutral stick", i. e., 0%, and Gear 0 starts the sequence.

Virtual channel 1:
Page 1:
Switch: Gear1
Mux: Replace
Src: None (This will be set once you set the Curve to "Fixed" in the next step)
Curve: Fixed
Scale: 0
Offset: 0

Page 2:
Switch: Gear0
Mux: Replace
Src: None
Curve: Fixed
Scale: 105. Note: THIS WOULD BE THE "STICK LEFT" VALUE. Please adjust it according to your needs. 100 should be sufficient as well. HOWEVER: you need to PLAY with these values.
Offset: 0

Virtual Channel 2:
Page 1:
Switch: Gear1
Mux: Replace
Src: None
Curve: Fixed
Scale: 0
Offset: 0

Page 2:
Switch: Gear0
Mux: Replace
Src: None
Curve: Fixed
Scale: -105.
Offset: -100

Page 3:
Switch: None
Mux: Delay
Src: None
Curve: Fixed
Scale: 50. NOTE: SCALE defines delay. A scale of 100 results in a delay of 5 seconds. You need to play around with these delay values. This delay applies to the COMPLETE mixer.
Offset: 0

Virtual Channel 3:
Page 1:
Switch: Gear1
Mux: Replace
Src: None
Curve: Fixed
Scale: 0
Offset: 0

Page 2:
Switch: Gear0
Mux: Replace
Src: None
Curve: Fixed
Scale: 105
Offset: 100

Page 3:
Switch: None
Mux: Delay
Src: None
Curve: Fixed
Scale: 100
Offset: 100

Perhaps you understand what these Virtual channels do: each of them sets a different FIXED value when toggling to Gear0.
Virtual Channel 1 sets it without any delay. Virt 2 and 3 use increasing delays to apply their values.

Now let us turn to the Rudder Channel.

Page 1:
Switch: Gear1
Mux: Replace
Source: None
Curve: Fixed
Scale: 0
Offset: 0

Page 2:
Switch: Gear0
Mux: Replace
Source: Virt1
Curve: 1-to-1
Scale: 100
Offset: 0

Page 3:
Switch: Gear0
Mux: Add
Source: Virt2
Curve: 1-to-1
Scale: 100
Offset: 0

Page 4:
Switch: Gear0
Mux: Add
Source: Virt3
Curve: 1-to-1
Scale: 100
Offset: 0

Please note that the SOURCE varies from Virt1 to Virt3 in pages 2 to 4. The 1-to-1 curves and Scales 100 adopt the values from the respective virtual channels completely unaffected, i. e., 1 to 1.

If you now toggle the "Gear" switch or any other switch you like (and defined), this triggers ALL THREE virtual channels at once. The different delays vary the speed at which the FIXED values defined in the virtual channels apply to the rudder channel.

Please make sure to monitor channel 4 on the main screen and then see "what happens" when you toggle the "Gear" switch (or your own specific switch).
Vary the delays in Virt2 and 3 and see how this affects the output shown on the monitor.

In the next step, if you are confident enough, try it with your Blade 350QX :unsure:

IMPORTANT NOTE: Please make ABSOLUTELY SURE that the switch initializing your motor engaging sequence MUST BE SET TO THE SAFE VALUE before your Tx starts up.

Otherwise your motor might accidentally start spinning very shortly upon initializing your Tx...

Okay...

Unfortunately, I still do not understand what you called the "even more complex part" of your question. As far as I could understand your motor will stop spinning as soon as you move your throttle stick fully down. And this is what you wanted, isn´t it?
Please advise B)
Perhaps it would be best if you just described what you would like to achieve and how (switches, throttle stick movement, and so on).

Please also try to understand that a SIMULATOR will not simulate every single aspect of the "real thing". They may just have programmed it the way you saw it there because it was EASIER for them. And engaging the motor in the way the freaks (I intentionally call them this) at E-Flite did is of course not necessary for a simulation...
Last edit: 29 Nov 2014 21:14 by mattygerman.

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

More
30 Nov 2014 07:54 - 30 Nov 2014 08:17 #26675 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
UPDATE: IF the stick sequence necessary to initialize ANY ESC requires only TWO stick movements rather than three (left-right-left), my very easy approach described in my previous post will DEFINITELY work.
Just skip Virt3 and page 4 of the rudder channel (or any other channel necessary).
Then set the DELAY of Virt2 to any value > 0 but < 100 (100 will also work but equals 5 seconds :P ). I suggest starting with 10.
Play around with the delay (and, if necessary, the fixed value of Virt1) until it works.
Monitor the channel of interest and see how this works WITHOUT powering on your aircraft first.

NOTE: Page 3 of the rudder channel ADDS the fixed value of page 2 of Virt2.
To make this approach work we need to simulate a stick movement of e. g. "100" and then "-100" (or vice versa, depending on your configuration) by toggling one switch. Therefore, the fixed value of page 2 of Virt2 must always be AT LEAST -200 (fixed -100 and offset -100) in order to compensate the previously +100 when ADDED to the formerly +100 value in the rudder channel.
If you INCREASE the fixed value of page 2 of Virt1 beyond 100 (i .e., > 100) you need to "increase" the NEGATIVE value of page 2 of Virt2 accordingly.

A NOTE ON SAFETY:
Setting up a switch OVERRIDING an otherwise necessary SAFETY STICK movement can be EXTREMELY DANGEROUS.
Imagine you power on your receiver first and THEN your transmitter (something you should never do :evil: ) and forget toggling the "sequence initializing switch" to its SAFETY position. This will result in an IMMEDIATE start of the motors!!!
I thus highly recommend to FORCE YOU to set this dangerous switch to its safety position FIRST BEFORE your Tx initializes.
This is done in the following way:
Edit your model.ini file.
Then search "Auto=min" OR if you already deleted this entry, search "[safety]"
Then enter one of the following commands, depending on the SWITCH you set to initialize the sequence:
RUD DR0=max
ELE DR0=max
AIL DR1=max
GEAR1=max
FMODE0=max

You may need to vary "max" to "min" and/or e. g. DR0 to DR1. Other switches are also possible. Just try finding their appropriate designations.
TEST IT WITH YOUR TX ONLY first.
If your settings are right, you will get a warning to set the switch to the position defined as SAFETY position. Deviation will not initialize anything if the switches aren´t set correctly...
This is what we want B)

Have fun!
Last edit: 30 Nov 2014 08:17 by mattygerman.

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

More
04 Dec 2014 00:13 #26752 by override
It was my bad in the initial posts for some reason thinking it was left, right, left to engage the motors...Its actually just left, right and thus I am an idiot lol

Anyways thank you so much Mattygermany for explaining all of this to me! I have not gotten a chance to actually try it on the Transmitter but when the time comes I will get it out and go through and set everything up! I will leave feedback on what I find worked the best from your approach.

Thanks again very much man, your too awesome!

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

More
21 Dec 2014 17:06 - 21 Dec 2014 18:17 #27121 by ThomasC
Hello Folks,

I had to dive into the DeviationTX world because I recommended a Devo10 to a friend. Currently this great transmitter is in my hands, and I had the idea to fly a Nano QX with it and switch flight mode blue/red via FMODE switch:
FMODE0 is blue mode, 125% D/R -20% EXPO (just for an easy start, and also used as "recover" switchposition)
FMODE1 is red mode, 60% D/R 0% EXPO (for inside)
FMODE2 is red mode, 100% D/R 20% EXPO (for fast outside flight including flips)

Switching between red and blue mode on this NanoQuad is done by toggling Channel 6 from negative to positive and back. So I had to program a kind of channel sequencer:
start point -30% (i chose this value for no special reason, you can also use -100%)
mid poing +30%
end poing -30%

To accomplish this, I also searched the DeviationTX forum and found this thread. I played around with the idea and finally dropped it for a much simpler solution, which could also help in how to start and stop the 350QX using a simple switch.

First my Idea: I need a delayed curve, that transits between -100% and 100% with a programmable delay. Therefor I need a virtual channel with a complex mixer:
[virtchan1]
name=Delay
template=complex
[mixer]
src=!FMODE0
dest=Virt1
usetrim=0
[mixer]
src=FMODE0 <- doesn't apply when curvetype is set to fixed
dest=Virt1
scalar=2 <- these values control ...
usetrim=0 <- ...the amount of delay
muxtype=delay
curvetype=fixed

As you can see, I use the state !FMODE0 to ensure that the mode switching is triggered only by the FMODE0 switch position. I set "scalar" to 2 to get a delay of 0.1 seconds, means the switching is done quite fast. This can be slowed down to about 10 seconds, which would suffice to e.g. control a retractable landing gear or sth. like that.

As a second step, I applied this curve to channel 6. Because channel 6 on this heli is not used otherwise, I can do it simple:
[channel6]
template=simple
[mixer]
src=Virt1
dest=Ch6
curvetype=3point
points=-30,30,-30

And that's all. As you can see, I set a 3point curve and added all values needed in the sequence as mixer values. So the curve represents my channel sequence which replaces the linear "sweep" from Virt1. 3-point is all I need, but with 12-point quite complex sequences can be programmed.

As I understood, the 350QX starts the motor with the following sequence on channel 4:
rudder0, rudder left, rudder right, rudder 0. So four points in your sequence, you will need at least a 5point curve:
curvetype=5point
points=0,-100,100,0,0
or
curvetype=5point
points=0,100,-100,0,0
(whichever is the right sequence -> test it)
The last sequence position is simply repeated for any unneccessary points (here only point 5 is not needed)

As I also understood, motor is stopped by toggling throttle (channel 1) to below -125% and back to -100. This needs only a 3point curve:
curvetype=3point
points=-100,-125,-100
Truly needed is only -125%,-100% - but a symmetrical sequence means it works regardless of the direction of the channel sweep, so this is more foolproof for folks like me ;)

As "Source" for Virt1 you would choose the switch you're about to use to start/stop your motor. Experiment with the "inverted" attribute for channel source - the sequence runs backwards if defined wrong, so motor start would not function as the motor start sequence is not a symmetrical one.

Then set up your Rudder channel to ADD your 5point curve by source of Virt1, set switch to the switch position which should start your motor. ADD must be done because the channel stays active while flight (because of this the last curve point must be zero).

Then set up your Throttle channel to REPLACE channel with your 3point curve by source of Virt1, set switch to the switch position that STOPS your motors. REPLACE also disables your throttle stick while switch is in "motor stop" position.

This switch must be the same as the "source" for Virt1, everything else is meaningless. In order to assign a different switch to the process, it must be changed in Virt1 and in all channel mixers that refer to Virt1. This seems to be vital for the 350QX setup. In the NanoQX setup there are no switches defined (and not needed) because there's nothing that depends on the switching direction as in the 350QX.

Hope this clears some questions. DeviationTX rulez :)

Regards from germany

ThomasC

---
Last edit: 21 Dec 2014 18:17 by ThomasC. Reason: refined a few lines a bit more ;)

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

More
22 Dec 2014 06:57 #27138 by mattygerman
Replied by mattygerman on topic How to set up a complex mixer or complex template
Hi ThomasC,

Many thanks for this interesting approach!
To be honest, I never thought a switch would "obey", or follow, a curve as well. But, on the other hand, it seems only logical that it does since a switch acts like a stick that is moved from -100% to +100% (or vice versa :silly: ) very fast.
As far as I can see from your post you do not use FMOD1 and FMOD2 anymore since you set up the mixer for channel 6 - which is the channel performing the real control - with the "Simple" template.
Is that correct?
Then, if it is correct, why did you set up the Virtual Channel?
A virtual channel "only makes sense" (you may of course use any virtual channel for everything you like ;)) if used in a real channel mixer set up with the "Complex" template under circumstances where e. g. REPLACING one mixer with any other mixer ("Mux" = "Replace") would otherwise override and thus "destroy" complex mixing functions requiring the setup of different consecutive mixers, or, mixer pages. In such a case using virtual channels is "mandatory".

And, did you also try your setup without ANY delay?

The manual says the following about the "delay" function: "Delay: Delay the output of this mixer when used with a fixed curve. Scale of 100 represents 5 seconds delay. Can be varied by using scale or offset."
Since MIXER in your setting contains any multi-point curve in only ONE mixer I would assume that output of the COMPLETE mixer is delayed, i. e. output is delayed AFTER the curve has been fully processed rather than delaying output after processing individual values of the curve.
If this were true (and I guess it is :P ), you would not need any delay at all.
On the other hand, IF the control board of the 350 QX would "expect" some delay after EVERY SINGLE INPUT, i. e., value of the "curve" (which might be the case since it is impossible for humans to move a stick - rudder stick - from -100% to+ 100% as fast as any switch) your approach, unfortunately, wouldn´t work...

Perhaps "override" might answer this question...

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

Time to create page: 0.061 seconds
Powered by Kunena Forum