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 5 of 51, 2, 3, 4, 5
73 postsPage 5 of 51, 2, 3, 4, 5

Post by limor » Wed Jun 27, 2007 2:35 pm

Post by limor
Wed Jun 27, 2007 2:35 pm

Hi billyzelsnack,

Did you play with the servo return-delay parameter as suggested by JonHylands (default value of parameter 05 is 250us)?

Did you end up sending consecutive READ packets to the servos and then read consecutive returned results? is that necessary if the return-delay is set to a very small value?

As these are very important experimental results for everyone, can you please summarize your results and possibly post your code too.

thanks
Limor
Hi billyzelsnack,

Did you play with the servo return-delay parameter as suggested by JonHylands (default value of parameter 05 is 250us)?

Did you end up sending consecutive READ packets to the servos and then read consecutive returned results? is that necessary if the return-delay is set to a very small value?

As these are very important experimental results for everyone, can you please summarize your results and possibly post your code too.

thanks
Limor
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by billyzelsnack » Thu Jun 28, 2007 3:07 am

Post by billyzelsnack
Thu Jun 28, 2007 3:07 am

Ok. Trying to figure this out myself again. I've not had time to do any robotics lately ( stupid job getting in the way ). Hopefully I can remember what I was talking about after more than a month! So if I remember/decipher correctly..

You can't do a SYNC_WRITE to do a READ. That means if you need to get values from your servos you must do a WRITE then do a READ for each one, one at a time. So this..

Write telling servo 1 you want a value
Read the servo value
Write telling servo 2 you want a value
Read the servo value
Write telling servo 3 you want a value
Read the servo value
Write telling servo 4 you want a value
Read the servo value

What I did instead was this..

Write to buffer telling servo 1 you want a value
Write to buffer telling servo 2 you want a value
Write to buffer telling servo 3 you want a value
Write to buffer telling servo 4 you want a value
Write entire buffer to servos with single write call
Read the servo value
Read the servo value
Read the servo value
Read the servo value

Each servo had a difference return delay so that returned values would not arrive on top of each other.

Does that explanation make more sense than my previous jibberish?

btw. This code is STILL a freak'n mess. It's just being used to quickly experiment with different ideas. Once I figure out what I want to do I'll refactor it into something reasonable and will make it available.
Ok. Trying to figure this out myself again. I've not had time to do any robotics lately ( stupid job getting in the way ). Hopefully I can remember what I was talking about after more than a month! So if I remember/decipher correctly..

You can't do a SYNC_WRITE to do a READ. That means if you need to get values from your servos you must do a WRITE then do a READ for each one, one at a time. So this..

Write telling servo 1 you want a value
Read the servo value
Write telling servo 2 you want a value
Read the servo value
Write telling servo 3 you want a value
Read the servo value
Write telling servo 4 you want a value
Read the servo value

What I did instead was this..

Write to buffer telling servo 1 you want a value
Write to buffer telling servo 2 you want a value
Write to buffer telling servo 3 you want a value
Write to buffer telling servo 4 you want a value
Write entire buffer to servos with single write call
Read the servo value
Read the servo value
Read the servo value
Read the servo value

Each servo had a difference return delay so that returned values would not arrive on top of each other.

Does that explanation make more sense than my previous jibberish?

btw. This code is STILL a freak'n mess. It's just being used to quickly experiment with different ideas. Once I figure out what I want to do I'll refactor it into something reasonable and will make it available.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by Juha » Fri Jun 29, 2007 12:19 pm

Post by Juha
Fri Jun 29, 2007 12:19 pm

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

It's the SN74LVC2G241DCTR


Very nice find, thanks for the info. Looks like it's perfect for building the communications link to bioloid bus.

Now the challenge is to find a place where you can order a few of these without paying 10 times as much for the shipping costs as you pay for the chips.

Unless someone is planning on ordering more of these and would like to mail me few of them in an envelope ;)
dhylands wrote:I found a single chip which can replace the '04 and the '126

It's the SN74LVC2G241DCTR


Very nice find, thanks for the info. Looks like it's perfect for building the communications link to bioloid bus.

Now the challenge is to find a place where you can order a few of these without paying 10 times as much for the shipping costs as you pay for the chips.

Unless someone is planning on ordering more of these and would like to mail me few of them in an envelope ;)
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by JonHylands » Fri Jul 13, 2007 12:38 pm

Post by JonHylands
Fri Jul 13, 2007 12:38 pm

Here is my latest effort - I needed a simple board that just let me talk to devices on the bus, and provide power. Its almost as simple as you can get, with the possible exception of using the new bus chip my brother found instead of the tristate and inverter.

I would have used those, but this board had to work 100% guaranteed, and since no-one has actually tried this new bus switch yet, I had to stick with the old way, which I know 100% works.

Here's the PCB layout (red on top, green on bottom):

Image

Note that the board is 1.5" x 2" (about 38 mm x 51 mm).

Here's an earlier prototype of it, where I made a few errors (including swapping the D- and D+ lines):

Image

The board has a power socket, a fuse, a power switch, the USB socket, the usb & support chips, and 6 Bioloid bus headers.

- Jon
Here is my latest effort - I needed a simple board that just let me talk to devices on the bus, and provide power. Its almost as simple as you can get, with the possible exception of using the new bus chip my brother found instead of the tristate and inverter.

I would have used those, but this board had to work 100% guaranteed, and since no-one has actually tried this new bus switch yet, I had to stick with the old way, which I know 100% works.

Here's the PCB layout (red on top, green on bottom):

Image

Note that the board is 1.5" x 2" (about 38 mm x 51 mm).

Here's an earlier prototype of it, where I made a few errors (including swapping the D- and D+ lines):

Image

The board has a power socket, a fuse, a power switch, the USB socket, the usb & support chips, and 6 Bioloid bus headers.

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

Post by Zypkin » Fri Jul 13, 2007 2:23 pm

Post by Zypkin
Fri Jul 13, 2007 2:23 pm

Very well done!
Looks really compact and robust.

Zyp
Very well done!
Looks really compact and robust.

Zyp
Zypkin
Robot Builder
Robot Builder
Posts: 19
Joined: Thu Jul 05, 2007 12:26 pm

Post by bootstrap » Fri Sep 05, 2008 10:03 am

Post by bootstrap
Fri Sep 05, 2008 10:03 am

JonHylands wrote:Okay, so I've got a functioning USB board now...

Image

http://www.bioloid.info/tiki/show_image.php?id=185

It has:

- two power connectors (one for bus power, one for the electronics)
- two "switch" connectors (5 and 2 pin at the back, center)
--- these allow me to switch power to the bus, the cameras, and the gumstix
- 3 pin connector at far left for gumstix power regulator
- 2 pin gumstix power connector
- two 2-pin camera power connectors (next to the big cap)
--- I have a pair of AnyVolt minis under the board to switch power to 12 volts, regardless of the input voltage
- six bus connectors
- two fuses (the brown things behind the power connectors)
- USB interface chip (FT232), plus a 4-pin connector for i

- Jon


I am making a USB2Dynamixel or an FTDI FT232R based solution for dynamixel for my project ,could you please provide the schematic for the above circuit.
JonHylands wrote:Okay, so I've got a functioning USB board now...

Image

http://www.bioloid.info/tiki/show_image.php?id=185

It has:

- two power connectors (one for bus power, one for the electronics)
- two "switch" connectors (5 and 2 pin at the back, center)
--- these allow me to switch power to the bus, the cameras, and the gumstix
- 3 pin connector at far left for gumstix power regulator
- 2 pin gumstix power connector
- two 2-pin camera power connectors (next to the big cap)
--- I have a pair of AnyVolt minis under the board to switch power to 12 volts, regardless of the input voltage
- six bus connectors
- two fuses (the brown things behind the power connectors)
- USB interface chip (FT232), plus a 4-pin connector for i

- Jon


I am making a USB2Dynamixel or an FTDI FT232R based solution for dynamixel for my project ,could you please provide the schematic for the above circuit.
bootstrap
Robot Builder
Robot Builder
Posts: 13
Joined: Wed Sep 03, 2008 7:01 pm

Post by JonHylands » Fri Sep 05, 2008 1:38 pm

Post by JonHylands
Fri Sep 05, 2008 1:38 pm

bootstrap wrote:I am making a USB2Dynamixel or an FTDI FT232R based solution for dynamixel for my project ,could you please provide the schematic for the above circuit.


Here's a schematic for my USB interface board, which has the interesting parts. I don't normally make schematics, so I just made this one up by copying from the FT232 data sheet, and the AX-12 manual.

Image

- Jon
bootstrap wrote:I am making a USB2Dynamixel or an FTDI FT232R based solution for dynamixel for my project ,could you please provide the schematic for the above circuit.


Here's a schematic for my USB interface board, which has the interesting parts. I don't normally make schematics, so I just made this one up by copying from the FT232 data sheet, and the AX-12 manual.

Image

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

Post by Jonney_M » Fri Mar 12, 2010 3:47 pm

Post by Jonney_M
Fri Mar 12, 2010 3:47 pm

Hi I have manged to build this circuit on a breadboard but it doesn't seem to be recieving from the dynamixel.

Iam powering the dynamixel via the cm5 and am using usb host power.

http://www.rm-f.co.uk/uploads/cons+chips.jpg
http://www.rm-f.co.uk/uploads/usb.jpg

I have tested this using the dynamixel configurator v2
it seems to transmit but never cchange the state of txden to allow data to be recieved

It would be great if someone could look at my photos and tell me what i have done wrong, if anything.
Hi I have manged to build this circuit on a breadboard but it doesn't seem to be recieving from the dynamixel.

Iam powering the dynamixel via the cm5 and am using usb host power.

http://www.rm-f.co.uk/uploads/cons+chips.jpg
http://www.rm-f.co.uk/uploads/usb.jpg

I have tested this using the dynamixel configurator v2
it seems to transmit but never cchange the state of txden to allow data to be recieved

It would be great if someone could look at my photos and tell me what i have done wrong, if anything.
Jonney_M
Newbie
Newbie
Posts: 3
Joined: Fri Mar 12, 2010 3:17 pm

Post by billyzelsnack » Fri Mar 12, 2010 5:44 pm

Post by billyzelsnack
Fri Mar 12, 2010 5:44 pm

I remember using one of the FTDI tools to configure the TXDEN, but I'm not sure if it's already set correctly as the default. Maybe something to look into.
I remember using one of the FTDI tools to configure the TXDEN, but I'm not sure if it's already set correctly as the default. Maybe something to look into.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by JonHylands » Fri Mar 12, 2010 7:17 pm

Post by JonHylands
Fri Mar 12, 2010 7:17 pm

I use an inverter on the other line (RXDEN), since that one (TXDEN) doesn't seem to do anything.

- Jon
I use an inverter on the other line (RXDEN), since that one (TXDEN) doesn't seem to do anything.

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

Post by Jonney_M » Fri Mar 12, 2010 8:00 pm

Post by Jonney_M
Fri Mar 12, 2010 8:00 pm

I have looked through the datasheet and can't see any reference to rxden. I'm using the um232r dip module which is based on FT232R.
I have looked through the datasheet and can't see any reference to rxden. I'm using the um232r dip module which is based on FT232R.
Jonney_M
Newbie
Newbie
Posts: 3
Joined: Fri Mar 12, 2010 3:17 pm

Post by billyzelsnack » Fri Mar 12, 2010 8:16 pm

Post by billyzelsnack
Fri Mar 12, 2010 8:16 pm

This is the tool I was talking about.

http://www.ftdichip.com/Resources/Utilities.htm#FT_Prog

Page 13 in the manual gives a figure showing what you can configure.
This is the tool I was talking about.

http://www.ftdichip.com/Resources/Utilities.htm#FT_Prog

Page 13 in the manual gives a figure showing what you can configure.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by Jonney_M » Fri Mar 12, 2010 10:59 pm

Post by Jonney_M
Fri Mar 12, 2010 10:59 pm

Thanks for that billyzelsnack thats seems to have been the problem, it seems that even though the factory default is for it to be txden it was set to pwren. Oh well its fixed now.
Thanks for that billyzelsnack thats seems to have been the problem, it seems that even though the factory default is for it to be txden it was set to pwren. Oh well its fixed now.
Jonney_M
Newbie
Newbie
Posts: 3
Joined: Fri Mar 12, 2010 3:17 pm

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