Hi everyone !

After being trapped in a "digging/tweaking/tuning/flying/repeat" loop for 3 weeks, I've finally managed to have a stable yet fully aerobatic tricopter which loiters fine and can be flown FPV with no probs. However, I still have some issues regarding the RTL and Auto functions. It took ages to set everything up and solve some problems which jeopardized the whole flight capabilities of the plateform. So I tried to remember everyone of them, describe them and add the solution I've found to be able to help beginners tricopter builder in their firsts steps with Arducopter. I take absolutely no credit to any of the fixes mentionned here, since it's pretty much a compilation of solutions I found here and there, but I sincerely thank the numerous contributors of the DIYdrones community for helping people so much, without even knowing it.

To this day, using an APM2 to control a tricopter is a tricky thing to do. Setting up a more or less flyable tri is easily achieved, but having it fine-tuned and capable of performing sharp maneuvers without shaking like my grand-fathers hand as well as having a good yaw authority while keeping the heading smooth and precise require a lot more work. I will stubbornly stand against anyone daring to say the opposite. Arducopter (v2.4~2.6) might be PNF for other platforms, it absolutely ain't for the tricopter. However, a carefully tuned APM2 will deliver naza-like stability while remaining fully aerobatic if you take the time to show him love. So, it might be a very steep learning curve, but the result is IMO worth the hair loss. And after all, hairs are by far more disposable than the kidney you have to sell to buy a wookong anyway.

If you decide to take the plunge, hook the tricopter to a KKBoard and ensure everything is flying fine. This important step will rule out platform-dependant problems such as motors angle, yaw servo center and throw, yaw assembly wiggling, EM noise ... So don't skip it, it may save you a lot of time and some wig costs too. Once your tri is flying OK with the KKBoard, you'll know for sure that any issue encountered will be Arducopter-related. Time to install the APM2. Be sure to read the wiki thoroughly before, every aspect of the installation being perfectly described there.

Tip : it may be practical to glue some 3 pins male connectors through the cockpit, pointed outside (I use the infamous tupperware cockpits) so that the cockpit containing all the brains electronics (APM, OSD, telemetry...) remains watertight and can be mounted with velcro [yes, the blue one] on the platform. This way, exchanging platforms might just be as easy as exchanging cockpits, connecting ESCs and loading parameters or reflashing the firmware. Just be sure to tape the wires from servos and ESCs to the platform to avoid them getting disconnected in flight by vibrations and to punch a tiny hole on the bottom for the baro sensor.

  • Hardware-related problems (APM2-specific, I presume) :

  • Problem #1 : using a PPMsum receiver don't work. Easy fix : use the APM1 method described in the wiki instead, works a charm.
  • Problem #2 : if the jumper connecting the in and out power rails is set and the APM refuse to boot (not even the power LED lights up) You've fried a diode. Don't freak out and connect the positives rails of the in and out buses together by soldering a wire in between [quick and dirty fix]. Remember to ALWAYS apply power from a battery before connecting the APM2 to USB, and disconnect the battery only while the USB cable is disconnected. Otherwise, very bad things can happen. (Not sure which of your computer usb bus or the APM2 will release the magic smoke first. My money is on the computer)
  • Problem #3 [might be related to #2] : the 4pins serial interface don't work with telemetry/osd/whatever. You've possibly fried the serial mux (or a software bug ? To be confirmed) Fix : solder 4 pins to the serial 1 port on the side of the board and use it instead for your serial stuff.
  • Tweak : You want to have battery voltage monitoring without buying expensive or crash prone hardware. Two possibilities : either solder a connector to the APM2 analog port 1 (like if it was the AttoPilot sensor [see the wiki]) which will be plugged into the first cell of your flight battery. Then, using the mission planner, set the BATT_MONITOR param to 3 and VOLT_DIVIDER to the number of cell your battery has. Pros : ultra easy to do, works with different batteries (3s, 4s...). Cons : inaccurate, especially if the battery is unbalanced, might blow your APM2 if reverse connected. Alternative [preferred] method : solder a resistor bridge across your main voltage input which goes into the analog input 1 in the APM2. Calculate the resistors value with an online calc [google resistor divider] to scale your maximum battery voltage to around 3.5-4V Set the BATT_MONITOR param to 3. Using a voltmeter, measure the voltage of your main battery, then the voltage of the divider out, divide the first one by the second one and set the VOLT_DIVIDER to this value. Pros : monitor the whole battery pack. Use only 2 cheap, widely available components. Cons : need to be changed if battery cell count is augmented.

  • Tuning/flight behavior related issues:

  • Problem #4 : Yaw is horrible. Either slow and quadcopterish or overshooting and seesawing like mad. Tried any combination of Yaw_S and Yaw_R PID without success [success isn't to be barely flyable for me. It should be at least as good as with a KKBoard]. Tried the "alternate yaw method" of Robert Lefebvre which was not bad, although a bit sluggish. Solution : compile arducopter from Robert Lefebvre's git clone, yaw branch (). Big thumbs up for him, he has made my tricopter flyable. Side effect : Acro mode is gone (seems unflyable for me, don't know why) Before compiling this version of the firmware, my tri was very unstable each time I yawed. After that, it became both precise at slow speed and acrobatic at full stick deflection. So Robert, you are the man. Warning : always disconnect the props while uploading a new firmware ! [had some surprises in this domain, nearly fall out with my cat]
  • Problem #5 : How to tune the PIDs ? Tried various methods with mixed results (first acro then stable, first P then I then D; first P, then D, the I, tuning at full moon, facing the Mecca...) Best method to me this day : using CH6 tuning, switch to acro mode (before fix #4) and tune the kP roughly under the oscillations. Then dial in I so that the copter will maintain the angle for more than one second. Then add some kD by small increments until it begin to twitch. Back off a bit. Switch to stable mode. Adjust kP so that it will return from a sharp bank to level without too much slow oscillation (depends on how do you intend to fly it). Some rapid "acro-like" (too much rate kP) oscillations are ok, we will eliminate them later by lowering the rate kP. Set stab I and stab Imax to 0 (really not needed). At this point, be sure to autotrim the copter in a windless environnement so that it flies without drifting at center stick. It may fly slightly on the side, as long as it doesn't drift in that direction. At last, add a little bit of stab kD until it twitches then go fly into the wind and back off the rate kP until the rapid oscillations are gone. And voila. Using PID to compensate for the wind in stable mode doesn't seems a good idea to me, since it's easier done manually, especially in gusty winds.
  • Tip : on tricopters, the PIDs may be a little bit different on roll and pitch axis. I found mine to have lower Ps on the pitch than on the roll. Seems logical since three motors are controlling the pitch axis while only two take care of the roll axis. This difference is not very important for the overall flying behavior, so I keep those adjustments to the end, only after I had plenty of fun flying the tri.
  • Tip 2 : telemetry helps a lot while tuning PIDs and debugging auto modes. Grab a pair of APC220, they are cheap, won't interfere with your 2.4g stuff and works very well with MP1.1.9x
  • Tip 3 : before even attempting to tune, think about the type of flight you intend to do with that platform. Do you want it smooth and precise, sharp and agile ? What kind of wind do you expect it to handle ? Then, you will know what to look for (oscillating while recovering a 60 degree bank isn't a show stopper for an aerial photography platform). You can still have multiple PIDs stored in a computer for different occasions.
  • Problem #6 : The copter is either sluggish but stable (low stab kP) or aerobatic but shaky (high stab kP). This is still a work in progress. A temporary fix for this one would be to tune it to the sluggish phase, then modify the radio.pde file at the lines "g.rc_1.set_angle(4500)" and "g.rc_2.set_angle(4500);" to 6500. This control the angle you want the copter to achieve at full stick deflection. Default is 45degrees, 65deg provide more control [thank you, emile !]. However, there was once in a day a rc_scale parameter that was wiped from new releases. A more permanent fix would be to revive it. If I have time, I might try that and putting it as a tunable parameter. I see no reason why the input from the user should be dependent on the kP of the accelerometer. To be improved...
  • Problem #7 : Loiter doesn't work. Send the copter to hell, begin a toilet-bowl effect, attempt seppuku. Well. There is a lot of factors explaining this one. Loiter and Nav PID might be one. Lowering Nav P a lot and setting I to 0 might help. At least you can see what the copter is trying to do. One thing to keep in mind is to autotrim the damn thing correctly, to be sure it will fly without drifting at center stick. The smallest, sightliest amount of drift (in a windless environment) may reach havoc in loiter mode. I had a hard time figuring out that. So don't loose faith in the autotrim mode.

So there were the most tenacious problems I encountered until now. If I find new ones, I might update this post to keep it up to date. If I can persuade my sd-dvr to record fpv flights instead of obstinately corrupting my sd cards and my girlfriend to hold a camera instead of crashing a KK tricopter, I might add videos to [hopefully] help newcomers to motivate themselves into building an ardu-tri-copter. In the mean time, don't hesitate to post tricopter-related questions below.

Happy flying !

Views: 5331

Reply to This

Replies to This Discussion

Thanks, there's some good info in there. I too have had plenty of issues getting the APM to fly nicely on my tricopter. This morning I redid the yaw mechanism to use a fast hextronik d-mg16 servo (2.9kg/.08sec/18.8g), and it has made a huge difference. Previously I had a bms-385dmax (4.2kg / .15sec / 16.5g) and using that the yaw would oscillate constantly, and now it holds without issues. The only thing is now when disarmed it will be hard over to one side and buzz constantly. I'm sure it can't be good for it, but once armed and given a little throttle, it centres properly.

Now to try and get my loiter working...

Hi ! I'm actually using bms-385dmax on the yaw and refuse to change it to please a picky flight controller.  The d-mg16 has lower torque and may operate closer to his limits, reducing his life and the reliability of the whole platform. In general, I try not to squeeze hardware on 0-redundancy platforms ;-) I can't insist enough on trying the Robert Lefebvre's code, which really is a game changer for us tricopter guys.

I though the servo-to-the-left problem when disarmed was fixed in v2.5.5. Which version do you use ? Maybe the mechanical assembly don't have enough freedom of movement ? What kind of yawing speed can you achieve (1,1 1/2, 2 turns/second) ?

For the loiter, here are my PIDs :

HLD_LAT_I,0
HLD_LAT_IMAX,30
HLD_LAT_P,0.2
HLD_LON_I,0
HLD_LON_IMAX,30
HLD_LON_P,0.2
LOITER_LAT_D,0.4
LOITER_LAT_I,0.08
LOITER_LAT_IMAX,30
LOITER_LAT_P,2.4
LOITER_LON_D,0.4
LOITER_LON_I,0.08
LOITER_LON_IMAX,30
LOITER_LON_P,2.4

Using theses, the tricopter loiters in a 3-4m box with a good breeze. You might want to up the kP values, depending on your thrust/weight ratio.

Have fun loitering !

Yeah I figure if the new faster servo will fix my yaw oscillation, then it stays. They're supposed to be pretty strong servos, so I'll see how it goes. 

You mean using Robert's alternate yaw method? I tried it previously, but couldn't get it to give me smooth turns, they felt 'notchy' and they would also need pretty much full stick deflection to get anywhere no matter how high I set my stab_yaw_p. I will try again with this new servo and see if I can get it to feel good, but it seems to work reasonably well at the moment.

I'm running stock standard 2.6 from mission planner, and my servo jams over to the right when disarmed. With this servo I no longer need to reverse my yaw in MP or on the tx, so I'm guessing if it was all reversed like with the bms-385dmax it would be hard over to the left. I'm pretty sure there's enough mechanical freedom of movement. The same yaw mechanism works fine and turns very quickly with a KK and multiwii board.

It would be really nice if there was a parameter that we could use to set the endpoints and centre point for servo travel, as it can be a bit of a pain to get the yaw servo centred correctly with the current system.

Thanks for all the work on this.  I'm pretty sure my bald spot is at least 20% larger than it was when I started trying to get APM2 to work on my tri.

The most frustrating thing for me has been the variations.  I think I have everything locked in and great, then something happens (crash, breeze, tune another parameter, change batteries) and it all goes to hell again.  My configurations seem very fragile.  And it leads to emotional ups and downs.  Somedays I feel like ditching the whole thing, others I'm so happy with how it's performing.

I'll be implementing a lot of what you say here.  Thanks again.

I HAVE PROBLEM #5: Stability Tune needed.

Hello and Thank you for this post and thread,

I have had fair success with KK board but desire more;  I am mainly interested in Autolevel & AltitudeHold; my Arducopter board arrived last week, yesterday was my first day flying the ArduPilot and I was able to fly it LOS and found altitude hold a success; however, at this point  would like to tune the stability to the ability of the KK board;  my purpose is SLOW & STABLE for FPV = SLUGGISH is PERFECT!

Here is the video I took of my Tricopter (FPV manuals) today, stable mode is not stable yet; I have made no changes to default values of mission planner, only changed Tx to about 70% rate reduction to pitch, roll, yaw and 35% expo.;

Here is the video: http://www.youtube.com/watch?v=2PtLtU9Pp-g&feature=youtu.be

question: what is meant by "CH6 tuning" ?

question: You have any other recommendations for me prior to my attempt at tuning for stability?

Thank you,

Swerv

Glad to see I'm not the only one experimenting the frustrating infernal sinusoid ;) A few weeks ago, I even thought to use a multiwii or KK board between the APM2 and the ESCs/servo !

To make live easier, I try to have as high rate i it needs to accommodate cg changes, and I gave up on wind compensation for stabilise mode in wind. Still have the RTL problem popping off erratically which drives me nuts, but having a FPV tri which can loiter when you explain the FPV basics at people passing by is just priceless to me. The vocal battery alert from the mission planner has some serious bling too ;)

I know it's hard, but try to stay cool and to come back to the basics when a problem occur. It may be excruciatingly frustrating to tune the thing, but once the tri's in the air, it may just be worth it.

Thanks for the kind words, and keep me in touch. Will add some pics/vids when I'll be back home (10-12 days)

Hey Jazztech, I just happened to see this.  So you find the Acro mode "unflyable" with my code?  What is the problem exactly?  Is it too sensitive?  Well, I should say that I actually modified the Acro mode somewhat to try and give Marco the feel he was looking for.  Probably wasn't the smartest to sneak that into my "yaw control" branch, but I was hoping to get him to try a bunch of changes at once (which he hasn't yet).  Anyway, basically what I did is create a bunch of Expo on the Acro mode.  Basically, it used to be that... full stick in Acro Mode would give you a rate that was 100% of whatever your Acro_P was.  But Marco found that that made the quad too slow in Acro mode unless you turned up AcroP, but then that would in turn make it oscillate.

So what I did was hard-code some exponential into the Acro mode.  Basically, now full stick gives you ~230% of full stick AcroP.  So it will roll and pitch faster, without becoming unstable.

Perhaps you have some Expo on your transmitter?  Maybe try taking it out if you do, and see if that helps.

That's a nice big one !

The CH6 tuning use a knob on the Tx to adjust a parameter in real time while flying. The whole process is described in the "in-flight tuning" section of this page on the AC2 wiki.

On the KKBoard, tuning is just a matter or adjusting the reaction of the copter to external forces, while on the APM2 tuning determines the overall flight envelope of the platform. So setting it too sluggish may become dangerous since you may lack of authority to recover the tri in case of some unscheduled aerobatics. Of course it's a question of nuances between slow and stable and twitchy but acrobatic. You may want to turn down the rate kPs while keeping a "reasonable" amount of stab kP to keep some maneuverability. It's up to you to try different settings and choose those which fits your flying style. I also fly mainly FPV, but I appreciate to have a fair amount of control for low altitude fun, obstacle avoidance and in a near future, multicopter dogfight ;)

A little dirty trick that may help (or not at all, depending on your thrust/weight ratio) to keep some authority with low kPs is to mix quite a bit of throttle with sharp sticks input on your Tx (quite easy to do with er9x). That way inputting full right aileron will send full right + wot at the apm2, resulting in a sharper roll. This may be completely inefficient if your thrust/weight ratio isn't high enough, the left motor being already maxed out. This trick could also be problematic in altitude hold modes, since the throttle no longer directly control the motors but the altitude. And chances are that you already are used to increase throttle during sharp turns. But who knows, to be tried ...

At last, it may be a good idea to reset any radio trim and expo settings before autotrimming and tuning the copter to keep feeding linear inputs to the apm2. The firmware include a dead band for each stick and the stable mode definitely has an "exponential" feeling which might not need further expo.

Good luck tuning and keep us in touch with the PIDs you use, and maybe some videos ? [Mines are coming in 12-15 days if it stop raining and PIDs posted here]. Have fun !

Ok, now that's make all the sense in the world. I haven't even tried to make the acro mode work since the PIDs I had were working nicely with the stab mode (and I was kind of bored to do constant adjustments to have half the flight modes working) but I will try to adjust AcroP knowing that. But the concept is looking great and I may steal you some of the code to apply it to stable mode. It drives me nuts to see the flight envelope hardlinked to the accelerometer behavior. Oh, and I don't have any expo on my radio.

(placement issue...ignore)

I haven't flown a multicopter yet, but I don't think you should have to fly in Acro mode to tune the RateP. That's not the goal of the system.

You are right about the expo.  That is usually how it works.  But what I did is a hack to give more rate, and expo.  So it's like Dual Rates and Expo together.  Just a hack to get a better feel within the existing system.  

At Jazztech,

Thank you for getting back to me;

Question: Is Acro tuning a requirement to stability tuning?

Comment: I happen to come across the Channel 6 tuning in my reads (thanks to your recommendation of course); and have been testing some parameters and video taping also; consistent with the information presented I found strong correlation between general hover stability and RateP and StabP, much less in Stab I, but nothing noticeable in Rate I.  There was noticeable overall improvement so time was well spent. however,  I used to hover with KK board in a one care garage, bot I have to use both garages to hover with APM2; I am in the process of sharing the videos, will provide link here to share soon.  I should probably get out there to the field and enjoy the extra features of this board to mix in some more JOY !  that always helps my own stability !!

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service