text: (window.webpackJsonp=window.webpackJsonp||[]).push([[188],{1229:function(e,t,r){e.exports=r.p+"assets/img/orel20_top.d7a047d6.jpg"},1230:function(e,t,r){e.exports=r.p+"assets/img/kotleta20_top.2488a779.jpg"},1231:function(e,t,r){e.exports=r.p+"assets/img/kotleta20_bottom.885d7558.jpg"},1232:function(e,t,r){e.exports=r.p+"assets/img/sadulli_top.d9e61c38.jpg"},1748:function(e,t,r){"use strict";r.r(t);var o=r(18),a=Object(o.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"uavcan-escs-motor-controllers"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#uavcan-escs-motor-controllers"}},[e._v("#")]),e._v(" UAVCAN ESCs (Motor Controllers)")]),e._v(" "),o("p",[e._v("PX4 supports the "),o("a",{attrs:{href:"https://uavcan.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("UAVCAN"),o("OutboundLink")],1),e._v(" bus for connecting peripherals, including ESCs, GPS modules, various types of sensors, etc. However PX4 currently does not support UAVCAN Servos.")]),e._v(" "),o("p",[e._v("UAVCAN ESCs have a number of advantages over "),o("RouterLink",{attrs:{to:"/en/peripherals/pwm_escs_and_servo.html"}},[e._v("PWM ESCs")]),e._v(":")],1),e._v(" "),o("ul",[o("li",[e._v("UAVCAN has been specifically designed to deliver robust and reliable connectivity over relatively large distances.\nIt enables safe use of ESCs on bigger vehicles and communication redundancy.")]),e._v(" "),o("li",[e._v("The bus is bi-directional, enabling health monitoring and diagnostics.")]),e._v(" "),o("li",[e._v("Wiring is less complicated as you can have a single bus for connecting all your ESCs and other UAVCAN peripherals.")]),e._v(" "),o("li",[e._v("Setup is easier as you configure ESC numbering by manually spinning each motor (for most types of UAVCAN ESCs).")])]),e._v(" "),o("h2",{attrs:{id:"px4-supported-esc"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#px4-supported-esc"}},[e._v("#")]),e._v(" PX4 Supported ESC")]),e._v(" "),o("p",[e._v("PX4 is compatible with any/all UAVCAN ESCs (UAVCAN is generally speaking a plug'n'play protocol).")]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("At time of writing PX4 supports UAVCAN v0 (not v1.0).")])]),e._v(" "),o("p",[e._v("The only difference between UAVCAN ESCs from a setup perspective is that the physical connectors and the software tools used to configure the motor order and direction may be different.")]),e._v(" "),o("p",[e._v("Some popular UAVCAN ESC firmware/products include:")]),e._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"#sapog"}},[e._v("Sapog")]),e._v(" firmware; an advanced open source sensorless PMSM/BLDC motor controller firmware designed for use in propulsion systems of electric unmanned vehicles.\n"),o("ul",[o("li",[o("a",{attrs:{href:"https://zubax.com/products/orel_20",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zubax Orel 20"),o("OutboundLink")],1)]),e._v(" "),o("li",[o("a",{attrs:{href:"https://shop.holybro.com/kotleta20_p1156.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Holybro Kotleta20"),o("OutboundLink")],1)])])]),e._v(" "),o("li",[o("a",{attrs:{href:"https://zubax.com/products/mitochondrik",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mitochondrik"),o("OutboundLink")],1),e._v(" - integrated sensorless PMSM/BLDC motor controller chip (used in ESCs and integrated drives)\n"),o("ul",[o("li",[o("a",{attrs:{href:"https://shop.zubax.com/collections/integrated-drives/products/sadulli-integrated-drive-open-hardware-reference-design-for-mitochondrik?variant=27740841181283",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zubax Sadulli Integrated Drive"),o("OutboundLink")],1)])])]),e._v(" "),o("li",[o("a",{attrs:{href:"https://zubax.com/products/myxa",target:"_blank",rel:"noopener noreferrer"}},[e._v("Myxa"),o("OutboundLink")],1),e._v(" - High-end PMSM/BLDC motor controller (FOC ESC) for light unmanned aircraft and watercraft.")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://vesc-project.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("VESC Project ESCs"),o("OutboundLink")],1),e._v(" (see also "),o("a",{attrs:{href:"http://vedder.se",target:"_blank",rel:"noopener noreferrer"}},[e._v("Benjamin Vedder's blog"),o("OutboundLink")],1),e._v(" - project owner)")]),e._v(" "),o("li",[o("a",{attrs:{href:"http://www.olliw.eu/2017/uavcan-for-hobbyists/#chapterescactuator",target:"_blank",rel:"noopener noreferrer"}},[e._v("OlliW’s UC4H ESC-Actuator Node"),o("OutboundLink")],1)]),e._v(" "),o("li",[e._v("A number of others are "),o("a",{attrs:{href:"https://forum.uavcan.org/t/uavcan-esc-options/452/3?u=pavel.kirienko",target:"_blank",rel:"noopener noreferrer"}},[e._v("listed here"),o("OutboundLink")],1)])]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("This list is "),o("em",[e._v("not exhaustive/complete")]),e._v(".\nIf you know of another ESC, please add it to the list!")])]),e._v(" "),o("h2",{attrs:{id:"purchase"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#purchase"}},[e._v("#")]),e._v(" Purchase")]),e._v(" "),o("p",[e._v("Sapog-based ESCs:")]),e._v(" "),o("ul",[o("li",[o("p",[o("a",{attrs:{href:"https://zubax.com/products/orel_20",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zubax Orel 20"),o("OutboundLink")],1)]),e._v(" "),o("p",[o("img",{attrs:{src:r(1229),alt:"Orel20 - Top"}})])]),e._v(" "),o("li",[o("p",[o("a",{attrs:{href:"https://shop.holybro.com/kotleta20_p1156.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Holybro Kotleta20"),o("OutboundLink")],1)]),e._v(" "),o("p",[o("img",{attrs:{src:r(1230),alt:"Kotleta20 - Top"}}),e._v(" "),o("img",{attrs:{src:r(1231),alt:"Kotleta20 - Bottom"}})])])]),e._v(" "),o("p",[e._v("Mitochondrik based drives and ESC:")]),e._v(" "),o("ul",[o("li",[o("p",[o("a",{attrs:{href:"https://shop.zubax.com/collections/integrated-drives/products/sadulli-integrated-drive-open-hardware-reference-design-for-mitochondrik?variant=27740841181283",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zubax Sadulli Integrated Drive"),o("OutboundLink")],1)]),e._v(" "),o("p",[o("img",{attrs:{src:r(1232),alt:"Sadulli - Top"}})])])]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("There are many other commercially available ESCs; please add new links as you find them!")])]),e._v(" "),o("p",[o("span",{attrs:{id:"connecting"}})]),e._v(" "),o("h2",{attrs:{id:"wiring-connections"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#wiring-connections"}},[e._v("#")]),e._v(" Wiring/Connections")]),e._v(" "),o("p",[e._v("Connect all of the on-board UAVCAN devices into a chain and make sure the bus is terminated at the end nodes.\nThe order in which the ESCs are connected/chained does not matter.")]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("All UAVCAN ESCs share the same connection architecture/are wired the same way.\nNote however that the actual connectors differ (e.g. "),o("em",[e._v("Zubax Orel 20")]),e._v(" and "),o("em",[e._v("Holybro Kotleta20")]),e._v(" use Dronecode standard connectors (JST-GH 4 Pin) - while VESCs do not).")])]),e._v(" "),o("p",[e._v("For more information about proper bus connections see "),o("a",{attrs:{href:"https://kb.zubax.com/display/MAINKB/UAVCAN+device+interconnection",target:"_blank",rel:"noopener noreferrer"}},[e._v("UAVCAN Device Interconnection"),o("OutboundLink")],1),e._v(" (Zubax KB).")]),e._v(" "),o("h2",{attrs:{id:"px4-configuration"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#px4-configuration"}},[e._v("#")]),e._v(" PX4 Configuration")]),e._v(" "),o("p",[e._v("In order to use a UAVCAN ESC with PX4 you will need to enable the UAVCAN driver:")]),e._v(" "),o("ol",[o("li",[e._v("Power the vehicle using the battery (you must power the whole vehicle, not just the flight controller!) and connect "),o("em",[e._v("QGroundControl")]),e._v(".")]),e._v(" "),o("li",[e._v("Navigate to the "),o("strong",[e._v("Vehicle Setup > Parameters")]),e._v(" screen\n"),o("blockquote",[o("p",[o("RouterLink",{attrs:{to:"/en/advanced_config/parameters.html"}},[e._v("Parameters")]),e._v(" explains how to find and set parameters.")],1)])]),e._v(" "),o("li",[e._v("Set "),o("RouterLink",{attrs:{to:"/en/advanced_config/parameter_reference.html#UAVCAN_ENABLE"}},[e._v("UAVCAN_ENABLE")]),e._v(" to the value "),o("em",[e._v("Sensors and Motors")]),e._v(" (3) and then reboot the flight controller.")],1)]),e._v(" "),o("p",[e._v("If applicable (some systems will not benefit from this behavior, e.g. glider drones):")]),e._v(" "),o("ol",[o("li",[e._v("Set "),o("RouterLink",{attrs:{to:"/en/advanced_config/parameter_reference.html#UAVCAN_ESC_IDLT"}},[e._v("UAVCAN_ESC_IDLT")]),e._v(" to 1 in order to ensure that the motors are always running at least at the idle throttle while the system is armed.")],1)]),e._v(" "),o("h2",{attrs:{id:"esc-setup"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#esc-setup"}},[e._v("#")]),e._v(" ESC Setup")]),e._v(" "),o("p",[e._v("While UAVCAN devices are generally "),o("em",[e._v("plug'n'play")]),e._v(" you will still need to enumerate (number) each of the ESC used in your system and set their direction so that they can be identified/controlled by PX4.")]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("The ESC index and direction must match/map to the "),o("RouterLink",{attrs:{to:"/en/airframes/airframe_reference.html"}},[e._v("Airframe Reference")]),e._v(" for the vehicle type.\nESC indexes from 0-7 map to MAIN 1-8, while ESC indexes 8-15 map to AUX 1-8.")],1)]),e._v(" "),o("p",[e._v("The mechanism for enumerating each type of UAVCAN ESC is different (look up the instructions in your ESC's manual).\nSetup information for some UAVCAN ESCs is provided below.")]),e._v(" "),o("p",[o("span",{attrs:{id:"sapog"}})]),e._v(" "),o("h3",{attrs:{id:"sapog-esc-setup"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#sapog-esc-setup"}},[e._v("#")]),e._v(" Sapog ESC setup")]),e._v(" "),o("p",[e._v("The following sections explain how to enumerate "),o("a",{attrs:{href:"https://github.com/PX4/sapog#px4-sapog",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sapog-based"),o("OutboundLink")],1),e._v("-based ESCs with PX4.\nThe instructions should work for any Sapog-based ESC design.")]),e._v(" "),o("p",[o("span",{attrs:{id:"sapog_esc_qgc"}})]),e._v(" "),o("h4",{attrs:{id:"esc-enumeration-using-qgroundcontrol"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#esc-enumeration-using-qgroundcontrol"}},[e._v("#")]),e._v(" ESC Enumeration using QGroundControl")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),o("p",[e._v("You can skip this section if there is only one ESC in your setup, because the ESC index is already set to zero by default.")])]),e._v(" "),o("p",[e._v("To enumerate the ESC:")]),e._v(" "),o("ol",[o("li",[o("p",[e._v("Power the vehicle with a battery and connect to "),o("em",[e._v("QGroundControl")])])]),e._v(" "),o("li",[o("p",[e._v("Navigate to "),o("strong",[e._v("Vehicle Setup > Power")]),e._v(" in QGC.")])]),e._v(" "),o("li",[o("p",[e._v("Start the process of ESC auto-enumeration by pressing the "),o("strong",[e._v("Start Assignment")]),e._v(" button, as shown on the screenshot below.")]),e._v(" "),o("p",[o("img",{attrs:{src:r(377),alt:"QGC - UAVCAN ESC auto-enumeration"}})]),e._v(" "),o("p",[e._v("You will hear a sound indicating that the flight controller has entered the ESC enumeration mode.")])]),e._v(" "),o("li",[o("p",[e._v("Manually turn each motor in the correct direction of its rotation, starting from the first motor and finishing with the last motor.\nEach time you turn a motor, you should hear a confirmation.")]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("Make sure to turn each of the motors in the correct direction, because the ESC will automatically learn and remember the direction (i.e. motors that spin clockwise during normal operation must also be turned clockwise during enumeration).")])])]),e._v(" "),o("li",[o("p",[e._v("After the last motor is enumerated, the confirmation sound should change to indicate that the enumeration procedure is complete.")])])]),e._v(" "),o("p",[e._v("The following video demonstrates the process:")]),e._v(" "),o("p"),o("div",{staticClass:"embed-responsive embed-responsive-16by9"},[o("iframe",{staticClass:"embed-responsive-item youtube-player",attrs:{type:"text/html",width:"640",height:"390",src:"https://www.youtube.com/embed/4nSa8tvpbgQ",frameborder:"0",webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:""}})]),o("div",{staticClass:"embed-responsive embed-responsive-16by9"},[o("iframe",{staticClass:"embed-responsive-item youtube-player",attrs:{type:"text/html",width:"640",height:"390",src:"https://www.youtube.com/embed/4nSa8tvpbgQ",frameborder:"0",webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:""}})]),o("p"),e._v(" "),o("h4",{attrs:{id:"manual-esc-enumeration-using-sapog"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#manual-esc-enumeration-using-sapog"}},[e._v("#")]),e._v(" Manual ESC Enumeration using Sapog")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),o("p",[e._v("We recommend automated "),o("a",{attrs:{href:"#sapog_esc_qgc"}},[e._v("ESC Enumeration using QGroundControl")]),e._v(" rather than manual enumeration - it is easier and safer.")])]),e._v(" "),o("p",[e._v("You can manually configure the ESC index and direction using the "),o("a",{attrs:{href:"https://uavcan.org/GUI_Tool/Overview/",target:"_blank",rel:"noopener noreferrer"}},[e._v("UAVCAN GUI Tool"),o("OutboundLink")],1),e._v(".\nThis assigns the following Sapog configuration parameters for each enumerated ESC:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("esc_index")])]),e._v(" "),o("li",[o("code",[e._v("ctl_dir")])])]),e._v(" "),o("div",{staticClass:"custom-block note"},[o("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),o("p",[e._v("See "),o("a",{attrs:{href:"https://files.zubax.com/products/io.px4.sapog/Sapog_v2_Reference_Manual.pdf",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sapog reference manual"),o("OutboundLink")],1),e._v(" for more information about the parameters.")])]),e._v(" "),o("h3",{attrs:{id:"myxa-esc-setup"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#myxa-esc-setup"}},[e._v("#")]),e._v(" Myxa ESC Setup")]),e._v(" "),o("p",[e._v("Motor enumeration for Myxa "),o("a",{attrs:{href:"https://zubax.com/products/telega",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telega-based ESCs"),o("OutboundLink")],1),e._v(" is usually performed using the "),o("a",{attrs:{href:"https://files.zubax.com/products/com.zubax.kucher/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Kucher tool"),o("OutboundLink")],1),e._v(' (or less "GUI-friendly" '),o("a",{attrs:{href:"https://uavcan.org/GUI_Tool/Overview/",target:"_blank",rel:"noopener noreferrer"}},[e._v("UAVCAN GUI Tool"),o("OutboundLink")],1),e._v(").")]),e._v(" "),o("p",[e._v("There is some guidance here: "),o("a",{attrs:{href:"https://forum.zubax.com/t/quick-start-guide-for-myxa-v0-1/911",target:"_blank",rel:"noopener noreferrer"}},[e._v("Quick start guide for Myxa v0.1"),o("OutboundLink")],1),e._v(" (Zubax blog).")]),e._v(" "),o("h3",{attrs:{id:"vesc-esc-setup"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#vesc-esc-setup"}},[e._v("#")]),e._v(" VESC ESC Setup")]),e._v(" "),o("p",[e._v("For "),o("a",{attrs:{href:"https://vesc-project.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("VESC ESCs"),o("OutboundLink")],1),e._v(" the preferred tool for motor enumeration is the "),o("a",{attrs:{href:"https://vesc-project.com/vesc_tool",target:"_blank",rel:"noopener noreferrer"}},[e._v("VESC tool"),o("OutboundLink")],1),e._v(".\nIn addition to the normal motor configuration that you will have to setup in the VESC tool, you will also need to properly setup the app configuration.\nThe recommended app setup is as follows:")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[e._v("Parameter")]),e._v(" "),o("th",[e._v("Option")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[e._v("App to use")]),e._v(" "),o("td",[o("code",[e._v("No App")])])]),e._v(" "),o("tr",[o("td",[e._v("VESC ID")]),e._v(" "),o("td",[o("code",[e._v("1,2,...")])])]),e._v(" "),o("tr",[o("td",[e._v("Can Status Message Mode")]),e._v(" "),o("td",[o("code",[e._v("CAN_STATUS_1_2_3_4_5")])])]),e._v(" "),o("tr",[o("td",[e._v("CAN Baud Rate")]),e._v(" "),o("td",[o("code",[e._v("CAN_BAUD_500K")])])]),e._v(" "),o("tr",[o("td",[e._v("CAN Mode")]),e._v(" "),o("td",[o("code",[e._v("UAVCAN")])])]),e._v(" "),o("tr",[o("td",[e._v("UAVCAN ESC Index")]),e._v(" "),o("td",[o("code",[e._v("0,1,...")])])])])]),e._v(" "),o("p",[e._v("VESC ID should have the same motor numbering as in PX4 convention, starting at "),o("code",[e._v("1")]),e._v(" for top-right motor, "),o("code",[e._v("2")]),e._v(" for bottom-left motor etc.\nHowever the "),o("code",[e._v("UAVCAN ESC Index")]),e._v(" starts from "),o("code",[e._v("0")]),e._v(", and as such it is always one index lower than the "),o("code",[e._v("VESC ID")]),e._v(".\nFor example, in a quadcopter the bottom left motor will have "),o("code",[e._v("VESC ID = 2")]),e._v(" and "),o("code",[e._v("UAVCAN ESC Index = 1")]),e._v(".")]),e._v(" "),o("p",[e._v("Finally the "),o("code",[e._v("CAN Baud Rate")]),e._v(" must match the value set in "),o("RouterLink",{attrs:{to:"/en/advanced_config/parameter_reference.html#UAVCAN_BITRATE"}},[e._v("UAVCAN_BITRATE")]),e._v(".")],1),e._v(" "),o("h2",{attrs:{id:"further-information"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#further-information"}},[e._v("#")]),e._v(" Further Information")]),e._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"https://github.com/PX4/sapog#px4-sapog",target:"_blank",rel:"noopener noreferrer"}},[e._v("PX4/Sapog"),o("OutboundLink")],1),e._v(" (Github)")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://files.zubax.com/products/io.px4.sapog/Sapog_v2_Reference_Manual.pdf",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sapog v2 Reference Manual"),o("OutboundLink")],1)]),e._v(" "),o("li",[o("a",{attrs:{href:"https://kb.zubax.com/display/MAINKB/UAVCAN+device+interconnection",target:"_blank",rel:"noopener noreferrer"}},[e._v("UAVCAN Device Interconnection"),o("OutboundLink")],1),e._v(" (Zubax KB)")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://kb.zubax.com/display/MAINKB/Using+Sapog-based+ESC+with+PX4",target:"_blank",rel:"noopener noreferrer"}},[e._v("Using Sapog based ESC with PX4"),o("OutboundLink")],1),e._v(" (Zubax KB)")])])])}),[],!1,null,null,null);t.default=a.exports},377:function(e,t,r){e.exports=r.p+"assets/img/qgc_uavcan_settings.9ea99d99.jpg"}}]);