Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Homemade servocontroller for dynamixel RX 28

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
10 postsPage 1 of 1
10 postsPage 1 of 1

Homemade servocontroller for dynamixel RX 28

Post by Gulaszewski » Wed Aug 24, 2011 9:48 am

Post by Gulaszewski
Wed Aug 24, 2011 9:48 am

Hi ,

I have to do a electronic board " homemade" like CM 2 to control dynamixel servos RX-28 . Where can I find some information about this project ? ( program for the mikroprocessor , wiring diagram etc. )
Do you have any experience about it ?

Thank for answear !
Hi ,

I have to do a electronic board " homemade" like CM 2 to control dynamixel servos RX-28 . Where can I find some information about this project ? ( program for the mikroprocessor , wiring diagram etc. )
Do you have any experience about it ?

Thank for answear !
Gulaszewski
Newbie
Newbie
Posts: 5
Joined: Tue Aug 23, 2011 11:05 pm

Post by i-Bot » Wed Aug 24, 2011 10:42 am

Post by i-Bot
Wed Aug 24, 2011 10:42 am

If you google around, you will find plenty of hardware and firmware designs to interface AX12 servos. The only difference is that the AX12 uses TTL levels and the RX servos use RS485.

If you compare the AX12 manual to the RX28 manual you will see the different interface IC and its connection.

For the RS485 interface chip, I strongly advise using the MAX3443E or similar transciever with fail safe receiver inputs. This ensures the receiver goes to a known state when all drivers on the bus are disabled. It is possible to use resistors to do this, but not as neat.

Let us know if you have problems finding information, or later in project.
If you google around, you will find plenty of hardware and firmware designs to interface AX12 servos. The only difference is that the AX12 uses TTL levels and the RX servos use RS485.

If you compare the AX12 manual to the RX28 manual you will see the different interface IC and its connection.

For the RS485 interface chip, I strongly advise using the MAX3443E or similar transciever with fail safe receiver inputs. This ensures the receiver goes to a known state when all drivers on the bus are disabled. It is possible to use resistors to do this, but not as neat.

Let us know if you have problems finding information, or later in project.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by i-Bot » Wed Aug 24, 2011 12:00 pm

Post by i-Bot
Wed Aug 24, 2011 12:00 pm

Did you already review the CM2 manual. It has schematic and code.

http://www.megarobot.net/cj/manualy/rob ... CM2_aj.pdf
Did you already review the CM2 manual. It has schematic and code.

http://www.megarobot.net/cj/manualy/rob ... CM2_aj.pdf
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Gulaszewski » Wed Aug 24, 2011 9:38 pm

Post by Gulaszewski
Wed Aug 24, 2011 9:38 pm

i-Bot thans for helpfull answears ! Yes, I read it. But I have some question :

1) Board CM2 has uploaded program in Atmega128 ?
2) Program wich is on the pages 34-37 is enough to control servos ? I mean that is it the end of necessary code ?
i-Bot thans for helpfull answears ! Yes, I read it. But I have some question :

1) Board CM2 has uploaded program in Atmega128 ?
2) Program wich is on the pages 34-37 is enough to control servos ? I mean that is it the end of necessary code ?
Gulaszewski
Newbie
Newbie
Posts: 5
Joined: Tue Aug 23, 2011 11:05 pm

Post by i-Bot » Thu Aug 25, 2011 10:15 am

Post by i-Bot
Thu Aug 25, 2011 10:15 am

The CM-2 has a bootloader programmed into the ATmega128 by Robotis. This bootloader is not made public so far as I am aware. You will find many alternative free bootloaders for the ATmega devices. You may be better to base your hardware on the Arduino, since that already has good bootloader and development environment. Arbotix is an great example of this.

Once you have the bootloader, then you can upload you compiled operational code.

The operational code in the CM-2 manual appears to be complete, but is really just for test and demonstation purposes. It is not well structured for re-use. Better to investigate the existing libraries for AX servos which can be simply adapted to RX servos.
The CM-2 has a bootloader programmed into the ATmega128 by Robotis. This bootloader is not made public so far as I am aware. You will find many alternative free bootloaders for the ATmega devices. You may be better to base your hardware on the Arduino, since that already has good bootloader and development environment. Arbotix is an great example of this.

Once you have the bootloader, then you can upload you compiled operational code.

The operational code in the CM-2 manual appears to be complete, but is really just for test and demonstation purposes. It is not well structured for re-use. Better to investigate the existing libraries for AX servos which can be simply adapted to RX servos.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Gulaszewski » Sun Aug 28, 2011 8:57 pm

Post by Gulaszewski
Sun Aug 28, 2011 8:57 pm

It is possible to connect in one bus RX-28 and RX-64 ? They have got different voltage.

Do you think that Atmega128 will be ok to control 21 servos ? In the future i want to use gyroscope and two accelerometers. (not necessarily in one board ). Which processor will be good ?
It is possible to connect in one bus RX-28 and RX-64 ? They have got different voltage.

Do you think that Atmega128 will be ok to control 21 servos ? In the future i want to use gyroscope and two accelerometers. (not necessarily in one board ). Which processor will be good ?
Gulaszewski
Newbie
Newbie
Posts: 5
Joined: Tue Aug 23, 2011 11:05 pm

Post by i-Bot » Sun Aug 28, 2011 11:00 pm

Post by i-Bot
Sun Aug 28, 2011 11:00 pm

You can run different power supply voltage servos on the same bus. You need to common the two data lines and ground to all servos. Then the power to the servos can be different for the two or more types of servo. The signalling and processor voltages are derived from a regulator in the servo.

Do take care with the wiring to avoid shorting different power supplies together or running high currents through small wires.

For the AtMega128 it depends what you mean by "control". Is this a main controller or a subcontroller connected to another processor or PC ? The ATmega128 is capable to control 21 RX servos and support IMU with scripts. If you want to do IK or lots of floating point then not easily.

The low cost of 32 bit micros is making them more attractive now. The Darwin OP project has 32 bit ARM Cortex hardware (CM730) which could be modified. Even on 8 bit, the Xmega range is popular due to the larger number of serial ports. Traditionally Gyro and Accelerometers were on analog inputs, but new low cost devices with SPI or I2C interface are better.
You can run different power supply voltage servos on the same bus. You need to common the two data lines and ground to all servos. Then the power to the servos can be different for the two or more types of servo. The signalling and processor voltages are derived from a regulator in the servo.

Do take care with the wiring to avoid shorting different power supplies together or running high currents through small wires.

For the AtMega128 it depends what you mean by "control". Is this a main controller or a subcontroller connected to another processor or PC ? The ATmega128 is capable to control 21 RX servos and support IMU with scripts. If you want to do IK or lots of floating point then not easily.

The low cost of 32 bit micros is making them more attractive now. The Darwin OP project has 32 bit ARM Cortex hardware (CM730) which could be modified. Even on 8 bit, the Xmega range is popular due to the larger number of serial ports. Traditionally Gyro and Accelerometers were on analog inputs, but new low cost devices with SPI or I2C interface are better.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Gulaszewski » Thu Sep 01, 2011 11:30 am

Post by Gulaszewski
Thu Sep 01, 2011 11:30 am

Ok I understand :) But I have small problem with other thing.

It is about example 17 in RX - 64 manual. Why in data are 4 parameters ? If I also want to control speed , I must write address 31 and 32 ?

Could you recommend me a freeware software to control RX from PC ? [/img]
Ok I understand :) But I have small problem with other thing.

It is about example 17 in RX - 64 manual. Why in data are 4 parameters ? If I also want to control speed , I must write address 31 and 32 ?

Could you recommend me a freeware software to control RX from PC ? [/img]
Gulaszewski
Newbie
Newbie
Posts: 5
Joined: Tue Aug 23, 2011 11:05 pm

Post by i-Bot » Thu Sep 01, 2011 4:30 pm

Post by i-Bot
Thu Sep 01, 2011 4:30 pm

You are right there does appear to be an error in the Example 17.

If you decode the final message:
Instruction Packet: FF FF 01 07 03 1E 00 02 00 02 D3
0xFF 0xFF: is the header
0x01: is the ID of the servo
0x07: is the length of the message ( enough for 4 bytes of write data)
0x03: is the write instruction
0x1E: is the start address in RX64 memory where write starts
This is the goal position(L) from the table 3-4 Control table, so 4 bytes written will write to goal position(L), goal position(H), moving speed(L), moving speed(H)
0x00 0x02: = 0x200 written to goal position
0x00 0x02: = 0x200 written to moving speed
0xD3: correct checksum

So the goal position is written as 0x200 (512), not 511 as stated earlier in example.

For the software, are you using USB2Dynamixel as interface ?

Do you want utilities such as dynamixel wizard , complete program like Roboplus, or libraries for development under C# or C++ ?
You are right there does appear to be an error in the Example 17.

If you decode the final message:
Instruction Packet: FF FF 01 07 03 1E 00 02 00 02 D3
0xFF 0xFF: is the header
0x01: is the ID of the servo
0x07: is the length of the message ( enough for 4 bytes of write data)
0x03: is the write instruction
0x1E: is the start address in RX64 memory where write starts
This is the goal position(L) from the table 3-4 Control table, so 4 bytes written will write to goal position(L), goal position(H), moving speed(L), moving speed(H)
0x00 0x02: = 0x200 written to goal position
0x00 0x02: = 0x200 written to moving speed
0xD3: correct checksum

So the goal position is written as 0x200 (512), not 511 as stated earlier in example.

For the software, are you using USB2Dynamixel as interface ?

Do you want utilities such as dynamixel wizard , complete program like Roboplus, or libraries for development under C# or C++ ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Gulaszewski » Thu Sep 01, 2011 5:34 pm

Post by Gulaszewski
Thu Sep 01, 2011 5:34 pm

0x00 0x02: = 0x200 written to goal position
0x00 0x02: = 0x200 written to moving speed

Why 0x00 0x02 are giving 0x200 ?
So 0x00 is low byte , and 0x02 hight byte. And controler recognized it in this order : 0x02 and 0x00 = 0x200 ?

For example : moving speed = 400 (0x190) and other instruction are the same.
Instruction packet : FF FF 01 07 03 1E 00 02 90 01 xx ?

I want to connect my own main controller to the PC. Program like dynamixel wizard and libraries for C++ will be helpfull.
0x00 0x02: = 0x200 written to goal position
0x00 0x02: = 0x200 written to moving speed

Why 0x00 0x02 are giving 0x200 ?
So 0x00 is low byte , and 0x02 hight byte. And controler recognized it in this order : 0x02 and 0x00 = 0x200 ?

For example : moving speed = 400 (0x190) and other instruction are the same.
Instruction packet : FF FF 01 07 03 1E 00 02 90 01 xx ?

I want to connect my own main controller to the PC. Program like dynamixel wizard and libraries for C++ will be helpfull.
Gulaszewski
Newbie
Newbie
Posts: 5
Joined: Tue Aug 23, 2011 11:05 pm


10 postsPage 1 of 1
10 postsPage 1 of 1