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

Simple PC/USB to Robotis bus interface

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
73 postsPage 4 of 51, 2, 3, 4, 5
73 postsPage 4 of 51, 2, 3, 4, 5

Post by billyzelsnack » Wed May 09, 2007 9:00 pm

Post by billyzelsnack
Wed May 09, 2007 9:00 pm

I was doing that in code, but.. The docs say that a valid value is between 2 and 255. The dialog lets you choose 1. I disabled my call. It was faster. I put a 1 in my call it was faster. So.. Apparently you can stick a 1 in there. Geez.

Thanks for the tip.
I was doing that in code, but.. The docs say that a valid value is between 2 and 255. The dialog lets you choose 1. I disabled my call. It was faster. I put a 1 in my call it was faster. So.. Apparently you can stick a 1 in there. Geez.

Thanks for the tip.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Wed May 09, 2007 9:21 pm

Post by billyzelsnack
Wed May 09, 2007 9:21 pm

I need to do some more testing with the latencytimer set to 1, but I have some results now.

Packing reads doesn't seem to matter at all.

fps below is assuming 18 servos.

4 servos, packed writes, unpacked reads : ~85fps
4 servos, packed writes, packed reads : ~85fps
3 servos, packed writes, unpacked reads : ~75fps
3 servos, packed writes, packed reads : ~65fps ????
2 servos, packed writes, unpacked reads : ~60fps
2 servos, packed writes, packed reads : ~60fps
1 servos : ~33fps

Seems like 4 servos just barely can pack together. I set them to 250, 166, 83, 0.
I need to do some more testing with the latencytimer set to 1, but I have some results now.

Packing reads doesn't seem to matter at all.

fps below is assuming 18 servos.

4 servos, packed writes, unpacked reads : ~85fps
4 servos, packed writes, packed reads : ~85fps
3 servos, packed writes, unpacked reads : ~75fps
3 servos, packed writes, packed reads : ~65fps ????
2 servos, packed writes, unpacked reads : ~60fps
2 servos, packed writes, packed reads : ~60fps
1 servos : ~33fps

Seems like 4 servos just barely can pack together. I set them to 250, 166, 83, 0.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Wed May 09, 2007 11:16 pm

Post by billyzelsnack
Wed May 09, 2007 11:16 pm

I finally did a test actually using all 18 servos at once..

no packing : 40fps
2 write packing : 60fps
3 write packing : 75fps
4 write packing : 75fps

I remember sync writes being pretty fast, so hopefully when I add those they don't kill my fps to something unreasonable. Luckily I only want to do writes 50% as often as reads.
I finally did a test actually using all 18 servos at once..

no packing : 40fps
2 write packing : 60fps
3 write packing : 75fps
4 write packing : 75fps

I remember sync writes being pretty fast, so hopefully when I add those they don't kill my fps to something unreasonable. Luckily I only want to do writes 50% as often as reads.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Fri May 11, 2007 3:23 am

Post by billyzelsnack
Fri May 11, 2007 3:23 am

Some numbers with sync sets. 'Sync every other' means that I did one sync set for every two gets. A get grab 8 bytes starting from PRESENT_POSITION_L. Sync set sets 4 bytes starting from GOAL_POSITION_L. This is with all 18 servos.

pack 1, no sync : 33
pack 1, sync : 24
pack 1, sync every other : 30

pack 2, no sync : 55
pack 2, sync : 28
pack 2, sync every other : 38

pack 3, no sync : 70
pack 3, sync : 31
pack 3, sync every other : 43

pack 4, no sync : 70
pack 4, sync : 33
pack 4, sync every other : 47

My testing is 500 iterations. The first 250 iterations it just recording. The second 250 it is playing it back in reverse order and recording. I should add another test where I only playback.

I think I am not handling something correctly as when I quickly move the servo end up with checksum errors. The less packing I do, the less likely the errors. I don't get these errors when I am not doing the sync sets. It seems that the servo uC might not be running quite realtime or something when it is doing heavy servo modification.

Anyone else got to the point where they are doing both syncs sets AND gets?

btw. You may have noticed that I keep saying set and get instead of read and write. I do that because it is more clear to me (at least, haha) because the process of a get requires both a read and a write.
Some numbers with sync sets. 'Sync every other' means that I did one sync set for every two gets. A get grab 8 bytes starting from PRESENT_POSITION_L. Sync set sets 4 bytes starting from GOAL_POSITION_L. This is with all 18 servos.

pack 1, no sync : 33
pack 1, sync : 24
pack 1, sync every other : 30

pack 2, no sync : 55
pack 2, sync : 28
pack 2, sync every other : 38

pack 3, no sync : 70
pack 3, sync : 31
pack 3, sync every other : 43

pack 4, no sync : 70
pack 4, sync : 33
pack 4, sync every other : 47

My testing is 500 iterations. The first 250 iterations it just recording. The second 250 it is playing it back in reverse order and recording. I should add another test where I only playback.

I think I am not handling something correctly as when I quickly move the servo end up with checksum errors. The less packing I do, the less likely the errors. I don't get these errors when I am not doing the sync sets. It seems that the servo uC might not be running quite realtime or something when it is doing heavy servo modification.

Anyone else got to the point where they are doing both syncs sets AND gets?

btw. You may have noticed that I keep saying set and get instead of read and write. I do that because it is more clear to me (at least, haha) because the process of a get requires both a read and a write.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by JonHylands » Fri May 11, 2007 1:12 pm

Post by JonHylands
Fri May 11, 2007 1:12 pm

What does your test do, exactly? Does it update/read from each of the 18 servos on the bus, or only one?

- Jon
What does your test do, exactly? Does it update/read from each of the 18 servos on the bus, or only one?

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

Post by billyzelsnack » Fri May 11, 2007 2:11 pm

Post by billyzelsnack
Fri May 11, 2007 2:11 pm

I have my interface plugged into the entire 18 servo default humanoid. I can move any/all servos during the first 250 iterations and it will replay the movements back in reverse order during the last 250 iterations.
I have my interface plugged into the entire 18 servo default humanoid. I can move any/all servos during the first 250 iterations and it will replay the movements back in reverse order during the last 250 iterations.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Dynamixel configurator

Post by billyzelsnack » Wed May 16, 2007 3:07 am

Post by billyzelsnack
Wed May 16, 2007 3:07 am

I was playing around with the Dynamixel configurator today.

http://www.robotis.com/hb/hisboard.php? ... &mode=list

It does work with this interface. So if you are just putting the interface together this would be a good way to test it out without having to worry about your software being broken too!

Their drivers are even the FTDI drivers, so maybe it's even the same chip. haha.

Just be careful and don't hit the reset button. It'll set your current servo id to 1. I'm not sure how it did that without broadcasting, but I didn't risk it when setting it back and just had a single servo attached.

Also.. I did notice that you need to have your status return value set to 2 and the return delay set to a high value (default 250 is good) to not get a ton of failures.
I was playing around with the Dynamixel configurator today.

http://www.robotis.com/hb/hisboard.php? ... &mode=list

It does work with this interface. So if you are just putting the interface together this would be a good way to test it out without having to worry about your software being broken too!

Their drivers are even the FTDI drivers, so maybe it's even the same chip. haha.

Just be careful and don't hit the reset button. It'll set your current servo id to 1. I'm not sure how it did that without broadcasting, but I didn't risk it when setting it back and just had a single servo attached.

Also.. I did notice that you need to have your status return value set to 2 and the return delay set to a high value (default 250 is good) to not get a ton of failures.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by JonHylands » Wed May 16, 2007 4:46 am

Post by JonHylands
Wed May 16, 2007 4:46 am

I haven't done extensive testing, but I can send 100's of requests to a servo or one of my sensors, with the return delay time set to a small number like 5, and I get no errors.

- Jon
I haven't done extensive testing, but I can send 100's of requests to a servo or one of my sensors, with the return delay time set to a small number like 5, and I get no errors.

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

Post by billyzelsnack » Wed May 16, 2007 5:15 am

Post by billyzelsnack
Wed May 16, 2007 5:15 am

Yeah. I don't seem to have problems with low return delays with my software either. Maybe their software actually interpret the status error codes. I know I don't bother. I'm just happy getting my packets back with valid checksums! haha.
Yeah. I don't seem to have problems with low return delays with my software either. Maybe their software actually interpret the status error codes. I know I don't bother. I'm just happy getting my packets back with valid checksums! haha.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by JonHylands » Wed May 16, 2007 12:53 pm

Post by JonHylands
Wed May 16, 2007 12:53 pm

I decode/interpret the individual bits of the error. That doesn't take a lot of time...

- Jon
I decode/interpret the individual bits of the error. That doesn't take a lot of time...

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

