HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 01, 2012, 04:14 PM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Ailerons input is from one channel, so no differential.
Flaperons is from another channel.
Both RC channels full throw (-100% / +100%).

Input A ailerons full throw (e.g. 1000-2000)
Input B flaperons full throw (e.g. 1000-2000)

Output C servo left moves down 50%, up 100% on ailerons input A (1250-2000 ?)
Output C servo left moves full throw on flaperons input B (1000-2000).
Output D same as C

I tried to set throw, but when the servo is in the lowest throw position flaperons input is reduced also.

About CW used as mux device, will it work with my Graupner MC24 ?
I use a TSLRS, which has the well known and common problem of fixed frame length.
It works well in PPM18 mode, if I avoid channels over 100%, but it don't work with PPM24, because it is variable length.
If it is the same as for DLink I should be able to use it with PPM24 and have then the full 12ch potential of my RX tx.

Ric

P.s.: i tried the CW with the autopilot, with some channels directly from RC rx and some passing through the autopilot and everything seemed to work perfectly. It was not the same with usual mixers.
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 01, 2012, 04:49 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
Quote:
Originally Posted by chiloschista View Post
Output C servo left moves down 50%, up 100% on ailerons input A (1250-2000 ?)
Output C servo left moves full throw on flaperons input B (1000-2000).
Output D same as C

I tried to set throw, but when the servo is in the lowest throw position flaperons input is reduced also.
Ok, input A is supposed to affect output C between -50% and +100%. There's no straight-forward way to do that. Don't be scared by the looks of it now but this might work:
c.src=adds(b, scale(a, if(lt(a,1520), 920, 1520)))
If this is a common scenario I can add a more simple way.
The part "if(lt(a,1520), 920, 1520)" chooses one of the options 920 and 1520, depending on a condition. The condition is "lt(a,1520)", meaning a<1520. ("lt" is short for "less than"). In other words, if A is negative, scale it down to half (scale(a, 920)). If A is positive, don't change the scale (scale(a, 1520)).

Quote:
Originally Posted by chiloschista View Post
About CW used as mux device, will it work with my Graupner MC24 ?
I use a TSLRS, which has the well known and common problem of fixed frame length.
It works well in PPM18 mode, if I avoid channels over 100%, but it don't work with PPM24, because it is variable length.
If it is the same as for DLink I should be able to use it with PPM24 and have then the full 12ch potential of my RX tx.
Yes it will work. But if you only want 12ch, you don't need the muxing capability. CW can generate regular 12ch that's compatible with DL and TSLRS.

Quote:
Originally Posted by chiloschista View Post
P.s.: i tried the CW with the autopilot, with some channels directly from RC rx and some passing through the autopilot and everything seemed to work perfectly. It was not the same with usual mixers.
Nice
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 02, 2012, 01:29 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Hi FpvKiwi,

thanks a lot for your answers and sorry for overwhelm you with questions, but it seems this item is only starting to show its full potential (to me).
This last scenario could be interesting for glider pilots and allow the use of very simple transmitters to control crow, camber etc.

On 2.4GHz side I use ACT system. They have PPM out capable rx, but they say it is a faster PPM format.
Could you please take a look at bottom and tell me if CW will work with this format (sorry in german, but I think the sense is clear) ?
Here is the link to their page.

Thanks,

Ric

Serielle Parameter: 38400 Baud, 1 Stoppbit, kein Parity

Datenformat
Es werden je 12 Kanäle als 24 Byte ausgegeben. Je zwei Byte pro Kanal. Das High Nibble des Ersten Bytes enthält die Kanalnummer. Die Folgenden 12Bit enthalten die Servoposition. Der Positionswert kann mit der folgenden Formel direkt in Millisekunden umgerechnet werden.

Kanal in ms = ((X * 4) + 8840) / 11059200
Beispiel: 17 cb 27 c6 3c 40 47 ba 5a 6a 68 0f 75 f1 81 a9 97 8f a7 8f b7 8f c7 8f
Kanal 1: 0x7CB = 1995
((1995 * 4) + 8840) / 11059200 = 1,52 ms (Servomitte)

Timing
Die 24 Byte werden als ein zusammenhängender Block von 9,1 Millisekunden gesendet. Die folgende Pause von 5,1 Millisekunden kann zur Synchronisation genutz werden.
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 02, 2012, 04:56 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
Ok, that's not a PPM format at all but a digital serial format. It wouldn't be too hard to support but it doesn't fit well into the software design. If one adds lots of stuff without regards to the big picture, you end up with a mess.
I'd like to wait with supporting the ACT format. I want to see if more people are interested and maybe I'll come up with a general way to handle different digital input formats.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 03, 2012, 03:43 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Hi,

what I don't understand is this sentence on ACT site :

Ein serielles Summensignal auf Ausgang 1, einen seriellen Datenstrom auf Ausgang 6
(A serial sum output signal to 1, a serial data stream on output 6)


But anyway, don't change your firmware only for this (unless there is a big interest).
I would ask ACT to know what exactly is their PPM format, because they say it is compatible with Mikrocopter. Is this not the usual / actual PPM format ?
I will ask if it would be possible to have usual PPM.
Could you please tell me which are the specs I have to ask for ?

Thanks,

Ric
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 03, 2012, 05:28 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
Oh I see. There's both a serial data output (ch6) and a fast PPM output (ch1). The specs you quoted are for the serial data output. The format of the fast PPM output isn't specified. The regular PPM format isn't "fast".
Yes maybe you can convince them to output regular PPM.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 03, 2012, 05:30 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Hi,

I'm trying to program a double flaperon control.
I would like to have crow proportional control and a fixed thermal camber position and switch between them with a third channel.
A starting working solution could be this one :

f.src=adds(b,smooth(if(lt(c,1520),1100,a)))

Is there a way to control speed / time when changing from condition 1 and condition 2 of "if", other than smooth ?

Thanks,

Ric
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 03, 2012, 05:37 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
Instead of "smooth", try "slow". It limits the maximum rate of change.
The speed isn't configurable... for now.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 03, 2012, 05:42 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Thanks, I found it right now
It works well, it almost the speed I wanted.
The only issue is that the RC input on that channel is working with the same speed, but for flaps it is ok.
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 03, 2012, 10:06 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
I realized the expression can be a little shorter.
instead of if(lt(c,1520),1100,a)
this will do the same: if(c,a,1100)
Meaning "if C is above middle then pick A, otherwise pick 1100.

How important is it to have both a smooth transition between the options and quick response to changes in A? I'd have to think about how that combination could be done.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 03, 2012, 10:48 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
I tried this line
f.src=adds(b,slow(if(c,a,1100)))
but I get erroneous qualifier. What am I doing wrong ?
(Anyway I don't understand it. Edit : reading again the wiki now I understand it )

About speed when I program crow I mix ailerons into flaps.
I do those programs with flight conditions and I set a retarder when switching between flight conditions which involve big flaps amount.
Crow flaps could mean flaps at 90° down. Imagine if those flaps goes to 90° suddenly
Not very nice for the flight attitude and for servo stress too.
So flaps and flaperons should change position slowly (even 2 seconds), but roll control (both on ailerons and flaps) should remain at pilot stick speeds.
Hopefully I was clear enough.

Ric
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 03, 2012, 05:47 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
You need to have the ports configured as the correct type before setting 'src'.

I can see that a slow transition between different 'if' values is useful. I'll get back with a solution soon.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 04, 2012, 05:24 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Hi,
yes, it works now.
I already configured the ports, but probably something was wrong.
Thanks,

Ric
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Old Feb 04, 2012, 07:39 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
701 Posts
New firmware version 3.13

I have published version 3.13. The changes since 3.10 are:
Quote:
Add command 'weigh', rename 'wheel' to 'dial'.
Add option for port EXT to output an analog voltage level.
See the upgrading page for instructions.

Function: weigh
The new function weigh makes a weighted average between two inputs. A third input tells how much relative emphasis to place on the inputs;
Quote:
weigh(920, A, B) => B
weigh(1520, A, B) => the average of A and B
weigh(1820, A, B) => 75% of A and 25% of B: 0.75*A + 0.25*B
weigh(2120, A, B) => A
A and B are only examples here. Any input or formula can be used.

This is in fact a gradual version of 'if'. Compare with the one-or-the-other behavior of 'if':
Quote:
if(920, A, B) => B
if(1820, A, B) => A ('if' never mixes A and B!)
if(2120, A, B) => A
To make a gradual transition like chiloschista needs, use a formula like this:
f.src = weigh(slow(bin(c)),a,1100)
The trick here is that the weight, based on C, will slowly move between the two extremes, gradually shifting weight between A (whatever value it is for the moment) and the constant position 1100. "bin(c)" rounds C to 920 or 2120, whichever is closer.

Analog output
The EXT port can already be configured to generate a sound wave, to be connected to a loudspeaker. Now, it can also output voltage levels in 256 steps, controlled from any PPM channel, port or formula.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Feb 04, 2012, 09:43 AM
T.ing to put on air 100 models
chiloschista's Avatar
Switzerland
Joined Feb 2008
665 Posts
Wow, you are quick.
Thank you very much !
Great the analog output also. I have RC rx that can output RSSI on a selectable channel as servo position.
So I could use it as RSSI through the CW and an OSD.

Best rergards,

Ric
chiloschista is offline Find More Posts by chiloschista
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Channel Wizard: Flexible PPM encoding/decoding/mixing FpvKiwi DIY Electronics 36 Feb 10, 2012 02:24 AM
Discussion Converting a PPM 9 channel to PPM 8 channel....... lazy-b DIY Electronics 5 Mar 10, 2011 11:22 AM
Question PPM decode + PWM encode in one PIC AnthonyRC UAV - Unmanned Aerial Vehicles 31 Mar 04, 2008 04:10 PM
Question PPM decode + PWM encode in one PIC AnthonyRC DIY Electronics 14 Jul 03, 2006 01:26 AM