Video thumbnail

    Setting up Hobbywing DroneCAN ESCs with ArduPilot

    This article provides a comprehensive guide on setting up Hobbywing DroneCAN ESCs with ArduPilot, addressing the specific challenges posed by Hobbywing's proprietary variant of the DroneCAN protocol. It covers everything from initial wiring and correcting default bitrate issues to configuring individual ESCs with unique IDs and optimizing CAN bus bandwidth. The article emphasizes the importance of using the correct software versions and meticulously following each step to ensure proper communication and functionality. It also highlights the advantages of DroneCAN ESCs, such as sharing the same CAN port with other devices, and introduces advanced features like setting message rates for telemetry data and utilizing a notch filter for noise reduction.

    Wiring and Initial Setup

    Connecting the Hobbywing DroneCAN ESCs to your flight controller, such as a CubePilot Cube Orange, requires a simple three-wire connection: ground, CAN Low, and CAN High. It is crucial to double-check the pin order in your specific ESC model's manual, as it may vary. A significant advantage of DroneCAN ESCs is their ability to share a single CAN port with various other devices, including GPS modules, compasses, and airspeed sensors, making it a versatile and efficient setup for managing multiple peripherals. This contrasts with proprietary CAN protocols that often require dedicated ports.

    Addressing Bitrate Mismatch

    A primary challenge with Hobbywing ESCs is their factory default CAN bitrate of 500,000 bits per second, which differs from ArduPilot's default of 1 Megabit per second. To resolve this, you must first connect only the ESC to the CAN bus, removing other devices like GPS or compasses. Then, using Mission Planner, navigate to the CAN port settings (e.g., "CAN D1 Bitrate") and change it to 500,000. After writing the parameters and performing a pre-flight reboot, ArduPilot will communicate at the slower bitrate, allowing you to reconfigure the ESC.

    Configuring ESCs with DroneCAN GUI Tools

    To configure the Hobbywing ESCs, you need DroneCAN GUI Tools, ensuring you have version 1.2.25 or later for Hobbywing ESC support. Connect your flight controller to your computer, typically via a second USB port configured for MAVLink. Within the DroneCAN GUI Tools, select the "Hobbywing ESC" panel. This panel will display connected ESCs, showing their voltage and temperature. If you have multiple ESCs, they will likely all have default Node ID 1 and Throttle ID 1. Each ESC must be configured individually to have a unique Node ID (up to 127) and Throttle ID, which corresponds to the servo number in ArduPilot's configuration.

    You need a recent version of drone can GUI tools so you need to connect this up to your device I've connected it on the second USB port some Modern fly controllers based on the H7 present two USB interfaces on a USB cable and the I've set up the second one as mavlink and connected in this drone can GUI tool you can also do this over Telemetry or other ways you can check the RG Pilot wiki for how to connect drone cam GUI tool you can't do the hobby Wing ESC configuration using the mission planner can configuration or at least not yet.

    Setting Bitrate, Throttle ID, and Node ID

    For each ESC, change its bitrate to 1 Megabit per second. This change takes effect only after power cycling the ESC. Additionally, set the "Throttle ID" and "Node ID" to unique values. For instance, in a quad plane setup where motors are on outputs 5, 6, 7, and 8, you would set the first ESC to Throttle ID 5 and Node ID 5. After setting these values, power cycle the ESC. When the ESC reappears in the table, it will be operating at 1 Megabit per second. Remember to then change the CAN bus bitrate back to 1 Megabit per second in Mission Planner and perform another pre-flight reboot to re-establish proper communication.

    ArduPilot Configuration for Hobbywing ESCs

    Once the ESCs are individually configured, ArduPilot needs to be set up to communicate using Hobbywing's specific DroneCAN variant. Access the ArduPilot CAN D1 settings (for the first CAN bus). Set the "Protocol" to 1 (DroneCAN). Crucially, set the "Bitmask" for ESC outputs. For a quad plane using motors 5, 6, 7, and 8, the bitmask value would be 240. For a quadcopter with motors 1, 2, 3, and 4, you would set the appropriate bitmask value that corresponds to those outputs. Then, enable the "Hobbywing ESC Option" within the CAN bus options. After writing these parameters, perform a final pre-flight reboot. This will ensure ArduPilot properly initializes and communicates with the Hobbywing ESCs, often indicated by the motors ceasing their initialization beeps.

    Telemetry and Message Rates

    Beyond basic functionality, you can configure telemetry feedback from the ESCs. The "Message 1 Rate" determines the frequency of RPM data, with options up to 500 Hz, though 100 Hz is often sufficient to avoid excessive bandwidth usage. "Message 2 Rate" controls voltage and current data, while "Message 3 Rate" provides additional temperature data (capacitor, MOSFET). These lower-priority messages should be set at lower rates than the RPM data. This telemetry is vital for monitoring motor performance and enabling advanced features like dynamic notch filter setup based on ESC RPM, which is highly effective in reducing noise. To utilize these features, your ArduPlane or ArduCopter firmware must be version 4.4.1 or later.

    This message One Rate determines the rate at which we get RPM data back from the ESC so I've got that at 50 hertz I can change that to say 100 Hertz and that gives us fairly rapid we can go up to 500 Hertz but it uses a fair bit of bandwidth on the bus.

    Optimizing CAN Bus Bandwidth

    ArduPilot, by default, sends eight raw ESC commands, even if fewer motors are used, which consumes more CAN bus bandwidth than necessary. To optimize this, set an "ESC Offset" in the CAN D1 settings. For example, an offset of 4 will shift ESC 5 to be recognized as ESC 1, packing the ESC commands more efficiently. After setting the offset, you'll need to reconfigure the ESC's Node ID and Throttle ID back to 1 in DroneCAN GUI Tools. This optimization approximately halves the bandwidth used, fitting all four ESC commands into a single CAN frame, rather than three, significantly improving bus efficiency for faster control and feedback.

    Takeaways

    1. Bitrate Correction: Hobbywing ESCs ship with a 500kbps CAN bitrate, requiring initial configuration through Mission Planner at this speed before the ESCs can be set to ArduPilot's default 1Mbps.
    2. Unique ID Assignment: Each ESC needs a unique Node ID and Throttle ID for proper enumeration and control within the ArduPilot system, configured using DroneCAN GUI Tools.
    3. Hobbywing Specific Configuration: ArduPilot must be explicitly configured to recognize Hobbywing's variant of DroneCAN by enabling the "Hobbywing ESC Option" and setting the correct output bitmask.
    4. Telemetry and Filtering Capabilities: The setup enables valuable telemetry data (RPM, voltage, current, temperature) from ESCs, which is crucial for advanced features like dynamic notch filtering to reduce motor noise.
    5. Bandwidth Optimization: Using the "ESC Offset" parameter in ArduPilot can significantly reduce CAN bus bandwidth usage by efficiently packing ESC commands, leading to improved performance.

    References

    This article was AI generated. It may contain errors and should be verified with the original source.
    VideoToWordsClarifyTube

    © 2025 ClarifyTube. All rights reserved.