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

    UART rangefinder integration with VOXL 2 Mini

    VOXL 2 Mini
    2
    10
    88
    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.
    • P
      psafi
      last edited by psafi

      I have a UART distance sensor from ARK Electronics that I'd like to integrate with VOXL 2 mini. First of all I have a question on wiring: Can this be wired to J10 on VOXL or it has to be connected to an expansion board (we have M0188)? and second question is do I need to add driver to voxl-px4 for this sensor to work?

      Eric KatzfeyE 2 Replies Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @psafi
        last edited by

        @psafi Which sensor is it?

        P 1 Reply Last reply Reply Quote 0
        • Eric KatzfeyE
          Eric Katzfey ModalAI Team @psafi
          last edited by Eric Katzfey

          @psafi J10 is a UART mapped to the applications processor (Linux). Most of PX4 runs on the DSP and uses UARTs mapped to the DSP. To use J10 you would have to include the driver module into the applications processor build and then start it in the start script.

          1 Reply Last reply Reply Quote 0
          • P
            psafi @Eric Katzfey
            last edited by

            @Eric-Katzfey ARK FLOW with some customization to enable UART

            Eric KatzfeyE 1 Reply Last reply Reply Quote 0
            • Eric KatzfeyE
              Eric Katzfey ModalAI Team @psafi
              last edited by

              @psafi So which driver do you use in PX4 then? Do you have a custom driver since you modified it to use UART instead of UAVCAN?

              P 1 Reply Last reply Reply Quote 0
              • P
                psafi @Eric Katzfey
                last edited by psafi

                @Eric-Katzfey My expectation is that I am going to receive mavlink messages from it. There is no driver for this product in mainstream PX4. I have never integrated UART version only CAN (which was plug and play with px4, i.e. I was receiving DISTANCE_SENSOR message with some parameter configuration). UART version should technically work the same from software standpoint since it is going to send mavlink messages. I guess the title of my post might be misleading. I am trying to integrate a "mavlink" device and I want it to connect to VOXL over UART.

                Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                • Eric KatzfeyE
                  Eric Katzfey ModalAI Team @psafi
                  last edited by

                  @psafi Ah, okay, then you will need to set up a new mavlink instance in /usr/bin/voxl-px4-start. It would be something like mavlink start -x -d /dev/ttyHS0

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    psafi @Eric Katzfey
                    last edited by

                    @Eric-Katzfey Ok great. This is working now. It would be great if you can give me some idea of the underlying architecture for troubleshooting in the future and also making sure this is not going to have any side effects on the entire system. What is the role of voxl-mavlink-server in all of this? I understand we are telling voxl-px4 to expect mavlink messages on ttyHS0.

                    I see messages 132 and 106 start showing up in output of "mavlink-server -k" which is "show debug info on messages coming from autopilot" and they stop showing up when I unplug the sensor. It'd be great if you can give me some idea of flow of information.

                    Eric KatzfeyE 2 Replies Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team @psafi
                      last edited by

                      @psafi Some of it is just standard PX4 stuff so you can take a look at their documentation. For voxl-mavlink-server this may help: https://docs.modalai.com/mavlink/

                      1 Reply Last reply Reply Quote 0
                      • Eric KatzfeyE
                        Eric Katzfey ModalAI Team @psafi
                        last edited by

                        @psafi In this case we don't use voxl-mavlink-server directly because we are essentially setting up a "mavlink device" straight into px4.

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