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

Playing with AX-12's

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

Playing with AX-12's

Post by JonHylands » Tue Jan 09, 2007 4:26 am

Post by JonHylands
Tue Jan 09, 2007 4:26 am

Hi everyone,

I had originally posted in a different thread, but decided that this deserved a thread of its own.

I've been making up some little GUIs in Squeak, and playing with my AX-12 interface. I've recorded a few movies:

The first is just controlling an AX-12 from a GUI:

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=45

The second is controlling an AX-12 by turning another AX-12:

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=48

The third is controlling an AX-12 using a different GUI, which also shows position and torque feedback. I show the torque feedback by manually applying torque to the servo.

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=49

Sorry for the poor quality, my web cam is just not that good...

- Jon
Hi everyone,

I had originally posted in a different thread, but decided that this deserved a thread of its own.

I've been making up some little GUIs in Squeak, and playing with my AX-12 interface. I've recorded a few movies:

The first is just controlling an AX-12 from a GUI:

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=45

The second is controlling an AX-12 by turning another AX-12:

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=48

The third is controlling an AX-12 using a different GUI, which also shows position and torque feedback. I show the torque feedback by manually applying torque to the servo.

http://www.bioloid.info/tiki/tiki-download_file.php?fileId=49

Sorry for the poor quality, my web cam is just not that good...

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

Post by DerekZahn » Tue Jan 09, 2007 5:31 am

Post by DerekZahn
Tue Jan 09, 2007 5:31 am

Nice job Jon, looks like you've mastered controlling those servos!
Nice job Jon, looks like you've mastered controlling those servos!
DerekZahn
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

Post by Juha » Tue Jan 09, 2007 2:06 pm

Post by Juha
Tue Jan 09, 2007 2:06 pm

Very nice Jon. You probably mentioned it earlier, but what are you using between your computer and the ax-12s? Robostix? How many times per second do you receive information from the ax-12s?
Very nice Jon. You probably mentioned it earlier, but what are you using between your computer and the ax-12s? Robostix? How many times per second do you receive information from the ax-12s?
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by JonHylands » Tue Jan 09, 2007 2:34 pm

Post by JonHylands
Tue Jan 09, 2007 2:34 pm

I'm using a robostix by itself, as documented on this page:

http://www.bioloid.info/tiki/tiki-index.php?page=gumstix

I'm replacing the gumstix with my laptop and a USB -> TTL serial converter.

I'm currently retrieving information from the bus at 33 times per second, more or less. Once I get the Wifi link done, I will be able to talk to 20 or more servos at that speed.

- Jon
I'm using a robostix by itself, as documented on this page:

http://www.bioloid.info/tiki/tiki-index.php?page=gumstix

I'm replacing the gumstix with my laptop and a USB -> TTL serial converter.

I'm currently retrieving information from the bus at 33 times per second, more or less. Once I get the Wifi link done, I will be able to talk to 20 or more servos at that speed.

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

Post by Joe » Fri Jan 12, 2007 9:25 pm

Post by Joe
Fri Jan 12, 2007 9:25 pm

JonHylands wrote:I'm using a robostix by itself, as documented on this page:

http://www.bioloid.info/tiki/tiki-index.php?page=gumstix

What's not clear to me from this (and the "pc serial" page) is why a robostix or other ATmega128 is needed. Why can't you directly interface with the Bioloid bus (perhaps through a RS232-TTL level converter)?

By the way, that "pc serial" tutorial is amazing — 3D renders to clearly illustrate each step! Beautiful work. I just don't understand why it's necessary. :)

Thanks,
— Joe
JonHylands wrote:I'm using a robostix by itself, as documented on this page:

http://www.bioloid.info/tiki/tiki-index.php?page=gumstix

What's not clear to me from this (and the "pc serial" page) is why a robostix or other ATmega128 is needed. Why can't you directly interface with the Bioloid bus (perhaps through a RS232-TTL level converter)?

By the way, that "pc serial" tutorial is amazing — 3D renders to clearly illustrate each step! Beautiful work. I just don't understand why it's necessary. :)

Thanks,
— Joe
Joe
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by JonHylands » Fri Jan 12, 2007 10:05 pm

Post by JonHylands
Fri Jan 12, 2007 10:05 pm

Well, its complicated :)

It basically comes down to two things - because the Bioloid bus does RS-232 Tx and Rx on the same wire, you need an RS-232 system that is compatible with that, from an electrical point of view. Once you have that, you need to deal with the timing aspect of it.

The way the bus works, the master (in our case, the PC) sends a packet down the Tx line of the bus. One of the slaves (an AX-12) will respond with a response packet. The turnaround time is specified by register 5 in the control table, which is "Return Delay Time". The default response time is 500 micro-seconds, which is half a millisecond.

So, in that time, in order for the bus to work, the master has to switch the bus line from transmit mode to receive mode. You can do that with a bus switch, but you have to know exactly when to do the switch.

A UART in a PC is a complex beast, and the reason it can do such high speeds is because you basically give it a bunch of bytes to send, and say "send it". You (as the programmer) have no idea when those bytes actually get sent down the pipe, so you have no idea what 500 micro-second window to change your bus switch over.

With a micro-controller, you're basically working at the hardware/driver level, so you can get an interrupt when the UART is done shifting the bytes down the line.

That, in a nutshell, is why you need a micro-controller to do this...

- Jon
Well, its complicated :)

It basically comes down to two things - because the Bioloid bus does RS-232 Tx and Rx on the same wire, you need an RS-232 system that is compatible with that, from an electrical point of view. Once you have that, you need to deal with the timing aspect of it.

The way the bus works, the master (in our case, the PC) sends a packet down the Tx line of the bus. One of the slaves (an AX-12) will respond with a response packet. The turnaround time is specified by register 5 in the control table, which is "Return Delay Time". The default response time is 500 micro-seconds, which is half a millisecond.

So, in that time, in order for the bus to work, the master has to switch the bus line from transmit mode to receive mode. You can do that with a bus switch, but you have to know exactly when to do the switch.

A UART in a PC is a complex beast, and the reason it can do such high speeds is because you basically give it a bunch of bytes to send, and say "send it". You (as the programmer) have no idea when those bytes actually get sent down the pipe, so you have no idea what 500 micro-second window to change your bus switch over.

With a micro-controller, you're basically working at the hardware/driver level, so you can get an interrupt when the UART is done shifting the bytes down the line.

That, in a nutshell, is why you need a micro-controller to do this...

- 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:38 am

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

Actually you can write software that will know when the byte has been sent on a standard PC UART. This code may have to be at device driver level but it can be done. [ We recently wrote such a driver for Matlab/Simulink real-time-Windows-target in order to communicate with the CM5. ]

The problem with standard PC UART is that it is formally limited to 115kpbs so it can not interface directly at 1mbps with the Bioloid bus.
Actually you can write software that will know when the byte has been sent on a standard PC UART. This code may have to be at device driver level but it can be done. [ We recently wrote such a driver for Matlab/Simulink real-time-Windows-target in order to communicate with the CM5. ]

The problem with standard PC UART is that it is formally limited to 115kpbs so it can not interface directly at 1mbps with the Bioloid bus.
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:25 am

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

That's true, but if you're going to go to that level, you might as well be using a microcontroller - its a lot simpler to program a microcontroller than a device driver.

My brother and I talked about doing a Linux device driver on the gumstix to do this, but decided it would be simpler and easier to just use a micro-controller.

- Jon
That's true, but if you're going to go to that level, you might as well be using a microcontroller - its a lot simpler to program a microcontroller than a device driver.

My brother and I talked about doing a Linux device driver on the gumstix to do this, but decided it would be simpler and easier to just use a micro-controller.

- 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