CDS5500 Robot Servo (SKU:SER0026)

From DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot.com
CDS55xx Robot Servo

Introduction

The Uptech CDS 5500 Serial Robot Servo (Robotis Compatible) has been launched with the aim to solve most important problems caused by R/C servos in robot and simultaneously inheriting most of the advantages of them. Because of the advanced position sensor and precise A/D converter gives the high position accuracy, the position resolution in position-mode can be up to 0.3°. The response time is up to 2ms contrast a 20ms of traditional R/C servo.

The CDS series robot servo can be linked by serial bus, which can connect up to 200+ servos. Each unit can feedback its position, rotation velocity, torque, current, motor temperature and so on. The robot built with robot servos can set actions through artificial demonstration, that is, the user can regulate the robot’s joints posture with hands and the robot can record the parameters like location, speed, etc. Then, it is able to automatically play them. So there is no need to set position, velocity parameters of each joint and observe whether the joints right in place or the parameters are appropriate. You just need play and record.

It can do rotating all round, and the velocity can be controlled, just act as a gear motor. This feature enables it to work as a motor of wheeled robots, or tracked robots. The CDS series robot servo can send alarm signal via the serial bus, or shut down output in condition of over current, over temperature and so on.

Specification

Max holding torque: >14 kgf.cm
Weight: 61 g
Slewing range/servo mode: 300°
Max rotate velocity: 0.18 sec/60°
Power supply: 6.5 ~ 8.4VDC
Dimensions: 40 x 20.5 x 42 mm


Requierments

You need a Ax-12 CDS55xx Driver Board to drive these servos.

Please see AX12 CDS55xx Driver Board(SKU:DRI0016) wiki for a wiring diagram.

Arduino Sample Code

#define startByte 0xFF
#define ID 0x01

//— Control Table Address —
//EEPROM AREA
#define P_MODEL_NUMBER_L 0
#define P_MODEL_NUMBER_H 1
#define P_VERSION 2
#define P_ID 3
#define P_BAUD_RATE 4
#define P_RETURN_DELAY_TIME 5
#define P_CW_ANGLE_LIMIT_L 6
#define P_CW_ANGLE_LIMIT_H 7
#define P_CCW_ANGLE_LIMIT_L 8
#define P_CCW_ANGLE_LIMIT_H 9
#define P_SYSTEM_DATA2 10
#define P_LIMIT_TEMPERATURE 11
#define P_DOWN_LIMIT_VOLTAGE 12
#define P_UP_LIMIT_VOLTAGE 13
#define P_MAX_TORQUE_L 14
#define P_MAX_TORQUE_H 15
#define P_RETURN_LEVEL 16
#define P_ALARM_LED 17
#define P_ALARM_SHUTDOWN 18
#define P_OPERATING_MODE 19
#define P_DOWN_CALIBRATION_L 20
#define P_DOWN_CALIBRATION_H 21
#define P_UP_CALIBRATION_L 22
#define P_UP_CALIBRATION_H 23
#define P_TORQUE_ENABLE (24)
#define P_LED (25)
#define P_CW_COMPLIANCE_MARGIN (26)
#define P_CCW_COMPLIANCE_MARGIN (27)
#define P_CW_COMPLIANCE_SLOPE (28)
#define P_CCW_COMPLIANCE_SLOPE (29)
#define P_GOAL_POSITION_L (30)
#define P_GOAL_POSITION_H (31)
#define P_GOAL_SPEED_L (32)
#define P_GOAL_SPEED_H (33)
#define P_TORQUE_LIMIT_L (34)
#define P_TORQUE_LIMIT_H (35)
#define P_PRESENT_POSITION_L (36)
#define P_PRESENT_POSITION_H (37)
#define P_PRESENT_SPEED_L (38)
#define P_PRESENT_SPEED_H (39)
#define P_PRESENT_LOAD_L (40)
#define P_PRESENT_LOAD_H (41)
#define P_PRESENT_VOLTAGE (42)
#define P_PRESENT_TEMPERATURE (43)
#define P_REGISTERED_INSTRUCTION (44)
#define P_PAUSE_TIME (45)
#define P_MOVING (46)
#define P_LOCK (47)
#define P_PUNCH_L (48)
#define P_PUNCH_H (49)

//— Instruction —
#define INST_PING 0x01
#define INST_READ 0x02
#define INST_WRITE 0x03
#define INST_REG_WRITE 0x04
#define INST_ACTION 0x05
#define INST_RESET 0x06
#define INST_DIGITAL_RESET 0x07
#define INST_SYSTEM_READ 0x0C
#define INST_SYSTEM_WRITE 0x0D
#define INST_SYNC_WRITE 0x83
#define INST_SYNC_REG_WRITE 0x84

void setup()
{
Serial.begin(1000000);                        // start serial port at 1000000 bps:
}

void loop()
{
//  if (Serial.available() > 0) {              // if we get a valid byte
//    Serial.println( Serial.read() );            // get incoming byte:
//  }

// Instruction Packet OXFF 0XFF ID LENGTH INSTRUCTION PARAMETER1 …PARAMETER N CHECK SUM
// CDS5500 tech support suggests the following will work: FF FF 01 07 03 1E 00 02 00 02 D2
int pos = random(255);
int pos2 = random(3);
int vel = random(255);
int vel2 = random(3);
int messageLength = 5+2;

Serial.print(startByte, BYTE);              // send some data
Serial.print(startByte, BYTE);
Serial.print(ID, BYTE);
Serial.print(messageLength, BYTE);
Serial.print(INST_WRITE,BYTE);
Serial.print(P_GOAL_POSITION_L, BYTE);
Serial.print(pos, BYTE);
Serial.print(pos2, BYTE);
Serial.print(vel, BYTE);
Serial.print(vel2, BYTE);
Serial.print((~(ID + (messageLength) + INST_WRITE + P_GOAL_POSITION_L + pos + pos2 + vel + vel2))&0xFF, BYTE);
delay(1500);
}