Quick Start Guide#

Before first use#

Here are some things to look out for while playing with the MD80 x CANdle ecosystem for the first time:

  1. Always stay cautious when dealing with actuators. Even though they don’t seem like it, they may severely hurt you when unintentional movement occurs. It’s recommended to fix the actuator to the workbench.

  2. Get accustomed to the safety limits section of this document. While developing your application be sure to keep the limits low, and only if you are sure you know what you’re doing - increase the limits.

  3. We recommend using power supply sources that can work in two quadrants - meaning they can supply and dissipate some of the energy produced by the motor in case it works as a generator. Old trafo-based power supplies usually block current coming into the power supply, causing overvoltage events on the MD80s. The best choice is to use LiPo batteries or at least SMPS power supplies.

Video tutorials#

Check out our video tutorials if you prefer this way of presentation:

  1. Guide on how to set up a new MD80 to work with a motor of your choice: MD80 x CANdle - Brushless Motor Setup Guide

  2. Quick startup guide - watch when your motor is already configured and you’d like to try the examples: MD80 x CANdle - Getting Started Tutorial

  3. MDtool guide - a short introduction to MDtool and its basic commands (at this point the MDtool has evolved, however, the main principles are the same) MD80 x CANdle - MDtool

  4. Motion modes guide - an introduction to motion modes available on MD80 MD80 x CANdle - motion modes

  5. ROS/ROS2 startup guide - an introduction to ROS/ROS2 drivers for MD80 MD80 x CANdle - ROS/ROS2 startup guide

Configuring the MD80 controller for a new motor#

MDtool is used to set up a new motor to work with the MD80 controller. This approach simplifies the configuration process so that the end user can reconfigure the MD80 driver to work with almost any brushless motor.

Warning

Steps presented in this section are performed on HW 2.0 unit. These steps are universal between the controller hardware revisions, however, be sure to always check the maximum ratings before applying voltage to the controller.

  • First, make sure the MD80 controller can work with your motor. A vast majority of hobby motors will be suitable, although too big motors in terms of power and gimbal motors (high resistance ones) might not work as expected. Be sure to contact us before you proceed with a gimbal or high-power motor (over 2kW peak power).

  • Place the diametrically magnetized magnet on the motor shaft and mount the MD80 controller firmly centered above the magnet.

candle

Fig. 1 Magnet - encoder placement cross section#

The optimal height between the magnet and the encoder IC is 1mm. The magnet and the encoder must be on the same rotation axis.

MD80 V2.0 is equipped with seven mounting holes. Please refer to the technical drawing below to find out the hole dimensions and their placement. The PCB 3D models for both V2.0, HW1.1, and HV1.3 can be found on the downloads page.

../_images/PCB_drawing.png
../_images/mount_cross_section.png

Warning

Always make sure the head of the screw is inside the white hole outline. Otherwise, it may cause permanent damage to the controller when a short circuit occurs between the head screw and any of the copper planes. Using M2.5 DIN912 stainless socket screws is recommended.

candle
  • Solder the motor wires to the PCB making sure all the individual motor wires within a single phase are connected (in case the motor is wound with more than one wire on each phase). It is possible to solder the motor from the bottom, however, soldering the wires on the top is also acceptable. Make sure that the phase wires are connected only to their respective polygons.

Warning

The order of the cables does not matter (does not change the rotation direction) as long as the order is not changed after the calibration. Each modification in wire order should be followed by a full motor calibration.

candle

Hint

Sometimes it may be difficult due to the high-temperature enamel on the copper wires. In that case, try to apply solder at high temperatures using flux until the solder sticks to all wires nicely.

  • Connect the power supply to the controller through the CANdle device as specified in this section. When powered the controller should blink shortly with a green LED once a second. If the red LED is fully on there are some errors that should be cleared after the calibration.

Warning

Always make sure that the polarity of the power supply is correct. MD80 controllers do not have reverse polarity protection so connecting the power supply in reverse polarity will cause permanent damage to the controller.

  • Connect CANdle to the PC using a USB type-C cable.

  • Ensure you’ve got the latest MDtool. For the MDtool installation guide refer to the MDtool section.

  • Please upgrade the setup software if any of your devices (MD80 or CANdle device) is older than the one from “latest” row in the releases table.

  • Once installed and run the MDtool will create an MDtool directory in ~/.config directory.

Hint

Press Ctrl+H to view the hidden folders (starting with a dot)

candle

There, you will find a mdtool.ini file which contains factory settings and should not be modified, and a mdtool_motors directory, which holds all the motor configuration files you will work with.

candle

Feel free to add a new *.cfg file for your custom motors in there. Use the already existing files as a reference, especially the AK60-6.cfg which contains some additional comments.

  • Check if the MD80 controller can be discovered properly using the mdtool ping all command

candle
  • To setup the MD80 controller simply call mdtool setup motor <ID> <*.cfg> where the ID is the ID that shows up after the mdtool ping command is called, and the *.cfg is one of the files existing in the mdtool_motors directory (press tab to list available config files). If anything fails during the process be sure to check your setup and try again.

candle
  • Do not worry if at this point there are many errors after calling mdtool setup info <ID> command (like below). They should be cleared after a successful calibration.

candle
  • When succeeded, the motor is set up correctly and now’s the time to calibrate it using mdtool setup calibration <ID>. Please follow the calibration guidelines for more information on the calibration process itself.

  • After the calibration the motor should be ready to use - the best way to find out everything was completed without errors is to check the MD80 info using the mdtool setup info <ID>. This command lists all the important parameters of the actuator. Errors are shown in red on the bottom if anything has failed during the process. If there are still errors after the calibration be sure to check out the error’s description and try the recommended action to clear it status.

Correct after-calibration mdtool setup info command output may look like this:

candle

Your actuator should be now ready to go! To make it move you can try the mdtool test move <ID> <pos> command, or try the CANdle lib C++ or Python examples.