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

[ask]instruction packet dont make AX-12 move with atmega162

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

[ask]instruction packet dont make AX-12 move with atmega162

Post by boenklon2 » Tue May 31, 2011 6:33 am

Post by boenklon2
Tue May 31, 2011 6:33 am

hi im a student from indonesia

i have a really really weird problem with my dynamixel. i want to control dynamixel AX-12 with Atmega162

i use Codevision AVR

peripheral that i use is
1. Atmega 162 with crystal 16 MHz and 2 usart (usart0 and usart1*but i just use usart0))
2. Dynamixel AX-12

i make a really-really simple program to make sure the every byte sent succefully. i just want to make the dynamixel move.

this is the setting that i used.
1. i use atmega162 usart0 with baudrate 57600
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: On
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 57600
UCSR0A=0x00;
UCSR0B=0x18;
UCSR0C=0x86;
UBRR0H=0x00;
UBRR0L=0x10;

2. dynamixel with id 1 and baudrate 57600 (i change this via controller CM-5)

then the sample code i made form codevision AVR

i put this before while(1)
i made this porogram really easy because i tried another code but never work:(:( and i just want to make sure the data being sent correctly


---sample code----- i put this before while(1) that generated by codevision AVR to prevent looping------

putchar(0xFF); // header
putchar(0xFF); // header
putchar(0x01); // ID
putchar(0x05); // length
putchar(0x03); // write instruction
putchar(0x1E); // goal position
putchar(0x52); // position that i want
putchar(0x02); // to give to dynamixel
putchar(0x84); // check sum


i simulate in isis proteus, check with virtual terminal (simulation) *byte correct* and already check (and make sure) my instruction with terminal CV AVR that connect to atmega 162 sent correctly(real life) *sent byte correct*.(i check it with Tx pin connect to USB Programmer then i connect USB Programmer to PC)

but why when i sent this instruction code to dynamixel it doesnt move the servo??please guys help me i got stuck over 4 days. i tried everything (many methods) but never work.dynamixel never respond my instruction.but when i used cm-5 it work.

is it ok if i connect Atmega 162 Tx pin to Data pin Dynamixel??

i already used the schematic that provided in AX-12 datasheet which used 74HC126 and 74HC04 but it never work.
i already make variation with the baudrate (19200,38400,5670,112500 )but it never work
i already make buffer in Tx and Rx interrupt but it never work
i already change the hexa in putchar to decimal, ex putchar(255);putchar(1); but it never work


i have already read the atmega8535 with dynamixel, even he just sent the packet like me and he can control it why i cant control it:(:(
please i really really need ur help guys. :cry: :cry: :cry: :cry:
hi im a student from indonesia

i have a really really weird problem with my dynamixel. i want to control dynamixel AX-12 with Atmega162

i use Codevision AVR

peripheral that i use is
1. Atmega 162 with crystal 16 MHz and 2 usart (usart0 and usart1*but i just use usart0))
2. Dynamixel AX-12

i make a really-really simple program to make sure the every byte sent succefully. i just want to make the dynamixel move.

this is the setting that i used.
1. i use atmega162 usart0 with baudrate 57600
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: On
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 57600
UCSR0A=0x00;
UCSR0B=0x18;
UCSR0C=0x86;
UBRR0H=0x00;
UBRR0L=0x10;

2. dynamixel with id 1 and baudrate 57600 (i change this via controller CM-5)

then the sample code i made form codevision AVR

i put this before while(1)
i made this porogram really easy because i tried another code but never work:(:( and i just want to make sure the data being sent correctly


---sample code----- i put this before while(1) that generated by codevision AVR to prevent looping------

putchar(0xFF); // header
putchar(0xFF); // header
putchar(0x01); // ID
putchar(0x05); // length
putchar(0x03); // write instruction
putchar(0x1E); // goal position
putchar(0x52); // position that i want
putchar(0x02); // to give to dynamixel
putchar(0x84); // check sum


i simulate in isis proteus, check with virtual terminal (simulation) *byte correct* and already check (and make sure) my instruction with terminal CV AVR that connect to atmega 162 sent correctly(real life) *sent byte correct*.(i check it with Tx pin connect to USB Programmer then i connect USB Programmer to PC)

but why when i sent this instruction code to dynamixel it doesnt move the servo??please guys help me i got stuck over 4 days. i tried everything (many methods) but never work.dynamixel never respond my instruction.but when i used cm-5 it work.

is it ok if i connect Atmega 162 Tx pin to Data pin Dynamixel??

i already used the schematic that provided in AX-12 datasheet which used 74HC126 and 74HC04 but it never work.
i already make variation with the baudrate (19200,38400,5670,112500 )but it never work
i already make buffer in Tx and Rx interrupt but it never work
i already change the hexa in putchar to decimal, ex putchar(255);putchar(1); but it never work


i have already read the atmega8535 with dynamixel, even he just sent the packet like me and he can control it why i cant control it:(:(
please i really really need ur help guys. :cry: :cry: :cry: :cry:
boenklon2
Newbie
Newbie
Posts: 2
Joined: Tue May 31, 2011 6:32 am

Post by Fritzoid » Tue May 31, 2011 12:49 pm

Post by Fritzoid
Tue May 31, 2011 12:49 pm

dumb question...is torque enabled ?

Also, does the dynamixel return a response packet?

if yes - it sees the command but ignores it due to a configuration problem.

if no - it does not see the packet due to a communications problem.
dumb question...is torque enabled ?

Also, does the dynamixel return a response packet?

if yes - it sees the command but ignores it due to a configuration problem.

if no - it does not see the packet due to a communications problem.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by boenklon2 » Wed Jun 01, 2011 7:29 am

Post by boenklon2
Wed Jun 01, 2011 7:29 am

Fritzoid wrote:dumb question...is torque enabled ?

Also, does the dynamixel return a response packet?

if yes - it sees the command but ignores it due to a configuration problem.

if no - it does not see the packet due to a communications problem.


hey fritzoid thx for the reply. i found the error. i believe this is some kind of stupid bug. i dont know wether it come form my microcontroler, codevision, or the dynamixel it self.
i find that if i write hexa in upper case word (ex : 0xFF,0xD6) it dont work. but if i write the code in lower case in hexa (0xff, 0xd6) it work!!! i dont know why this is happen.this phenomenon really make me crazy!!

thx guys
Fritzoid wrote:dumb question...is torque enabled ?

Also, does the dynamixel return a response packet?

if yes - it sees the command but ignores it due to a configuration problem.

if no - it does not see the packet due to a communications problem.


hey fritzoid thx for the reply. i found the error. i believe this is some kind of stupid bug. i dont know wether it come form my microcontroler, codevision, or the dynamixel it self.
i find that if i write hexa in upper case word (ex : 0xFF,0xD6) it dont work. but if i write the code in lower case in hexa (0xff, 0xd6) it work!!! i dont know why this is happen.this phenomenon really make me crazy!!

thx guys
boenklon2
Newbie
Newbie
Posts: 2
Joined: Tue May 31, 2011 6:32 am


3 postsPage 1 of 1
3 postsPage 1 of 1