paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] IMU and I2C


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] IMU and I2C
Date: Tue, 4 Dec 2012 09:19:20 +0100

It is a known problem of barometers that the digital bus must be quite when the actual reading takes place. You should therefore always check that you use the following measurement flow:

1) Read IMU
2) Ask for Baro Data
3) Be quite
4) when Baro data is available, Read it
5) only then read the imu again.

This is not straight forward as the 120Hz paparazzi I2C imu loop does never leave sufficient time to do high resolution Baro Measurements. When possible a different I2C bus is a better solution. 

On yapa2 the secondary I2C bus is present but on 2 different headers (as very little people use it). One pin is the CTS pin of the Modem Header and the other pin is the Boot Pin. The boot pin already has a pull-up to 3.3V but the CTS does not. However it sits just next to the +3v3V on the modem header so if your I2C slave board does not have pull ups worst case a through hole 10k resistor could be inserted in the far 2 holes of the modem header. http://paparazzi.enac.fr/wiki/File:Yapa_i2c2.png



-Christophe 



On Tue, Dec 4, 2012 at 7:50 AM, Jefferson Romney <address@hidden> wrote:
I have noticed something funny on  my fixed wing. I have always gotten rather delayed and noisy readings from my barometer over I2C. I noticed that when I disconnect the IMU from the I2C line, the Barometer data improves drastically. It is not delayed and it is much less noisy. Is this a conflict with the Barometer driver, the IMU driver, or something else. I have only a limited knowledge of I2C. My setup is as follows:

YAPA 2
BMP_085
Aspirin v2.1 over I2C

This is how the test went. Graphs are attached. the altitude change is from a third floor to a ground floor outside:

I started by testing the barometer without the autopilot in the loop. Hooked it up to an Arduino and just logged the temperature compensated pressure. The graph titled arduino_baro.bmp is the pressure readings that we got when we lowered the device from the third floor balcony rapidly. This graph is perfectly reasonable and the altitude calculations work out perfectly for the change in altitude from the third floor to the first.

Then we ran the same test with the autopilot in the loop. and we got the graph titled ppz_baro_IMU.bmp. This graph shows a lot of noise. The "average" pressure changes to reflect the change in altitude from dropping it from the third floor. However, the drop only took 7-10 seconds, and the data that the autopilot was getting indicates that it took almost 30 seconds to go from the third floor to the first. You can see that there is a lot of noise in this graph too. I immediately notice some noisy signal with a period of about 30 seconds. 

So, I thought that it might be the 900MHz antenna that was right next to the I2C lines (if the Antenna gets too close to the I2C lines, the barometer stops communicating all together). Changed Xbees to 2.4GHz models, and there was no change in the data. Just as noisy and delayed. 

Then, I unplugged the IMU. The data was much less noisy. There is still some sort of noise in the signal, but for the most part, much better data. The data still seems a little delayed too, but that seems to have improved as well. I tried this twice, once with the 2.4GHz xbees (ppz_baro_noIMU_2400.bmp), and once with the 900MHz. (ppz_baro_noIMU_900.bmp) Both have some weird noise issues, but overall, are much better than when the IMU is not plugged in.

The best that I can figure is the IMU and the barometer are clashing on the I2C bus.



On Wed, Nov 28, 2012 at 8:44 AM, Eduardo lavratti <address@hidden> wrote:
I use my own driver.
i posted the link with this driver some week ago.



From: address@hidden
Date: Wed, 28 Nov 2012 08:03:15 -0700

To: address@hidden
Subject: Re: [Paparazzi-devel] IMU and I2C

eduardo, I was looking at your links, in particular the second. Do you just use the aspirin i2c driver and the baro_bmp driver for it? if not, what do you use?


the link you posted for reference:


On Wed, Nov 28, 2012 at 12:46 AM, Prof. Dr.-Ing. Heinrich Warmers <address@hidden> wrote:
Hi,
This is one of the drotex,
It wokrs fine wiht the lpc2148 (yapa, tworg) for fixed wing.
They sell also one wiht only the mpu6050 for 17 euros.
You have to cange the slave adress.

On the stmf3 pcb  there is a usb one wire interface to debug and load the program code.
You need only a usb cable about 3 Euro.



Reagads
Heinirch

limaiem imed schrieb:
the last one is the same as this one ?

http://cgi.ebay.fr/IMU-10DOF-MPU6050-HMC5883L-MS5611-Arduino-MultiWii--/280833652536?pt=FR_YO_MaisonJardin_Bricolage_ElectroniqueComposants&hash=item4162fd7738

