PDA

View Full Version : Robotis OpenCM9.04 need help.



Hari
03-04-2014, 07:44 AM
We have bought 6 MX 64T and a CM9.04B.


We are totally new to these products and need technical help on controlling them.


Here is a brief description on what we did with the motor and controller.


One TTL port of the motor was connected to the TTL port available on the controller.
An example code on the software was uploaded. On the other port available on the motor, we had connected a 12v DC battery with the positive wired to the pin 2 and the ground wired to the pin3 and pin 1 was left free. A red light on top of the motor lighted up for a moment and got switched off. We tried powering up the motor through the controller using the + and - pins instead of powering the motor directly. That also gave the same result.


When we tried reading the values on the RAM of the motor, every memory location gives the same output, that is, 255.


Expecting an early and positive reply from your side.

tician
03-04-2014, 10:04 AM
Having the LED flash once at power up is perfectly normal operation. The reason you cannot access the servos is likely because you are using the default baudrate of the CM-904 and AX servos (1 Mbps), while the MX servos have a default baud of 57600 bps. You will need to open the DXL device at the slower baudrate and test reading the address table. If it works, then you can change the baudrate to the higher speed by writing to the appropriate location in the address table.

http://support.robotis.com/en/techsupport_eng.htm#product/dynamixel/mx_series/mx-64.htm#Actuator_Address_04
The baudrate address is 4 and the default value for the MX-64 is 34, while the default value for AX-12 is 1. Be very careful that you do not change the baudrate to an uncommon value, or you may require a USB2Dynamixel to reset it.

KevinO
03-04-2014, 11:24 AM
Since you are completely new I'm assuming you haven't even set the ID's on each servo, thus they are all set to 1. Unplug all of them except one and get it going. Then set the ID's one at a time when you have a handle on how these work and are confident on how to work with the CM-904.

Hari
03-04-2014, 06:31 PM
Thanks for your time.

I tried connecting just one MX 64T and I suppose, it has a default ID of 1. But, still, it isn't working. Anyways, I have to check with the baud rate issues. What could be the other possible reasons?

Thank you in advance

Hari

KevinO
03-04-2014, 06:34 PM
What code are you referring to? It will help us help you. :)

Hari
03-04-2014, 06:37 PM
Thanks for your time.


You will need to open the DXL device at the slower baudrate and test reading the address table.

What does the above sentence mean and how am I supposed to change the baud rate of the controller? How am I supposed to OPEN the DXL device?

Thank you in advance

Hari

Hari
03-04-2014, 06:39 PM
The examples code available on the IDE provided with the controller

KevinO
03-04-2014, 06:57 PM
Thanks for your time.



What does the above sentence mean and how am I supposed to change the baud rate of the controller? How am I supposed to OPEN the DXL device?

Thank you in advance

Hari

Tician means initialize the bus at the default baud rate of the MX-64. The CM-904 defaults to 1 Mbps, while the MX servos have a default baud of 57600 bps.

KevinO
03-04-2014, 07:01 PM
Also give us a heads up if you are new to programming. We are probably short handing our answers and might not make sense if you are just starting out.

tician
03-04-2014, 07:33 PM
Apparently the github version (https://github.com/robotis-pandora/ROBOTIS-OpenCM) of the IDE as two sketches just for this occasion ("File->Examples->06. Dynamixel" named "d_Dxl_ID_Change" and "e_Dxl_Bps_Change"). Basically, upload this sketch to the CM-904 and connect one servo, let the sketch run until the servo starts panning back and forth. After it is moving, you disconnect everything, change the desired ID number in the sketch and re-upload to the CM-904, and repeat the process for the next servo.

YOU MUST CONNECT ONLY ONE SERVO AT A TIME TO THE CM-904. IT USES THE BROADCAST ID, SO ALL SERVOS ON THE BUS WILL CHANGE THEIR BAUDRATE AND ID TO THE SAME VALUE.


Dynamixel Dxl(1); //Dynamixel on Serial1(USART1)

void setup() {
// Initialize the dynamixel bus:
Dxl.begin(34); //57600bps

Dxl.writeByte(0xfe, P_ID, 1); //Change dynamixel ID #1 (argument #3 is desired ID number)
Dxl.writeByte(0xfe, P_BAUD_RATE, 1); // Set baudrate to 1 Mbps

// Re-initialize dynamixel bus at 1Mbps
Dxl.begin(1); // initialize again at new baudrate 1Mbps
}

void loop() {
delay(500); // Wait for 0.5 second (500 milliseconds)
Dxl.writeWord(1, P_GOAL_POSITION_L, 512); // Rotate dynamixel ID 1 to position ~45 degrees
delay(500); // Wait for 0.5 second
Dxl.writeWord(1, P_GOAL_POSITION_L, 3584);// Rotate dynamixel ID 1 to position ~315 degrees
}

Hari
03-05-2014, 12:40 AM
I am new to programming and thank you for your support.

I will try uploading this code and will get back to you.

Thank you.

Hari

Hari
03-06-2014, 09:03 AM
I tried uploading that code. But, it didn't turn up to be working. The red LED lights up for the moment I connect the supply.

I am using a 12V 7 mah @20 c lead acid battery. Is the issue concerned with the battery? Should I change my battery and try this code again?

Thanks in advance

Hari
03-06-2014, 09:32 AM
Also, I had my negative of the supply to pin 3 and positive of the supply to pin 2. pin 1 was left free. Is that the right method? orelse, what should be done? I don't have an SMPS2Dynamixel or USB2Dynamixel.

jwatte
03-06-2014, 11:08 AM
A single blink when turning on power is normal.

If you're going to be working with Dynamixel servos, and you do not have a strong embedded programming skill set, you really do need a USB2Dynamixel or USB2AX, to use the Dynamixel Wizard tool.

If you do have the programming skill set, then look up the packet format, and set up your UART to the default speed of 57600 and try talking to the servo; if that doesn't work, try 1 Mbps, 2 Mbps, and 9600 bps in that order.
The packet format is documented for example here:
http://support.robotis.com/en/product/dynamixel/dxl_communication.htm
http://support.robotis.com/en/product/dynamixel/mx_series/mx-64.htm

KevinO
03-06-2014, 11:27 AM
Also, I had my negative of the supply to pin 3 and positive of the supply to pin 2. pin 1 was left free. Is that the right method? orelse, what should be done? I don't have an SMPS2Dynamixel or USB2Dynamixel.

PIN1: GND
PIN2: VDD
PIN3: DATA


Sounds like you haven't read any of the support documentation. Take a look at this and what jwatte posted before you go any further..
http://support.robotis.com/en/product/dynamixel/dxl_mx_main.htm

Hari
03-06-2014, 06:49 PM
Sorry, I had connected it that way. ground to pin 1 and vdd to pin 2 and pin 3 was left free.

KevinO
03-06-2014, 06:52 PM
So are you working in Linux? or Windows? You need to be a bit more verbose on things. We are trying to help but you are not giving us much to go on.

KevinO
03-06-2014, 06:54 PM
In the list of examples provided with the OpenCM which ones did you start with? For example... In the basics? In the Dynamixel section?

Hari
03-06-2014, 06:59 PM
We are working on Windows. I tried uploading the blink example first. That worked fine. Next, I uploaded, the Dynamixel_Position example.

KevinO
03-06-2014, 07:03 PM
If the blink is working then that is a good sign. What did the Dynamixel_Position example do?

Hari
03-06-2014, 07:04 PM
Just the blink. Nothing beyond that.

Hari
03-06-2014, 07:06 PM
When I uploaded Dynamixel_Position, the RED LED lights up for a moment when I plug in the supply and it goes off soon after that. When I take out the supply and plug it again, it lights up for that moment.

Hari
03-06-2014, 07:11 PM
When I tried reading the values on the motor, it always, gave 255. Why is that? What does it mean?

tician
03-06-2014, 07:13 PM
Use the [ code ] [ /code ] tags (remove the spaces inside the braces) to post the exact sketch that you are attempting to upload. Also, what version of the IDE are you using?

KevinO
03-06-2014, 07:14 PM
Ok... Let's say this one more time.... The LED turns on briefly every time power is supplied to the Dynamixel. This is normal and it will do that every time it first recieves power.... They all do it. It's expected. It's just telling you "Yes I'm recieving power."

Now with that being said... I'm assuming you already know that power needs to be applied to the servos prior to running a sketch?

Meaning... Turn on your power to the servos then restart or run your sketch...

Hari
03-06-2014, 07:15 PM
I did that. It was powered and then code was uploaded.

Hari
03-06-2014, 07:17 PM
/* Dynamixel Basic Position Control Example

Turns left the dynamixel , then turn right for one second,
repeatedly.
Dynamixel constants and control table are declared in below header
work\hardware\robotis\cores\robotis\dxl_constants. h

You can buy DYNAMIXEL in ROBOTIS-SHOP
[KOREAN]
http://www.robotis-shop-kr.com/goods_list.php?Index=273
[English]
http://www.robotis-shop-en.com/shop/step_submain.php?b_code=B20070914050547

You can also find all information about DYNAMIXEL
http://support.robotis.com/

Ported to CM9 from the ROBOTIS E-manual 21 Oct 2012
*/

/*
************************************************** *******************************
* Dynamixel instantiation on serial device
* To use dynamixel class, it must be needed for supporting OpenCM 485 SHD since v1.0.1
* Dynamixel bus can be operated on any serial device OpenCM board.
************************************************** *******************************
*/
Dynamixel Dxl(1); //Dynamixel on Serial1(USART1)


//Dxl.writeWord(Dynamixel_Motor_Number, Address_Number, Address_Data);


void setup() {
// Initialize the dynamixel bus:
// baud rate index n=1 is 1Mbps refer to 2000000/(1+n)
// 34 is 57600 bps
Dxl.begin(1); //1Mbps
}


void loop() {
Dxl.writeWord(1, 30, 0); //Turn dynamixel ID 1 to position 0
delay(1000); // Wait for 1 second (1000 milliseconds)
Dxl.writeWord(1, 30, 300);//Turn dynamixel ID 1 to position 300
delay(1000); // Wait for 1 second (1000 milliseconds)
}

tician
03-06-2014, 07:18 PM
Unless you have followed the directions in the post I made a couple days ago to change the baudrate and the servo ID numbers, Dxl.begin(1) should be Dxl.begin(34).

Hari
03-06-2014, 07:19 PM
I had uploaded this code. Further, I uploaded the code which you gave in this forum. In the code which you gave, the baud rate was changed to 57600 bps, but, still it didn't start working.

Hari
03-06-2014, 07:21 PM
Apparently the github version (https://github.com/robotis-pandora/ROBOTIS-OpenCM) of the IDE as two sketches just for this occasion ("File->Examples->06. Dynamixel" named "d_Dxl_ID_Change" and "e_Dxl_Bps_Change"). Basically, upload this sketch to the CM-904 and connect one servo, let the sketch run until the servo starts panning back and forth. After it is moving, you disconnect everything, change the desired ID number in the sketch and re-upload to the CM-904, and repeat the process for the next servo.

YOU MUST CONNECT ONLY ONE SERVO AT A TIME TO THE CM-904. IT USES THE BROADCAST ID, SO ALL SERVOS ON THE BUS WILL CHANGE THEIR BAUDRATE AND ID TO THE SAME VALUE.


Dynamixel Dxl(1); //Dynamixel on Serial1(USART1)

void setup() {
// Initialize the dynamixel bus:
Dxl.begin(34); //57600bps

Dxl.writeByte(0xfe, P_ID, 1); //Change dynamixel ID #1 (argument #3 is desired ID number)
Dxl.writeByte(0xfe, P_BAUD_RATE, 1); // Set baudrate to 1 Mbps

// Re-initialize dynamixel bus at 1Mbps
Dxl.begin(1); // initialize again at new baudrate 1Mbps
}

void loop() {
delay(500); // Wait for 0.5 second (500 milliseconds)
Dxl.writeWord(1, P_GOAL_POSITION_L, 512); // Rotate dynamixel ID 1 to position ~45 degrees
delay(500); // Wait for 0.5 second
Dxl.writeWord(1, P_GOAL_POSITION_L, 3584);// Rotate dynamixel ID 1 to position ~315 degrees
}


I had uploaded this code as well. But, it did not start working. :(

Hari
03-06-2014, 07:23 PM
I am using this version of OpenCM. OpenCM v1.0.1 Fixed

KevinO
03-06-2014, 07:27 PM
When you upload you are getting a successful upload message correct?

KevinO
03-06-2014, 07:28 PM
Did you buy these servos new? Or were they used?

Hari
03-06-2014, 08:28 PM
These servos are new. It says, ' Done downloading' after after I click the download button.

Hari
03-08-2014, 04:08 AM
I made my servos to work. But, the one on which I was experimenting is not working. A possible reason could be that, I have connected the signal to ground and ground to signal. What happens if those two are interchanged?

Xevel
03-08-2014, 05:50 AM
I think if you do that, the signal pin sees -5V... not sure how well protected the servos are to this particular situation :s

jwatte
03-09-2014, 10:52 PM
If you reverse the polarity of a Dynamixel servo, you will burn the buffer/interface chip.

Hari
03-10-2014, 04:25 AM
Is there any method by which, I can check whether I have burnt my buffer/interface chip? If it has got burnt, what is the procedure to rectify it?

jwatte
03-10-2014, 11:21 AM
You can check the buffer chip by attempting a "firmware recovery" using the Dynamixel Wizard. If that doesn't work, the buffer is gone.
If you don't have a USB2Dynamixel or USB2Ax, then it's harder to confirm for sure. If you have code that works for all the other servos, but not this servo, then it's very likely it's damaged, though. And I would recommend getting a USB2Dynamixel or USB2Ax :-)

The procedure is to contact the vendor of the servos (Kyle at Trossen, if that's where you got them) for technical support, and they will let you fill out a RMA spreadsheet, and then you send the servos to Robotis in California. They can change the PCB in the servo.
If this is covered under warranty, you pay shipping there.
If this is considered user error, you pay shipping, PCB/labor, and shipping back. The PCB/labor isn't terribly expensive -- much cheaper than a new servo :-)

If you're not in the US or Korea, the process may be more complicated or slow or costly -- I don't know which countries have Robotis reps other than those.