HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old May 21, 2011, 04:20 PM
Registered User
Joined Feb 2005
473 Posts
Quote:
Originally Posted by RCvertt View Post
...This currently isn't working good though. The (DIGITAL_MOTOR_TILT) section works fine. It's stretched and centered good but the (DIGITAL_TILT_PITCH) section results in a servo that is pointing forward instead of at the desired 45 degree default position and doesn't seam to be stretched
It sounds like the stretch bit hasn't been set for servo[2], here:
Code:
static uint8_t stretch = 0b00100100; // servo xx543210
hth,
Billy
cass3825 is offline Find More Posts by cass3825
Reply With Quote
Sign up now
to remove ads between posts
Old May 21, 2011, 04:41 PM
Registered User
v22chap's Avatar
United States, IN, Granger
Joined Jan 2003
3,118 Posts
Good work you guys ... keep it up and I am going to have to have a multiwii board or two
v22chap is offline Find More Posts by v22chap
Reply With Quote
Old May 22, 2011, 05:37 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Quote:
Originally Posted by cass3825 View Post
No kidding! +1

I'm planning on this same approach with one of leadfeather's F-35 airframes. With pitch and roll handled in this manner, I'm not convinced I even need tailerons. This would definitely save some weight...
Thanks. I think your right about the talerons.

Feel free to use this code for ledfeathers F-35. Coding the tilt motors so they respond to TX commands but still smoothly transition to any flight mode position was one of the more difficult things to figure out. You are more than welcome to use it for his project. all of this code is basically a direct copy and paste from what I did with the AQ two years ago. The AeroQuad changed their code base to something I can no longer read so thankfully the MultiWii is an off shoot of one of the AeroQuad versions I was using. There is some irony in there somewhere that I had to leave the AeroQuad in order to finish my AeroQuad code You guys caught me just as I'm starting to port all of my AQ code over to the MultiWii so the timing is good. Hope it works out for him as it would save me from doing some flight testing.

Quote:
Originally Posted by cass3825 View Post
It sounds like the stretch bit hasn't been set for servo[2], here:
Code:
static uint8_t stretch = 0b00100100; // servo xx543210
hth,
Billy
Yep it's set.

Took a while but I tracked down and took out the constraint you had in this code block and now the servos work perfectly.

Code:
  #if defined(SERVO)
    for (i=0; i<6; i++) {
      if (stretch & 1<<i) {
        atomicServo[i] = (slowServo[i]-1000)/2;       //Removed "constrain" part.
        if (atomicServo[i] > 255) {
          carry |= 1<<i;
          atomicServo[i] -= 250; }
        else carry &= ~(1<<i); }
      else atomicServo[i] = (slowServo[i]-1000)/4;
    }
  #endif
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; Oct 29, 2011 at 09:30 AM.
Reply With Quote
Old May 22, 2011, 05:56 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Quote:
Originally Posted by v22chap View Post
Good work you guys ... keep it up and I am going to have to have a multiwii board or two
We'll convince you to use one yet. Had a DuinoStamp and some more wii stuff in my parts box so I threw another controller together for the F35 build. This one has the wii gyros and accel put together which isn't bad at 20$ for all the parts.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; Oct 29, 2011 at 08:57 AM.
Reply With Quote
Old May 25, 2011, 01:38 AM
Design, Build, and Fly
KatanaGuy's Avatar
Pleasant Grove, Utah
Joined Nov 2001
382 Posts
My contribution/imatation: The Manta TriHybrid



A few weeks ago, I started following this thread. In the intervening time, I've been designing a flying-wing tricopter hybrid, somewhat inspired by RCvertt's idea. I'm keeping the tail servo and putting the two front motors on a single tilt rod as opposed to two. I may have to forgo the fancy manta wing in favor of a simple combat wing, but I'm pretty sure I'll stick with the current structures described in my model. No idea how I'll control the tilt angle, as the KK board only takes 4 channels. May need to do some deep code modification...

Main page for these pics and my other projects at http://diydrones.com/photo/albums/tr...xedwing-hybrid

-Steve
KatanaGuy is offline Find More Posts by KatanaGuy
Reply With Quote
Old May 25, 2011, 04:31 AM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Looks like the port of my AeroQuad rear motor ramping code is working.
RearMotorRamping.avi (0 min 29 sec)


Quote:
Originally Posted by KatanaGuy View Post
A few weeks ago, I started following this thread. In the intervening time, I've been designing a flying-wing tricopter hybrid, somewhat inspired by RCvertt's idea. I'm keeping the tail servo and putting the two front motors on a single tilt rod as opposed to two. I may have to forgo the fancy manta wing in favor of a simple combat wing, but I'm pretty sure I'll stick with the current structures described in my model. No idea how I'll control the tilt angle, as the KK board only takes 4 channels. May need to do some deep code modification...

Main page for these pics and my other projects at http://diydrones.com/photo/albums/tr...xedwing-hybrid

-Steve
Great project. It'll be interesting to see how the KK board works out. Are you going for the assembly version or the similar project where they ported the code over to C?
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Latest blog entry: Chupacabra sighting !!!
Reply With Quote
Old May 26, 2011, 11:56 PM
Design, Build, and Fly
KatanaGuy's Avatar
Pleasant Grove, Utah
Joined Nov 2001
382 Posts
I'm currently figuring out the XX C source.

I noticed this nifty site while researching VTOL flight this evening: http://vstol.org/wheel.htm

It is basically a chart of every single VTOL configuration ever tried in the last 80 years, all in one image. According to the chart, the designs we've been trying to develop here are Lift + Lift/Cruise, or numbers 30 to 35.
KatanaGuy is offline Find More Posts by KatanaGuy
Last edited by KatanaGuy; May 27, 2011 at 12:02 AM.
Reply With Quote
Old May 27, 2011, 05:41 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Having a little trouble with the current ramp down code. I set it to wait until the motors are pointing straight forward before the rear motor starts to shut down. The problem is that while the rear motor is waiting it still needs to respond to throttle and pitch control like a regular tricopter, but it needs to do so while it's value it centered around it's last commanded value. Currently it just stays static at it's last commanded value while it waits using the below code...
Code:
if (servoNeutral == -250){                                                                                                                 //If motors are pointing forward...
            if (currentTime > servoNeutralTime + SERVONEUTRALLOOPTIME){        
                if (rampHoverMode == 0 || rampTransitionMode == 0 || rampHoverMode == 1 || rampTransitionMode == 1) motor[0] = motor[0] - 1;       ...Ramp rear motor down.
                servoNeutralTime = currentTime;
                }
            }
            else{                                                                                                                                 // If motors are not pointing straight forward keep rear motor at it's last commanded value to keep it from jumping up
                 motor[0] = motor[0] 
                }
I can get the rear motor to stay active with the below code but it jumps up while it waits. I need to center it around it's last commanded value some how while it waits...
Code:
        if (servoNeutral == -250){                                                                                                                // If motors are pointing forward...
            if (currentTime > servoNeutralTime + SERVONEUTRALLOOPTIME){        
                if (rampHoverMode == 0 || rampTransitionMode == 0 || rampHoverMode == 1 || rampTransitionMode == 1) motor[0] = motor[0] - 1;      //...Ramp rear motor down.
                servoNeutralTime = currentTime;
                }
            }
            else{                                                                                                                                 //If motors are not pointing straight forward...
                 motor[0] = ((rcCommand[THROTTLE] + axisPID[PITCH]*4/3) +150);                                                                      //AH ...use normal rear motor hover commands. Need to find a way to center this around "motor[0]" last commanded value.
                 
                }
I think this is where the current code centers the throttle and PITCH axis RC stick commands...
Code:
  for(axis=0;axis<2;axis++)
    rcCommand[axis]   = (rcHysteresis[axis]-MIDRC) * (rcFactor2 + rcFactor1*square((rcHysteresis[axis]-MIDRC)));
  rcCommand[THROTTLE] = (MAXTHROTTLE-MINTHROTTLE)/(2000.0-MINCHECK) * (rcHysteresis[THROTTLE]-MINCHECK) + MINTHROTTLE;
  rcCommand[YAW]      = rcHysteresis[YAW]-MIDRC;
}
So if we can move this centering code into the VTOL section and use motor[0] instead of MIDRC, I think we can center rcCommand[PITCH] but I'm not sure how to center the throttle also.

Quote:
Originally Posted by KatanaGuy View Post
I'm currently figuring out the XX C source.

I noticed this nifty site while researching VTOL flight this evening:...
Good site. I thought I was going to be able to keep my mind off building another VTOL aircraft for a while after this one if finished but I see a couple there that need to be built.

It's not too late to go with an arduino. That way you could help us out with these builds There is a really small megamini we can use to get a few extra pins.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; May 27, 2011 at 05:50 PM.
Reply With Quote
Old May 27, 2011, 05:46 PM
Registered User
Joined Feb 2005
473 Posts
Have you tried removing the '+150' in the following line:
Code:
motor[0] = ((rcCommand[THROTTLE] + axisPID[PITCH]*4/3) +150);
cass3825 is offline Find More Posts by cass3825
Reply With Quote
Old May 27, 2011, 06:02 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Quote:
Originally Posted by cass3825 View Post
Have you tried removing the '+150' in the following line:
Code:
motor[0] = ((rcCommand[THROTTLE] + axisPID[PITCH]*4/3) +150);
Afraid so. That's just for trim that is in each of the three modes. With it removes it still jumps up too far. I'll see if I can make a video of what is going on.

---Edit
Using this code for transition and forward flgiht...
Transition Mode-
Code:
if (currentTime > servoNeutralTime + SERVONEUTRALLOOPTIME){            
            if ((rcCommand[THROTTLE] + axisPID[PITCH]*4/3) +150 > motor[0]) motor[0] = motor[0] + 1;      //Ramp up the rear motor speed if it is not at the commanded value.        
            if ((rcCommand[THROTTLE] + axisPID[PITCH]*4/3) +150 < motor[0]) motor[0] = motor[0] - 1;      //Ramp down the rear motor speed if it is not at the commanded value.
            servoNeutralTime = currentTime;
            }
            if (motor[0] == rcCommand[THROTTLE] + axisPID[PITCH]*4/3) rampTransitionMode = 0;      //Turn off rear motor auto ramping if rear motor value is at the commanded value
            if (rampTransitionMode == 0){
                motor[0] = rcCommand[THROTTLE] + axisPID[PITCH]*4/3;                               //Use normal rear motor hover commands if rear motor auto ramping is off.   
                rampHoverMode = 1;
                }
Forward Flight Mode-
Code:
 if (servoNeutral == -250){                                                                                                                // If motors are pointing forward...
            if (currentTime > servoNeutralTime + SERVONEUTRALLOOPTIME){        
                if (rampHoverMode == 0 || rampTransitionMode == 0 || rampHoverMode == 1 || rampTransitionMode == 1) motor[0] = motor[0] - 1;      //...Ramp rear motor down.
                servoNeutralTime = currentTime;
                }
            }
            else{                                                                                                                                 //If motors are not pointing straight forward...
                 motor[0] = rcCommand[THROTTLE] + axisPID[PITCH]*4/3;                                                                      //...use normal rear motor hover commands.
                }
I get this video result..

1)In the video I switch to forward flight and the rear motor starts to decrease in value. This is good.
2)When the rear motor is almost shut off I switch to transition mode and the rear motor starts to increase in value. This is good.
3)While the rear motor is still increasing in transition mode, I switch to forward flight mode and the rear motor jumps up. This is bad. We need to center the pitch and throttle commands around what ever the last good rear motor value was before it jumps up.

MotorJump (0 min 18 sec)
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; May 27, 2011 at 07:26 PM.
Reply With Quote
Old May 27, 2011, 07:11 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
The problem is while the back motor waits for the servo to be pointing straight forward, we are setting the rear motor value to exactly where the throttle and pitch TX sticks are telling it to be. This is not the correct value. It's too high. The rear motor is moving towards the (TX throttle+Pitch stick) position, but it's hasn't reached it yet.

It's what ever this intermediate motor value is that we need to center the TX throttle and pitch stick commands around while the rear motor waits for the tilt servos to be pointing forward again.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; May 27, 2011 at 07:28 PM.
Reply With Quote
Old May 27, 2011, 07:29 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Double post.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Latest blog entry: Chupacabra sighting !!!
Reply With Quote
Old May 27, 2011, 07:31 PM
Registered User
Joined Feb 2005
473 Posts
I now understand the problem. As the front motors tilt forward, their upward thrust diminishes by the sin of their angle (where 90deg is straight up and 0deg is straight forward). The throttle component of the rear motor needs to diminish at the same rate in order to maintain level flight. Perhaps <pseudo code>'motor[0] = rcCommand[THROTTLE] * sin(frontCalculatedMotorAngle) + pitchComponent' would be worth a try...
cass3825 is offline Find More Posts by cass3825
Reply With Quote
Old May 27, 2011, 08:24 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
4,148 Posts
Quote:
Originally Posted by cass3825 View Post
I now understand the problem. As the front motors tilt forward, their upward thrust diminishes by the sin of their angle (where 90deg is straight up and 0deg is straight forward). The throttle component of the rear motor needs to diminish at the same rate in order to maintain level flight. Perhaps <pseudo code>'motor[0] = rcCommand[THROTTLE] * sin(frontCalculatedMotorAngle) + pitchComponent' would be worth a try...
I'm not sure that's the same issue.

I did a similar but more hackish method of cutting the rear motors throttle range in half for transition mode, thinking that the 45 degree front motors were only using half their thrust to lift the aircraft so the rear motor should be sending a half power lifting component also.

I used the below code to cut the rear throttle range in half for transition mode...
Code:
motorCommand[REAR] = ((transmitterCommand[THROTTLE] + motorAxisCommand[PITCH]) - 1000) / 2) + 1000;
The problem with my aircraft that I found is that it wants to pitch up a lot as soon as the switch from forward flight to transition mode is made. My plane needs the rear motor to stay near full power during the entire transition to counter act this. The single successful transition I had was when I held full down elevator on while making the transition.

So I agree that what you propose should work but if your aircraft is set up like mine with the CG near the rear motor and a huge circle cut out of the rear of the airframe which basically removed it's horizontal stabilizer, then the rear motor now has to act like that stabilizer for a little longer until sufficient airspeed is obtained. That's why I now delay the ramping down of the rear motor until the front motors are pointing straight forward. My guess is that if the motors are straight forward then the rear motor no longer has to counteract any gyroscopic forces from the front motors tilting and enough speed should be obtained so the rear prop doesn't have to act like the surface of the airframe that it replaced.

On an F-35 the elevators and almost the entire wing is behind the CG which puts a lot of surface area there to help dampen any unwanted pitching moments which I don't have. My aircraft has just the opposite with most of the surface area in front of the CG making it a little more inherently unstable during transitions.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Last edited by RCvertt; May 27, 2011 at 10:36 PM.
Reply With Quote
Old May 27, 2011, 09:50 PM
Registered User
Joined Feb 2005
473 Posts
What is the name of the front motor tilt servo variables (servo[x], servo[y]), and what are their expected ranges (0-250 or 1000-2000, and is the low value point up or forward)?
cass3825 is offline Find More Posts by cass3825
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion QTD- Quad Tilt Duino (Arduino- Tilt Rotor) RCvertt VTOLs 100 Jun 28, 2012 12:15 AM
Question Tricopter: What rear tilt angle? bb42 Multirotor Talk 3 Oct 15, 2010 09:40 AM
New Product The new Panther tilt rotor UAV from Israel Aerospace Industries Hunter850 Multirotor Talk 2 Oct 06, 2010 08:06 AM
For Sale Rc lander panther complete setup with metal edf/motor/esc/servos/retracts/battery TurboFanElectric Aircraft - Electric - Jets (FS/W) 3 Mar 25, 2010 08:29 AM
Sold RClander Panther 70mm Fan and motor cjdscratch Aircraft - Electric - Power Systems (FS/W) 7 Mar 13, 2010 10:31 PM