The mixing system, how to?

More
29 Nov 2012 01:32 - 29 Nov 2012 01:33 #3385 by MatCat
The mixing system, how to? was created by MatCat
Ok I am experimenting with the mixing system, but I have yet to figure out how to do something... basically I want to use switches to add to a channels value.

Currently I have Ch5 mixer set with 3 pages, on page 1 there is a min/max curve set to be low at -100 and high at 0 and to add to ch5, and is set to happen on fmode 0 with a src of Elev DR, now page 2 has min/max curve for fmode0 set to add 12 to the channel, and page 3 has rudd d/r on fmode1 set ot add 25 to the channel, yet no output occurs at all, what am I missing?
Last edit: 29 Nov 2012 01:33 by MatCat.

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

More
29 Nov 2012 02:02 #3387 by PhracturedBlue
Replied by PhracturedBlue on topic The mixing system, how to?
please provide an ini file.
your 1st mixer should almost always be a 'replace' type and NOT have a switch associated with it.
I can't duplicate your mixer definition from your description, so I'm not exactly sure how to help at this point.

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

More
29 Nov 2012 02:30 #3389 by MatCat
Replied by MatCat on topic The mixing system, how to?
I should probably explain myself a bit better on what I want to achieve...

Basically binary encoding over the channels... I.E. use Ch5 to 7 as multiplexer for 4 to 5 bit per channel, ultimately I am going to program the logic into the radio itself, but for experimenting I feel this can be done with just the switches.

Flight Mode Switch: (% given is total throw of the channel)
Pos 0: Set CH5/CH6 0%
Pos 1: Set CH5 50%
Pos 2: Set CH6 50%

Rudd D/R:
Add 25% to CH5

Elev D/R:
Add 12% to CH5

Gear D/R:
Add 6% to Ch5

Ail D/R:
Add 25% to Ch6

Mix 1: Add 12% to Ch6
Mix 2: Add 6% to Ch6

Doing so I can read the PWM output from RX on the plane, and determain the exact position of all 6 switches from 2 channels as outlined above.

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

More
29 Nov 2012 03:17 #3392 by PhracturedBlue
Replied by PhracturedBlue on topic The mixing system, how to?
There are many ways to do this, but here is one:
Ch5:
Mixer1:
Src RUD DR, switch=none, curve=zero/Max, scale=50, offset=-100, type=replace
Mixer2:
src ELE DR, switch=none, curve=zero_max, scale=12, type = add
Mixer3:
src (anything but none), switch = FMODE1, curve=fixed, scale=50, type=add

Ch6:
Mixer1:
Src=AIL DR, switch = none, curve=zero/max, scale=50, offset=-100, type=replace
Mixer2:
src=(anything), switch = FMODE2, curve=fixed, scale=50, type=add
Mixer3:
src=(anything), switch = mix1, curve = fixed, scale = 12, type = add
Mixer4:
src=(anything), switch = mix2, curve = fixed, scale = 6, type = add

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

More
29 Nov 2012 06:46 #3402 by MatCat
Replied by MatCat on topic The mixing system, how to?
I did the CH5 setup as you stated, however it results in CH5 staying 100% all the time

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

More
29 Nov 2012 06:54 #3403 by PhracturedBlue
Replied by PhracturedBlue on topic The mixing system, how to?
are you looking at the actual servo output or the channel test page?
always start with the channel test page, then verify with the servos.
I have tested the above, and it does work properly, so either I mistyped it, or you mis-entered it. I can't do it right now, but if you can't get it to work, I'll provide my model.ini file too.
or you can provide your model.ini file, and I can tell you what is wrong.

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

More
29 Nov 2012 08:02 #3405 by MatCat
Replied by MatCat on topic The mixing system, how to?
I am judging it by the little bar that shows next to the graph, I am assuming this is output as it seems to match what the channel output monitor says, I will get to the model.ini shortly... It's an interesting mixer system once I get the actual idea of how it's doing things hehe.

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

More
29 Nov 2012 19:56 #3435 by MatCat
Replied by MatCat on topic The mixing system, how to?
Ok I managed to get it working properly however it took numbers different then yours... I will post the config when I get home from work.

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

More
30 Nov 2012 08:10 #3446 by MatCat
Replied by MatCat on topic The mixing system, how to?
Ok I managed to tweak the settings to where 6 of my switches fully 5 bit encode onto channel 5, I programmed my AVR to break it down properly and I was able to use my switches to count in binary from 0 to 31 hehe. However I did encounter an odd bug, twice while messing with the mixes the radio would go into bind mode, and reset my mix settings to what they where at power on, I have no idea what prompted this but it happened twice while editing mixes, I will file on issue tracker.

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

More
30 Nov 2012 08:12 #3447 by MatCat
Replied by MatCat on topic The mixing system, how to?
Update, Issue #157

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

More
30 Nov 2012 10:31 #3448 by MatCat
Replied by MatCat on topic The mixing system, how to?
Ok here is attached a model with binary encoding on channel 5 and 6. The idea is if you start with the smallest number you can accurately recieve, and double up to the largest one you can transmit while still being able to add up the smaller ones an be up to or less then the total you can add them up however you want and the number will always be unique. Think about Binary, bit 1 is 0 or 1, bit 2 is 0 or 2, bit 3 is 0 or 4, etc etc.

In this setup CH5 has a 5 bit resolution, starting with the smallest being 3% of output, which is tied to Ail. DR, the 6% bit is Gear switch, the 12% bit is Ele D/R, 24% is Rud. D/R, 48% is Fmode1, on Channel 6 Fmode2 is the 3% bit, Mix1 is the 12% bit, and Mix2 is the 24% bit.

The device RX side will read the PWM's and decode the timing to figure out exactly what state all 6 switches are in using only 2 channels, with 2 bits more resolution available on Ch6.

Ultimately there is no limit to how this type of setup could be used, with some clever software on the radio itself even more complex things are capable.
Attachments:

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

More
30 Nov 2012 10:52 #3449 by FDR
Replied by FDR on topic The mixing system, how to?
I don't think it is correct.
The off values of the switches which are added should be all zeroes.
It would be better to use them as switch inseat of source and use the fixed function to add the necessary value, as PB has written.

And one more hint: increase the channel's scale to maximum (=150) for better resolution at the receiver side...

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

More
30 Nov 2012 18:09 - 30 Nov 2012 18:11 #3459 by MatCat
Replied by MatCat on topic The mixing system, how to?
It works fine, I am able to pick up the pulse lengths and decode with no issue. If I was trying for 6th bit of resolution I would go for 150%, but it is not neccessary.

At first I tried PB's settings but it just put the channel to 100% every time.

Besides once I have my 433MHz module working I am going to code up USART connection via trainer port then ALL values will be exact hehe.
Last edit: 30 Nov 2012 18:11 by MatCat.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum