Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. What control signal does the PX4 send to the ESCs?

What control signal does the PX4 send to the ESCs?

Scheduled Pinned Locked Moved Ask your questions right here!
3 Posts 2 Posters 1.1k Views 2 Watching
  • 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 Offline
    M Offline
    mrunaljsarvaiya
    wrote on last edited by
    #1

    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
    0
    • M mrunaljsarvaiya

      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 Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #2

      @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
      0
      • Alex KushleyevA Alex Kushleyev

        @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 Offline
        M Offline
        mrunaljsarvaiya
        wrote on last edited by
        #3

        @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
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        ModalAI
        Categories Recent Tags ModalAI.com Docs
        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups