Thread Tools
Feb 08, 2016, 10:55 PM
Am I crazy or everyone else?
jamieFL's Avatar
Thread OP
Discussion

Is there a fixed wing flight stabilizer that can control yaw by thrust vectoring?


I have a dual motor plane without rudder.
Sign up now
to remove ads between posts
Feb 09, 2016, 12:05 AM
Registered User
Hugeone's Avatar
Naze32 with cleanflight can do it.
Check the mixer fonction.
I begged eagletree many time to support it on the vector fc, but they never did.

Hugo
Feb 09, 2016, 12:08 AM
Registered User
Daemon's Avatar
Could add that functionality to any controller by adding a simple V-tail mixer with throttle as
one input and rudder as the other.
Feb 09, 2016, 12:40 AM
Am I crazy or everyone else?
jamieFL's Avatar
Thread OP
I didn't know the Naze could handle thrust vectoring. I'll look into it. Is that in Baseflight or Cleanflight? I did some reading a little while ago on fixed wing on the Naze and it seemed like it was buggy and not fully implemented. Is this incorrect?

Quote:
Originally Posted by Hugeone
Naze32 with cleanflight can do it.
Check the mixer fonction.
I begged eagletree many time to support it on the vector fc, but they never did.

Hugo
Feb 09, 2016, 12:44 AM
Am I crazy or everyone else?
jamieFL's Avatar
Thread OP
What stabilizer? Most I've seen have aileron, elevator, and rudder inputs.

Quote:
Originally Posted by Daemon
Could add that functionality to any controller by adding a simple V-tail mixer with throttle as
one input and rudder as the other.
Feb 09, 2016, 01:31 AM
Registered User
Daemon's Avatar
As I said, any stablizer. Put a standalone V-tail mixer between the stabilizer's rudder/throttle outputs and the two ESCs.
Feb 09, 2016, 12:12 PM
Am I crazy or everyone else?
jamieFL's Avatar
Thread OP
Ah. OK. Now I understand. Thanks. But, most stabilizers don't have a throttle input/output. Is it done like this?

Receiver Throttle Out ---> Mixer In Right
Receiver Rudder Out ---> Stabilizer Rudder In
Stabilizer Rudder Out ---> Mixer In Left

Is that correct? In this case, I'll be ordering the Eagle Tree Guardian and a v-tail mixer.

Quote:
Originally Posted by Daemon
As I said, any stablizer. Put a standalone V-tail mixer between the stabilizer's rudder/throttle outputs and the two ESCs.
Feb 09, 2016, 02:41 PM
Registered User
Daemon's Avatar
Any stabilizer with an autopilot (Vector, RVOSD, etc) all have a throttle in/out, but
even if they don't, just go direct from the Rx. What I'm talking about functions the same.
Throttle -> elevator input of V-tail mixer
Rudder -> rudder input of V-tail mixer.
When throttle is all the way down, both outputs of the mixer will be all the way down.
Throttle goes up, both outputs come up proportionally.
When rudder is pushed to either side, the mixer increases one output and decreases the other.


There may be some quirks when rudder is moved at zero throttle depending on how
the V-tail mixer handles maximum servo range on the output. There exists V-tail mixers
that let you program the servo endpoints, which should avoid those quirks, like this one
http://www.robotmarketplace.com/products/0-DGEVMXR.html
Last edited by Daemon; Feb 09, 2016 at 02:49 PM.
Feb 09, 2016, 03:20 PM
Registered User
Hugeone's Avatar
Quote:
Originally Posted by Daemon
Could add that functionality to any controller by adding a simple V-tail mixer with throttle as
one input and rudder as the other.
Tried, problem is if the two pwm inputs are not in synch, the mixer goes crazy.
Since one input come from the FC and the other from the RX, they become out of synch.

The only mixer I know that overcome this are FC board such as naze or the channel wizard.
If you find a V-tail mixer that handle it, be sure to let me know.

-Hugo
Feb 09, 2016, 03:43 PM
Registered User
Daemon's Avatar
Hmm, that's an interesting consideration. Is a bit odd that they'd do that, considering that not
all receivers output PWM signals the same. Some update the channels in sequence, and
some all at once.
Feb 09, 2016, 04:50 PM
Opt
Opt
Registered User
A little arduino sketch would allow a custom mixer to be made up, hardware cost ~$3

Here is a v-tail mixer sketch


Code:
/**
PPM V-Tail/elevon mixer

Input pins:
 2: aileron/rudder
 3: elevator

Output pins:
 9: servo left
10: servo right
*/


#include <math.h>
#include <Servo.h>

//#define DEBUG
#define START_OUTPUT_PIN 9
#define LOW_PASS_FILTER 50 // difference must be greater than X at 


int Chan1Interrupt = 0; // pin 2, aileron
int Chan2Interrupt = 1; // pin 3, elevator

unsigned long Chan1_startPulse, Chan2_startPulse;
volatile double Chan1_val, Chan2_val = 1500;
volatile double Chan1_val_last, Chan2_val_last = 1500;
long StartMillis=0;
long FrameCounter=0;

Servo ServoArray[2];

double reverse(double val) {
 return (val-1500) * -1 + 1500;
}

double add(double val1, double val2) {
 double out = (val1 -1500 + val2 -1500) + 1500;
 out = (out < 1000) ? 1000 : out;
 out = (out > 2000) ? 2000 : out;
 return out;
}

void serviceServos(long pFrameCounter) {
 
 // do the v-tail mixing 
 double left  = add(Chan2_val, Chan1_val);
 double right = add(reverse(Chan2_val), Chan1_val);
 
 ServoArray[0].writeMicroseconds(left);
 ServoArray[1].writeMicroseconds(right);
}

void setup() {
 attachInterrupt(Chan1Interrupt, Chan1_begin, RISING);
 attachInterrupt(Chan2Interrupt, Chan2_begin, RISING);
 
 ServoArray[0].attach(START_OUTPUT_PIN+0, 900, 2100); // aileron
 ServoArray[1].attach(START_OUTPUT_PIN+1, 900, 2100); // elevator

 StartMillis = millis();
#ifdef DEBUG
 Serial.begin(115200);
#endif
}

void loop() {
 long LocalMillis;
 long LocalFrameCounter;
 LocalMillis = millis();
 LocalFrameCounter = (LocalMillis - StartMillis) / 20;

 if (LocalFrameCounter > FrameCounter) {
  FrameCounter = LocalFrameCounter;
  serviceServos(FrameCounter);
 }
}

void Chan1_begin() {
 Chan1_startPulse = micros();
 detachInterrupt(Chan1Interrupt);
 attachInterrupt(Chan1Interrupt, Chan1_end, FALLING);
}

void Chan1_end() {
 Chan1_val = micros() - Chan1_startPulse;
 detachInterrupt(Chan1Interrupt);
 attachInterrupt(Chan1Interrupt, Chan1_begin, RISING);
 if (Chan1_val < 1000 || Chan1_val > 2000) {
  Chan1_val = Chan1_val_last;
 } else {
  if ((Chan1_val + LOW_PASS_FILTER) > Chan1_val_last || 
      (Chan1_val - LOW_PASS_FILTER) < Chan1_val_last)
   Chan1_val_last = Chan1_val;
  else
   Chan1_val = Chan1_val_last;
 }
}

void Chan2_begin() {
 Chan2_startPulse = micros();
 detachInterrupt(Chan2Interrupt);
 attachInterrupt(Chan2Interrupt, Chan2_end, FALLING);
}

void Chan2_end() {
 Chan2_val = micros() - Chan2_startPulse;
 detachInterrupt(Chan2Interrupt);
 attachInterrupt(Chan2Interrupt, Chan2_begin, RISING);
 if (Chan2_val < 1000 || Chan2_val > 2000) { 
  Chan2_val = Chan2_val_last;
 } else {
  if ((Chan2_val + LOW_PASS_FILTER) > Chan2_val_last || 
      (Chan2_val - LOW_PASS_FILTER) < Chan2_val_last)
   Chan2_val_last = Chan2_val;
  else
   Chan2_val = Chan2_val_last;
 }
}
Last edited by Opt; Feb 09, 2016 at 05:25 PM.
Feb 09, 2016, 06:08 PM
Registered User
Daemon's Avatar
Ya that would do it, although I'd lower the value for the LOW_PASS_FILTER from 50, to like 3-5.
50uS is a really big dead zone.
It appears to set the output limits to 1000 and 2000uS so wouldn't have
any issues moving the rudder at zero throttle. (one output will stay at 1000uS,
while the other rises).
Shouldn't have any issues mixing input sources, because they're both independently
interrupt driven and the values are just accumulated so can use em any time for
the output calculations. I know the whole PPM stream can be negative or positive shift, but
I'm not sure if servo PWM outputs can be.. If on the off chance they were mixed (one input positive shift, the
other negative shift) , you'd just swap the start and end conditions for one input (RISING <-> FALLING).

In case folks are wondering what he means by $3 hardware cost. That's the cost of
a naked Aurduino Nano. Add about a buck for pins, but could solder on some servo leads.
Last edited by Daemon; Feb 09, 2016 at 06:15 PM.
Feb 09, 2016, 06:14 PM
JettPilot's Avatar
Quote:
Originally Posted by jamieFL
I have a dual motor plane without rudder.
The simplest, most reliable answer is usually the best... Put a rudder on the plane. Autopilots can fly a plane, but they usually work a LOT better when the plane has some natural stability.

So CAN it be done, sure, but the question is SHOULD you do it...

Mike
Feb 09, 2016, 09:06 PM
Am I crazy or everyone else?
jamieFL's Avatar
Thread OP
Unfortunately, you guys are now talking over my head. I wish I was, but I'm just not capable of building and programming a mixer without detailed instructions.

Since the Turnigy mixer is less than $4, it might just be worth a try.
Feb 10, 2016, 02:13 AM
Opt
Opt
Registered User
In this case you would literally buy an arduino board, copy that code in and click upload.. but the ready made one is certainly worth a try


Quick Reply
Message:

Thread Tools