ArduinoGeneral

Question about Arduino / CDS5xx Servo connection

userHead Maris 2013-04-02 08:54:26 3984 Views3 Replies
Good morning or good evening everyone,

my question is about the connection between an Arduino MEGA 2560 Controller and CDS55xx Servomotors connections. I have recently bought the DFRobot Hexapod Kit, but I encounter problems when I need to set the ID of the servos. I downloaded a quick start manual for the servos, which is attached to the kit wiki page, and it shows how to set the ID, but it only talks about a situation using an UP-Debugger, which I do not have. (I attached the manual, if needed).

So my question is to know how to do it only with the Arduino Microcontroller, the shield and the servo driver boards, which are included in the kit.

I thank you to have read my post.
2013-04-08 00:28:23 Hi

you should first reset your 18 servos' ID, all the servos have a unique ID number. You can choose to set the ID via program or UART via PC. such as "FF FF 01 04 03 03 02 F2" means set the servo's number 1 to 2.You can check the page6 of this pdf like:
[url=https://www.dfrobot.com/image/data/SER0026/CDS55XX_Robot_Servo_User_Manual_EN.pdf]https://www.dfrobot.com/image/data/SER0026/CDS55XX_Robot_Servo_User_Manual_EN.pdf[/url]

After each servo has a unique ID , the code , like SERVO.xxx(1,xx) should include the ID, so that each servo will know what it should do.

You can refer to these two products' manual
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=cds55&product_id=579#.UWErj5P-GeE]https://www.dfrobot.com/index.php?route=product/product&filter_name=cds55&product_id=579#.UWErj5P-GeE[/url]
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=cds&product_id=373#.UWEr1ZP-GeE]https://www.dfrobot.com/index.php?route=product/product&filter_name=cds&product_id=373#.UWEr1ZP-GeE[/url]
userHeadPic Phoebe
2013-04-04 06:24:16 Hello,

firstly, thank you very much for your answer.

There is just a think that I do not understand. I am currently developing a software with Qt C++ Library to control my hexapod by clicking on buttons in the software's window. I know exactly how to draw buttons, how to do the signals, etc.. but I do not understand how to be able to say to the program "Okay, when the user clicks on the button, you will ask the Arduino microcontroller to move these three servos during this laps of time, and you will stop when the user will no more click."

The problems I encounter is that I do not understand how I can differentiate the servos from each other (in the code you gave me, it is only talking about SERVO, I do not see any differentiation between the 18 servos) and then I do not see how I can send the message to the Arduino controller.

If you could help me about that, I would be very grateful.
userHeadPic Maris
2013-04-02 18:21:54 Hi Maris

Here is a sample code which can set the servo's ID1 to ID2. The ID number & the baud rate of  servo in default is 1 & 1000000.

[b]#include <CDS5500.h>

CDS5500 SERVO;

void setup(){
  Serial.begin(1000000);//init Serial baudrate
}

void loop(){

  SERVO.SetID(1,2);//  1: ID    2:NewID 
  delay(100);
}[/b]

Good Luck :D
userHeadPic Phoebe