User’s Guide Contents 1. Before Starting 1-1. A Word of Caution Page 4 1-2. What is Bioloid? Page 6 1-3. Things to Understand Before Starting Page 8 1-4. Package Contents Page 11 2. Learning the Basic Operations 2-1. The CM-5 and Its Operation Modes Page 13 2-2.
Page 3
9. Information for Advanced Users 9-1. Boot Loader Page 116 9-2. Using the C Program Language Page 119 9-3. Compiling Page 120 9-4. Example.c Page 126 10. Bioloid Program Update 10-1. CM-5 Program Update Page 135 10-2. Dynamixel AX-12 Program Update Page 139...
User’s Guide 1. Before Starting 1-1. A Word of Caution A Note on Safety The user is responsible for any accidents that occur while building the robot. Before starting, please remember the following. Read and study the manual before starting. The recommended age for this product is 12 years and older.
Page 5
User’s Guide Notes Please note the following. The beginner should not use self-made cables. Only use the right size screw drivers. Do not use excess force when tightening the bolts or assembling the parts. Turn off the power immediately to avoid damage to the robot if a joint gets twisted caused by the inappropriate motion settings during development.
1-2. What is Bioloid? Bioloid The Bioloid is a robot kit where the user can build anything they desire, just like the Lego sets. But unlike the Lego sets, the robot is built with blocks that are actuated, so the joints can move. The name “Bioloid” comes from the words“Bio”...
The hardware of the Bioloid consists of three types. Dynamixel: This is the basic unit of the Bioloid which acts as a joint or a sensor. The AX-12 Dynamixel is an actuator that is used as a joint. The AX-S1 Dynamixel is a sensor unit that can sense both distance and sound.
Page 8
Step 2 This is where you decide what kind of robot you will be building. With the Bioloid kit, you can make all kinds of robots. If you are a beginner, however, we recommend that you first make the robot that is shown in this User’s Guide.
Page 9
User’s Guide Step 4 After the configuration of the robot is completed, the next step is to connect the cables. Having the CM-5 unit as the center, the wires are connected to, and through the Dynamixel units. Each cable is made up of three wires. Two of the wires are for power and one is for communication.
Page 10
User’s Guide PC Requirements PC : IBM compatible (Required) OS : Windows 2000 or Windows XP (Required) CPU: Intel Pentium III 1GHz or AMD Athlon XP 1GHz or higher (Recommended) RAM: 256MB or higher (Recommended) Graphic Card : 3D acceleration function (Direct 3D supported) (Required) HDD free space : at least 300MBytes (Recommended)
2-1. The CM-5 and Its Operation Mode. CM-5 The CM-5 is the main controller for the Bioloid. As mentioned previously, the robot is built by connecting the Dynamixels to the CM-5 as the central unit. In order to understand how the Bioloid works, you first have to understand how the CM-5 operates.
Page 14
User’s Guide Execution If you press the start button during standby mode the CM-5 unit will go into the mode that you have selected. To go back into standby mode you can press the mode change button or turn the power switch off and then back on again. The mode change button is the reset button for the CPU inside the CM-5 unit.
User’s Guide 2-2. Behavior Control Program A robot is a machine that can behave in various ways. However, it can do so only when there is a program that tells how the robot should act for a certain situation. This program is called the “behavior control program.” A behavior control program is a series of rules that define the action a robot should take for the given state.
Page 16
If input item 2 occurs, then execute output B. Thus, understanding what types of input and output items are available is important to writing a behavior control program. Learning how to use the Bioloid is to learn about the input and output items. Let’s practice creating a simple...
User’s Guide 2-3. Examples of Simple Behavior Control There are several buttons and LEDs on the CM-5 unit that is user definable. Five out of the total six buttons (except the mode change button) and the AUX LED can be used for such purposes in Behavior Control Programmer. AUX LED Start button Mode button...
Page 18
User’s Guide “Start” Left double-clicks the first cell in the Behavior Control Programmer. The following commands should appear. Select “START.” The “START” command does not instruct a specific action, but rather it tells that the program is starting. You can see that the first cell is used for commands.
Page 19
User’s Guide Double-clicks the first cell of the following line and select the command “If.” Parameters There are some commands that need to be used together with a number or symbol. For example, the command “START” does not require any number or symbol to be used with, but the a command like “compute 1 + 2”...
Page 20
User’s Guide Now select the ○ button. Double-click the parameter on the opposite side and check the location of the ○ button. The next step is to select the operator that compares the two parameters. Select the equal sign. Finally, select the undefined item and double-click “THEN.”...
Page 21
User’s Guide If you have done everything correctly, your screen should look like the figure below. 이 Now we have finished making the complete command sentence, “ If (button status = ○ button), then.” It seems difficult at first but after practicing several times it should become natural.
Page 22
User’s Guide For the right parameter a number is needed, so first select “INPUT” and then type in the number 1. 그 러 You have finished creating the following command. Editing 행동제어 프로그램을 작성하다가 보면, 문장 전체, 심지어는 몇 개의 문장을 통째로 지우거나 복사 Select the number of the sentence that you want to edit.
Page 23
To download the behavior control program onto the robot, the robot and the computer needs to be connected to each other with a serial cable as shown in the figure below. To download the behavior control program, the Bioloid robot has to be turned on.
Page 24
User’s Guide Connect to CM-5 Connect to the PC [Connecting the serial cable] Click on the download toolbar icon. The following dialog box will show up. If the CM-5 unit and the behavior control programmer are not connected properly, then the following error message will show up. In such cases check the following in order.
Page 25
User’s Guide Is the COM port on your PC set up properly? This is how to set up the COM port on your PC. With the serial cable disconnected, click on the COM port set up button, which is on the bottom left corner of the program download screen. Select the correct COM port that the cable is connected, such as COM1 and COM2.
Page 26
User’s Guide Now download the program again and see how it executes. If it does not work properly, go over the program and check if there are any errors. If it still doesn’t work then open and download (Examples\Example(Button and LED.bpg) from the provided CD.
“If” statement with this fact in mind. Setting the input and output items means specifying the ID and address. The Bioloid has three units: CM-5, AX-12, and AX-S1. Let take a look at the available input and output items. ID Assignment The following are the IDs that are assigned to each unit.
Page 28
For the AX-12 and AX-S1, you can set or reset the ID as needed. The AX-12s that come with the Bioloid already have their IDs set in sequential order, but the AX- 12s that come directly from the factory have their IDs set to 1. If you have a problem with one of these units and have to order a new one, you have to reset the IDs accordingly.
Page 29
You will learn the items of the CM-5 unit one by one as you read this manual. You don’t have to understand all of the items for the AX-S1 and AX-12 units either when you first start learning about Bioloid. Just refer to the manual when necessary.
Page 30
User’s Guide Time interval is 0.1 seconds and a Duration of buzzer maximum of 50 intervals is possible. If Input, sound it is 255, then a prerecorded sound will Output be played (buzzer scal 0~27) Supplied voltage X 10 (12V will be read Supplied voltage Input as 120)
Page 31
User’s Guide Destination Joint position from 0° to 300° (300° Input, position when 1023) Output Speed when moving (values from Input, Speed 0~1023) Output Set maximum torque (values are Input, Torque control 0~1023) Output Current position Value of current position (0~1023) Input Current speed Value of current speed (0~1023)
If the robot has many degrees of freedom it can move in many different ways, however, the robot will also become heavy and slow and will become hard to operate. The recommended size of a Bioloid robot is as follows. Robot weight: No heavier than 2 kg...
User’s Guide The F3 frame can be connected to three side of the Dynamixel at a 90 degree angle. There are a total of four ways to connect the frame and the Dynamixel. There are other additional ways to construct the frame. Refer to the construction diagram of the robot for more specific information.
Page 34
User’s Guide Bus Expansion A robot can have legs, a head, and sometimes a tail. Thus sometimes there will be a need for more 3 line bus connectors on the CM-5. In such cases a bus expansion board can be used (connector expansion board is not included in the beginner’s kit.) The figure below shows how the connector expansion board is used in wiring.
User’s Guide Crossing gate Let’s build a simple device as shown below. It is a crossing bar where if you press ○ button, the bar goes up and down when you press ○ button. Wiring Connection and check Check connected direction We have to keep in mind of three things when we assemble the robots.
Page 36
User’s Guide correspond, the location value will be 512. Print Screen Let’s check the above value. There will be times when you want to find out the value for input and output while creating behavior control program. In this case, load value “...
User’s Guide values one by one, you can select “all Dynamixels” and assign values to all the Dynamixels at once. In crossing gate, we use one Dynamixel. However for robots that use many joints, you can take advantage of “all Dynamixel.” Refer to the QuickStart for crossing gate example program.
Page 38
User’s Guide there is one labeled Power. This will be ON when running on battery power and will blink during recharging. When the recharging is almost finished, the blinking will become faster. When the recharging is done, the blinking will become slow again. Refer to the “3-2 Charging CM-5”...
Page 39
User’s Guide following. Set the motor torques to one fourths of its max value. Set the motor speeds to one eighths of its max value. If the U button is pressed, move the arm up. If the D button is pressed, move the arm down. If the L button is pressed, turn the AUX LED off and release the power in the arm.
Page 40
User’s Guide Comments The flow chart shown above is much more complicated than the behavior control program that we created before. Thus, to prevent mistakes and to make it more convenient, you can use comments. A comment does not affect execution of the program but it is rather a memo for the user.
Page 41
User’s Guide Now, let’s make a program that prints the value of joint of robot arm on screen. Follow the following steps. Set the torque limit to 0. Display the present position of a joint on screen continually. following figure shows this done.
Page 42
User’s Guide Appropriate joint position values for moving up the arm. Value of joint position ID = 1: 512 Value of joint position ID = 2: 465 Value of joint position ID = 3: 860 Appropriate joint position values for moving down the arm Value of joint position ID = 1: 512 Value of joint position ID = 2: 815 Value of joint position ID = 3: 512...
User’s Guide 4. Behavior Control Programmer So far we have made simple behavior control programs and learned how to use the Behavior Control Programmer. In this chapter we will be learning the functions of the behavior control program one by one. 4-1.
User’s Guide 4-2. Editing Function of the Behavior Control Programmer Selecting a Sentence Before copying, moving, or deleting a sentence you have to select a sentence. You can do this by clicking on the number at the very beginning of the sentence. To select several sentences at the same time press the SHIFT key and click on the numbers.
Page 45
User’s Guide Editing menu After selecting a command sentence, go to the menu and click on EDIT to see the editing menu items. This can also be done by right clicking on the selected sentences. Cutting a selected sentence will save it and then delete it. This sentence can be used again elsewhere by using the paste function.
Page 46
User’s Guide Insert When you want to put in another sentence between two sentences you can use the insert function. Select the number of sentences that you want to insert and then press “insert.” [Insert Instruction in two lines selected state makes two blank line] Erase Use this function when you want to delete a sentence.
Page 47
User’s Guide If you select “input” instead of “CM-5” you will be able to input something via the keyboard instead, as shown in the figure below. Selecting “input” in the menu means that the program is expecting you to input a constant or a variable. When inputting a constant, just type in numbers and when inputting a variable, type in an appropriate variable name.
Page 48
User’s Guide Correcting To correct an element of a parameter command after you are done editing, first left click the sentence that you want to correct and then right click to see the first menu again to correct it.
User’s Guide 4-3. Syntax of the Behavior Control Program We have learned several commands for the behavior control program with several examples. Let’s now review it systematically. Command Sentence The basic unit of a behavior control program is the command sentence. Each line tells what the robot should do.
Page 50
User’s Guide Command There are three types of commands: execution, condition, and branch. Condition: IF, ELSE IF, ELSE, CONT IF Execution: START, END, LOAD, COMPUTE Branch: JUMP, CALL, RETURN Start, End These are the very basic commands. The behavior control program will consider everything between the start and the end command as the program that will actually be used.
Page 51
User’s Guide Parameter1 and Parameter2 are the objects to be compared, and the operator decides what type of comparing will to be performed. For example, for a sentence “If A is larger than B,” “A” is paramter1, “B” is parameter2, and “larger” is the operator.
Page 52
User’s Guide LOAD The command LOAD will load one item onto another. The sentence structure is as the following. LOAD | Parameter 1 | Parameter 2 This commands to load parameter 2 into parameter 1. LOAD is an execution command which is used like “start the robot motion on page 10” or “Set the Dynamixel destination position to 500.”...
Page 53
User’s Guide Call, Return Sometimes you will have to execute an identical code of a program several times. You can make such a code a subroutine and call it whenever you need to execute it to simplify the program and for convenience. This technique is used very often in programming and it becomes especially useful as the program becomes lengthier.
Page 54
User’s Guide When you download a program to the robot, rule check will run automatically. Enable/Disable Code When creating a program, sometimes you will have to prevent some parts of the code from being changed. This can be done with enabling or disabling the code segments.
Page 55
User’s Guide Portions that will ignored Portion that will ignored Enable / Disable Code...
User’s Guide 5. Using Sensors A robot cannot truly be a robot if it simply moves by remote control. A robot has to be able to move and do things all by itself. The most important thing in making a robot autonomous is to give it the ability to sense and gather information. For example, if you want to build a robot that can avoid obstacles, the robot would first need to have the ability to sense the obstacle.
User’s Guide The AX-S1 has the identical mechanical and electrical universal expansion structure as the AX-12 which can be connected to other Dynamixel units. 5-2. Distance Sensing Function Let’s create a behavior control program that will print the distance sensor values on the screen.
User’s Guide not go down to zero, this means that the lighting in the surrounding area is too bright or the sensor is sensing the wall or ceiling. One thing that you have to be careful about is the fact that the sensitivity is different between white objects and black objects and thus this value can not be assumed to be the absolute distance to the object.
User’s Guide 5-4. Assembling Attacking Duck that Uses Sensor We are now going to build a very interesting robot. Let’s make a duck robot that attacks an object that approaches it. Attach an AX-S1 unit to the robot arm built in chapter 3 as shown in the figure below.
Page 60
User’s Guide Since it will be difficult to make the two repeating items into a single command, it will be better to divide it into small parts. Refer to the following flow chart which labels the complicated parts as ○ , ○...
Page 61
User’s Guide Next, let’s go into more detail for part 3. Here, it is sensing objects straight in front so only the center sensor value needs to be checked. We have now completed with the overall structure of the program. But we still have to finish part 2 and part 4.
Page 62
User’s Guide The figure below shows the entire program by putting together all the codes developed so far. Refer to the “Examples\Example(Attacking Duck).bpg”inside the CD. Main routine Routine for front-side/left-side reaction to the sensors...
Page 63
User’s Guide Arm bending/straightening routine to front side reaction Routine that waits until one motion is finished...
User’s Guide 5-5. Surrounding Light Sensing Function Let’s create a behavior control program that will print the surround light sensor values on the screen. There are three light sensors. Let’s print the value of each, one by one on the screen. Select LOAD for the command, CM-5 screen as the left parameter, and sensor 1 of the Dynamixel as the right parameter.
User’s Guide 5-6. Melody Playing Function AX-S1 can make a sound as there is a buzzer inside. Let’s make a robot that can make sound or that exhibit expressions using the melody playing function. Special Melody Play Special melody is already built inside and there are 27 melody sounds that can be played by AX-S1.To play the special melody sound, the “buzzer sound”...
Page 66
User’s Guide Now, let’s make a program that plays the special melody sounds from 0 to 26 and that print the numbers corresponding to the sounds. The program will look like the following. Refer to the “Examples\Example(Play special melody sound).bpg].bpg” inside the CD...
Page 67
User’s Guide Musical Notes While working with the robot never put your face close to the robot. Musical notes consist of “C D E F G A B C” and AX-S1 has a range of three octaves, consisting of 52 notes. For more details related to musical notes, refer to the AX- S1 manual.
User’s Guide 5-7. Assembling Intelligent Car that Uses Sensor We are now going to build a very interesting robot. Let’s make an intelligent car that makes a melody sound and that moves in opposite direction when an object moves towards it. Refer to the “2-2-9.
Page 69
User’s Guide Start ○ Left turn while making Left sensed distance melody sound > 200 ? ○ Right turn while making Right sensed distance melody sound > 200 ? ○ Move back while Center sensed distance making melody sound > 200 ? Wheel end ○...
Page 70
User’s Guide AX-12 Continuous Turn Mode To use the wheel motor of AX-12, it is required to set the “continuous turn mode” rather than the “joint mode.” For more details on the “continuous turn mode,” refer to the AX-12 manual. Among the items of AX-12, if you set the “CCW angle limit”...
Page 71
User’s Guide If you want to change back the AX-12 to “joint mode,” input the value of 1023. Refer to “Examples\Example(Change joint mode).bpg”inside the CD. Be aware as once you set the AX-12 mode, it will be in a set mode until you change it directly.
Page 72
User’s Guide For the intelligent car example here, AX-12 will be set to the “continuous turn mode.” To do so, refer to “Examples\Example(Change endless turn mode).bpg” inside the CD. Next will be the intelligent car behavior control program. For that, refer to “Examples\Example(Intelligent Car).bpg”inside the CD.
User’s Guide 6. Motion Editor There are two ways to edit the motion. One is to use the motion editor and the other way is to execute the program mode using the robot terminal. The motion editor has a graphical user interface so it is easy for beginners to use. The robot terminal uses text mode, so it lets users see all information all at once, thus more useful to advanced users.
User’s Guide 6-1. Using the Motion Editor Motion Editor The motion editor has a graphical user interface that allows the user to edit a multi-jointed robot made up of Dynamixels. A user can create and edit motions by moving the joints by hand and saving each pose using the motion editor. The user can also connect or repeat edited motions.
Page 76
User’s Guide information file will be used by the behavior control programmer and in the motion editor. The file extension for the robot profile is *.rbt Below screen is, after the program is installed, when the motion editor is executed and is applied to the default robot profile (default.rbt). [Part where robot profile is used in the motion editor] Robot Profile Change If a specific robot information file has not been selected after installing the...
Page 77
User’s Guide After selecting the “Walking Droid.rbt.” the robot profile information will look like the following. [Walking Droid. rbt. executed in the motion [Walking Droid. rbt. executed in the Behavior Control Programmer] Pose The pose is an instance of a motion. For example, in the figure right, you will need many poses to make the robot move one side step.
Page 78
The numbers and poses that are shown on a motion editor screen are the information for a single motion page. A motion page is made up of 7 poses and 64 bytes of page information. The Bioloid has up to 127 motion pages. The Bioloid’s motion memory = 127 motion pages...
Page 79
User’s Guide You can select several joints at the same time for this operation. Hold the Ctrl key and select the joints that you want to turn ON or OFF as once. Shown below is a summary of the process for creating a motion. Joint OFF Create the desired pose Joint On...
Page 80
User’s Guide Valid poses Invalid poses Pose Save Addition of pose always goes in the end of pose save window. If you want to put the pose in particular place, however, you can drag and drop as shown below. Take note however that the previous pose will be overwritten. Drag &...
Page 81
User’s Guide Delete Right click the pose to be removed and select delete. The following is a summary of the above. The key to motion editing is posing editing and saving. A pose is created using the ON, OFF button and actually moving the robot joint by hand.
Page 82
User’s Guide Start Address This is the location of the code memory of the page that you are currently working on. You do not have to be concerned about this information. Play Count This item tells how many times the motion will be played. The default value is 1. Number of Poses When you play the motion, the poses from 0 to the valid number of poses will be played.
Page 83
User’s Guide Motion data filename extension is mtn and to download, select “manage” from the behavior control program menu and choose ‘motion data download.” Here, open “Examples\Example(Walking Droid)..mtn in the CD and download it. To download the motion, follow the following steps. Also, refer to the “2-1-2. Robot Program Download”...
User’s Guide 6-2. Motion Editing Using the Robot Terminal Once you get familiar with the robot you will want to edit motion in the text interface instead of the graphic user interface - being able to see all the information at once can be helpful. In this chapter we will learn how to edit motion using the robot terminal program.
Page 85
User’s Guide Apply power to the CM-5 and run the program mode. To do this, go into program mode by pressing the MODE button and then press the START button. The following screen should appear. Dynamixel ID The position of the currently connected 7 poses The first column on the left is the ID of the Dynamixel.
Page 86
User’s Guide information is not shown here. The next column (which we call POSE 7) shows the values of the current angle positions of the Dynamixel units. By the numbers in POSE7 you can see that only one Dynamixel of an ID 1 is connected. The figure above shows the screen for editing a single motion page.
Page 87
User’s Guide Write After setting the joint angles to the desired positions, type in the WRITE command. The joint angle values of the POSE7 will be added to the pose. Let’s make several more poses this way. POSE loading After executing the ON command After executing the WRITE command Play We will now check the motion that...
Page 88
User’s Guide “Write [pose number].” And the joint values for POSE7 will be saved in the specified “pose number. Insert While editing, you will sometimes want to place the current pose (POSE7) between two other poses. To do this, use the “insert” command. The format is “insert [pose number].”...
Page 89
User’s Guide able to get the desired motion unless you set the speed between poses correctly. You can do this by setting the value of the speed at the bottom of the screen. The following shows how this is done. Move the cursor to the item that you want to set.
Page 90
User’s Guide acceleration time will make the motors acceleration faster and stress on the joints. Increasing the acceleration time might create an interval which makes it impossible to complete a motion. Page Speed Use this when you want to adjust the play speed of the whole page. The default value is 32.
User’s Guide 6-3. Walking Droid ’s Program Now let’s build a walking droid as follows. When an object is sensed by center sensor, the robot will move forward. When handclapped, walking droid will stamp its feet corresponding to a number of handclaps.
Page 92
User’s Guide The second problem is the number of times the sound is sensed. The starting value for the number of sound sensing event might not be set to zero. Also, the robot could sense its own clapping sound as a clap made by the user. If the number of sound sensing is not set to 0, it will clap endlessly unless there is a part of the code that will set this value to 0.
Page 93
User’s Guide Motion Execution To use the motion data that was created with the motion editor, it is necessary to use the motion execution function. The motion execution involves inputting a motion page number of user’s choice in the “Robot Motion” item of CM-5. When the page numbers that will be used in the motion data are managed separately, it will be very useful when you want to create behavior control program.
Page 94
User’s Guide To create above program, follow the following steps. Refer to the “Examples\Example(Walking Droid).bpg”inside the CD. Main routine Button reaction routine for the center reaction, handclap reaction to the sensors...
Page 95
Motion page 6: Foot stamping motion Motion page 7: Dancing motion The Bioloid has motion pages from 1 to 127. When you create the desired motion onto the page and call this page from the behavior control program, the motion will be played.
Page 96
User’s Guide download the provided “Examples\Example(Walking Droid).mtn” data. The figure below shows how to download a motion. After download is complete, execute the play mode by clicking a button. Go ahead and test by handclapping and putting a hand closer to the robot’s waist.
User’s Guide 7. Building a Wireless Remote Control Bioloid supports two types of wireless communication. With these methods, user can control the robots remotely or allow the Bioloids to send and receive the data between each others. The first method involves sending data using IR (infrared rays) transmitter- receiver function of AX-S1 and by attaching the Zigbee module ZIG-100, dedicated Bioloid wireless device, to CM-5.
Page 98
User’s Guide IR Communication S/W The result of communication between AX-S1 can be checked through behavior control program of CM-5. That is, to control the Bioloid via IR transmission, you need behavior control program that communicates between each other using AX-S1.
Page 99
User’s Guide predict when there will be data transmission from outside source. Accordingly, reception standby routine is required. With the proper use of flag available in AX- S1, user can create reception standby routine. Here, if the value is 0, it means that data did not arrive, whereas, if the value is other than 0, it indicates that data has arrived.
Page 100
User’s Guide [Transmitter behavior control program] [Receiver behavior control program]...
Page 101
Wireless CM-5 and ZIG-100 By default CM-5, the central control device of Bioloid, does not have ZIG-100. Thus, for the IR wireless communication between Bioloid, you need to have ZIG- 100 attach to the CM-5. In order to attach it, you need to dissemble CM-5 and solder the ZIG-100 on Zigbee circuit board, as shown on below pictures.
Page 102
User’s Guide Zigbee ID ZIG-100 modules each have their own unique IDs. Following that, in order to communicate between each others, they need to know the IDs of respective devices. In general, with known IDs, devices can communicate one to one and additionally, you can send broadcasting messages to all ZIG-100s.
Page 103
Take note however that wireless communication by itself means simple transmission of data between 0 and 65535. Thus, if you want Bioloid to receive data and to behave accordingly, you must create behavior control program and set the protocol.
Page 104
User’s Guide [Receiving data] < New wireless data flag > -> 0: No arrived data -> 1: Data arrived Example Let’s expand what we have learned before when we created program that turn on and off AUX LED by pressing a button. Here, let’s create a program that can control AUX LED by wireless.
Page 105
User’s Guide 7-3. Walking Droid Program Controlled by RF Wireless Remote Control Let’s apply what we have learned so far in wireless communication to making a remote control to control the robot remotely. Refer to “2-2-14 Walking Droid” and build hardware. Additionally, prepare by purchasing the pair of ZIG-100(not included) and additional CM-5.
Page 106
User’s Guide Transmitter CM-5 behavior control program When the button of CM-5 is pressed, it will send 1. When the button of CM-5 is pressed, it will send 2. When the button of CM-5 is pressed, it will send 3. When the button of CM-5 is pressed, it will send 4.
Page 107
User’s Guide Receiver CM-5 behavior control program When received wireless data is 1, it will take forward motion. When received wireless data is 2, it will take backward motion. When received wireless data is 3, it will take left turn motion. When received wireless data is 4, it will take right turn motion.
User’s Guide 8. Management Mode This chapter explains about using Manage Mode. In “manage mode” you can check the robot status and check or change the Dynamixel settings. 8-1. SETTING THE ID AND DYNAMIXEL SEARCH Robot Terminal Run the Robot Terminal program. In the previous chapter, we have explained how the CM-5 and the PC is connected.
Page 109
User’s Guide Command Format Type in a command followed by a number (parameter). The following are some examples. ID 10 Dump WR 10, 1 RD 10, 2 HELP Type in help to see the available functions in manage mode. CID is the abbreviation of Control ID. This shows the ID of the Dynamixel that the CM-5 is controlling.
Page 110
User’s Guide To change the ID of the Dynamixel that the CM-5 controls to number 3, type in the following commands. After the command above, only the Dynamixel with an ID of 0x03 will react. Communication between the CM-5 and Dynamixel will not occur even if you run the CID command.
User’s Guide SEARCH If you are not sure if the communication speed between the CM-5 and the Dynamixel is set properly, you can use the SEARCH command to search the Dynamixels. The SEARCH command is slow and it could find duplicates if similar baud rates are used.
Page 112
User’s Guide WRITE This command is used to change a data value of the control table. The WRITE command format as the follows. Usage: WRITE [Address] [Data] [Data] [Data]… In the example below, you can verify that the LED turns on and off when 1 and 0 is written to Address 25.
Page 113
User’s Guide This command moves the Dynamixel to the specified position. The GO command is used like the following. Usage: GO [Position Value] [Speed Value] Here, the range of parameter values is from 0 to 1023. If you take a look at the packet, you can see that the WRITE command has been executed starting from Address 30 which corresponds to goal position and goal speed.
Page 114
User’s Guide SYNC_WR When you want to write to several Dynamixels and if the Write Addresses are all the same, you can use the SYNC_WR command to write to all of the Dynamixels at once. The format of a SYNC_WR command is as follows. Usage: SWR [ADDRESS] [LENGTH] [ID] [DATA0] [DATA1] …[ID] [DATA0] [DATA1]…...
Page 115
User’s Guide RESET The RESET command will change all the settings of the Dynamixel back to the factory initial settings. Usage: reset [ID] RESET명령은 가급적이면 사용하지 않기 바란다. The H command will send the numbers that are typed into the Robot Terminal as text to the Dynamixels in binary format.
User’s Guide 9. Information for Advanced Users This chapter is for advanced users who have experience with microprocessors. In order to understand the following material you will need to have knowledge of hexadecimal, binary numbers, and ASCII code. Finally, we briefly explain how to control the CM-5 using the C language.
Page 117
Download Let’s learn how to download a provided Firmware or a program you have created onto the CM-5 unit. Let’s try downloading a program called Bioloid.hex. Type in the command “load.” The following message should appear. This message indicates that the data is ready to be written to address 0.
Page 118
User’s Guide If you press the mode change button, the downloaded program will be executed.. Memory Dump The CM-5 unit not only has 128 Kbytes of flash memory but also 4 Kbytes of RAM and 4 Kbytes EEPROM. There is a function in the CM-5 boot loader where you can check the contents in these memory spaces.
User’s Guide 9-2. USING THE C PROGRAM LANGUAGE The program for the Bioloid was programmed in C and loaded with the Boot Loader. In order to write such a program, you will need to know how to program in C and you should also have some CPU hardware background. This is beyond the scope of this manual, thus we recommend you refer to other references for such information.
Let’s install and run the AVR GCC Editor, Win-AVR. Win-AVR can be downloaded from the Internet and you can find a link from the website www.robotis.com. Since Win-AVR already includes the AVR GCC, the user only needs to install the Win-AVR.
Page 121
User’s Guide Win AVR The Win-AVR editor runs the GCC compiler by calling the AVR GCC internally. From the Win-AVR menu, select Programmer’s Notepad [Win AVR]. The following screen will appear. Project File When writing a large program, it is helpful to structure the program by dividing the source file into a number of smaller files by its contents.
Page 122
User’s Guide C Source File Next, we open the C source code file which is a lower-level file. Select “C/C++” from the “New” menu item under the “File” menu. To assign a name, select “Save As…” from the “File” menu and give it any name as you wish.
Page 123
User’s Guide Main() Type the following in the “SimpleMain.c” source code. void main(void) The above program has no content and is in the form of the most basic structure of a C source code. Now the source code is completed, the next step is to compile it.
Page 124
User’s Guide First, open the file that you want to edit. There are two ways of editing the Makefile; the user can directly edit the contents of the Makefile, or the user can use the menu to edit it. To edit it using the menu, the user selects the “Makefile”...
Page 125
User’s Guide Executing Compile Select “Make All” from the “Tools” menu of the Programmers Notepad 2 [WinAVR]. The compile result message will appear at the bottom of the output window. If the compile was successful with no error, the “Errors: none” message will appear. Simple.hex Download Now let’s verify and download the file “simple.hex.”...
User’s Guide 9-4. Example.c Example.c “Example.c” contains various routines for the CM-5 to directly control the Dynamixel actuators. Using these routines, one can easily develop a program for controlling them. Select “Open Project(s)” from the “File” menu on the MinAVR Programmers Notepad.
Page 127
User’s Guide Files Open Double-click the “Example.c” on the left and the contents of it appear on the screen. Compile Select “Make All” from the “Tools” menu to compile. The output after the compile should look like the following.
Page 128
User’s Guide Download Now, let’s use the Robot Terminal to download “example.hex” to the CM-5 unit. Please refer to Chapter 2 for downloading instructions. Use the “Go” command to execute “example.hex.” The screen shot of this is shown below. Pressing a key will make it proceed to the next example.
Page 129
User’s Guide Example 5 reads all the data from the Control Table by sending a packet to read data from address 0 to 0x31. The figure above shows the list of these 0x37 packets in the [Address]: Data form. Example 6 demonstrates the command for moving the output of a Dynamixel actuator to a specified position.
Page 130
User’s Guide Example.c #define P_PRESENT_LOAD_L (40) * The Example of Dynamixel Evaluation with Atmega128 #define P_PRESENT_LOAD_H (41) * Date : 2005.7.11 #define P_PRESENT_VOLTAGE (42) * Author : BS KIM #define P_PRESENT_TEMPERATURE (43) #define P_REGISTERED_INSTRUCTION (44) #define P_PAUSE_TIME (45) #define P_MOVING (46) * included files #define P_LOCK (47)
User’s Guide 10. Bioloid Program Update This chapter is about the Bioloid program update. We are going to introduce a way to maintain Bioloid in latest version by showing how to update firmware for CM-5, main controller, and Dynamixel AX-12. We recommend that you visit Robotis site, www.robotis.com, and download the latest version.
Page 136
User’s Guide Step 3 From “Manage” menu, select”CM-5 update” as shown below. Step 4 If you see “Can not connect to CM-5!”message, set “Com port” properly and click “CM-5 connect” button. Step 5 After connection, click “Download” button.
Page 137
User’s Guide Step 6 Select CM-5 program file. Go to Robotis homepage, www.robotis.com and download the latest version. We recommend that you periodically check out the homepage for the latest updates. Step 7 You will see the update progress bar.
Page 138
User’s Guide Step 8 If update is successful, you will get the message indicating so, if not, start once again from the beginning. IF CM-5 does not operate properly as a result of update problem, refer to the“9-1. Boot Loader of “9. Information for Advanced Users and update it manually.
AX-12 program update is a function that was added from the 1.26 version of“Behavior Control Programmer.” Thus, users who are using versions below 1.26 should visit www.robotis.com and download the latest version and install it. To see what version is installed, go to “help -> Behavior Control Programmer Information.”...
Page 140
User’s Guide Step 2 Execute the behavior control programmer. Step 3 From “Manage” menu, select “AX-12 update” as shown below. tep 4 If you see “Can not connect to CM-5!”message, set “Com port” properly and click “CM-5 connect” button.
Page 141
User’s Guide Step 5 After connection, click “Download” button. Step 6 Select AX-12 program file. Go to Robotis homepage, ww.robotis.com and download the latest version. We recommend that you periodically check out the homepage for the latest updates tep 7 You will see the update progress on the print screen window While updating make sure that CM-5 power is not turned off.
Page 142
User’s Guide Step 8 If you get the message indicating update completion, click “close” button to close the AX-12 program update.
Need help?
Do you have a question about the Robotis and is the answer not in the manual?
Questions and answers