Difference between revisions of "ROBOTIS DYNAMIXEL XL330 PID Example"

From Lofaro Lab Wiki
Jump to: navigation, search
(Code Explanation (Assuming Dynamixel library is already installed))
(Code Explanation (Assuming Dynamixel library is already installed))
Line 24: Line 24:
 
==Code Explanation (Assuming Dynamixel library is already installed)==
 
==Code Explanation (Assuming Dynamixel library is already installed)==
 
Note: No matter what we are trying to do, when using the DYNAMIXEL hardware components, we must always import the DYNAMIXEL library. This means that the Dynamixel2 library must be installed from this website:
 
Note: No matter what we are trying to do, when using the DYNAMIXEL hardware components, we must always import the DYNAMIXEL library. This means that the Dynamixel2 library must be installed from this website:
* [http://files.lofarolabs.com/software/Dynamixel2Arduino-master.zip| http://files.lofarolabs.com/software/Dynamixel2Arduino-master.zip]
+
* [http://files.lofarolabs.com/software/Dynamixel2Arduino-master.zip http://files.lofarolabs.com/software/Dynamixel2Arduino-master.zip]

Revision as of 22:38, 16 September 2021

Prerequisites

To utilize this tutorial, the assumption is made that you have the following:

  • 1x DYNAMIXEL Shield for Arduino MKR Series (MKR Zero Preferred)
  • 1x Arduino MKR compatible device: Please note that this tutorial uses the MKR ZERO
  • 1xCompatible 1S LiPo battery with a JST2.0 connector
  • Nx DYNAMIXEL XL330-M288-T ROBOTIS actuators where N >= 2
  • 1x Micro-USB to USB-A Cable Overview

This tutorial gives examples of how to change the P gain, D gain, and, in the process, change the actuator ID of the XL330-M288-T ROBOTIS actuators when connected to the DYNAMIXEL Shield for MKR.

Tutorial

Written Explanation

To perform this tutorial the following steps must be completed:

  1. Put the DYNAMIXEL shield on top of the Arduino MKR Zero. The ports should exactly match each other. For instance, 5volts from the DYNAMIXEL shield should go into the 5volt channel of the MKR zero and so on.
  2. Connect one of the three stringed wires that came with the DYNAMIXEL actuator to the actuator. Please take care in how you attach the cable as the cable should easily fit into the connection port for the actuator.
  3. Please connect the other end of that wire to port DXL_T1 of the DYNAMIXEL shield.
  4. Once the cable has been attached from one actuator to the DYNAMIXEL shield, connect another 3 stringed cable into the other port on that same XL330 actuator.
  5. Connect the other end to a second XL330 actuator.
  6. Connect the fully charged 1S batter to the JSt2.0 battery port on the DYNAMIXEL shield. Note: this will power the actuators only!
  7. Connect the Micro-USB to USB-A cable to the MKR Zero.
  8. Connect the other end to the USB port of your computer.


Code Explanation (Assuming Dynamixel library is already installed)

Note: No matter what we are trying to do, when using the DYNAMIXEL hardware components, we must always import the DYNAMIXEL library. This means that the Dynamixel2 library must be installed from this website: