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

    What control signal does the PX4 send to the ESCs?

    Ask your questions right here!
    2
    3
    265
    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.
    • M
      mrunaljsarvaiya
      last edited by

      Hello,

      We're using the voxl2 for our quadrotor and had a few questions related to how the px4 and escs are integrated to help us correctly tune our system's parameters. If you could help us out that would be appreciated!

      1. How is the output (PWM value or motor control signal) of the thrust model (equation that uses THR_MDL_FAC ) used by the px4? Given a desired relative throttle value, does it calculate the relative PWM through the equation and directly send those to the esc? Or is the output of the equation used as a relative RPM, which is then sent to the esc as a rpm setpoint?
      2. Our motors run fine even though we don't have the kv value specified in our esc parameters file. Would you recommend using the kv values?
      3. The min_pwm and max_pwm specified in the esc file seem to scale from 0-999 while the pwms used to find the THR_MDL_FAC value in this script has pwm in us. Could you clarify the pwm units in the esc file and how it relates to those used to calculate THR_MDL_FAC value?

      Thanks!

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @mrunaljsarvaiya
        last edited by

        @mrunaljsarvaiya

        Here is the actuator driver that communicates with the modalai ESCs via UART: https://github.com/modalai/px4-firmware/blob/voxl-dev/src/drivers/actuators/voxl_esc/voxl_esc.cpp

        The driver has params min and max rpm, which is used by the mixer for scaling the actuator output between 0 and 100%. the voxl_esc driver receives the actuator command The ESC will execute the commanded RPM. Typically thrust is very close to a perfect quadratic as a function of RPM ( thrust = a * rpm ^2), so in ideal conditions, THR_MDL_FAC would be set to 1.0. We normally use a setting of 0.8.

        Regarding kV value, it is only currently used during sinusoidal spin-up, see example here : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-params/Sentinel_V1/Sentinel_V1.xml?ref_type=heads#L69 . However, you should probably update the kV value in the ESC params anyway.

        min_pwm and max_pwm ESC configuration parameters represent the minimum and maximum duty cycle that the ESC can apply (hard limits). These are the limits that ESC uses to cap the duty cycle sent to the motor (in any mode of operation). These parameters can be used to limit the maximum power sent to the motor (but normally this is not what you would want to do). This has no relation to THR_MDL_FAC parameter in PX4, because PX4 actually sends our RPMs.

        Let me know if you still have any questions about this.

        Alex

        M 1 Reply Last reply Reply Quote 0
        • M
          mrunaljsarvaiya @Alex Kushleyev
          last edited by

          @Alex-Kushleyev Thank you, appreciate the detailed response! (I completely missed this message, I thought I'd get a notification but I forgot to subscribe to notifications)

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