Camera gimbal control not functioning

Mike you are correct, but in the past I have seen that this parameter had quite some influence in the correct handling of these channels…

I am using serial out to control a storm32 gimbal, and in that case it’s a must to specify the correct Gimbal type.

Absolutely true, but in this case using parameter value 58, passthrough is telling Arducopter not to interfere. Just pass along the pwm values from the selected input channel to the selected output channel.

Hi again Mike. I am pleased to report that I have made some progress since yesterday. Before trying a full rest and starting over I decided to give the SBUS option another go.

My 8XR receiver is connected to the Pixhawk via SBUS.

I have tilt set to control from radio channel 8 (dial) and pan set to radio channel 9 (dial). I have also set channel 12 to a two way switch so I will be able to set the Tarot gimbal mode. Once the channels are assigned on the radio the functions are set in the Tarot ZYX configuration program, with a USB connection to flash the Gimbal controller on set up. I have left the Gimbal mode control set to “unmapping” in this configuration program, for now. The receiver type is set to SBUS and the default mode is Pan Follow.

In Mission planner I have to do the following in the full parameter tree.
Set BRW_SBUS_OUT From 0 to 1.
Set SERVO8_FUNCTION from 0 to 1, enables pass through.
Set SERVO9_FUNCTION from 0 to 1, enables pass through.
Set SERVO12_FUNCTION from 0 to 1, enables pass through.

No settings are made in the mission planner camera gimbal page - Mission planner doesn’t know the gimbal exists.

I can now power up the Pixhawk, power up the gimbal, depress the safety switch and the gimbal stabilises as the airframe moves with tilt and pan functioning perfectly via the radio.

I should be pleased at that. However I now have a new question.

From the excellent description of the use of CHx_OPT and SERVOx_FUNCTION for Copter 3.5 is see a contradiction implied by my setup which has me confused about exactly what the SERVOx_Function is referring to.

What I took from your description was that my Servo settings would be controlling Servo output 8, Servo output 9 (AUX1) and Servo output 12 (AUX4). These are all outputs from the Pixhawk.

However, on my copter nothing is connected to these outputs on the Pixhawk. Instead in my case the SERVOx_FUNTION numbers seem to refer to the inputs from the radio channels I set for tilt (8) and pan (9) [12 is not set to do anything yet]. These radio channels now pass through the PIXHAWK, thereby directly controlling the Gimbal.

I must be missing something obvious.

That is the way it is supposed to work. Since you are using S.BUS out. Those parameters tell the Pixhawk to take the ch8,9,12 and route them to the s.bus out as a passthrough. I need to add that to my article.

I need to test but I assume that in your example ch9, 10, 11 could/would be directed to the normal outputs while the ch8,9,12 are sent to the s.bus output stream. If you have a servo laying around try controlling it from Ch10 rcin and SERVO10_function=60 and connect it to AUX2 and see if it works.

Glad things are working.

Hi Mike

The Servo idea was a good one.

I had CH14 spare on my radio. I checked that CH14 on the radio worked in Mission planner first and checked the servo worked with a tester before starting.

I then set SERV10_FUNCTION=64 to get ch14 to AUX2.

Once powered on the safety switch was then armed.

With power from the USB this doesn’t work.

When power from the battery it does.

I will now try the Gimbal again, just in case I did not power the Pixhawk from the battery last time.

Remember the output bus on the Pixhawk is not powered. So it makes sense if the external power you use to power the gimbal or servo is not turned on then the USB can’t/won’t power anything connected to the output bus.

Hi Mike

So I have started over.

I now know that you can route a radio channel through to AUX2, SERVO10, by testing a spare Servo.

Test 1
I connected the Gimbal Tilt lead to AUX1, SERVO9. I want this controlled from Radio Channel 8 (All channels tested and working in Mission Planner Radio Calibration).

Mission Planner set up

And Gimbal configuration Program set up

In the Full Parameter Tree
SERVO9_FUNCTION = 7, which would be correct for Tilt.

Once all powered on, USB or Via battery, nothing happens.

2nd Test

Gimbal Tilt lead still on AUX1, SERVO9

In Mission Planner, All Gimbal Values removed in Camera/Gimbal settings.

In Full parameter Tree

SERO9_FUNCTION= 58, to pass Radio channel through from Channel 8.

Same Gimbal configuration program settings.

Again once powered up, nothing happens

Third Test.

Going back to plugging the Gimbal Tilt lead in to the SBUS on the Pixhawk (This will also control the Pan function as well).

Setting up the SBUS with BRD_SBUS_OUT from 0 to 1.

And the pass through for SERVO8 and 9_FUNCTION set to 1 from 0. (This makes no sense to me as the term SERVO is now referring to the radio channel and not an output on the Pixhawk).

Gimbal Configuration Program settings now changed for SBUS.

Once powered up this works perfectly.

I wonder if for the set ups that do not work, there is a conflict between the Mission Planner settings and those in the Gimbal configuration program?

I was wondering that too. When you set it to s.bus you are by-passing the Pixhawk and it is just passing through those channels to the gimbal.

First the output bus is not powered with the Pixhawk so you must supply power to whatever you are trying to control gimbal or servo but all the grounds must be common. So you have a ground and signal coming from the pixhawk to your device and the device gets power and a common ground from a bec.

Next I would eliminate the gimbal and check and see of you can drive a servo off the same Pixhawk settings instead of the gimbal like you did for Channel 10.

Next I would test if you can control the gimbal pwm with a servo tester rather than Pixhawk or directly off a receiver via PWM rather than s.bus.

This eliminates the Pixhawk and makes sure the gimbal works, as you are expecting with other simple PWM signals, or not.

I was wondering that too. When you set it to s.bus you are by-passing the Pixhawk and it is just passing through those channels to the gimbal.

Agreed

First the output bus is not powered with the Pixhawk so you must supply power to whatever you are trying to control gimbal or servo but all the grounds must be common. So you have a ground and signal coming from the pixhawk to your device and the device gets power and a common ground from a bec.

My power module supplies power to the Pixhawk output bus. Hence the Servo worked when connected to SERVO10 and the battery was used for power. The Gimbal has a separate power supply. The input cable for Tilt has a ground and a signal lead only. The ground is connected to the ground bus. The 5V power lead is disconnected as the Gimbal gets power separately. The second input, for pan is a signal only lead.

Next I would eliminate the gimbal and check and see of you can drive a servo off the same Pixhawk settings instead of the gimbal like you did for Channel 10.

I assume you mean in Mission Planner set up a servo as if it was the TILT channel for the Gimbal and see if it works. I am betting it will, because of the following.

Next I would test if you can control the gimbal pwm with a servo tester rather than Pixhawk or directly off a receiver via PWM rather than s.bus.

I am fairly sure I have already done this and I could not get it to work, either as an analogue or digital servo. That would suggest that the Gimbal doesn’t respond to PWM directly. I will recheck and let you know.

Now you are narrowing it down.
If the gimbal works on the pixhawk s.bus but not from the pwm outputs. (Now that I think about it check to make sure the Aux outputs are set to analog not digital by default the first four are analog.)
If you can’t control the gimbal directly from a receiver or servo tester then there must be a jumper or configuration setting that switches the gimbal from being controlled by discrete pwm channels vs s.bus serial. If so it is not a problem related to the Pixhawk itself.

Hi Mike

Yes definite progress.

When I put a Servo onto AUX1, SERVO9 and configure in Mission Planner Camera/Gimbal, as though the Gimbal tilt (SERVO9), Radio Channel 8, it works fine.

When I put the Gimbal tilt lead onto a Servo Tester it doesn’t work with the Gimbal powered on.

