Tag: CM-5

Choose hardware, firmware and language

This entry is part 1 of 3 in the series Programming Robotis Bioloid hardware

There are a lot of possible combinations of hardware, firmware and languages for programming Bioloid. I think that the table below show the the main combinations.

You can choose from the easy but limited Robotis own tool (Roboplus Task) and only your CM-5 or CM-510 to a SBC or “embedded” PC like Roboard and any language which can manage a serial port connection, like C, C++, Java, Python,…

Linux C++ Dynamixel reading and writing example

C# Dynamixel reading and writing example

Practical C++ programming tutorial for Bioloid

Programming Bioloid: choose hardware, firmware and languages

Programming Bioloid: choose hardware, firmware and languages

Robotis officially supports the programming solutions with the blue background:

  • The dark blue, RoboPlus Tasks, is the only one in which you can create the motions with RoboPlus Motion and execute it in CM-5/CM-510 with the program create with RoboPlus Tasks, after downloading the generated executable into the CM-5/CM-510, of course.

With these programming solutions you can use the Zigbee SDK to send and receive data between the CM5-/CM-510 and any computer, using Zig-110A or the new bluetooth BT-110, the Zig2Serial and the USB2Dynamixel. You can download example in Visual Basic .Net, C# and Visual C++

But there are more options!

Using a PC, SBC (Single Board Computer), PDA, Mobile or other light and battery powered computer

Using a serial port connection with your more beloved programming language:

  • USB2Dynamixel

If you have any device with a USB host and a FTDI driver you can use USB2Dynamixel to command programatically your Dynamixel servos using the Dynamixel protocol. You only will need your CM-5 or CM-510 to connect your Dynamixel to the battery.

  • Serial port cable

Same as the previous option but instead of using the USB2Dynamixel you only will need the serial cable and the “Toss Mode” launched with the ‘t’ command from the “Manage Mode”

  • Wireless control

Instead of only sending and receiving data, with the previous wireless connections you can command remotely your robot using the standard firmware and the “Toss Mode” launched with the ‘t’ command from the “Manage Mode”. You will need to command it using the Dynamixel protocol.

With these options and the CM-510 you will find a little problem… there is no way to read your sensor values! Well, you can use this firmware that offers a “Toss Mode” that supports reading CM-510 ports.

Start learning!

If you want to start learning how to program your CM-5 or CM-510 controller you will find interesting this post “Start programming  CM-5/CM-510 in C“. But may be you prefer to control your robot from a PC, SBC or other computer in C++ or C#

CM-5: Creating a simple “Hello World” C program

This entry is part 2 of 4 in the series Programming CM-5/CM-510

This post try to explain how to compile, load in the CM-5 (transmit) and execute a C program (a servo version of the “Hello World” classic example).

What do you need?

(You can find here how to start programming CM-5 / CM-510)

Obviously, some Bioloid hardware:

– The CM-5

– The battery or power source

– The serial cable

– An AX-12

– A cable to connect the AX-12 with the ID 17 to the CM-5. You can change the ID in the program.

What should you do?

1. Download and install the software:

1.- Download and install the Robotis RoboPlus software.

2.- Download and install WinAVR

3.- Download a Hello World example for WinAVR.

The C “Hello World” servo program is based in the original Robotis example.

4.- You should create a folder for your CM-5 program, for example c:myprojectscm5helloworld Copy there the previously downloaded helloworld.zip and unzip it.

2. Compile and link the program

1. Execute WinAVR and open the unzipped project:

( Bioloid User’s Guide.pdf could help you using WinAVR)

You should change the ID 17 of the servo for the ID of the servo you are using

2.- Compile and link. Make all:

3.- You should see “Errors: none”

4.- Transmit and execute the helloworld.hex to the CM-5

( Here you can find more info )

Well, if you only want to test the executable, you can download only the hex.

When loaded you should see an screen with two equal values as a correct “Checksum” check (in this example the value is 81, it’s calculated from the source code). If the values are not equal there is an error in the transmission.


5.- Every time you press the red MODE button the servo should spin

Start programming CM-5/CM-510 in C (AVR microcontrollers)

This entry is part 1 of 4 in the series Programming CM-5/CM-510

From time to time I receive questions about how to start programming the CM-5/CM-510 with C.

[This post is also in spanish]

I think it’s necessary to have a working knowledge about:

1. C programming

2. CM-5/CM-510 programming

3. Dynamixel protocol

You can find  a lot of information about CM-510 / CM-700  programming at Robotis support website And here you can learn how to create a simple “Hello World” program for CM-5

1. C programming

I think “C Programming for Microcontrollers is a fast and very practical introduction to C and microcontrolers programming, but I’m a not sure if it an easy way to start learning C.If you a want a more structured and deeper introduction to the C programming language, this is a pretty good and free introduction:

C introduction (pdf)

But there are a lot…

C Language Tutorial (html)
How C Programming Works (html)
Several C programming tutorials (html)

and more from Google

2. CM-5/CM-510 programming

From Robotis support website CM-5/CM-510 programming

3. Dynamixel protocol

From Robotis support website Dynamixel actuator

4. Your first step

If you use a CM-510 you will find here at Robotis support site a lot of information, and if you use the CM-5 you will find in this post some useful information and links

Two others great sources of information are:

Robosavvy Bioloid information wiki

Source code of Stuart&Matt library

%d bloggers like this: