Skip to content

End Effector Servos

JamesNewton edited this page Mar 11, 2019 · 13 revisions

The new Tool Interface for end effectors incorporates 2 Dynamixel XL-320 servos which use a single wire, half duplex, serial interface and a data format known as the Dynamixel v.20 Protocol. These become the 6th and 7th axis for the robot. Data for the servo bus comes from the main controller board.

The connector on the servo is a Molex Microlatch 3 pin. For a PCB, the mating part is the Molex 53253-0370

Pin Signal @Servo Signal @MicroZed Board
1 GND (nearest the feedhorn) J25 top pin
2 VDD J25 bottom pin*
3 DATA J20 bottom pin "AUX2"

*See the Tool Interface page, Version 2 section for more on that wiring / power supply.

The firmware was changed May 29th on the TDInt branch to accept servo commands via the Set Parameter command and to include measured angle and force data via the returned status data

Communications are at 115,200 baud. Joint 4 is Servo ID 3, and Joint 5 is Servo ID 1 on the Dynamixel Protocol 2.0 bus. The following Arduino program will setup the servos for use in Dexter.

Servo Setup

// ========================================
// Dynamixel XL-320 Setup for Dexter
// ========================================

#include "XL320.h"
// You will need to install the XL320 library from:
// https://github.com/hackerspace-adelaide/XL320

// Name your robot!
XL320 robot;
int servoID = 3; //desired servo ID number (1 "span" or 3 "roll" for Dexter)

void setup() {

// Uncomment these one at a time, program the Arduino, then power cycle the servo
//IMPORTANT: POWER CYCLE EACH TIME YOU DO ONE OF THE SETUP STEPS

//Step 1 - Set the ID number
/*
  Serial.begin(1000000); //Default baud rate for XL-320 servos
  robot.begin(Serial); 
  delay(100);
  robot.sendPacket(254, XL_ID, servoID); //broadcast to all servos
*/

//Step 2 - Set the baud rate
/*
  Serial.begin(9600); // Goes back to 9600 after ID set for some reason
  robot.begin(Serial); 
  delay(100);
  // writePacket(1, XL_BAUD_RATE, x) sets the baud rate:
  // 0: 9600, 1:57600, 2:115200, 3:1Mbps
  robot.sendPacket(254, XL_BAUD_RATE, 2);
*/

//Step 3 - Test / Move to zero
/*
  Serial.begin(115200); // Now at our desired baud rate
  robot.begin(Serial);
  delay(100);
  robot.moveJoint(servoID, 0);  
*/
}

void loop() {
}
You can’t perform that action at this time.