Dragonfly Custom Mix in Naze32

WiredForStereo

New member
Hi there,

I've done a couple searches looking for exactly what I need, but I'm only finding tertiary snippets of information. This might be one of those fun challenges that can help a few people who want to try out the Dragonfly configuration and get deeper into the control board.

I'm doing a modified Dragonfly. The stock Dragonfly has five ten inch booms. I'm using angled boom ends which extend the three standard tricopter booms an extra 5.9". The center two motors are remaining on stock ten inch booms and without angled props (for now).

While putting this together, assuming I was going to use the stock y-connectors, I realized that they are a big bunch of mess to fit into the limited space. Then I realized that the Naze23 (rev6) board I bought for this project has six outputs. Why not just do a custom mix and forget the y-connectors?

Further thinking revealed that there are problems with the y-connector layout because while the front two motors contribute to pitch, the center two don't, and if they are wyed together, they could cause less than intuitive reactions to hard up or down stick. Also, since mine are of different boom lengths, a custom mix would further help to produce the correct reactions to control inputs, while still giving me the lift to fly my gimbal.

I found the following code for a tricopter:
mixer CUSTOMTRI
mmix reset
mmix 0 1.000 0.000 1.333 0.000
mmix 1 1.000 -1.000 -0.667 0.000
mmix 2 1.000 1.000 -0.667 0.000
smix reset
smix 0 5 2 100 0 0 100 0
profile 0
smix reverse 5 2 r
profile 1
smix reverse 5 2 r
profile 2
smix reverse 5 2 r

That makes all sorts of sense, but I've also found some info hinting at the idea that when in servo mode, two of the outputs are set to servo. On a Dragonfly, I need only one servo output and five motor outputs. Is this an actual hangup or have I just not found the right info?

I know the contributions of the different motors to throttle, roll, pitch, and yaw, but I don't know how to put it all into the final package.

In this configuration, what would be the motor numbering scheme?

Thanks for your time, and I appreciate any assistance you can give me.
 

megabotz

TWO DOLLARS!
By all means, experiment.

If length of signal wire is the only reason you want to eliminate the Y harness, why not just add an extension cable to the longer booms? Wires that are too long can create a mess but that is why the baby Jesus invented the soldering iron & shrink tubing ;)

I don't get what you mean about the front motors contributing to pitch but not the center. Isn't extra lift from the tail causing pitch?

megabotz
 

WiredForStereo

New member
If length of signal wire is the only reason you want to eliminate the Y harness, why not just add an extension cable to the longer booms?
It's not that the wires are not long enough for the longer booms, that's only a problem with the tail boom and not at issue here. By eliminating the Y, I can create a better performing pentacopter and a less messy build.


I don't get what you mean about the front motors contributing to pitch but not the center. Isn't extra lift from the tail causing pitch?
The mid motors are on the center of gravity. Give them full power and all the machine does is go straight up. They do not contribute to pitch. As you can see in the above CLI code, the front motors each contribute 2/3 toward pitch and the tail contributes 1 1/3. You may be referring to a mix I'm not aware of but all the tri's I've seen seem to rotate about the center of gravity on a front or back flip. And the mid motors are on the center of gravity. The combination of the front and mid motors that a y creates puts their force vector at the midpoint between the two props, rather than at the center of each prop in a proper mix. Unless I'm mistaken, that would cause the copter to be overly aggressive on a front flip and sluggish on a back flip. Since I'm wanting to do AF, I want everything to be the best possible. That means the Naze needs to know where each motor is and when to give it power. Yes, it will do fine with a Y as the video shows, but I'm looking for a little better than fine. Plus, this is an adventure in creating something no one else has ever done.
 

WiredForStereo

New member
Here's what I came up with, will have to fine tune the roll power on the mid motors.

mmix <motor> <throttle> <roll> <pitch> <yaw>
smix <rule> <servo> <source> <rate> <speed> <min> <max> <box>

mixer CUSTOMTRI
mmix reset
mmix 0 1.000 0.000 1.333 0.000
mmix 1 1.000 0.750 0.000 0.000
mmix 2 1.000 -1.000 -0.667 0.000
mmix 3 1.000 1.000 -0.667 0.000
mmix 4 1.000 0.750 0.000 0.000


smix reset
smix 0 5 2 100 0 0 100 0
profile 0
smix reverse 5 2 r
profile 1
smix reverse 5 2 r
profile 2
smix reverse 5 2 r

Here's the layout (total assumption at this point)

3----------------2
|
|
4---------1
|
|S0
0

I put the above code into the CLI prompt. Everything seemed to go in iNav (assume I'm using Cleanflight). Motors now shows 5 motors, and S0 is shown on Servo 6.

Okay, discovered a problem that confirms what I was talking about in post #1. I plugged a servo into the outputs. Servo 6 is in fact mapped to output #1. Output #2 is nothing. Output #3 is motor#1 (#0 in the code) and then it counts up from there, which means I have no output for motor #5 (#4 in the code). Now how to re-map the motors. There's no servo on 2. If I could just figure out how to map motor 5 (4) to output 2, I'd be golden.
 

megabotz

TWO DOLLARS!
I am all about experimentation & making things nobody has ever seen before. I have my own project like that nearly complete. I'm not trying to shoot you down, promise.

I see a few problems:

1. The center booms are supposed to be on the CG. They are only there to provide lift & help ROLL the aircraft.

2. If you are looking for a cleaner build, either zip tie your excess wires out of sight or shorten them & heat-shrink them.

3. Making a new pentacopter is admirable, just make sure the work hasn't already been done, thus wasting your time.

I don't think I mentioned any mix above. I was explaining that I believe the tail is really the part responsible for setting the pitch angle. It's either that or the pitch angle is achieved by the front motors providing a little less lift but I believe it is the former.

Josh actually explains, I believe in the build video, why they are mounted on the CG. If not, you get something like this: http://robot-kingdom.com/five-rotor-flying-drone-pentacopter/

The tricopter configuration doesn't work if you place those center booms anywhere but the center.

megabotz
 

WiredForStereo

New member
Talking to someone who seems knowledgeable on YouTube, he has confirmed my hangup. There is no way to remap output 2 when 1 is being used for a servo. I need a FC with eight outputs. So on that front, I'm looking for a new FC, and the one that has caught my eye so far is SPRacingF3, which has eight outputs and is Cleanflight compatible.
 

WiredForStereo

New member
The tricopter configuration doesn't work if you place those center booms anywhere but the center.

The tricopter with y-connections just "works" but it's not "right." The mid motors are still trying to provide pitch control as well as roll, but they can't. They physically can't. So the net product is a thrust vector at the midpoint between the mid motors and front motors, like mounting your FC in the wrong place and/or putting different sized motors on the front of your tri than on the back.
 

WiredForStereo

New member
I was explaining that I believe the tail is really the part responsible for setting the pitch angle. It's either that or the pitch angle is achieved by the front motors providing a little less lift but I believe it is the former.

It's both, actually. It's readily evident in the mix. The tail motor and the front motors combined are equally responsible for pitch. But with a wyed pentacopter, the mid motors are also trying to provide pitch control which they are incapable of doing.
 

WiredForStereo

New member
Dragonfly Custom Mix in Cleanflight

Did a little research and ordered the SP Racing F3 EVO flight controller.

Also did a little playing around with the motor mixing calculator at https://www.iforce2d.net/mixercalc/

Came up with this:

mixer custom
mmix reset
mmix 0 1 0 1 -1
mmix 1 1 -0.625 0 -1
mmix 2 1 -0.866 -0.5 1
mmix 3 1 0.866 -0.5 -1
mmix 4 1 0.625 0 1

This mixer calculator doesn't take the tail servo into account, so that's why the yaws are all at 1. In the final, they will be at zero. However, with a custom mix, I could throw some yaw into the forward props as well.

For those of you interested in doing a custom mix with a Dragonfly, this is not the same for your machine. Mine has extended arms on the tricopter arms, and stock 10" arms on the middle arms. In fact, I may even try to shorten them a little more to move the mid props a little further away from the front props.

Also, I have a pic for you. You'll notice all the props are inverted from the stock Dragonfly. I've dubbed it the Scorpion FDT, which stands for effing death trap.

FDT.JPG
 

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
Not too fond of props and servos, are you?

The reason the motors are inverted on the dragonfly is because the props are overlapping. Your extended booms accommodate for this . . . so why mount inverted? It's not that much more efficient (you're flying a pent after all) and it puts the prop at greater risk in a tip-over or high-speed landing.

On the tail you're also exposing the tilt mechanism to damage -- you won't break the tough tilt, but I've seen the dragonfly strip METAL gear servos in an instaflip. I see your beefy LG (fine construction, BTW), but it won't take much to flip back onto that tail motor. If mounted up you *might* break a prop. Mounted as you have it, you'll probably strip the servo (just after you break the prop).

Your build, your call, but good props that size ain't cheap (and you'll want good props eventually) and good servos are expensive.


BTW, as far as your yaw mixing . . . why just the front two? The tail motor shouldn't have any yaw mix because the servo does that for it, but if the remaining 4 motors are counter torqueing each other, why not leave the mix in for all 4? That should increase your yaw authority, which means the servo will tilt less for a given yaw. you'll still have the same amount of tail-induced drift in hover, but you'll have far less tail slide and yaw-roll coupling in a turn.
 

WiredForStereo

New member
Dan, you make some very good points. The inverted props were mostly for uniqueness, some for efficiency, some for looks. You make some good points about the tail that I hadn't considered. My original layout had the tail motor on top for the scorpion motif, but I stuck it on there inverted for fun. Your yaw idea is good. How much yaw authority is enough? The tri tail benefit is for yaw authority, right? I've built and flown quads before, tris are new for me.

My extended booms are almost long enough, but they overlap still a little. The angle helps, but if they flex at all, they will collide.
 

Craftydan

Hostage Taker of Quads
Staff member
Moderator
Mentor
Dan, you make some very good points. The inverted props were mostly for uniqueness, some for efficiency, some for looks.

Fair enough. If it's not "cool" we wouldn't play with 'em. Just so long as you know the cost of "cool", she's yours to build as you like and I don't see anything that won't work.

How much yaw authority is enough? The tri tail benefit is for yaw authority, right? I've built and flown quads before, tris are new for me.

Is enough ever enough? ;)

In all seriousness, the more authority you can get from the physics, the more you can reduce the control rate. This will give you as-much-as-you-want, with less impact from the unfavorable side effects. You may loose some resolution with the reduced rate, but you likely won't feel it. The final consequence is your tail servo won't move as much for the same yaw, so you have less thrust vectoring, so less slide-and-dip. You'll still have some, but it won't be as pronounced.

Keep in mind, you will have to shift one of the motor rotations to -1 in the yaw mix . . . which ones is something you'll have to find out experimentally.

My extended booms are almost long enough, but they overlap still a little. The angle helps, but if they flex at all, they will collide.

Fair enough. That's hard to see from the pic, but I'm sure you're right.