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

Post by billyzelsnack » Wed Feb 14, 2007 3:35 am

Post by billyzelsnack
Wed Feb 14, 2007 3:35 am

Parts are ordered finally. Should get them in a few days.

Arnaud. I was thinking.. Your interface might make for a cool article in robot magazine. It would also help evangelize the Bioloid and hopefully get some more kids playing with the same toy! More kids == more information.
Parts are ordered finally. Should get them in a few days.

Arnaud. I was thinking.. Your interface might make for a cool article in robot magazine. It would also help evangelize the Bioloid and hopefully get some more kids playing with the same toy! More kids == more information.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by ArnaudBuy » Fri Feb 16, 2007 10:02 pm

Post by ArnaudBuy
Fri Feb 16, 2007 10:02 pm

You think ?
If you think thus, I leave you the pleasure and freedom to act.
I can also provide the C# source code for communicating with actuators if it is necessary ...

Arnaud BUY.
You think ?
If you think thus, I leave you the pleasure and freedom to act.
I can also provide the C# source code for communicating with actuators if it is necessary ...

Arnaud BUY.
ArnaudBuy
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Jan 20, 2007 1:00 am
Location: Lille, France

Post by billyzelsnack » Sun Feb 18, 2007 5:28 am

Post by billyzelsnack
Sun Feb 18, 2007 5:28 am

So I built the interface with the 232R and I am not getting any response from the servo (shows up on the scope though). Is there something special that I need to do to set the baudrate from an app. From the baudrate app note it looks like the virtual comm driver will handle that for me.

I think I might like to grab your program if possible. I'm not sure of the state of my dmtalk code and eliminating an unknown would help.

btw. I did use MPROG to set the cbus0 to txden, so I should be good to go.
So I built the interface with the 232R and I am not getting any response from the servo (shows up on the scope though). Is there something special that I need to do to set the baudrate from an app. From the baudrate app note it looks like the virtual comm driver will handle that for me.

I think I might like to grab your program if possible. I'm not sure of the state of my dmtalk code and eliminating an unknown would help.

btw. I did use MPROG to set the cbus0 to txden, so I should be good to go.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Sun Feb 18, 2007 5:41 am

Post by billyzelsnack
Sun Feb 18, 2007 5:41 am

btw. GEEZ. It sure would be handy to have a working CM5 right now so I could verify that dmtalk is working. haha.
btw. GEEZ. It sure would be handy to have a working CM5 right now so I could verify that dmtalk is working. haha.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by ArnaudBuy » Sun Feb 18, 2007 6:48 pm

Post by ArnaudBuy
Sun Feb 18, 2007 6:48 pm

Here's the source code:
http://robosavvy.com/site/Builders/ArnaudBuy/RoboticsLibrary.zip

Note that I'm not using the virtual COM port but the D2XX Interface.

Could you post me your code, it can help me to resolve your problem ?

Arnaud BUY.
Here's the source code:
http://robosavvy.com/site/Builders/ArnaudBuy/RoboticsLibrary.zip

Note that I'm not using the virtual COM port but the D2XX Interface.

Could you post me your code, it can help me to resolve your problem ?

Arnaud BUY.
ArnaudBuy
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Jan 20, 2007 1:00 am
Location: Lille, France

Post by billyzelsnack » Sun Feb 18, 2007 11:37 pm

Post by billyzelsnack
Sun Feb 18, 2007 11:37 pm

It works! I just wrote a quick little app to use your AX12 lib and it just worked. Thanks Arnaud.

I'm not sure if my dmtalk code is just broke right now or what. I'll experiment over the next few days. It would be nice if the virtual comm stuff works because then you could use the same code with other setups.

1M interface for $30. Talk about awesome.

http://img380.imageshack.us/img380/4317/img2541lz6.jpg

http://img518.imageshack.us/img518/6327/img2543fe4.jpg

Check out that mess of wires! haha.
It works! I just wrote a quick little app to use your AX12 lib and it just worked. Thanks Arnaud.

I'm not sure if my dmtalk code is just broke right now or what. I'll experiment over the next few days. It would be nice if the virtual comm stuff works because then you could use the same code with other setups.

1M interface for $30. Talk about awesome.

http://img380.imageshack.us/img380/4317/img2541lz6.jpg

http://img518.imageshack.us/img518/6327/img2543fe4.jpg

Check out that mess of wires! haha.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Fri Feb 23, 2007 6:53 am

Post by billyzelsnack
Fri Feb 23, 2007 6:53 am

I finally found some time to play with this tonight and I got it working with normal serial calls. Turns out the problem was that at 1Mbit I could not get away with calling write multiple times per packet. By buffering a packet up and sending it off with a single write call it worked with no other changes.

In the process of figuring this out I did also get it working with D2XX. I might keep it around for awhile until I can determine if the latency is lower with it. Hopefully the normal serial version is just as fast and I won't have any reason to have two code paths.

Next step is to see if the read latency is low enough (fingers crossed) .
I finally found some time to play with this tonight and I got it working with normal serial calls. Turns out the problem was that at 1Mbit I could not get away with calling write multiple times per packet. By buffering a packet up and sending it off with a single write call it worked with no other changes.

In the process of figuring this out I did also get it working with D2XX. I might keep it around for awhile until I can determine if the latency is lower with it. Hopefully the normal serial version is just as fast and I won't have any reason to have two code paths.

Next step is to see if the read latency is low enough (fingers crossed) .
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Sat Feb 24, 2007 6:41 am

Post by billyzelsnack
Sat Feb 24, 2007 6:41 am

Arnaud.. What your RETURN_DELAY_TIME set to?

I don't seem to be getting back full packets in either your program or mine. I do seem to be able to get back packets with the first 0xff missing though.

