Dynamixel & ARDUINO

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

Dynamixel & ARDUINO

Post by alonsoBrain » Thu Sep 20, 2007 4:43 pm

Post by alonsoBrain
Thu Sep 20, 2007 4:43 pm

Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)

Any help, link o reference?

thanks!
Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)

Any help, link o reference?

thanks!
alonsoBrain offline
Robot Builder
Robot Builder
User avatar
Posts: 13
Joined: Wed Sep 20, 2006 1:00 am

Post by JonHylands » Thu Sep 20, 2007 5:38 pm

Post by JonHylands
Thu Sep 20, 2007 5:38 pm

Yes, you can do that. The ARDUINO boards use an ATmega168, which is (incidentally) the same processor I use in my boards.

The source code for my IMU is available - see:

http://www.bioloid.info/tiki/tiki-index.php?page=6-Axis+Bus+IMU

for the link to the repository where it is stored.

It wouldn't be that hard to change the control table to match what an AX-12 has...

- Jon
Yes, you can do that. The ARDUINO boards use an ATmega168, which is (incidentally) the same processor I use in my boards.

The source code for my IMU is available - see:

http://www.bioloid.info/tiki/tiki-index.php?page=6-Axis+Bus+IMU

for the link to the repository where it is stored.

It wouldn't be that hard to change the control table to match what an AX-12 has...

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by limor » Thu Sep 20, 2007 9:38 pm

Post by limor
Thu Sep 20, 2007 9:38 pm

Jon,
Arduino doesnt have the circuitry to buffer between the RX and TX.
Do you think that simply shorting its RX and TX onto the AX12 data line would allow the Arduino to communicate with the AX12 (given appropriate code that would disable RX when TX is talking and v.v.) ?
Jon,
Arduino doesnt have the circuitry to buffer between the RX and TX.
Do you think that simply shorting its RX and TX onto the AX12 data line would allow the Arduino to communicate with the AX12 (given appropriate code that would disable RX when TX is talking and v.v.) ?
limor offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1809
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Thu Sep 20, 2007 11:07 pm

Post by JonHylands
Thu Sep 20, 2007 11:07 pm

Yes, that's what all my device boards do...

The ATmega UART can selectively switch off the transmit and receive pins while it is operating, which is what the code my brother wrote does. In general, the Tx pin is disabled, and its in receive mode. When it needs to transmit an answer back again, it disables the Rx pin, enables the Tx, and then sends the response, and switches them back again.

Or something very close to that...

- Jon
Yes, that's what all my device boards do...

The ATmega UART can selectively switch off the transmit and receive pins while it is operating, which is what the code my brother wrote does. In general, the Tx pin is disabled, and its in receive mode. When it needs to transmit an answer back again, it disables the Rx pin, enables the Tx, and then sends the response, and switches them back again.

Or something very close to that...

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by limor » Thu Sep 20, 2007 11:29 pm

Post by limor
Thu Sep 20, 2007 11:29 pm

so you dont use the 748C126 component recommended by Robotis ?
so you dont use the 748C126 component recommended by Robotis ?
limor offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1809
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Fri Sep 21, 2007 12:31 am

Post by JonHylands
Fri Sep 21, 2007 12:31 am

No.

I use that for my USB interface, because you need it. But the AVR can handle in software what the tristate buffer is doing in hardware.

- Jon
No.

I use that for my USB interface, because you need it. But the AVR can handle in software what the tristate buffer is doing in hardware.

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by limor » Fri Sep 21, 2007 8:36 am

Post by limor
Fri Sep 21, 2007 8:36 am

i didn't know that you had modules working this way. This issue was discussed before here with relation to the Pepper board and somehow I got the impression that there was some kind of electrical or signal problem with shorting the RX and TX on the Atmega.

But this is great news because it means that basically any Atmega controller board (with the 1mbps UART) can control the Bioloid bus.


:idea:
i didn't know that you had modules working this way. This issue was discussed before here with relation to the Pepper board and somehow I got the impression that there was some kind of electrical or signal problem with shorting the RX and TX on the Atmega.

But this is great news because it means that basically any Atmega controller board (with the 1mbps UART) can control the Bioloid bus.


:idea:
limor offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1809
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Fri Sep 21, 2007 12:28 pm

Post by JonHylands
Fri Sep 21, 2007 12:28 pm

Yeah, as long as you have either an 8Mhz or 16Mhz crystal/oscillator, or use the built-in 8MHz one, you can do this.

- Jon
Yeah, as long as you have either an 8Mhz or 16Mhz crystal/oscillator, or use the built-in 8MHz one, you can do this.

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Re: Dynamixel & ARDUINO

Post by alonsoBrain » Fri Sep 21, 2007 2:44 pm

Post by alonsoBrain
Fri Sep 21, 2007 2:44 pm

alonsoBrain wrote:Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)



I think I'm loosing

... so... do i need any aditional hardware to conect both devices...?

thanks for your patience....

aB
alonsoBrain wrote:Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)



I think I'm loosing

... so... do i need any aditional hardware to conect both devices...?

thanks for your patience....

aB
alonsoBrain offline
Robot Builder
Robot Builder
User avatar
Posts: 13
Joined: Wed Sep 20, 2006 1:00 am

Re: Dynamixel & ARDUINO

Post by alonsoBrain » Fri Sep 21, 2007 2:45 pm

Post by alonsoBrain
Fri Sep 21, 2007 2:45 pm

alonsoBrain wrote:Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)



I think I'm loosing

... so... do i need any aditional hardware to conect both devices...?

thanks for your patience....

aB
alonsoBrain wrote:Hi!

Is it possible to simulate an AX-12 Dynamixel device with an ARDUINO?
(assign ID, read the CM5 signals, write in the bus...)



I think I'm loosing

... so... do i need any aditional hardware to conect both devices...?

thanks for your patience....

aB
alonsoBrain offline
Robot Builder
Robot Builder
User avatar
Posts: 13
Joined: Wed Sep 20, 2006 1:00 am

Post by JonHylands » Fri Sep 21, 2007 3:07 pm

Post by JonHylands
Fri Sep 21, 2007 3:07 pm

You need to cross the Rx and Tx pins of the ATmega168, and use the software I pointed out to you in my first reply. Don't short the pins until you have the software loaded, because otherwise you can burn out the UART. I typically solder a molex 2-pin header to the two pins, and then put a jumper across (see pic below - the jumper is just above the bus connection)...

Image

Then you can modify that software so that instead of representing an IMU, it simulated an AX-12. The control table for the AX-12 is very well defined, and it should be fairly simple to do most of it. It really depends on how deep you want your simulation to be...

- Jon
You need to cross the Rx and Tx pins of the ATmega168, and use the software I pointed out to you in my first reply. Don't short the pins until you have the software loaded, because otherwise you can burn out the UART. I typically solder a molex 2-pin header to the two pins, and then put a jumper across (see pic below - the jumper is just above the bus connection)...

Image

Then you can modify that software so that instead of representing an IMU, it simulated an AX-12. The control table for the AX-12 is very well defined, and it should be fairly simple to do most of it. It really depends on how deep you want your simulation to be...

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by gr33nhorn » Sat Sep 13, 2008 9:37 pm

Post by gr33nhorn
Sat Sep 13, 2008 9:37 pm

hi guys,
i saw a thread from somewhere, some one use pnp transitor to create ttl half duplex....anyone know anything about it?
hi guys,
i saw a thread from somewhere, some one use pnp transitor to create ttl half duplex....anyone know anything about it?
gr33nhorn offline
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Sep 13, 2008 9:35 pm

Post by gr33nhorn » Sun Sep 14, 2008 6:22 am

Post by gr33nhorn
Sun Sep 14, 2008 6:22 am

sorry for asking question where by alot of people asked before.i bought arduino months ago and wish to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance
sorry for asking question where by alot of people asked before.i bought arduino months ago and wish to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance
gr33nhorn offline
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Sep 13, 2008 9:35 pm

Post by gr33nhorn » Sun Sep 14, 2008 6:24 am

Post by gr33nhorn
Sun Sep 14, 2008 6:24 am

sorry for asking question where by alot of people asked before.i bought arduino months ago and wish to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance
sorry for asking question where by alot of people asked before.i bought arduino months ago and wish to use its IDE to control ax-12.i saw a few thread but i just confuse with a few methods for connecting the rx and tx pins into ttl half dupex.hope you guys can give me some guidance
gr33nhorn offline
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Sep 13, 2008 9:35 pm

Post by JonHylands » Mon Sep 15, 2008 3:44 am

Post by JonHylands
Mon Sep 15, 2008 3:44 am

If you follow the instructions I posted above last year, you should be good.

- Jon
If you follow the instructions I posted above last year, you should be good.

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Next
Next
20 postsPage 1 of 21, 2
20 postsPage 1 of 21, 2
cron