ITG3200 is better than WMP?

Post Reply
Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

ITG3200 is better than WMP?

Post by Stalk »

My tricopter and quadrocopter fly very well with the WMP and BMA020 with software version 1_7. :D
But ITG3200 and BMA020 are turbulent, does not help tuning PID. I tried 1_7, dev0529 and dev0607.
I've spent with it for several weeks without result. :cry:
You advise someone what is wrong?

miniquad
Posts: 65
Joined: Wed Mar 23, 2011 8:17 pm

Re: ITG3200 is better than WMP?

Post by miniquad »

I use the following initializing code posted by ziss_dm in another post and ITG3200 is working quite well for me:

Code: Select all

void i2c_Gyro_init() {
  delay(100);
  i2c_rep_start(0XD0+0);      // I2C write direction
  i2c_write(0x3E);            // Power Management register
  i2c_write(0x80);            //   reset device
  delay(5);
  i2c_rep_start(0XD0+0);      // I2C write direction
  i2c_write(0x16);            // register DLPF_CFG - low pass filter configuration & sample rate
//  i2c_write(0x1D);            //   10Hz Low Pass Filter Bandwidth - Internal Sample Rate 1kHz
//  i2c_write(0x19);            //   188Hz Low Pass Filter Bandwidth - Internal Sample Rate 1kHz
  i2c_write(0x18);            //   256Hz Low Pass Filter Bandwidth - Internal Sample Rate 8kHz
  i2c_rep_start(0XD0+0);      // I2C write direction
  i2c_write(0x3E);            // Power Management register
  i2c_write(0x01);            //   PLL with X Gyro reference
  delay(100);
  gyroPresent = 1; 
}

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

This initialization code I use, but is very nervous tricopter compared to WPM.
Nevertheless, I thank you, you're the only one who tried to help me.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: ITG3200 is better than WMP?

Post by ziss_dm »

Hi Stalk,
1) Can you describe you setup little bit more detailed (size/weight/motors/props/etc..)?
2) What PID values you have with WMP and ITG.
3) What type of oscillations you have (fast/slow/random)?
4) Are we are talking about "acro" or "level" mode?
5) Can you post your 1.7 sketch here?

regards,
ziss_dm

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

Hi ziss_dm,
thank you for your response

1) The size is 25cm from the center to the engine, weight about 500g, KD20-50 engines, propellers EPP 10x4.5, ESC Plush 10A
BMA020 is powered from Arduino D12 through diode, ITG3200 (Sparkfun) from 3.3V, address is changed as the FFIMU
2) The PID is the default, with WMP can increase P without oscillations
3) The damped oscillations are irregular (as quakes?), change I (in the range 0.005 to 0.050) and D (10-40) does not work
I do not know if I have exaggerated expectations, I would like greater Quad or Hex carry a camera.
4) In both is the same
5) See appendix
6) Thank you again
Attachments
Tri_02_1_7.zip
The sketch
(22.5 KiB) Downloaded 250 times

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: ITG3200 is better than WMP?

Post by Kayle »

Hi stalk,

I see you use keda 20-50s with 10x4,5 Props? This works? The esc getting not hot?

Greetings kayle

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

I was wrong, of course, there have 8x4.5

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: ITG3200 is better than WMP?

Post by ziss_dm »

Hi Stalk,
I forget to ask: What is your cycle time with WMP and ITG?

regards,
ziss_dm

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: ITG3200 is better than WMP?

Post by Kayle »

Hey Stalk,

thanks for reply.

Greetings Kayle

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

ziss_dm wrote:Hi Stalk,
I forget to ask: What is your cycle time with WMP and ITG?

regards,
ziss_dm


Hi ziss_dm,
My cycle time is about 2700.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: ITG3200 is better than WMP?

Post by ziss_dm »

Hi Stalk,

There are couple of things I have noticed:
1) In your sketch, the internal i2c pullups are enabled and you did not mentioned LLC, are your ITG3200 connected through BMA020 breakout LLC? Have you tested yor gyro readings with GUI? You should not have saturations, missing samples, etc..
2)
The damped oscillations are irregular (as quakes?), change I (in the range 0.005 to 0.050) and D (10-40) does not work
I do not know if I have exaggerated expectations, I would like greater Quad or Hex carry a camera.

If oscilations are random (more like random shakes), this usually indicates high vibration noise, usually you can "fix" it icreasing I and decreasing D. Have you tried to drop D to zero?
3) The PID values cannot be the same for WMP and ITG3200 for various reasons:
- In your sketch sensitivity for ITG3200 is 1.5 higher than WMP. It is not bad thing, as it gives additional resolution, but that means that PID values should be reduced 1.5 times
- I and D are highly sensitive to cycle time, and I think you have different cycle time for WMP and for ITG3200
So, it is good idea to re-setup PIDs from begining. You can use this guide: http://wbb.multiwii.com/viewtopic.php?f=14&t=28
4) For expirementation purposes I have updated your sketch with latest changes and alsho "aligned" ITG3200 sensitivity to WMP. You can try this.
Attachments
Tri_02_1_7.zip
(23.18 KiB) Downloaded 190 times

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

Thank you for your help, I'll try your tips and I'll know.
ITG3200 I was connected directly to the Arduino, now I have a 4k7 pull-ups to 3.3V and internal disabled. But it is the same.
The engine and propeller is ballanced (maybe wrong?). I will try to dampen complex FC.
Cycle time with WMP is longer.
For shorter cycle time should be less than three PID parameters?
Once again thank you and greet

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: ITG3200 is better than WMP?

Post by Stalk »

Hi Your honor ziss_dm, this is spectacular!!!!!
Already after the first flight, it is clear that it is much better.
I do not understand too much calculation in the IMU, but it seems to me similar to dev0607. Still dev0607 did not work well with my ITG3200.
Can I use your modified sketch with WMP or Jussi FFIMU?
Best regards

Post Reply