• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    BAR30 on Flight Core

    Flight Core
    3
    5
    510
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Andrew Keefe
      last edited by 16 Nov 2020, 16:07

      Does the Flight Core firmware support the BAR30 pressure sensor? I plugged one into J13 after changing out the connector, but the sensor didn't register in QGroundControl. Then it donned on me that ArduSub supports the BAR30, but not the others. I'm using the Flight Core on a submersible and I will be using the BAR30 for depth.

      If this isn't already supported then I will need to manually pull it in from ArduSub I suppose. I can write my own app to access the I2C bus and publish the information as a node.

      1 Reply Last reply Reply Quote 0
      • M
        modaltb ModalAI Team
        last edited by 16 Nov 2020, 16:24

        Hi Andrew,

        We've not tried using this sensor, but getting I2C drivers up and going is pretty easy normally. I found this in the Nuttx code base that might help:

        https://github.com/PX4/NuttX/blob/904a602c74dc08a100b5c2bd490807de19e73e10/drivers/sensors/ms58xx.c

        You'd need to enable the driver to build in here:
        https://github.com/PX4/PX4-Autopilot/blob/master/boards/modalai/fc-v1/default.cmake#L17

        And to run on startup here:
        https://github.com/PX4/PX4-Autopilot/blob/master/boards/modalai/fc-v1/init/rc.board_sensors

        1 Reply Last reply Reply Quote 0
        • A
          Andrew Keefe
          last edited by 19 Nov 2020, 21:50

          It looks like ArduSub modified the ms5611 driver to accommodate the ms5837 and calls the driver AP_Baro_MS5611. The init() has a switch case on _ms56xx_type and includes a "BARO_MS5837" case.

          https://github.com/ArduPilot/ardupilot/blob/ArduSub-4.0.0/libraries/AP_Baro/AP_Baro_MS5611.cpp

          It also includes a function for calculating the temperature and compensated pressure for the 5837.

          The Flight Core firmware incudes a different version of the MS5611 driver that doesn't support the ms5837. This would be a good update to pull in.

          1 Reply Last reply Reply Quote 0
          • M
            modaltb ModalAI Team
            last edited by 20 Nov 2020, 18:34

            If it's a good addition, and you're up for it, I'd suggest going for it and adding the driver to the 'standard' PX4 code base! If it's in the master branch we could pull it in pretty easily.
            Thanks!

            1 Reply Last reply Reply Quote 0
            • R
              ryan_meagher
              last edited by 26 May 2021, 18:40

              I know this is kinda an old post but I have created a driver for px4 that can use both flavors of the MS5837 the bar2 and bar30. I will create a pull request with px4 so it will be available.

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Powered by NodeBB | Contributors