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

Control an AX-12 from your PC

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

Control an AX-12 from your PC

Post by JonHylands » Wed Jan 10, 2007 8:23 pm

Post by JonHylands
Wed Jan 10, 2007 8:23 pm

I'm putting together a tutorial on my site that describes how to interface one or more AX-12 servos to a PC, using an ATmega128 controller board and a few other bits of hardware.

http://www.bioloid.info/tiki/tiki-index ... =pc+serial

I'll be adding a schematic, and finishing the text within the next day or so. I just wanted to give people here an advance look, given the number of threads in recent days regarding controlling an AX-12 from a PC.

This gives you direct access to the AX-12 bus at a binary level, at 115,200 baud. You can send messages (like SYNC_WRITE), as defined in the AX-12 manual, and get responses back. You can also query individual servos on the bus for their state.

- Jon
I'm putting together a tutorial on my site that describes how to interface one or more AX-12 servos to a PC, using an ATmega128 controller board and a few other bits of hardware.

http://www.bioloid.info/tiki/tiki-index ... =pc+serial

I'll be adding a schematic, and finishing the text within the next day or so. I just wanted to give people here an advance look, given the number of threads in recent days regarding controlling an AX-12 from a PC.

This gives you direct access to the AX-12 bus at a binary level, at 115,200 baud. You can send messages (like SYNC_WRITE), as defined in the AX-12 manual, and get responses back. You can also query individual servos on the bus for their state.

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

Post by savuporo » Thu Jan 11, 2007 11:09 am

Post by savuporo
Thu Jan 11, 2007 11:09 am

Have you looked at what is the smallest AVR chip that can do this interfacing function ? As the code is only 2KB a atTiny or something equally cheap could do it, no ? Or maybe direct USB interface with AT90USB series.
Someone ought to put together a low-cost prebuilt board for that and sell it on robosavvy.
Have you looked at what is the smallest AVR chip that can do this interfacing function ? As the code is only 2KB a atTiny or something equally cheap could do it, no ? Or maybe direct USB interface with AT90USB series.
Someone ought to put together a low-cost prebuilt board for that and sell it on robosavvy.
savuporo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 26
Joined: Sun Dec 17, 2006 1:00 am

Post by JonHylands » Thu Jan 11, 2007 2:02 pm

Post by JonHylands
Thu Jan 11, 2007 2:02 pm

You need a mega-series chip, because you need to have two hardware UARTs. As far as I know, the ATmega128 series is the only one that has that.

I could build a board that would be pretty tiny, with a built-in USB interface cihp as well. That's an interesting thought - I wonder how much demand there would be...

- Jon
You need a mega-series chip, because you need to have two hardware UARTs. As far as I know, the ATmega128 series is the only one that has that.

I could build a board that would be pretty tiny, with a built-in USB interface cihp as well. That's an interesting thought - I wonder how much demand there would be...

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

Post by savuporo » Thu Jan 11, 2007 6:21 pm

Post by savuporo
Thu Jan 11, 2007 6:21 pm

Actually, just by looking at the parametric table at Atmel site, there are Atmega162 ( 3 bucks ), Atmega64 etc which all come with 2 UARTS, which all should make the board price lower.
I'd definitely buy one, preassembled and tested. Even though i dont have a bioloid kit yet , but i'd get me a couple AX servos just to fool around on my other robot gear.

Atmel should really have a button on their site that would let you upload your firmware and then suggest the minimum-cost chip to get the given job done :) Its a tall order, i know :)
Actually, just by looking at the parametric table at Atmel site, there are Atmega162 ( 3 bucks ), Atmega64 etc which all come with 2 UARTS, which all should make the board price lower.
I'd definitely buy one, preassembled and tested. Even though i dont have a bioloid kit yet , but i'd get me a couple AX servos just to fool around on my other robot gear.

Atmel should really have a button on their site that would let you upload your firmware and then suggest the minimum-cost chip to get the given job done :) Its a tall order, i know :)
savuporo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 26
Joined: Sun Dec 17, 2006 1:00 am

Post by JonHylands » Thu Jan 11, 2007 7:26 pm

Post by JonHylands
Thu Jan 11, 2007 7:26 pm

