Hi,
I just build a Tri based on ArduCopter. I had some issues with yaw and did some changes in the code. In this post I want to share my experience and I would like the developers to take my changes into the official release, that it will be easier for others to build a Tricopter.
First of all, this is the result:
One of the most interesting mechanical parts, the Yaw-Servo:
Now my yaw-issues and solutions, starting from code release 2.1:
1) Yaw-Servo not in middle position on "power on"
2) Yaw-Servo reverse with Mavlink RC7_REV
1) Yaw-Servo not in middle position on "power on"
Issue: On "power on" the Yaw-Servo moved into mechanical limit (bad sound, high current consumtion and reduced lifetime for the servo). After a few seconds it returned to the middle position.
Solution:
In file "radio.pde" in function "output_min()":
Replace:
APM_RC.OutputCh(CH_7, g.rc_3.radio_min);
By this:
#if FRAME_CONFIG == TRI_FRAME
APM_RC.OutputCh(CH_7, g.rc_4.radio_trim); // Yaw servo middle position
#else
APM_RC.OutputCh(CH_7, g.rc_3.radio_min);
#endif
2) Yaw-Servo reverse with Mavlink RC7_REV
Issue: Depending on how you mount your Yaw-Servo the stabilisation of yaw can run in the wron direction. Reversing yaw on the remote doesnt help. You need to reverse the servo or change it mechanically. To reverse the servo:
Solution:
In file "ArduCopter.pde" in function "fifty_hz_loop()":
Replace:
APM_RC.OutputCh(CH_7, g.rc_4.radio_out);
by:
APM_RC.OutputCh(CH_7, ( (-1 * (g.rc_4.radio_out - g.rc_4.radio_trim) ) + g.rc_4.radio_trim ) );
I got this change from this Link! Now you can reverse the yaw-servo by putting "-1" to the parameter "RC7_REV" via Mavlink.
Regards, Igor
Comments
Ken, have you tried setting the RC7_REV parameter?
I haven't used a tri for a while, but last time I did I needed to set that for it to work correctly.
Yup, loaded the firmware from the Mission Planner. Tried Stable and one of the Betas - went back to Stable.
I've never flown a tri but that doesn't sound right. Of course you've loaded the tricopter software from the mission planner? (I'm sure you wouldn't make that mistake!) I just don't see why the yaw channel would move with the throttle. The yaw servo is plugged into output 7 on the APM?
It's true that the tri-copter software is not as polished as the rest of the multicopters (although in fact it's only the motor mixing that is tricopter specific) although Leonard from the dev team is building a tri so we probably will get to improving it over the next few months.
My APM 2.6 3.01 yaw servo tilts on throttle up. As I throttle up it tilts in proportion to the amount of throttle given. It centers fine when idle, the ranges from the TX all make sense in the mission planner. I've calibrated and re-calibrated a dozen times. I've updated firmware a few time, re-calibrated my ESCs 3 times. This is as good as it gets. I'm using the standard FliteTest David Windestal configuration. I think it's possible that APM as it stands is hit-or-miss when it comes to tricopters.
Glen,
I think maybe the fix is working but you've got some other issues there. I've commented on that thread, I hope it helps.
Hi Randy, that change of yours didn't work for me. Details of what happened are here: http://diydrones.com/forum/topics/tricopter-yaw-issues
Thanks for that. I'll give it a go and report back.
Glen,
I moved all the motors code into the AP_Motors library in 2.5.4. So you need to go into AP_MotorsTri.cpp and change somewhere around line 129 to be this:
I've actually checked this fix into trunk so it'll come out in the next official version and you won't need to manually upload using Arduino anymore.
By the way, I don't actually have a Tri so I'm interested to hear if this fix works ok for you.
I'm just setting up a tri, and need to reverse my yaw direction. In 2.5.4 I can't see the following code in arducopter.pde. Where should this be changed, and is this the best way to do it?
Replace:
APM_RC.OutputCh(CH_7, g.rc_4.radio_out);
by:
APM_RC.OutputCh(CH_7, ( (-1 * (g.rc_4.radio_out - g.rc_4.radio_trim) ) + g.rc_4.radio_trim ) );
Got my tri flying last night. When using the KK board I ended up tilting the 2 front motors (about 7 deg) so the craft would hover in one position LEVEL. Before this the frame tilted to one side to counter the side thrust of the tail rotor which had to tilt to prevent yaw (all props spin same direction). With this frame and the APM2 the craft flew first time with default settings. Starting to tune but flys well already. I needed to add a servo reverser to correct the yaw servo direction. Am waiting for this in Ground Control but may try the software change soon.