X Gyro is sluggish

4 views
Skip to first unread message

bw

unread,
Jan 7, 2011, 12:52:59 AM1/7/11
to UAVHeliBoard
I'm using the UAV Quad Copter Monitor to set-up my quad and the X gyro
is very slow to respond compared to the Y gyro. The gains for the
pitch and roll are the same. Is there another setting that influences
the response time?

I've tried adjusting the gain for the roll and it's doesn't seem to
improve the response.

Am I missing something?

Regards,

Bryan

Jerry Chapman

unread,
Jan 8, 2011, 10:49:18 AM1/8/11
to uavhel...@googlegroups.com
Bryan,
 
Sorry for the slow response, but was out of town for the day.
 
There is no setting that infuences the response time.  What values have you tried for the gain?  Could you also send a jpg or video showing the response of the x gyro.
 
Thanks,
 
Jerry
 
 
> Date: Thu, 6 Jan 2011 21:52:59 -0800
> Subject: X Gyro is sluggish
> From: bw4...@gmail.com
> To: UAVHel...@googlegroups.com

Jerry Chapman

unread,
Jan 9, 2011, 12:28:16 AM1/9/11
to uavhel...@googlegroups.com
Bryan,
 
John just reminded me of another possibility of your problem.  Did you change the board type?  Its in options.h - #define BOARD_TYPE
 
Let me know what you find,

 
Jerry
   
> Date: Thu, 6 Jan 2011 21:52:59 -0800
> Subject: X Gyro is sluggish
> From: bw4...@gmail.com
> To: UAVHel...@googlegroups.com
>

bw

unread,
Jan 9, 2011, 12:37:34 PM1/9/11
to UAVHeliBoard
Hi Jerry,

I left the gain values at the original values and I changed the
BOARD_TYPE = INVENSENSE_BOARD.

I think that I must have something else going on, now when I test i
don't see the motor commands trying to correct pitch or roll actions.
I'm pretty sure this was working before.

What values should i expect for the gyros? Pitching +/- 90 deg I get
+/- 30 on the UAV Quad Monitor graphs. I noticed that in another post
the values were almost three times this when you were discussing the
noise values. I have an image but I don't see a way to post it...

Anyway, I'm not sure what's going on. I've even went back to the
original files and still see the same results. I'll keep fiddling, but
any thoughts would be appreciated.

Thanks,

Bryan

Jerry Chapman

unread,
Jan 9, 2011, 12:52:59 PM1/9/11
to uavhel...@googlegroups.com
Bryan,
 
To post a jpg.  Just reply in your email program and send it as an attachment.
 
Jerry
 
> Date: Sun, 9 Jan 2011 09:37:34 -0800
> Subject: Re: X Gyro is sluggish

bw

unread,
Jan 9, 2011, 1:35:00 PM1/9/11
to UAVHeliBoard
I'm using it on-line.

Bryan Walter

unread,
Jan 9, 2011, 1:36:05 PM1/9/11
to UAVHeliBoard
ok, turned on the email updates.
KP_015_KD_15_org.PNG

Jerry Chapman

unread,
Jan 9, 2011, 2:02:47 PM1/9/11
to uavhel...@googlegroups.com
Bryan,
 
I think it would be good to run the self test and check out the board.  (standard firmware for self test  ,self test instructions here).
 
Also could you send me your options.h
 
Thanks,
 
Jerry
 
> Date: Sun, 9 Jan 2011 11:36:05 -0700

Bryan Walter

unread,
Jan 9, 2011, 2:27:47 PM1/9/11
to uavhel...@googlegroups.com
Hi Jerry,

I got the motor commands to respond to roll and pitch movements.

The

#define ROLLKP0.2
#define ROLLKD 0.15

Find attached my options.h file.

options.h

Bryan Walter

unread,
Jan 9, 2011, 2:54:38 PM1/9/11
to uavhel...@googlegroups.com
Opps, hit send a little early.

So i got the motor commands to respond, it seems that the original values:

//#define ROLLKP 0.015
//#define ROLLKD 0.15

//#define PITCHGAIN 0.015
//#define PITCHKD 0.15

are to low and don't produce much response.

If I raise them to the following, the motor commands start to respond

//#define ROLLKP 0.2
//#define ROLLKD 0.15

//#define PITCHGAIN 0.2
//#define PITCHKD 0.15

the board seems to work ok, and using a receiver I can make each motor
speed up, slow down accordingly to which stick I move. I also can tell
that the motors are changing speed when I pitch and roll, so it
appears that everything is kinda working, it's just slow. I have my
machine mounted to a platform that allows it to pitch and roll, so I
can try it with props before trying to fly it. Anyway, so when I add
the props, it looks like it attempts to keep the quad level but the
response it just to slow. If I give it 50% throttle, I would expect it
to balance or if I try to pitch or yaw with the receiver, it should
try and correct after I let go of the sticks. Watching the UAV Quad
Monitor, it pretty evident that the response is not responding fast
enough to correct or keep the quad level.

I haven't tried the self test because the board responds when I pitch
and roll the quad an I'm using the v3 board and the self test doesn't
look to support it...

Do you have any idea what the update rate is on the control loop?

Regards,

Bryan

John McClelland

unread,
Jan 9, 2011, 3:01:16 PM1/9/11
to uavhel...@googlegroups.com
Something strange here, but maybe I just haven't kept up....

The Quad distribution options.h file has:

#define ROLLKP 0.015 //

#define ROLLKD 0.150 //

#define PITCHGAIN 0.015 //!!!!! Used in Heli (.2)

#define PITCHKD 0.150 //!!!!! Used in Heli (.1)

#define FILTERSHIFT 0 // filter shift divide

Bryan's option.h has:

#define ROLLKP 1.0 //

#define ROLLKD 0.5 //

#define PITCHGAIN 1.0 //!!!!! Used in Heli (.2)

#define PITCHKD 0.5 //!!!!! Used in Heli (.1)

#define FILTERSHIFT 5 // filter shift divide

Fist off, Jerry must hardwire FILTERSHIFT somewhere or the code would not
work with 0 (at least not with any vibrations). But Bryan has 5...a HUGE
difference.

Bryan's gains are also VERY large compared to Jerry's. However, if he is
filtering at that large a differnce it would explain the high gains.

Maybe if I understand the sources of these differences I could help.

Best,

John

John McClelland

unread,
Jan 9, 2011, 3:03:11 PM1/9/11
to uavhel...@googlegroups.com
This would appear to all be consistent with a high FILTERSHIFT, particlarly
if it is being added to some hardwired value in the code.....sluggish and
large gains result.

John

----- Original Message -----
From: "Bryan Walter" <bw4...@gmail.com>
To: <uavhel...@googlegroups.com>

John McClelland

unread,
Jan 9, 2011, 3:06:30 PM1/9/11
to uavhel...@googlegroups.com
The inner loop (driving the servos) should be running at 40Hz.

John
----- Original Message -----
From: "Bryan Walter" <bw4...@gmail.com>
To: <uavhel...@googlegroups.com>
Sent: Sunday, January 09, 2011 12:54 PM

John McClelland

unread,
Jan 9, 2011, 3:44:05 PM1/9/11
to uavhel...@googlegroups.com
OK I see Jerry really does have FILTERSHIFT=0...the Quad must have a very
dynamical response than the heli...but we know this works for the Quad per
Jerry. So now the question is why Bryan has FILTERSHIFT set to 5? Did you
need to increase the signal to noise? This does explain the large gains and
sluggishness I believe, although the gains seem very high even for the
difference in FILTRSHIFT.

Best,


John
----- Original Message -----
From: "Bryan Walter" <bw4...@gmail.com>
To: <uavhel...@googlegroups.com>
Sent: Sunday, January 09, 2011 12:54 PM

Bryan Walter

unread,
Jan 9, 2011, 4:29:50 PM1/9/11
to uavhel...@googlegroups.com
Hi John,

I was playing around with the values and making BIG changes to try and
see what it did, which is why the gains were so high and the filter
values were so large.

So I have changed FILTERSHIFT = 0 and the gains to:

#define ROLLKP 0.2
#define ROLLKD 0.1

#define PITCHGAIN 0.2
#define PITCHKD 0.1

and it still very sluggish, as the attached image shows. To create the
image, I pitched forward and then back and then rolled right and left.
It seems to take 5 to 10 seconds for the response to settle. Likewise,
when I add the motors and pitch and roll the craft, the motors speed
up and slow down as they should however it's takes seconds to respond.

It's also a little odd that nothing is showing up in the z gyro plot.

Anyway, thanks for the feedback...I keep fiddling.

Bryan

KP_2_KD_1.PNG

Bryan Walter

unread,
Jan 9, 2011, 4:51:14 PM1/9/11
to uavhel...@googlegroups.com
I just switched to a v2 board and the response seems a lot better
(although noisy), so I kinda think I have some bad hardware.

Are you guys using a Sparkfun board or a prototype?

Bryan

v2_board.PNG

Marcus Fahlén

unread,
Jan 9, 2011, 5:05:17 PM1/9/11
to uavhel...@googlegroups.com
Bryan,

Could you check the voltage on pin3 on the gyro daughter board? (its the middle pin)
It should read close to 1.35V when the UDB sits still on the bench. The supply voltage is on one of the outermost pins. It should read close to 3.3V.

I had the same symptoms due to a faulty UDB. It was bad soldering that caused it. When my UDB acted up on me the reading from the gyros was close to 0 (zero) Volts.


Cheers!

/Marc

Bryan Walter

unread,
Jan 9, 2011, 5:52:42 PM1/9/11
to uavhel...@googlegroups.com
I get 3.3V on all the power lines, the grounds look good but I get 3.3
at one of the output pins, the others two are closer to 2V.

I re-solder all the pins and nothing changed...looks like I have a bad
daughter board.

Thanks for your suggestions.

Regards,

Bryan

Marc-X

unread,
Jan 9, 2011, 6:04:18 PM1/9/11
to UAVHeliBoard
Just to be sure: You have a UDB3 (with the Inversense IXZ-500 gyros?)

/ Marc
> >> >>> On Sun, Jan 9, 2011 at 12:02 PM, Jerry Chapman <raptor9...@msn.com>

Marc-X

unread,
Jan 9, 2011, 6:08:59 PM1/9/11
to UAVHeliBoard
Bryan,

I had to re-solder the actual gyro chips (under microscope), and re-
toasted the daughter card several times before my symptoms went away.

I do NOT suggest you try something like this yourself!!!
If you do solder the pins, do so both on the daughter card, and under
the UDB main board. 3 sec heat at each solder point with medium-hot
solder pen.


Cheers!

/Marc
> >> >>> On Sun, Jan 9, 2011 at 12:02 PM, Jerry Chapman <raptor9...@msn.com>

Bryan Walter

unread,
Jan 9, 2011, 6:16:43 PM1/9/11
to uavhel...@googlegroups.com
yup.

Bryan Walter

unread,
Jan 9, 2011, 6:24:29 PM1/9/11
to uavhel...@googlegroups.com
I think I'll try for a replacement board first, but I bought it a
while ago....we'll see how good sparkfun's customer service is ;)

Did you re-flow the board with hot air? I'm thinking that since the
output is 3.3, it's a chip problem and not a cold joint.

Regards,

Bryan

John McClelland

unread,
Jan 9, 2011, 6:28:02 PM1/9/11
to uavhel...@googlegroups.com, John McClelland Gmail
Bryan

Were you able to get the self test routine to run on your board? This is
the best way to see if the hardware is working. It basically lets you move
the UDB around and you watch three servos move for pitch/roll/yaw. This
should tell you if the gyros are working or not.

I'm not sure if there is a self test for the Invensense gyros or not, but I
can tell you how to mod the code that is on the MP download site if you
want.

Probably worth a test before resoldering or returning the board.

Let me know what you would like to do

Best,
John
----- Original Message -----
From: "Bryan Walter" <bw4...@gmail.com>
To: <uavhel...@googlegroups.com>
Sent: Sunday, January 09, 2011 4:24 PM
Subject: Re: X Gyro is sluggish

I think I'll try for a replacement board first, but I bought it a
while ago....we'll see how good sparkfun's customer service is ;)

Did you re-flow the board with hot air? I'm thinking that since the
output is 3.3, it's a chip problem and not a cold joint.

Regards,

Bryan

On Sun, Jan 9, 2011 at 4:16 PM, Bryan Walter <bw4...@gmail.com> wrote:
> yup.
>
> On Sun, Jan 9, 2011 at 4:04 PM, Marc-X <marcus...@gmail.com> wrote:
>> Just to be sure: You have a UDB3 (with the Inversense IXZ-500 gyros?)
>>
>> / Marc
>>
>> On Jan 9, 11:52 pm, Bryan Walter <bw4...@gmail.com> wrote:
>>> I get 3.3V on all the power lines, the grounds look good but I get 3.3
>>> at one of the output pins, the others two are closer to 2V.
>>>
>>> I re-solder all the pins and nothing changed...looks like I have a bad
>>> daughter board.
>>>
>>> Thanks for your suggestions.
>>>
>>> Regards,
>>>
>>> Bryan
>>>
>>>
>>>
>>>
>>>
>>>
>>>

>>> On Sun, Jan 9, 2011 at 3:05 PM, Marcus Fahl�n <marcus.fah...@gmail.com>

Bryan Walter

unread,
Jan 9, 2011, 7:05:06 PM1/9/11
to uavhel...@googlegroups.com
I didn't try the self test. I used an o-scope on the gyro outputs and
the z-axis doesn't seem to respond.

The self test project doesn't have the new board (V3) but I assume
it's as simple as copying the header file from another project and
including the Invensense header file, right?

Regards,

Bryan

>>>> On Sun, Jan 9, 2011 at 3:05 PM, Marcus Fahlén <marcus.fah...@gmail.com>

John McClelland

unread,
Jan 9, 2011, 7:09:20 PM1/9/11
to uavhel...@googlegroups.com
Marc is looking for the UDB3 self test code, but yea you should just go in
and see where the config files get included depending on what is defined in
the project and change it to use the IXZ500 config file.

Regards,

Bryan

>>>> On Sun, Jan 9, 2011 at 3:05 PM, Marcus Fahl�n <marcus.fah...@gmail.com>

Marc-X

unread,
Jan 9, 2011, 7:14:08 PM1/9/11
to UAVHeliBoard
I have sent it, but it hasn't shown up yet.
It was a pre-compiled .HEX file attachment.

I'm checking my source to be sure it builds OK, then I zip the project
and attach in another post.

Probably have to rename the .zip to .doc here or??

/Marc

On Jan 10, 1:09 am, "John McClelland" <mcclelland.j...@gmail.com>
wrote:
> >> On Sun, Jan 9, 2011 at 4:04 PM, Marc-X <marcus.fah...@gmail.com> wrote:
>
> >>> Just to be sure: You have a UDB3 (with the Inversense IXZ-500 gyros?)
>
> >>> / Marc
>
> >>> On Jan 9, 11:52 pm, Bryan Walter <bw4...@gmail.com> wrote:
>
> >>>> I get 3.3V on all the power lines, the grounds look good but I get 3.3
> >>>> at one of the output pins, the others two are closer to 2V.
>
> >>>> I re-solder all the pins and nothing changed...looks like I have a bad
> >>>> daughter board.
>
> >>>> Thanks for your suggestions.
>
> >>>> Regards,
>
> >>>> Bryan
>
> >>>> On Sun, Jan 9, 2011 at 3:05 PM, Marcus Fahl�n <marcus.fah...@gmail.com>
> ...
>
> read more »

John McClelland

unread,
Jan 9, 2011, 7:15:22 PM1/9/11
to uavhel...@googlegroups.com
Yea Google blocks them last I looked.

/Marc

> >>>> On Sun, Jan 9, 2011 at 3:05 PM, Marcus Fahl�n

> read more �

Marcus Fahlén

unread,
Jan 9, 2011, 7:17:54 PM1/9/11
to uavhel...@googlegroups.com
Cr*p!

I sent it to the uavdevboard group...

Here it is:
Change the .DOC to .HEX

read more »


RollPitchYawRed.DOC

Marcus Fahlén

unread,
Jan 9, 2011, 7:20:27 PM1/9/11
to uavhel...@googlegroups.com
Here is the project. Tested it and it built clean...

/Marc 
RollPitchYawRed.zip.DOC

John McClelland

unread,
Jan 9, 2011, 7:28:06 PM1/9/11
to uavhel...@googlegroups.com, John McClelland Gmail
Marc
 
I think this is just rev4 self test from the download site and does not have the conditional statements to include IXZ500 if defined.  Looks like you just renamed the Invensense gyro config file to be the Red board.   That should work, but could be confusing is someone tries to use it for a red board!
 
Thanks

Marcus Fahlén

unread,
Jan 9, 2011, 7:47:54 PM1/9/11
to uavhel...@googlegroups.com
I Should have mentioned that. I sent the file for this particular case. I'm not aware of another one modified to include the Inversense gyros. Just wanted to help this fellow to diagnose his board.

/ Marc

John McClelland

unread,
Jan 9, 2011, 7:47:57 PM1/9/11
to uavhel...@googlegroups.com
Very helpful Mard....thanks

Marcus Fahlén

unread,
Jan 9, 2011, 8:01:40 PM1/9/11
to uavhel...@googlegroups.com
No problems.

I'm also curious of how common these fault are. I have seen several incidents with the same symptoms now.
My guess is that early SF daughter cards were ran too fast through the toaster, or wrong amount of paste being used.
These gyros are a pure H*ll to solder without shorting the terminals...

/ Marc

John McClelland

unread,
Jan 9, 2011, 8:15:32 PM1/9/11
to uavhel...@googlegroups.com, John McClelland Gmail
If you want to modify the code to recognize the Invensense gyros, in the project file Marc sent replace options.h with the one attached, delete ConfigRed.h and add the three config files attached. 
 
Edit options.h and edit the first three lines to select the board you want.
 
Best
options.h
ConfigRed.h
ConfigGreen.h
ConfigIXZ500.h

bw

unread,
Jan 12, 2011, 8:51:24 PM1/12/11
to UAVHeliBoard
I've sent my board back to sparkfun for a replacement...hopefully I'll
be back at this soon :)

Thanks for all the help.

Regards,

Bryan

On Jan 9, 6:15 pm, "John McClelland" <mcclelland.j...@gmail.com>
wrote:
> If you want to modify the code to recognize the Invensense gyros, in the project file Marc sent replace options.h with the one attached, delete ConfigRed.h and add the three config files attached.  
>
> Edit options.h and edit the first three lines to select the board you want.
>
> Best
> John
>
>
>
>
>
>
>
> ----- Original Message -----
>   From: Marcus Fahlén
>   To: uavhel...@googlegroups.com
>   Sent: Sunday, January 09, 2011 5:47 PM
>   Subject: Re: X Gyro is sluggish
>
>   I Should have mentioned that. I sent the file for this particular case. I'm not aware of another one modified to include the Inversense gyros. Just wanted to help this fellow to diagnose his board.
>
>   / Marc
>
>   On Mon, Jan 10, 2011 at 1:28 AM, John McClelland <mcclelland.j...@gmail.com> wrote:
>
>     Marc
>
>     I think this is just rev4 self test from the download site and does not have the conditional statements to include IXZ500 if defined.  Looks like you just renamed the Invensense gyro config file to be the Red board.   That should work, but could be confusing is someone tries to use it for a red board!
>
>     Thanks
>     John
>       ----- Original Message -----
>       From: Marcus Fahlén
>       To: uavhel...@googlegroups.com
>       Sent: Sunday, January 09, 2011 5:20 PM
>       Subject: Re: X Gyro is sluggish
>
>       Here is the project. Tested it and it built clean...
>
>       /Marc
>
>       On Mon, Jan 10, 2011 at 1:17 AM, Marcus Fahlén <marcus.fah...@gmail.com> wrote:
>
>         Cr*p!
>
>         I sent it to the uavdevboard group...
>
>         Here it is:
>         Change the .DOC to .HEX
>
>         On Mon, Jan 10, 2011 at 1:15 AM, John McClelland <mcclelland.j...@gmail.com> wrote:
>
>           Yea Google blocks them last I looked.
>
>           ----- Original Message ----- From: "Marc-X" <marcus.fah...@gmail.com>
> ...
>
> read more »
>
>  options.h
> 1KViewDownload
>
>  ConfigRed.h
> < 1KViewDownload
>
>  ConfigGreen.h
> < 1KViewDownload
>
>  ConfigIXZ500.h
> < 1KViewDownload
Reply all
Reply to author
Forward
0 new messages