It might be workable, but I'd sure like to know what the deal is. Maybe I need to configure my UM232R with MPROG a little more. hmm.
Arnaud.. What your RETURN_DELAY_TIME set to?

I don't seem to be getting back full packets in either your program or mine. I do seem to be able to get back packets with the first 0xff missing though.

It might be workable, but I'd sure like to know what the deal is. Maybe I need to configure my UM232R with MPROG a little more. hmm.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by ArnaudBuy » Sun Feb 25, 2007 7:36 pm

Post by ArnaudBuy
Sun Feb 25, 2007 7:36 pm

Hi Billy,

My Return Delay Time are set to their initial value (250).
By calling any read method of the AX12 class of my program, I think you necessary have a well formed returned status packet, since the method which is invoked when packets are returned by AX12 compute the checksum and, if invalid, return a null reference.

Arnaud BUY.
Hi Billy,

My Return Delay Time are set to their initial value (250).
By calling any read method of the AX12 class of my program, I think you necessary have a well formed returned status packet, since the method which is invoked when packets are returned by AX12 compute the checksum and, if invalid, return a null reference.

Arnaud BUY.
ArnaudBuy
Robot Builder
Robot Builder
Posts: 12
Joined: Sat Jan 20, 2007 1:00 am
Location: Lille, France

Post by billyzelsnack » Mon Mar 05, 2007 3:40 am

Post by billyzelsnack
Mon Mar 05, 2007 3:40 am

I put some extra instrumentation in the code so it would help show me what was going on.

btw. Any reason why the 5V can't be powered from the USB itself? hmm. I think I'll look into that. Maybe that's what you meant in the first place. haha.
I put some extra instrumentation in the code so it would help show me what was going on.

btw. Any reason why the 5V can't be powered from the USB itself? hmm. I think I'll look into that. Maybe that's what you meant in the first place. haha.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by Biodog » Tue Apr 17, 2007 10:51 am

Post by Biodog
Tue Apr 17, 2007 10:51 am

Hi Billy,

I was looking for your ordering form and I noticed you ordered 2 SN74HC04N and 8 SN74HC126N!? Why that? On Arnaud'scheme we only need one inverter of the six provided by the SN74HC04N and two gates of the eight provided by the SN74HC126N no?
As you can guess I'm not an electronic boy :p
Hi Billy,

I was looking for your ordering form and I noticed you ordered 2 SN74HC04N and 8 SN74HC126N!? Why that? On Arnaud'scheme we only need one inverter of the six provided by the SN74HC04N and two gates of the eight provided by the SN74HC126N no?
As you can guess I'm not an electronic boy :p
Biodog
Robot Builder
Robot Builder
Posts: 17
Joined: Wed Mar 14, 2007 3:31 pm

Post by JonHylands » Tue Apr 17, 2007 1:07 pm

Post by JonHylands
Tue Apr 17, 2007 1:07 pm

I can't speak for Billy, but I ordered five of each, because they cost under a dollar each, and its nice to have spares.

I built this circuit last week using a TSSOP package FT232 chip (soldered to a DIP adapter), with the two logic chips, all on a solderless breadboard. It works great accessing the bus directly as a standard serial port on Windows, at one megabit per second.

Image

I'm going to use this on a custom circuit board (with the TSSOP package buffer and a small SOT-23 inverter) on BrainBot, and plug in a verdex gumstix with wifi. I'll be ordering the PCB probably today, and I'll let you know how it works once I get it set up...

- Jon
I can't speak for Billy, but I ordered five of each, because they cost under a dollar each, and its nice to have spares.

I built this circuit last week using a TSSOP package FT232 chip (soldered to a DIP adapter), with the two logic chips, all on a solderless breadboard. It works great accessing the bus directly as a standard serial port on Windows, at one megabit per second.

Image

I'm going to use this on a custom circuit board (with the TSSOP package buffer and a small SOT-23 inverter) on BrainBot, and plug in a verdex gumstix with wifi. I'll be ordering the PCB probably today, and I'll let you know how it works once I get it set up...

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

Post by billyzelsnack » Tue Apr 17, 2007 10:12 pm

Post by billyzelsnack
Tue Apr 17, 2007 10:12 pm

I just ordered extra because they were cheap.

btw. There were several options to choose from and I just chose one. It may not be correct and might be the reason I never get the first byte in a packet. I've been planning on rebuilding it on a breadboard to see what's up, but I have not found the time yet.
I just ordered extra because they were cheap.

btw. There were several options to choose from and I just chose one. It may not be correct and might be the reason I never get the first byte in a packet. I've been planning on rebuilding it on a breadboard to see what's up, but I have not found the time yet.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by Biodog » Wed Apr 18, 2007 8:06 am

Post by Biodog
Wed Apr 18, 2007 8:06 am

ok guys, thanks for the explanations :)
I think I'll work with the Usb2Dyn at first, but I'll certainly try Arnaud's interface when I'll have enough time to.
ok guys, thanks for the explanations :)
I think I'll work with the Usb2Dyn at first, but I'll certainly try Arnaud's interface when I'll have enough time to.
Biodog
Robot Builder
Robot Builder
Posts: 17
Joined: Wed Mar 14, 2007 3:31 pm

Post by JonHylands » Mon Apr 30, 2007 4:04 pm

Post by JonHylands
Mon Apr 30, 2007 4:04 pm

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 it

This board will allow me to connect directly via USB to my PC to control the robot, or connect the USB to the gumstix and use wifi to the gumstix to control the robot.

A big thanks to Arnaud, who figured this whole USB thing out in the first place...

- Jon
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 it

This board will allow me to connect directly via USB to my PC to control the robot, or connect the USB to the gumstix and use wifi to the gumstix to control the robot.

A big thanks to Arnaud, who figured this whole USB thing out in the first place...

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

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