You are not logged in.

#1 2014-08-21 11:13:34

Registered: 2014-07-10
Posts: 8

Robotis OpenCM9.04-B - Getting started and Pan Tilt Demo


These steps will help you getting started with the controller and the IDE.

All are useful to know for any Robotis projects.

-Robotis OpenCM 9.04B controller (Store link)
-2x AX-12A Robotis Smart Servos with 2x Robotis cables (Store link)
-Brackets; here I’m using CrustCrawler metal brackets (Store link)
-1x 12V/1A adapter (Store link)

Note: On the controller, I always put the switch to off when not using.

First thing to do is to download and install the Robotis OpenCM IDE software:

Link and installation (software, driver) tutorial:
http://support.robotis.com/en/software/ … pencm.htm/

Link to controller manual (Yeah, READ IT!):
http://support.robotis.com/en/product/c … m9.04.htm/

After that, you can test the controller with the IDE. To do that, upload the Blink example included in the IDE.

Now that you can blink the green light on the OpenCM 9.04B and having learned a bit about the IDE, let’s get some Dynamixels to work!

How to hook up brackets for Pan/Tilt:


5V USB is not enough power for the servos. You have to wire the two JST jacks to get power from the adapter. The one on the left is for a jumper and the other is for power. (See on pic and in manual for more info, left pin of each jack is negative). After, hook up the controller with USB to PC/Mac and then push the switch to the right to see red LEDS flash on the back of each Dynamixel. Yes, power!


Now with the IDE, you have to set the ID’s:
Take Dynamixel #1 and make sure the ID is set to 1;


Open IDE and upload:  File/Examples/Dynamixel Easy/a_getModelNumber

After upload, open the serial monitor, wait to see “Send any value to continue...” Then press any key. You will see if your Dynamixel #1 is really ID #1. Unplug Dynamixel #1 and plug the Dynamixel #2 on the controller.
Open IDE and upload:  File/Examples/Dynamixel Easy/a_getModelNumber


Open the setID code from here File/Examples/Dynamixel Easy/b_setID

In the IDE, go and change “NEW_ID 1” for “NEW_ID 2”
#define NEW_ID 1 //New ID to be changed.
Now looks like:
#define NEW_ID 2 //New ID to be changed.

Upload the edited example.

You can now wire the two Dynamixels together and after, upload the “a_getModelNumber” example again to see if each motors have the right IDs.

If all is good, mount all the pieces together, like this;


Finally, open the IDE and upload the code below:

/*  Dynamixel Pan/Tilt Demo
Pan/Tilt demo by Patrick Coutu based on code created 16 Nov 2012
/* Dynamixel ID defines */
#define ID_NUM_1  1
#define ID_NUM_2  2

/* Control table defines */
#define P_GOAL_POSITION    512
#define P_GOAL_SPEED    32

/********* Sync write data **************
 * ID1, DATA1, DATA2..., ID2, DATA1, DATA2,...
 /* Serial device defines for dxl bus */
#define DXL_BUS_SERIAL1 1  //Dynamixel on Serial1(USART1)  <-OpenCM9.04
#define DXL_BUS_SERIAL2 2  //Dynamixel on Serial2(USART2)  <-LN101,BT210
#define DXL_BUS_SERIAL3 3  //Dynamixel on Serial3(USART3)  <-OpenCM 485EXP

Dynamixel Dxl(DXL_BUS_SERIAL1);

word SyncPage1[9]=
  ID_NUM_1,200,50,  // 2 Dynamixels are move to position 0
  ID_NUM_2,800,50};  // with velocity 50
word SyncPage2[9]=
  ID_NUM_1,800,50, // 2 Dynamixels are move to position 512

void setup(){
// Dynamixel 2.0 Protocol -> 0: 9600, 1: 57600, 2: 115200, 3: 1Mbps 
  //Set all dynamixels as same condition.
  Dxl.writeWord( BROADCAST_ID, P_GOAL_POSITION, 512 );
  Dxl.writeWord( BROADCAST_ID, P_GOAL_SPEED, 512 );

void loop(){
 * byte syncWrite(byte start_addr, byte num_of_data, int *param, int array_length);


#2 2014-08-21 15:02:10

Diigiit Sales
Registered: 2014-05-26
Posts: 97

Re: Robotis OpenCM9.04-B - Getting started and Pan Tilt Demo


Your tutorial is really interesting with lots of details and photos.

Unfortunately, the OpenCM 9.04B controller is already sold out!

New stock will arrive soon!


Board footer