this one has less outputs ...

Imed LIMAIEM
address@hidden


On Tue, Nov 27, 2012 at 10:24 PM, Eduardo lavratti <address@hidden> wrote:
I use this IMU on me planes:
http://www.goodluckbuy.com/10dof-l3g4200dadxl345hmc5883lbmp085-nine-axis-imu-module.html
http://www.goodluckbuy.com/10dof-module-mwc-flight-control-ms5611-hmc5883l-mpu6050-sensor-module.html
I prefer the second one.




Date: Tue, 27 Nov 2012 22:11:55 +0100

From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] IMU and I2C

it would be kind if you show me some good combinations or some good boards.
thanks !

Imed LIMAIEM
address@hidden


On Tue, Nov 27, 2012 at 10:10 PM, Eduardo lavratti <address@hidden> wrote:
Then ... for fixedwinf for sure you can use all sensors in i2c bus.
If you want a cheap i2c sensor i can point you.

I using 2 kind of IMU in all my autopilots.
kind regard.




Date: Tue, 27 Nov 2012 22:04:02 +0100

From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] IMU and I2C

Thank Eduardo,

Your explanation is clear and now I understand well how it works

For information I am flying fixed wing.

Regards,  


Imed LIMAIEM
address@hidden


On Mon, Nov 26, 2012 at 12:32 AM, Eduardo lavratti <address@hidden> wrote:
First of all ...
you use the paparazzi on plane or rotorcraft ?

on yapa you can use mpu60x0 + bmp085 on i2c bus without problem.
the board with bmp180 + hmc5883 + mpu60x00 connect all i2c pins together.
The driver is the paparazzi code that control the sensors so you need a driver that control the mpu + bmp180.
this driver not exist.

I sugest that you order a know IMU taht already a driver.
Take care about mpu60x00 + magnetometer because some IMU board have HMC connected directly to MPU6000 so the driver is little diferent.

i already write a driver to use MPU6000 + hmc5883 + ms5611 with hmc connected directly to mpu6000.

regards.





Date: Sun, 25 Nov 2012 20:41:10 +0100
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] IMU and I2C


thank you for this answer.

so if we took the lpc2148 processor and the YAPA 2 board.

I can use MPU6050 sensor on the I2C connector and if I will not be able to use the barometric sensor BMP085 since it needs an I2C connector too ?

Should I understand that the  lpc2148 processor will better work with MPU6000 on SPI and BMP085 on I2C ?

another example, some IMUs boards have BMP180 + HMC5883L + MPU6050 sensors and one unique I2C output. Do I need a driver for this specific board ? or do I need 3 separate drives (one for each sensor ?)

If I plug it to the lpc2148 processor board let's say YAPA will it work ? (assuming I have separately the driver for each one of the sensors ?)
 
Thanks you for your answer.

Imed LIMAIEM
address@hidden


On Sun, Nov 25, 2012 at 11:42 AM, Prof. Dr.-Ing. Heinrich Warmers <address@hidden> wrote:
Dear Imed LIMAIEM,
its differ from the processor type.
Currently i have the MPU6000 (spi)  and MPU6050 (i2c  drotek modules  )   in combination with processor (lpc2148)   i2c barometer (bmp085) and magnetometer running for the LPC2148 for fixed wing and multirotor (MPU6000 spi). It is difficult to hold the 500 Hz for multirotor with the MPU6050.
The base for the MPU6000 driver is the aspirin driver with a new spi interfasce for the spi  interface of the  lpc2148.
For fixed wing (60Hz) the driver aspirin2_i2c works fine with drotek modules.
I will send a push request soon.
It would be nice if we split the asperin driver in 2 parts. One for imu data  and a secound for additonal  i2c  sensors magnetometer and  barometer.

Regards,

Heinrich Warmers
 

limaiem imed schrieb:
Hi all,

I have one simple question.

I see lot of IMU in the market with many combination of sensors (MPU60XX, Barometers ... Magnetometers ...) and many drivers been written for each sensor and each AP architecture with the following combinations:

SPI / STM / I2C/SPI

My question is: Is PPZ code able to recognize each combination ? I mean if I plug an IMU in the I2C port and define well this my airframe code will it work ? or should I modify the drives and so ... ?

Regards,

Imed LIMAIEM
address@hidden


_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




--
Thanks,
Jefferson Romney


_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




--
Thanks,
Jefferson Romney


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]