Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TriCopter: support servo with angle feedback to remove need to set YAW_SV_ANGLE #4294

Open
nmrdirtman opened this issue Jun 9, 2016 · 17 comments · May be fixed by #12752
Open

TriCopter: support servo with angle feedback to remove need to set YAW_SV_ANGLE #4294

nmrdirtman opened this issue Jun 9, 2016 · 17 comments · May be fixed by #12752

Comments

@nmrdirtman
Copy link

Issue details

Please describe the problem, or desired feature
Would like to make a request to consider adding dynamic yaw input from the yaw servo in a tricopter. Triflight ( https://github.com/lkaino/Triflight/releases ) uses this feed back data. Also RCExplorer.de sells a modified Blue Bird 210DMS servo with a feedback lead. http://rcexplorer.se/product/blue-bird-bms-210dmh-servo/ It uses a magnetic induction rotary encoder to know the rotor angle which can be used in calculations. This seems like a good idea. Please forgive me if its stupid or already address. I am willing to test.

Version

What version was the issue encountered with

Platform

[ ] All
[ ] AntennaTracker
[ x ] Copter
[ ] Plane
[ ] Rover

Airframe type

What type of airframe (flying wing, glider, hex, Y6, octa etc)

Hardware type

What autopilot hardware was used? (pixhawk, pixracer, PX4FMU etc)

Logs

Please provide a link to any relevant logs that show the issue

@rmackay9 rmackay9 changed the title Feature Request: Tricopter Dynamic Yaw Input TriCopter: support servo with angle feedback to remove need to set YAW_SV_ANGLE Jun 9, 2016
@ChrisKrieg
Copy link

This is quite an interesting enhancement. Has there been any development on implementing this sensor feedback?

@nmrdirtman
Copy link
Author

No a word. I am not a good coder but I bet if you look at at the triflight source code and port the control algorithm to Ardupilot it could work. Just beyond my abilities.

@IamPete1
Copy link
Member

IamPete1 commented Nov 2, 2019

@nmrdirtman @ChrisKrieg I have done a fix for this issue, It would be great if you could help me test it

@doceave
Copy link

doceave commented Jul 2, 2020

Hi there IamPete1... I have a tricopter under construction --- the same as described above by RCExplorer.se using but using a KakuteF7 AIO FC

I would be very happy to thoroughly evaluate the performance of the servo feedback feature.

Would you please advise how I can get hold of a firmware version with this feature for the Kakute F7 AIO v1.3?

@IamPete1
Copy link
Member

IamPete1 commented Jul 2, 2020

@doceave one build for Kakute F7

This is built on top of master, so it may be a little different if you have been flying stable. Set YAW_SV_PIN to the analog pin the feed back from the servo is connected to, RSSI pin is often used. Although I'm not sure what pin number that would be. Then set YAW_SV_SPEED to -1 to trigger a auto calibration. Have a look in the messages tab to see how it got on. You should then be good to fly.

@doceave
Copy link

doceave commented Jul 2, 2020 via email

@IamPete1
Copy link
Member

IamPete1 commented Jul 2, 2020

@doceave Yep that's it, if you leave YAW_SV_SPEED at 0 then its just a old fashioned tricopter. The new params have a MOT_ prefix, so the full thing would be MOT_YAW_SV_SPEED MOT_YAW_SV_PIN, there are some voltage ones too, but they should be auto populated by the calibration.

The .apj is exactly the same code as the .hex just packaged differently. Once you have uploaded a xxxx_with_bl.hex using betaflight configorator you then have the AP bootloader and can upload .apj's with Mission Planner.

@doceave
Copy link

doceave commented Jul 2, 2020 via email

@IamPete1
Copy link
Member

IamPete1 commented Jul 2, 2020

@doceave Yeah worth a search on the forum, shouldn't take too long to just try a few, the RSSI_PIN param description gives the common ones. If you can work it out we should add it to the documentation, If not I have one here somewhere I can see If I can work it out.

@doceave
Copy link

doceave commented Jul 2, 2020 via email

@doceave
Copy link

doceave commented Jul 16, 2020

@doceave Yeah worth a search on the forum, shouldn't take too long to just try a few, the RSSI_PIN param description gives the common ones. If you can work it out we should add it to the documentation, If not I have one here somewhere I can see If I can work it out.

I have completed my tricopter build and tuned it up to the best of my ability with the time I had available --- slight low frequency tail wobble but tomorrow I hope to address this by tubing Yaw kP/I/D in flight...

Sadly I have not managed to figure out the pin number associated with the RSSI pad on my FC, a Kakute F7 AIO v1.2

@IamPete1 --- Would you please call on your knowledgeable contacts to help me out re figuring out which pin to set as YAW_SV_PIN?

I will then be able to make good comparison of flight characteristics achievable with and without feedback from the tail servo :)

@IamPete1
Copy link
Member

@doceave I had a trawl through the code, its pin 15

@doceave
Copy link

doceave commented Nov 28, 2021

@IamPete1 ---- More than a year and some rebuilds later... Tricopter files nicely using the latest stable firmware without any servo feedback. There is, however, some tail wobble that is only bothersome when flying FPV.

Would you kindly again provide me with link to firmware for the Kakute F7 AIO with servo feedback? This time I hope to actually implement it properly.

Thanks.

@marcdornan
Copy link

marcdornan commented Dec 15, 2021

@IamPete1 Finally I built my mini tri! can probably just compile from a clone of your fork. However, I am not having much joy cherry picking that commit into my refeshed my fork of master. Here is what I get. Any ideas what the issue may be?

$ git cherry-pick 1c9c179
Auto-merging libraries/AP_Motors/AP_MotorsTri.h
CONFLICT (content): Merge conflict in libraries/AP_Motors/AP_MotorsTri.h
Auto-merging libraries/AP_Motors/AP_MotorsTri.cpp
CONFLICT (content): Merge conflict in libraries/AP_Motors/AP_MotorsTri.cpp
error: could not apply 1c9c179... AP_Motors: tricopter: estimate and measure yaw servo position

@IamPete1
Copy link
Member

@marcdornan I have rebased the branch.

@doceave This is a Kakute F7 build https://drive.google.com/file/d/1N5RKUplQBa4Y_vTq-2GZhyARHIS95i8-/view?usp=sharing

@doceave
Copy link

doceave commented Dec 16, 2021

You are all wizards! :)

@doceave
Copy link

doceave commented May 13, 2023

@IamPete1 --- My tricopter has now returned for a 3rd time! This time around I endeavor to do some tail servo testing before the vehicle attempts an RTL through a mountain!

Would you be willing to post a fresh link to a tricopter build with the servo angle feedback? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants