paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Fwd: Getting data from Aspirin onboard baro.


From: Michal Podhradsky
Subject: Re: [Paparazzi-devel] Fwd: Getting data from Aspirin onboard baro.
Date: Tue, 17 Dec 2013 23:58:37 +0100

Does only the I2C bus stop, or whole AP?


On Tue, Dec 17, 2013 at 10:14 PM, Helge Walle <address@hidden> wrote:
Thanks a lot Felix!

I switched to your branch and tried your suggestions. Now I get live raw values from the baro and mag.
The baro values are in accordance with my current local pressure.

The only downside was the I2C bus seemed to stop after several minutes. I'll do some logging with the analyzer to try and see how this happens.

Thanks again,
Helge.



2013/12/17 Felix Ruess <address@hidden>
forgot: and then use <subsystem name="imu" type="mpu6000_hmc5883"/>
which already defaults to spi2 and i2c2 on stm, so should be good for aspirin2.1 on Lisa/M


On Tue, Dec 17, 2013 at 12:41 AM, Felix Ruess <address@hidden> wrote:
Hi Helge,

I quickly added a simple imu driver that use the mpu6000 spi and hmc5883 peripherals in my imu_mpu6000_hmc5883 branch.
With that you should be able to read both the mag and baro via i2c without using the MPU slave mode.

git fetch https://github.com/flixr/paparazzi imu_mpu6000_hmc5883
git checkout -b imu_mpu6000_hmc5883 FETCH_HEAD

Cheers, Felix


On Mon, Dec 16, 2013 at 9:55 PM, Helge Walle <address@hidden> wrote:
Thank you Felix,

Yes, I did the modification on the pullups and and jumpers you mention, on my Aspirin. But I did not get the result I hoped for.

This was after I could not detect any baro messages on the Aspirin I2C bus with the jumpers open, pullups in place, and MPU-6000 as master.

Not sure if I have the needed skills yet to solve this, but given some time, maybe...

Helge.



2013/12/16 Felix Ruess <address@hidden>
Hi Helge,

handling I2C slaves through the MPU is a pain (and currenly only implemented for the mag).

I don't think that it can properly work as you are currently trying to:
You removed the pullups and add the jumpers 4 and 5 to connect the I2C on aspirin (with mag and baro) to I2C2 on Lisa/M, right?
But the imu aspirin_v2.1 subsystem (which reads the MPU via SPI) still enables I2C master on the MPU to read the mag as a slave.
Meaning you now have to masters (the mpu and the stm32) on the I2C on aspirin, see http://paparazzi.enac.fr/w/images/Aspirin_imu_schematic_V2_1.png

So as far as I can see there are only two options to get this to work with Aspirin2.1:
- implement reading of the baro as I2C slave to the MPU
- don't read the mag as mpu slave and rather read both mag and baro directly over I2C2 of the stm32

Hope that helps...

Cheers, Felix



On Mon, Dec 16, 2013 at 2:17 PM, Helge Walle <address@hidden> wrote:
Thank you for your answer Michal,

I got progress from your advice. I removed the pullup-resistors on the Aspirin board, and bridged the jumpers, to use the i2c2 bus.

When I switched to raw_sensors in GCS to get the BARO_RAW message I got a couple of readings showing the pressure at my location. However the values were only updated for a short while, and then freezed on a fixed number.

Rebooting Lisa/M showed an updated value for another couple of seconds. Every reboot seems to present a new updated (and true) value. So I guess the MS5611 is ok.

I took my logic analyzer and did three measurements from the first trigger on the i2c bus up to approx 30seconds. The baro read starts at approx 2000ms and gets corrupted after only one, or a few readings.

What happens is not the same every time. On one "take" SDA continued to send clock pulses continously for the duration of the measurement (30s). On another measurement all activity on the bus stopped after little more than 2000ms.

Also it seems that when the bus stops, it happens after ACK from the slave.

Maybe this is a software issue? It would be useful to know if the baro on Lisa/M could be used.

On another note: If I remove all references to baro and magnetometer in my airframe file, it seems there is still communication with the units. Why is that?

Helge.

  

2013/12/12 Michal Podhradsky <address@hidden>
Hi,

I remember using Aspirin 2.1 about a year ago. The Aspirin driver does not use the pressure sensor on auxiliary i2c bus. So I had to refactor the older drivers to talk to MS5611 over i2c2 bus. I believe this is currently handled here https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/boards/baro_board_ms5611_i2c.c

So to use baro on Aspirin 2.1 you have to bridge the jumpers on Aspirin to allow i2c2 and then define that you are using MS5611 on I2C. Would be neat to have pressure read through MPU6000, but it is probably not worth the effort.

 M


On Thu, Dec 12, 2013 at 2:11 AM, Tim Sindle <address@hidden> wrote:
Hi, 
Also wondering the same question with similar configuration file. If someone could let us know if they could get the MS5611 working with the baro on the Aspirin v2.1 r1, which is fixed on to Lisa/M v2.0. If not that's fine, but it'll save time knowing where to start. 

The fact that there was a Aspirin release V2.2 with he baro on the SPI directly tells me that that this was done for a reason. Was it because it wasn't possible to get readings through the MPU6000 with it on the I2C bus, or was the code never written? Or is the config setup file wrong?

Many thanks, 
Tim


On 10 December 2013 05:21, Helge Walle <address@hidden> wrote:
Hi again,

Referring to my mail and attached airframe file below.

I am still not able to get data from the baro on my Aspirin v2.1 r1, which is fixed on my Lisa/M v2.0. I use the default configuration on the Aspirin with internal I2C bus on the imu board, and SPI communication of all measurements to Lisa/M..

Yesterday I took measurements with a logic analyzer on the I2C bus. It seems there are only messages to/from the HMC5883 magnetometer present on the bus. I find only communication with a unit with I2C address 0x3C. The MS5611 barometer does not seem to be polled.

If someone get baro data from this hardware configuration, could you please check if my configuration file is ok? I have tried to dig into the barometer code, but so far without success.

Thanks,
Helge.


 
---------- Forwarded message ----------
From: Helge Walle <address@hidden>
Date: 2013/11/27
Subject: Fwd: Getting data from Aspirin onboard baro.
To: "address@hidden" <address@hidden>


Hi,

I would like to verify some features of my Lisa/M 2.0 board with onboard Aspirin IMU 2.1 r1. I have made an airframe file for it, please see the attachment.

As for the the Aspirin, R1 and R2 are placed, and JP4 and JP5 are not connected.

I get messages from the gyro and accelerometer all right, and the PFD shows correct movements in GCS when I move the board. However I do not think I get anything from the baro.

These lines are in my firmware section:

<firmware name="fixedwing">
<target name="ap" board="lisa_m_2.0">
<configure name="LISA_M_BARO" value="BARO_MS5611_SPI"/>
<configure name="USE_BARO_BOARD" value="TRUE"/><!-- default if board has baro -->
<define name="USE_BAROMETER" value="TRUE"/><!-- if ins_alt_float is used -->
<configure name="PERIODIC_FREQUENCY" value="120"/>
<configure name="AHRS_PROPAGATE_FREQUENCY" value="100"/>
<configure name="AHRS_CORRECT_FREQUENCY" value="100"/>
<define name="AHRS_TRIGGERED_ATTITUDE_LOOP" />
<configure name="AHRS_ALIGNER_LED" value="3"/>
<configure name="CPU_LED" value="3"/>
<define name="PERIOD_NAVIGATION_0" /><!-- stop NAVIGATION msg in main_ap.c -->
</target>


I commented out the #if DEBUG and #endif lines in sw/airborne/boards/baro_board_ms5611_spi.c to get the BARO_MS5611 message. The message shows only hPa=0. and deg_celsius=20.

The BARO_RAW message shows float abs=0. and float diff=0.

It seems I do not get values from the baro.

I use Paparazzi version v5.1_devel-664-g7c425ae-dirty.

Could anyone please point me in the right direction, how to get the baro values?

Thanks,
Helge.




_______________________________________________
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



reply via email to

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