I am not sure I understand why this is. I am assuming that the there is PWM out put from AUX1 that the SERVO motor understands in the direct test I did. However this same signal is no good for the Gimbal controller. However when using SBUS the radio signal carried through the Pixhawk directly to the Gimbal is fine. It must therefore be different to that set out through AUX1.

To recap from earlier and add to the confusion. In a previous version of the ARDUPLIOT firmware, 3.4, The tilt function worked through AUX1, configured in Mission Planner. I could not get AUX2 Pan to work through.

Non the less, I can only conclude so far that the output via Mission Planner from AUX1/AUX2 is different to that sent direct through the SBUS. The Gimbal controller can use this.

Alternatively it is a software issue. With the SBUS the signal comes from the radio straight through to the Gimbal controller software and works. When the AUX1 and AUX2 outputs are used the signal is from the radio to the Pixhawk/Mission Planner and then on to the Gimbal software. The Pixhawk is not directly controlling the Gimbal in other words.

What I then find odd is that the Tarrot T4 3d Gimbal appears to be a popular choice and has been around for a couple of years. I have found a few references to trouble using it with MissionPlanner. That is how I found out about using the SBUS. However I would have thought there would be more postings, or a formal solution posted either on the ARDUPILOT site or similar.

Hi Jonathan,
Thanks for your post, it helped me to configure my Tarot T3DIII Gimbal. Exactly the same config as yours, running now Arducopter 3.5.5:

BRD_SBUS_OUT 1
SERVO8_FUNCTION 1
SERVO9_FUNCTION 1
SERVO12_FUNCTION 1

A funny thing is when not armed (button switch), the cam is like retracted up and not moving.
I had some confusions with wiring I first tried to use by error CH2 (yellow) instead of CH1 (see pict) , so I upload the correct wiring.

One question, in this configuration, is it possible to use the DO_SET_ROI command in auto mode? Thanks, Chris

I just noticed in rereading the thread that in your Tarot GUI it shows Receiver =s.bus.

I think this really means input to the gimbal controller type=s.bus

I bet if you click on the drop-down for that parameter there is another setting called PWM or SERVO etc which reconfigures the gimbal controller to look for a standard PWM signal in vs an s.bus signal.

You would, of course, have to connect standard 3 wire servo cables to the gimbal controller for each axis you want to control.

Cheers

Hi Jonathan, i need your advice about installing the tarot t4-3d gimbal with pixhawk fc.
My x8r receiver is connected from the sbus to pixhawk rcin.
The cables of the gimbal must be wire on the aux pins or use a sbus splitter?.
Can i consider the info with the attached pics you have done for make it work?
hope in a your positive answer.

Hi chris,
as i must install and setup the tarot t4-3d gimbal on my x8r sbus, where i can find the correct procedure for make it work?
Better to wire it on the sbus splitter or aux of the fc?
I must also change the wire of the cables coming from the gimbal for make it work coz the yellow cable is single and i don’t know if without the ground it will work.
Waiting for an your advice

Hi Chris and Mike
Just noticed that this thread was still running. I am away from my Copter for a few days and have lost Trak of the issue. Once back I will have a look and see if there is anything I can help with.

Hi Dave, connect your SBUS to the Gimbal and X8R to RCIN of FC.
And set the following parameters as this (if you’re using the same servo output).

BRD_SBUS_OUT 1
SERVO8_FUNCTION 1
SERVO9_FUNCTION 1
SERVO12_FUNCTION 1

Hi Chris, thank you for your reply.
After i set the parameters you sent me on mission planner, i must set the
same channel 8-9-12 on the taranis x9d plus correct?

Yes, or adapt your parameters to your config! I did the same as Jonathan, please have a look at the posts below with the printscreen. With this config, I’m able to run DO_SET_ROI, very happy with that. If you use simply an Y wire for SBUS, you will not be able to use ROI. Very happy with that!

Today I’ve built a sbus splitter… i have wire on it the connection of the
gimbal and x8r receiver and connect it on the rcin pin of flight
controller.
Roi is necessary for?