HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jan 24, 2012, 11:13 AM
Registered User
Hugeone's Avatar
Canada,Quebec
Joined Jan 2005
2,064 Posts
I have a strong one for the wizard:

My plane use two V-tail on-board mixers for flapperons and differential thrust (twin motors).
Reason of this is that the RTH/stabilizer only have one ailerons/throttle channel.

I want to the wizard to replace the mixers but also, provide a 0-2V analog signal to control the current regulator of my LED light. Also, provide a channel control to drive the escs of the two onboard cooling pumps.

So I connect:
ail.ch from RTH >> input A
Flap.ch from rx >> input B
Th.ch from RTH >> input C
rud.ch from rx >> input D
Light.ch from rx >> input I

Output E >> left ail. servo
Output F >> right ail. servo
Output G >> left motor esc
Output H >> right motor esc
Output ext (PWM) >> smoothed by capacitor >> light control signal
Output O >> pumps escs

Now I need the prog. for all this to work.
I figure the V-tail mixer will be as follow:
E.src=Asubs(Bsubs1500)
F.src=Badds(Bsubs1500)

Light control will be like this:
x.src=i8
enablesound=1000

Pump control:
o.src=i8

Ideas welcomes.

-Hugo
Hugeone is offline Find More Posts by Hugeone
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 24, 2012, 04:17 PM
Registered User
United States, NY, New York
Joined Jun 2009
85 Posts
This is very exciting conceptually to me. Is there a way to connect the Channel Wizard to a Dragonlink directly (thereby removing the need for the original transmitter).

I have a Futaba 6Ex with dragonlink, and would love to be able to tap into the dragonlinks more plentiful channels (especially for pan/tilt)
greennomad is offline Find More Posts by greennomad
Reply With Quote
Old Jan 24, 2012, 04:45 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
Hugo you're the man to use Wizard to its fullest!
You're on the right track. I'll try to explain in simple terms, for anyone that wants an introduction.

The functions are written as in computer languages: it's "subs(A, B)" rather than "A subs B". Subs is signed subtraction. That is, a signal of 1500us is regarded as neutral. subs(A, 1500) gives the same result as A, so no need to deduct 1500.
This is a good starting point for the mixing:
E.src=adds(A,B)
F.src=subs(A,B)

To explain closer: E.src=adds(A,B) takes the value of inputs A and B and mixes them together to the servo output E. If B is neutral (stick in the middle), it has a signal value of 1500us. Say A has the value 1300us. This combination makes Wizard calculate adds(A,B) = adds(1300,1500) = 1300+0 = 1300 => E
If B moved to 1800, the calculation would go adds(A,B) = adds(1300,1800) = 1300+300 = 1600 => E
If B moved to 1400, the calculation would go adds(A,B) = adds(1300,1400) = 1300+(-100) = 1200 => E
Subs work the same, only B moves in opposite direction.

In formulas, all values are integers in the range 900-2100, which is the normal span of servo signals in microseconds. (Analog inputs are expressed as this range too.) Where a boolean value is needed (true/false), any value under 1500 means "false" and any above means "true".

EnableSound is a setting that continuously evaluates an expression to determine if the sound output should be switched on or off. Writing "1000" means always off, i.e. no output signal at all. "2000" means always on. So you rather want enableSound=2000 in this case.

The frequency of the sound is calculated from x.src so that's correct. But the sound output always has a 50% duty cycle which won't average to anything useful. (Duty cycle is the relation of high vs low voltage over time). I'll add another port type for you that works like sound output but varies the duty cycle instead of frequency. The PWM frequency can be 31 kHz. If this isn't high enough for smooth averaging I can raise the frequency at the price of reduced resolution.

PS. The exact servo range is 920-2120us, with neutral at 1520us. This is the range used by Futaba. Other manufacturers use slightly different ranges to express the same servo position.

PPS. The "IN" and "OUT" ports (I and O) have higher resolution than the others. I recommend using these for PPM when needed and the channels with highest requirements otherwise.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Jan 24, 2012, 04:55 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
Quote:
Originally Posted by greennomad View Post
This is very exciting conceptually to me. Is there a way to connect the Channel Wizard to a Dragonlink directly (thereby removing the need for the original transmitter).

I have a Futaba 6Ex with dragonlink, and would love to be able to tap into the dragonlinks more plentiful channels (especially for pan/tilt)
Hi greennomad, yes this is easy to do. Make a servo cable from the Tx, with PPM, 10V power and ground. (Or some other voltage that DL works with.) These are available from the trainer port or the rf module port.
Make a similar servo cable that connects to the DL.
Plug both these into a Wizard. CW copies the Tx signal to DL and adds any extra analog inputs (switches, pots, gimbals) or digital ones (a headtracker, another Tx, a Rx) into the signal.

