disabling all sensors except 1 axis gyro

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

disabling all sensors except 1 axis gyro

Post by alll »

Hello, (my first post here)

I want to tune the PID settings for gyro. What is the easiest way of having only 1 axis (pitch for example) active, all other axis are off.
I tried setting PID of roll & yaw to 0 (zero) but ideally the rx should also be turned off.

So the goal here is that only the pitch axis is enabled (sensors + rx) all other axis are completely off!

thanks
manu

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: disabling all sensors except 1 axis gyro

Post by cardboard »

I've never heard of turning off any axis's but I don't think the copter would fly for very long at all with 2/3 axis turned off. If you want to isolate 2 axis the easiest way I can think of is to tie it up with string, I can't find the youtube tutorial but there are a few out there.

But assuming your copter is symmetrical in both layout and weight the pitch and roll pids should be the same. Yaw is normally pretty easy to tune.

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: disabling all sensors except 1 axis gyro

Post by alll »

It is for tuning the PID on a test bank, between 2 ropes (not flying), and i don't want to get influences from the other axis.

Code: Select all

//in config.h
 #define PITCHAXISONLY 1
// in main loop at the end
...
  //**** PITCH & ROLL & YAW PID ****   
  for(axis=0;axis<3;axis++) {
...
    axisPID[axis] =  PTerm + ITerm - DTerm;
    #if PITCHAXISONLY
      if (axis>0) axisPID[axis]=0;
    #endif
 }

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: disabling all sensors except 1 axis gyro

Post by cardboard »

Ahh you are tieing the copter up, that makes more sense.

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: disabling all sensors except 1 axis gyro

Post by alll »

Still have to disable Rx commands for roll & yaw ...

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: disabling all sensors except 1 axis gyro

Post by cardboard »

Just take the props off the motors you don't want to have an effect on the airframe, would that work? or disconnect the motors all togeather

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: disabling all sensors except 1 axis gyro

Post by alll »

cardboard wrote:Just take the props off the motors you don't want to have an effect on the airframe, would that work? or disconnect the motors all togeather


No, you don't get it.

I hang the copter left and right wit a rope. My goal is to only PID tune 1 axis (pitch), and roll & yaw should be off (sensor : this is working with the modified code, rx not yet!)

see:
https://www.youtube.com/watch?v=YNzqTGE ... e=g-user-u

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: disabling all sensors except 1 axis gyro

Post by Sebbi »

How is turning off the PID controllers different from taking the props off? For the rx stuff, just configure your rx to not send those channels or leave them on the center setting (gain -100?) ...

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: disabling all sensors except 1 axis gyro

Post by cardboard »

We don't know what type of copter he is using. If it was a quad + you could just remove a pair of props, if it is a quad x you can't do that as all the motors are used for any one axis.

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: disabling all sensors except 1 axis gyro

Post by alll »

Yep, its X4 ;)
With the changes posted above, its working for the sensors. Rx are still all active, but that's ok.
This method of tuning pid is the best imho.
manu

Post Reply