Using the Arduino UNO to control Dynamixel XM430-210T Servos

Hey Guys,
I hope im right in this section.
I want to control my Servo with an Arduino UNO for a projekt. My Problem is that i cant communicate with the Servo. i have a instructionpacket for the Servo ( it should move) and im trying to get it running. I have to communicate on a Serial way. I want to use just one Pin and softwareserial since the Servo is half-duplex. Is it possible to run it like that without extra hardware? (At first i could just use the TX Mode if i dont want any feedback) I was trying something like:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(4,4); //Data Pin is on PIN 4
void setup(){
mySerial.begin(57600); //default baudrate according to the manual
pinMode(4,OUTPUT);
}
void loop(){
//this should make the Servo move according to its Protocol 2.0
Serial.write(0xFF);
Serial.write(0xFF);
Serial.write(0xFD);
Serial.write(0x00);
Serial.write(0x01);
Serial.write(0x09);
Serial.write(0x00);
Serial.write(0x03);
Serial.write(0x74);
Serial.write(0x00);
Serial.write(0x00);
Serial.write(0x02);
Serial.write(0x00);
Serial.write(0x00);
Serial.write(0xCA);
Serial.write(0x89);

delay(400);
}

This code doesnt work yet. Can you help me?

In this page I found this line.

To control X Series with a personally made Main Controller, the signal of Main Controller UART should be converted into RS485 type signal. The following is a recommended circuit diagram.

So it seems that you will need to convert the TTL serial to RS485, using the circuit shown on the linked page, to control the servo.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you post a link to specs/manual for the servo driver you are communicating with?

Thanks.. Tom.. :slight_smile:

Hi,
Change all your;

   Serial.write

To;

   mySerial.write

Tom... :slight_smile:

Im sorry! Here is the Code right formated. I think the mySerial.write function wont run either (i think had it that way in another verion and forgot to change it back), but ill try it out tomorrow.

 #include <SoftwareSerial.h>

SoftwareSerial mySerial(4,4); //Data Pin is on PIN 4

void setup(){

mySerial.begin(57600); //default baudrate according to the manual
pinMode(4,OUTPUT);
}

void loop(){


//this should make the Servo move according to its Protocol 2.0
    Serial.write(0xFF);                
    Serial.write(0xFF); 
    Serial.write(0xFD); 
    Serial.write(0x00);
    Serial.write(0x01);
    Serial.write(0x09);
    Serial.write(0x00);
    Serial.write(0x03);
    Serial.write(0x74);
    Serial.write(0x00);
    Serial.write(0x00);
    Serial.write(0x02); 
    Serial.write(0x00);
    Serial.write(0x00);
    Serial.write(0xCA);
    Serial.write(0x89);
 
 delay(400);



}

the Servo is this one(W210T): http://support.robotis.com/en/product/actuator/dynamixel_x/xm_series/xm430-w210.htm
and the circuit looks like this. (Data to Pin 4): https://goo.gl/images/EkbSqX except im using the Powerjack from the Arduino board, so the VDD goes to Vin and Gnd to Gnd
thanks for ur help.

Hi,
OPs diagram.

How are you powering the servo motor?
If it is through that jack, then connect the gnd of the jack DIRECTLY to the servo driver, no via the UNO.
You will have servo motor current running through the UNO, not good.

Please a hand drawn diagram, fritzy is a picture, it doesn't label any oof the components.

Thanks.. Tom.. :slight_smile:

groundFungus:
In this page I found this line.So it seems that you will need to convert the TTL serial to RS485, using the circuit shown on the linked page, to control the servo.

The op is using the W210T

Input Voltage : 10 ~ 14.8V (Recommended : 12V)
Command Signal : Digital Packet
Protocol Type
XM430-W210-T (Half duplex Asynchronous Serial Communication (8bit,1stop, No Parity)
XM430-W210-R (RS485 Asynchronous Serial Communication (8bit,1stop, No Parity)
Link (Physical)
XM430-W210-T (TTL Level Multi Drop Bus)
XM430-W210-R (RS485 Multi Drop Bus)
ID : 253 ID (0~252)
Feedback : Position, Velocity, Current, Realtime tick, Trajectory, Temperature, Input Voltage, etc.
Material : Full Metal Gear, Metal Body(Front, Middle), Engineering Plastic Body(Back)
Standby current : 40 mA

W4210-T is TTL.

Tom... :slight_smile: