how to setup 3 axis gimbal with multiwii? heading lock?

Post Reply
Trike
Posts: 3
Joined: Thu Jul 19, 2012 5:05 pm

how to setup 3 axis gimbal with multiwii? heading lock?

Post by Trike »

Hi, I'm trying to setup my 3 axis Cinestar gimbal with a Paris Gimbal board that has the sirius IMU on it. There will be a separate TX operating the gimbal. I currently have Tilt and Yaw from the RX hooked up to the paris board. I have #Gimbal and #Tri enabled in config.H

I have a few questions that hopefully someone can help me with.

1. How do you get pan/yaw to work in heading lock? I can't get yaw to work at all when hooked up to the paris board. Works fine when I hook it up directly to the RX. I have tried enabling MAG and always ARM in the GUI, but nothing happens. If I pan on the TX, the GUI does show movement, so it's getting signal from the RX. The pan will also move freely, it's almost like the servo isn't getting any signal at all. I'm not sure how to enable the pan axis and get heading hold to work.

2. Is there something I can do to enable slew mode for tilt? I'd like the ability to stop the tilt when I return the stick to center, instead of the tilt returning to center when the stick returns to center.

3. Any tips on tuning? I've just been messing with "TILT_ROLL_PROP" and "TILT_PITCH_PROP". I'm still having a hard time getting a perfectly level footage. Feels like it responds a little slow. If I increase the PROP to much then it becomes un-leveled.

I really would like to get the pan to work, so any suggestions on any of these questions is greatly appreciated. If somebody can point me in the right direction, it would greatly help.

EDIT: I'm trying to get the same results as Tretch5000 who is using the gimbal and paris board. http://youtu.be/c0W3cbZt0Hk

Thanks!

Trike
Posts: 3
Joined: Thu Jul 19, 2012 5:05 pm

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by Trike »

I think the problem with the heading lock on pan axis is the board isn't arming. I placed check marks on the ARM section in the GUI,I thought that was enough to arm. Maybe not? I'm still waiting for my 9x to show up so i'm using a RC car TX at the moment. I have the wheel assigned to yaw and throttle assigned to tilt. Arming with the TX might be difficult since i'm not using the throttle channel on the board.

Is there a way to make it arm all the time on power up?

tovrin
Posts: 705
Joined: Tue Sep 20, 2011 4:08 pm

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by tovrin »

did you click "write" after placing checkmarks? then click read again to make sure they stick.

(assuming your using multiwiiconf GUI)

if you checkmark all 3 positons of a aux port it will be on all the time i believe.

Trike
Posts: 3
Joined: Thu Jul 19, 2012 5:05 pm

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by Trike »

Yeah, I did make sure the settings were saved. I'll hook it up to my dx7 tonight and try to properly arm it to see if it'll start working. I might even just assign a switch on the TX to be at the min throttle setting so I can try to arm it.

Looking at the code, it looks like it needs to see the throttle set below the min before it will arm, even if the checkboxes are all checked.

remis
Posts: 3
Joined: Fri Oct 12, 2012 7:09 am

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by remis »

Hello,
I have the same issue , and this hardware :
http://www.multiwiicopter.com/products/ ... trol-board

In config.h..with dev 2.1
if I use only "GIMBAL" : I don"t have any effect on yaw axis. I'm able to add stick position to the pitch and roll stabilisation.
If I use only"TRI" : I have an effect on yaw axis with stick movement , but no compensation effect of yaw mouvement..even if mag are selected. I d'ont have any effect with stick on roll and pitch position.
Is there any body with a kind on config. h and snapshot view of GUI?
Many thank's for your help.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by PatrikE »

The Gimbal and servoTilt modes in MWii only have Tilt/Roll function.
There must be a 3-Axis mode made to make it work with Pan axis!
It may work if you select TRI and SERVO_TILT.
Using Tri servo for Pan.

CamStab must be set in gui to get Gimbal to move.

remis
Posts: 3
Joined: Fri Oct 12, 2012 7:09 am

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by remis »

Thank's patrikE. I apply your recommendation :

i change part of config .h :
//#define GIMBAL
//#define BI
#define TRI
#define SIRIUS // Sirius Navigator IMU
//#define SERVO_MIX_TILT
#define SERVO_TILT
I use a RC receiver connected to the board. After calibration , I activate the ACC, the MAG and CAMSTAB.( see jpg file)
Result :
Movement of the board :
effect on servo pitch and servo roll camera: good!
effect on yaw ,like tricopter : correction is done only durong motion. Servo comme back to middle position. thus it is impossible to keep direction with a camera. no effect of mag?

Movement of stick on RC tx :
pitch , yaw : no effect
yaw : good effect : servo keep the position.

what is the exact configuration?
Is there only modification in config.h?
Attachments
snapIssuegimbal.jpg

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by PatrikE »

Pitch/Roll on gimball is hardcoded to AUX3&4 in Output.ino

Code: Select all

  S_PITCH = TILT_PITCH_MIDDLE + rcData[AUX3]-1500;
    S_ROLL  = TILT_ROLL_MIDDLE  + rcData[AUX4]-1500;
    if (rcOptions[BOXCAMSTAB]) {
      S_PITCH += TILT_PITCH_PROP * angle[PITCH] /16 ;
      S_ROLL  += TILT_ROLL_PROP  * angle[ROLL]  /16 ;


Change rcData[AUX3] & rcData[AUX4] to PITCH & ROLL.

remis
Posts: 3
Joined: Fri Oct 12, 2012 7:09 am

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by remis »

thanks!! it works.
I'm using TRY configuration with camstab activated.
now : cam pitch and roll are able to folow both stick position and board motion

only issue : yaw is not follow board motion : just in derivative effect take account of °/s an not position angle...

Starbux
Posts: 1
Joined: Tue Oct 23, 2012 5:04 pm

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by Starbux »

I have been trying to do the same thing with the 3 axis gumball on the CS8. I am using Hobby King MultiWii 328P for the controller and a Spektrum Dx8 with the DSMX satellite connected directly to the Multiwii. I have set up the board to be a Tri Copter as well. I can get the tilt and roll to compensate. I notice that there is no way to get the tilt to lock in place. Any ideas on this. I am guessing that if I can hack the code and put a conditional statement to ignore the return movement of the stick might solve this if I can find the code that governs that servo movement. One the right stick is back to null the gimbal returns to neutral. Also I would rather the right stick be purposed for yaw not roll. In fact, in my opinon there really is no reason for the operator to have control of the rolling moment of the gimbal, it should just stay on a level plane. This is how real gimbals on Military UAV's and Targeting pods work, it is always assumed that the axis is level.

Secondly I tried to set up panning to be driven by D3 the port for the tricopter tail servo, when I plug it in the gimbal continuessly rotates clockwise and starts to jitter if I attempt to rotate it in the opposite direction with the DX8 Controller, not sure why it is doing this. The board seems to exept commands from from the spektrum without issue. I am using the DSMX not the DSM2 at 22ms.

Maine_Guy
Posts: 27
Joined: Fri Mar 06, 2015 7:07 pm

Re: how to setup 3 axis gimbal with multiwii? heading lock?

Post by Maine_Guy »

I know this thread is old... but I still found it helpful.

I altered the code slightly to use the yaw to make a simple gimbal to correct for that instead of roll.

Just altered this one line of code:

Code: Select all

    if (rcOptions[BOXCAMSTAB]) {
      servo[0] += ((int32_t)conf.servoConf[0].rate * att.angle[PITCH]) /50L;
      //servo[1] += ((int32_t)conf.servoConf[1].rate * att.angle[ROLL])  /50L;
      //trying yaw here for alternate gimbal
      servo[1] += ((int32_t)conf.servoConf[1].rate * att.heading * 10)  /50L;
     


or perhaps try this:

Code: Select all

      servo[1] += ((int32_t)conf.servoConf[1].rate * axisPID[YAW])  /50L;

Post Reply