Betaflight Tilt Servo - RC Groups
Thread Tools
Oct 06, 2016, 04:41 PM
Registered User
Help!

Betaflight Tilt Servo


Hi all,
I have a question regarding the tilt-servo feature.
On my new quadcopter I would like to use a tilt-servo to tilt the camera when flying at higher speeds.

I have already soldered the motors to pins 1,2,3,4 and my tilt-servo to motor output 8.
When continuing my build I saw that the servo needs to be soldered to pin 1 and the motors need to start from pin 3.

At this point the servo reacts to the camstab settings, when stab is disabled the servo acts when moving the quadcopter.
But I can not use a channel to move the servo.

What can I do to correct this problem (other than resoldering the motor outputs)?
I have read some information on the internet about remapping the motor outputs trough the CLI.

Thanks
Sign up now
to remove ads between posts
Apr 07, 2017, 08:54 AM
Registered User
Hi All,

I created a video showing the differences and setup for Servo Tilt and Channel Forwarding. I hope that somebody can find this useful.

Betaflight Servo Tilt vs. Channel Forwarding (14 min 50 sec)


-Chuck
Apr 07, 2017, 09:04 AM
Team AlienWarpSquad
Quote:
Originally Posted by Bertsjuhn
Hi all,
I have a question regarding the tilt-servo feature.
On my new quadcopter I would like to use a tilt-servo to tilt the camera when flying at higher speeds.

I have already soldered the motors to pins 1,2,3,4 and my tilt-servo to motor output 8.
When continuing my build I saw that the servo needs to be soldered to pin 1 and the motors need to start from pin 3.

At this point the servo reacts to the camstab settings, when stab is disabled the servo acts when moving the quadcopter.
But I can not use a channel to move the servo.

What can I do to correct this problem (other than resoldering the motor outputs)?
I have read some information on the internet about remapping the motor outputs trough the CLI.

Thanks

WHAT Version of F??
WHAT FC Hardware?
These make a huge difference in how to do servo-tilt so the above Video may or may NOT apply.

Then READ the F WIKI.
Jun 19, 2017, 05:43 PM
Registered User
The Betaflight wiki is the most confusing thing ever. Do they just delete documention from old versions? I'm trying to set up servo tilt on some older firmware and it's like there is no record of how to do it on the entire internet. I don't want to flash my board and figure out how to get it flying the same way that it does now. This is like trying to set up a mikrokopter!
Jun 19, 2017, 06:11 PM
Team AlienWarpSquad
Quote:
Originally Posted by importon
The Betaflight wiki is the most confusing thing ever. Do they just delete documention from old versions? I'm trying to set up servo tilt on some older firmware and it's like there is no record of how to do it on the entire internet. I don't want to flash my board and figure out how to get it flying the same way that it does now. This is like trying to set up a mikrokopter!
The F WIKI only covers Changes in firmware. So if there is Nothing in the Wiki then the feature works the Same as in CleanFlight and probably BaseFlight and could still be the same as MultiWii. This is why there are references and Links to the documents for these in the getting started pages of the WIKI.

And how Servo-tilt works is also VERY dependent on Which FC Hardware you are running- so Always Read the threads/ Wiki page on the FC to learn Hardware dependent setup.
Jun 19, 2017, 06:57 PM
Registered User
Oh wow! Thanks for the reply! I didn't even think anyone would. Sorry if I sound super frustrated.
So I think I kind of understand.
I have set up servo tilt on betaflight before. The problem is assigning the output of the board to contol the servo. In the newest betaflight you can use the "resource" function in the CLI to easily do this.
Betaflight Servo Tilt vs. Channel Forwarding (14 min 50 sec)
However the betaflight firmware I have on my board pre-dates this "resource" tool. I'm still having a hard time finding the equivalent of this tool in the clean-flight docs.

Quote:
Originally Posted by waltr
The F WIKI only covers Changes in firmware. So if there is Nothing in the Wiki then the feature works the Same as in CleanFlight and probably BaseFlight and could still be the same as MultiWii. This is why there are references and Links to the documents for these in the getting started pages of the WIKI.

And how Servo-tilt works is also VERY dependent on Which FC Hardware you are running- so Always Read the threads/ Wiki page on the FC to learn Hardware dependent setup.
Jun 19, 2017, 07:38 PM
Team AlienWarpSquad
Well, without any idea as to which FC board/ST32 processor, F1, F4, F3.... I can not start to suggest how.
But the Per-Resource versions have a same Servo-tilt as CF so check the CF docs.
Jun 19, 2017, 08:33 PM
Registered User
It's this board here. https://nathan.vertile.com/blog/2016...#motor-outputs
I got impatient and tried flashing with the latest firmware and now im in a world of pain. The board is not recognized at all by my computer anymore and I'm ready to cry.
Jun 19, 2017, 09:18 PM
Team AlienWarpSquad
Quote:
Originally Posted by importon
It's this board here. https://nathan.vertile.com/blog/2016...#motor-outputs
I got impatient and tried flashing with the latest firmware and now im in a world of pain. The board is not recognized at all by my computer anymore and I'm ready to cry.
Ok, it uses a STM32F3 and the SPRacingF3 target. Did you FLASH the correct firmware?
If not then use the Boot pin and flash the correct firmware.
Else: There is an Installation Page in the F Wiki on USB drivers and how to fix them when the FC does not connect.
Since this uses the SPRacingF3 target most of the threads about the SPRacingF3 FC's also apply.

An STM32F3 outputs Servos on Motor outputs 7 & 8. The CF Docs cover how to setup servo output and a very Detailed explanation is in the DOD FC thread.
Here is how to do this on Pre-resource F Versions (I copied and saved the Dodd post on this) and NOTE the Version in the CLI output at the end:

Quote:
Originally Posted by powdermnky007 View Post

I have mine working, there was a change some time ago but to keep it short try pasting this line into cli.

servo 0 1000 2000 1500 90 90 100 6

In the above, 0 stands for pitch servo on pin one (servo tilt enabled), 1000 and 2000 are the limits, 1500 is middle,
90 and 90 are max and min angles for servo, and finally 6 in my case matchest to AUX 3 switch. Depending on the Aux
channel selected for servo tilt play with the last number, If I recall corectly 4 would be Aux 1, 5 would be Aux 2 etc.


I don't mess with the max and min angles, I just set my transmitter 3 pos switch at what tilt angles I want. So the only
thing I mess with in the above posted CLI line is the last number to get the correct Aux channel to respond.
Hope this helps

Ok to share the info, Enginerd was right on track, his command worked perfectly! I just changed his 6 to a 5 to work on
my Aux 2 channel. Here are my notes. Hopefully it will help someone.

enable feature servo_tilt
That makes motor pins 1 and 2 servo outputs and the motors now run off pins 3 - 6. I connect my servo to pin 1.

old info: in the servo tab in Cleanflight you just tick the channel you will be using on your tx. I have Aux 2 ticked on
the pitch servo and that goes to the slider on the side of my tx.

new info: for newer versions of cleanflight the servo menu in cleanflight configurator is broken and you need to enter
the cli command.
This is the cli command: servo 0 1000 2000 1500 90 90 100 5

In the above, 0 stands for pitch servo on pin one (servo tilt enabled),
1000 and 2000 are the servo limits, 1500 is middle,
90 and 90 are max and min angles for servo
the last number is what controls the servo.
-1 is disabled 4 is Aux 1 5 is Aux 2 6 is AUX 3

I don't mess with the max and min angles, I just set my transmitter 3 pos switch at what tilt angles I want the servo
to point at. The only thing you should need to change in the above posted CLI line is the last number to get the correct
Aux channel to respond. You need to make sure the correct CLI commands have been done and the connections are on the right
pins or you could fry a servo.

Good to hear you got it working, I could have gone into more details that you covered but had a glass of wine in one hand
and grilling cedar plank salmon with the other so kept it short. But yes, going through cli is the answer for now as the
servo menu tab is broken as you pointed out.

Oh, and the 100 if I recall correctly had to do with the speed of the servo tilt...I'd leave it alone but maybe if someone
is using a gimbal they may want to adjust accordingly for slower or faster tilt speed...I think that was it.

-----------------------------------------------------------------------------
WR- Dodo with BetaFlight
# BetaFlight v2/SPRACINGF3 1.10.0 Oct 2 2015 / 22:36:51 (52172ef)

feature SERVO_TILT

# servo
servo 0 1000 2000 1500 90 90 100 4 # Aux1 to Dodo output 7
servo 1 1000 2000 1500 90 90 100 5 # Aux2 to Dodo output 8

ESCs still on Dodo outputs 1,2,3,4.

servo 0 1000 2000 1500 90 90 100 4 # Aux1 to Dodo output 7
servo 1 1000 2000 1500 90 90 100 6 # Aux3 to Dodo output 8

servo 2 1000 2000 1500 90 90 100 5 # nothing
-----------------------------------------------------------------------------
Jun 19, 2017, 09:52 PM
Registered User
Thanks again!

I've since managed to revive the board.
It's in much better shape than before but now the left front and rear motors will not spin even in motor test mode using the configurator.
I'm wondering if it has something to do with the default resource assignment not playing nice with this board???? (changed motors 5 and 6 to be servos)
"resource BEEPER C15
resource MOTOR 1 A06
resource MOTOR 2 A07
resource MOTOR 3 A11
resource MOTOR 4 A12
resource SERVO 1 B08
resource SERVO 2 B09
resource PPM A00
resource PWM 1 A00
resource PWM 2 A01
resource PWM 3 B11
resource PWM 4 B10
resource PWM 5 B04
resource PWM 6 B05
resource PWM 7 B00
resource PWM 8 B01
resource LED_STRIP A08

UPDATE: changing resource motor 3 and 4 to NONE cause the board to be unresponsive again. Now it won't connect to the configurator and won't respond to any radio commands. Back to crying again.

Quote:
Originally Posted by waltr
Ok, it uses a STM32F3 and the SPRacingF3 target. Did you FLASH the correct firmware?
If not then use the Boot pin and flash the correct firmware.
Else: There is an Installation Page in the F Wiki on USB drivers and how to fix them when the FC does not connect.
Since this uses the SPRacingF3 target most of the threads about the SPRacingF3 FC's also apply.

An STM32F3 outputs Servos on Motor outputs 7 & 8. The CF Docs cover how to setup servo output and a very Detailed explanation is in the DOD FC thread.
Here is how to do this on Pre-resource F Versions (I copied and saved the Dodd post on this) and NOTE the Version in the CLI output at the end:
Last edited by importon; Jun 19, 2017 at 10:15 PM.
Jun 20, 2017, 01:41 AM
Team AlienWarpSquad
You did NOT follow the Servo tilt instructions in the F WIKI!
Re-Flash and try again.
Jun 20, 2017, 02:00 AM
Registered User
Thanks again for your help. Managaed to get a pulse yet again. This time tried flashing with a baud rate of 57600 and it worked. I have no clue why but it worked.
You were right. Needed to plug servo into motor output 7. Everything is working now. Now to get it flying like I had it before. Sigh*
Jun 20, 2017, 09:07 AM
Team AlienWarpSquad
Ok, great.
Now that you flashed the latest- guessing v3.1.7- READ the WIKI starting with the 3.1.x page to learn about all the differences. Also the Tuning, etc pages.