Well, you're looking at around $25 worth of components.

I may get around to doing something like this later on this year. For now, you can build what I did - I included a full parts list at the end, with links.

http://www.bioloid.info/tiki/tiki-index.php?page=pc+serial

Assuming you have nothing, you can build this for about $125 plus tax and shipping from the various suppliers.

$25 of that is for the battery & charger, which most people already have.

- Jon
Well, you're looking at around $25 worth of components.

I may get around to doing something like this later on this year. For now, you can build what I did - I included a full parts list at the end, with links.

http://www.bioloid.info/tiki/tiki-index.php?page=pc+serial

Assuming you have nothing, you can build this for about $125 plus tax and shipping from the various suppliers.

$25 of that is for the battery & charger, which most people already have.

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

Post by JonHylands » Fri Jan 12, 2007 11:09 pm

Post by JonHylands
Fri Jan 12, 2007 11:09 pm

I've updated the tutorial, and it is now pretty much complete. It is aimed at complete beginners - those people who have never built anything robotics, and who don't neccessarily know how to read a schematic.

http://www.bioloid.info/tiki/tiki-index.php?page=pc+serial

$125 worth of parts (not including shipping) will get you a fully functional, 115 kbps connection directly to the AX-12 bus.

Once I get the wifi module, I'll be showing how to modify the board built in that tutorial, so for an additional $160 worth of parts, you'll end up with a 1.0 Mbps wireless connection to your Bioloid from your PC.

When I get to that point, I will be publishing an in-depth tutorial for that as well...

- Jon
I've updated the tutorial, and it is now pretty much complete. It is aimed at complete beginners - those people who have never built anything robotics, and who don't neccessarily know how to read a schematic.

http://www.bioloid.info/tiki/tiki-index.php?page=pc+serial

$125 worth of parts (not including shipping) will get you a fully functional, 115 kbps connection directly to the AX-12 bus.

Once I get the wifi module, I'll be showing how to modify the board built in that tutorial, so for an additional $160 worth of parts, you'll end up with a 1.0 Mbps wireless connection to your Bioloid from your PC.

When I get to that point, I will be publishing an in-depth tutorial for that as well...

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

Post by limor » Sat Jan 13, 2007 3:51 am

Post by limor
Sat Jan 13, 2007 3:51 am

Amazing tutorial!! these 3D drawings are awsome. what did you use to model the board, wires and components so effortlessly?

btw: I never tried changing the default 1mbps baud rate of the AX12. I don't recall seeing something about this in your tutorial. do you modify the default baud rate of the AX12 from 1mbps to 115kbps or do they auto-sense the speed?
Amazing tutorial!! these 3D drawings are awsome. what did you use to model the board, wires and components so effortlessly?

btw: I never tried changing the default 1mbps baud rate of the AX12. I don't recall seeing something about this in your tutorial. do you modify the default baud rate of the AX12 from 1mbps to 115kbps or do they auto-sense the speed?
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by JonHylands » Sat Jan 13, 2007 5:12 am

Post by JonHylands
Sat Jan 13, 2007 5:12 am

limor,

Thanks, I use Rhino3D for all my CAD work. I've been doing CAD as a part of my robotics research for 10 years now.

We're running the AX-12s at the full 1 Mbps. The ATmega128 implements a pair of 128-byte circular buffers for bidirectional communication. Since the master doesn't send huge packets, and the AVR sends them out as it gets them, it should never overrun the buffer.

So, the ATmega128 is talking to the PC at 115,200 and to the Bioloid bus at 1 Mbps, using both hardware UARTs.

- Jon
limor,

Thanks, I use Rhino3D for all my CAD work. I've been doing CAD as a part of my robotics research for 10 years now.

We're running the AX-12s at the full 1 Mbps. The ATmega128 implements a pair of 128-byte circular buffers for bidirectional communication. Since the master doesn't send huge packets, and the AVR sends them out as it gets them, it should never overrun the buffer.

So, the ATmega128 is talking to the PC at 115,200 and to the Bioloid bus at 1 Mbps, using both hardware UARTs.

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


8 postsPage 1 of 1
8 postsPage 1 of 1