EDIT: See update below
FpvKiwi is offline Find More Posts by FpvKiwi
Last edited by FpvKiwi; Jan 24, 2012 at 06:04 PM. Reason: See below
Reply With Quote
Old Jan 24, 2012, 05:13 PM
Registered User
Hugeone's Avatar
Canada,Quebec
Joined Jan 2005
2,064 Posts
Quote:
The PWM frequency can be 31 kHz. If this isn't high enough for smooth averaging I can raise the frequency at the price of reduced resolution.
Thx Kiwi!

31khz is plenty, ability to control duty cycle should yield a nice 0-5V output with a small cap.

-Hugo
Hugeone is offline Find More Posts by Hugeone
Reply With Quote
Old Jan 24, 2012, 06:04 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
Quote:
Originally Posted by greennomad View Post
This is very exciting conceptually to me. Is there a way to connect the Channel Wizard to a Dragonlink directly (thereby removing the need for the original transmitter).
Oh, if you mean to use DL without a Tx at all, that's possible. Wizard can generate a PPM signal from scratch to send to DL or another radio module. But for regular flying, you would miss the graphical menus, dedicated buttons for trim and all that.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Jan 25, 2012, 02:51 AM
Registered User
Impulze's Avatar
Sweden
Joined Jul 2004
712 Posts
How far away is the PPM to serial? I would like the feature of PPM to serial and convert it back in the other end.


//Matte
Impulze is offline Find More Posts by Impulze
Reply With Quote
Old Jan 25, 2012, 05:14 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
By serial, you mean to interface with a computer, right? It already supports basic serial reading/writing of PPM but it's not optimized for the speed of handling every PPM frame. Changing the firmware to handle an optimized data format is easy.

The big work is to write the software on the computer side. In the long run this will be an important part of the puzzle. Nothing is done here now... There's the open-source Compufly software that could serve as starting point.

Sounds like you have a special use case in mind.. pm/email me if you want to discuss in more detail.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Jan 25, 2012, 09:38 AM
my karma ranover my dogma
galaxiex's Avatar
Edmonton,Canada Eh
Joined Jun 2007
7,573 Posts
FpvKiwi, Great project!

I have a HiTec Laser-6 Tx that comes with an 8 ch Rx.
But the Laser-6 Tx only outputs 6 channels.

I would like to make use of the 2 "extra" channels on the Rx.

Assuming I can find the PPM signal in the radio, could I use this to "activate" the 2 un-used channels in the Rx?

I noticed the Mini Channel Wizard, would that be suitable?

Thanks!
galaxiex is offline Find More Posts by galaxiex
Reply With Quote
Old Jan 25, 2012, 10:21 AM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
Thanks galaxiex! I'm not familiar with this radio. Google says it's on 75MHz. If the transmitter module works with 8ch PPM, then yes a Wizard could activate the 2 extra Rx channels. You would need to solder wires to two switches or pots to provide the extra inputs as the Tx only uses 6 inputs.

I think Wizard Mini doesn't give much advantage. The latest "standard" Wizard is not much bigger and it works on any voltage... and it's easier for me to make.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Jan 25, 2012, 02:37 PM
my karma ranover my dogma
galaxiex's Avatar
Edmonton,Canada Eh
Joined Jun 2007
7,573 Posts
Quote:
Originally Posted by FpvKiwi View Post
Thanks galaxiex! I'm not familiar with this radio. Google says it's on 75MHz. If the transmitter module works with 8ch PPM, then yes a Wizard could activate the 2 extra Rx channels. You would need to solder wires to two switches or pots to provide the extra inputs as the Tx only uses 6 inputs.

I think Wizard Mini doesn't give much advantage. The latest "standard" Wizard is not much bigger and it works on any voltage... and it's easier for me to make.
Thanks for the fast reply. Ok, standard Wizard it is.