Post by JonHylands » Tue May 22, 2007 4:17 pm

Post by JonHylands
Tue May 22, 2007 4:17 pm

I thought I would post a little update here...

I have successfully managed to talk to an AX-12 directly from a gumstix verdex using this type of USB interface, at the full 1.0 Mbps.

- Jon
I thought I would post a little update here...

I have successfully managed to talk to an AX-12 directly from a gumstix verdex using this type of USB interface, at the full 1.0 Mbps.

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

Post by Marmakoide » Wed Jun 13, 2007 8:37 am

Post by Marmakoide
Wed Jun 13, 2007 8:37 am

I'am on the way to build this nice interface. As a computer science Phd, I know programming not that bad, but I definitly sucks in electronics stuffs... Questions :
* You were able to put the interface in the CM5 box ?
* Can I directly plug a 9.6V battery to feed the servos, or is it less simple than that ?
* The USB port as enougth power to feed the interface ? Even I use a 3 meters USB cable ?
I'am on the way to build this nice interface. As a computer science Phd, I know programming not that bad, but I definitly sucks in electronics stuffs... Questions :
* You were able to put the interface in the CM5 box ?
* Can I directly plug a 9.6V battery to feed the servos, or is it less simple than that ?
* The USB port as enougth power to feed the interface ? Even I use a 3 meters USB cable ?
Marmakoide
Robot Builder
Robot Builder
Posts: 13
Joined: Fri Mar 02, 2007 6:57 pm

Post by JonHylands » Wed Jun 13, 2007 1:34 pm

Post by JonHylands
Wed Jun 13, 2007 1:34 pm

Marmakoide wrote:I'am on the way to build this nice interface. As a computer science Phd, I know programming not that bad, but I definitly sucks in electronics stuffs... Questions :
* You were able to put the interface in the CM5 box ?
* Can I directly plug a 9.6V battery to feed the servos, or is it less simple than that ?
* The USB port as enougth power to feed the interface ? Even I use a 3 meters USB cable ?


- no, I didn't even try to put it in the CM-5 box. It would certainly be doable, however...

- Yes, you can power the servos directly off a 9.6 volt battery. You will want to make sure you include a fuse...

- Yes, you can feed the interface from USB.

- Jon
Marmakoide wrote:I'am on the way to build this nice interface. As a computer science Phd, I know programming not that bad, but I definitly sucks in electronics stuffs... Questions :
* You were able to put the interface in the CM5 box ?
* Can I directly plug a 9.6V battery to feed the servos, or is it less simple than that ?
* The USB port as enougth power to feed the interface ? Even I use a 3 meters USB cable ?


- no, I didn't even try to put it in the CM-5 box. It would certainly be doable, however...

- Yes, you can power the servos directly off a 9.6 volt battery. You will want to make sure you include a fuse...

- Yes, you can feed the interface from USB.

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

Post by billyzelsnack » Wed Jun 13, 2007 2:30 pm

Post by billyzelsnack
Wed Jun 13, 2007 2:30 pm

It works really well if you keep the CM-5 and battery just as is and use a long bioloid cable ( that you'll have to make ) going from the CM-5 to your interface.

I power my interface from USB and the servos get their power from the battery. Works great.
It works really well if you keep the CM-5 and battery just as is and use a long bioloid cable ( that you'll have to make ) going from the CM-5 to your interface.

I power my interface from USB and the servos get their power from the battery. Works great.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by dhylands » Sun Jun 24, 2007 1:37 am

Post by dhylands
Sun Jun 24, 2007 1:37 am

I found a single chip which can replace the '04 and the '126

It's the SN74LVC2G241DCTR

DigiKey and Mouser carry it in an 8 pin SSOP package.

Here's a link to the datasheet:
http://rocky.digikey.com/WebLib/Texas%2 ... C2G241.pdf
I found a single chip which can replace the '04 and the '126

It's the SN74LVC2G241DCTR

DigiKey and Mouser carry it in an 8 pin SSOP package.

Here's a link to the datasheet:
http://rocky.digikey.com/WebLib/Texas%2 ... C2G241.pdf
dhylands
Newbie
Newbie
User avatar
Posts: 5
Joined: Tue Dec 19, 2006 1:00 am

PreviousNext
73 postsPage 4 of 51, 2, 3, 4, 5
73 postsPage 4 of 51, 2, 3, 4, 5