PDA

View Full Version : Discussion elevon mixer


hargard
Feb 27, 2008, 02:06 PM
Hi
I am using a Atmel M8535 chip to mix two channel and I a little stumped on the mixing method.
I am using Bascom as the Programming language.
I have Googled this and there is little out there.
I have found one site that describes mixing but it makes no sense to me.
Link below
http://www.geocities.com/ilufa/MIXER_E1.htm
I know its got a be simple but I can not see the light at the end of the tunnel.
I just need to be able to mix two channels to give elevon or Vtail output.
Any help would be appreciated.

Regards Antony(UK)

jeffs555
Feb 27, 2008, 06:47 PM
It is fairly simple. You have two inputs, aileron and elevator. You have two outputs, left and right elevon. The elevator input mixes into both outputs, so that when the elevator stick is moved, both left and right elevon move together. The aileron input is mixed into one output, and the inversion of the aileron is mixed into the other output.

First thing you have to do is measure the input pulse widths. These will vary between 1 and 2 miliseconds, with 1.5mS as the center. You subtract 1.5ms from the input pulse width to get a value between +0.5mS and -0.5mS. For the inversion of the aileron input you just change the sign. Then all you have to do is add the elevator and aileron input to 1.5mS to get one output pulse width, and add the elevator and inverted aileron input to 1.5mS to get the other output. The catch is that if both aileron and elevator values are +0.5mS, your output would be 2.5ms which would overdrive the servo, and-0.5mS plus -0.5mS plus 1.5ms would be 0.5mS which would underdrive the servo, so you have to check the outputs and limit them to valid widths. If you add in only half of the value(ie +0.25ms to -0.25mS) you don't have that problem, but you might have less control.

hargard
Feb 29, 2008, 03:13 AM
Hi
Thanks Jeffs
This is were I went wrong
"You subtract 1.5ms from the input pulse width to get a value between +0.5mS and -0.5mS."
All sorted now.
Regards Antony(UK)