Ummm.... the Laser 6 was (it's discontinued) available in 72mhz (Air) and 75mhz (Surface), I have the 75mhz Surface Radio.

It's a NON module type radio (inexpensive, but seems pretty good quality).
This means I'd have to find where to break the PPM stream in the radio to add the channels, before the signal goes to the Tx section.
The stream is likely right on the PC board somewhere... probably means cutting a circuit trace....

Not sure how difficult it might be to find where to interupt the PPM stream.

It does have PPM available at the trainer port...

I did have the radio on a 'scope and it shows only 6 channels.

I cannot find a schematic anywhere...
galaxiex is offline Find More Posts by galaxiex
Reply With Quote
Old Jan 25, 2012, 05:58 PM
Up up and away!
FpvKiwi's Avatar
Sweden
Joined Oct 2010
702 Posts
Ok, no module means it could be more tricky. Look around with your scope to find the PPM before you order.

The Tx'es I've seen so far run the PPM through a through-hole inductor which I could cut one leg off.
I can't give a definitive answer but I'd say it's likely this works for Laser 6 and the module (if you can find and splice into the PPM signal). Anyway, I'll refund you if it doesn't work (minus shipping).

There are pictures of an installation here and I plan to post another detailed series of pictures.
FpvKiwi is offline Find More Posts by FpvKiwi
Reply With Quote
Old Jan 25, 2012, 07:40 PM
my karma ranover my dogma
galaxiex's Avatar
Edmonton,Canada Eh
Joined Jun 2007
7,573 Posts
Quote:
Originally Posted by FpvKiwi View Post
Ok, no module means it could be more tricky. Look around with your scope to find the PPM before you order.

The Tx'es I've seen so far run the PPM through a through-hole inductor which I could cut one leg off.
I can't give a definitive answer but I'd say it's likely this works for Laser 6 and the module (if you can find and splice into the PPM signal). Anyway, I'll refund you if it doesn't work (minus shipping).

There are pictures of an installation here and I plan to post another detailed series of pictures.
Thanks!

I'll poke around in the radio and see if I can find where the PPM goes to the Tx section....

Might be a couple days or so... got too many projects right now!
galaxiex is offline Find More Posts by galaxiex
Reply With Quote
Old Jan 25, 2012, 08:19 PM
Registered User
Hugeone's Avatar
Canada,Quebec
Joined Jan 2005
2,064 Posts
Quote:
Originally Posted by FpvKiwi View Post
Hugo you're the man to use Wizard to its fullest!
You're on the right track. I'll try to explain in simple terms, for anyone that wants an introduction.

The functions are written as in computer languages: it's "subs(A, B)" rather than "A subs B". Subs is signed subtraction. That is, a signal of 1500us is regarded as neutral. subs(A, 1500) gives the same result as A, so no need to deduct 1500.
This is a good starting point for the mixing:
E.src=adds(A,B)
F.src=subs(A,B)

To explain closer: E.src=adds(A,B) takes the value of inputs A and B and mixes them together to the servo output E. If B is neutral (stick in the middle), it has a signal value of 1500us. Say A has the value 1300us. This combination makes Wizard calculate adds(A,B) = adds(1300,1500) = 1300+0 = 1300 => E
If B moved to 1800, the calculation would go adds(A,B) = adds(1300,1800) = 1300+300 = 1600 => E
If B moved to 1400, the calculation would go adds(A,B) = adds(1300,1400) = 1300+(-100) = 1200 => E
Subs work the same, only B moves in opposite direction.

In formulas, all values are integers in the range 900-2100, which is the normal span of servo signals in microseconds. (Analog inputs are expressed as this range too.) Where a boolean value is needed (true/false), any value under 1500 means "false" and any above means "true".

EnableSound is a setting that continuously evaluates an expression to determine if the sound output should be switched on or off. Writing "1000" means always off, i.e. no output signal at all. "2000" means always on. So you rather want enableSound=2000 in this case.

The frequency of the sound is calculated from x.src so that's correct. But the sound output always has a 50% duty cycle which won't average to anything useful. (Duty cycle is the relation of high vs low voltage over time). I'll add another port type for you that works like sound output but varies the duty cycle instead of frequency. The PWM frequency can be 31 kHz. If this isn't high enough for smooth averaging I can raise the frequency at the price of reduced resolution.

PS. The exact servo range is 920-2120us, with neutral at 1520us. This is the range used by Futaba. Other manufacturers use slightly different ranges to express the same servo position.

PPS. The "IN" and "OUT" ports (I and O) have higher resolution than the others. I recommend using these for PPM when needed and the channels with highest requirements otherwise.
Just tested the mixers, work well. just need the PWM out and I'll be all set

-Hugo
Hugeone is offline Find More Posts by Hugeone
Reply With Quote
Old Jan 28, 2012, 12:22 AM
Registered User
Hugeone's Avatar
Canada,Quebec
Joined Jan 2005
2,064 Posts
Tested the new analog out with my current regulator, work like a charm!
I now have a more refined current range and I took the opportunity to raise max current from 3.2 to 4A per LED.

-Hugo
Hugeone is offline Find More Posts by Hugeone
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 03:24 AM
Discussion Converting a PPM 9 channel to PPM 8 channel....... lazy-b DIY Electronics 5 Mar 10, 2011 12:22 PM
Question PPM decode + PWM encode in one PIC AnthonyRC UAV - Unmanned Aerial Vehicles 31 Mar 04, 2008 05:10 PM
Question PPM decode + PWM encode in one PIC AnthonyRC DIY Electronics 14 Jul 03, 2006 02:26 AM