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

Another newbie with questions

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

Another newbie with questions

Post by Juha » Mon Aug 28, 2006 3:20 pm

Post by Juha
Mon Aug 28, 2006 3:20 pm

Hello fellow robotiers.

I just found your nice forum last week, while ones again just surfing around the web for different robotics solutions (like I do so often).

I've been reading these sites for quite some time, and every now and then been thinking that I should actually do something about my interest in robotics one day, and actually try to build something.

The main problem has been, that if I spend many €€€ on some system, it should be the kind which can serve as base for something that can be expanded as far as possible (yeah, you've probably heard this one before...). I don't really want just some toy that moves its joints according to a pre-programmed steps and nothing else.

For example, using just regular servos don't really get you far. I've even been thinking about making my own to be able to chain them, get feed back etc. So, as you might guess, running into the Bioloid/robotis stuff kind of got me interested in this thing again.

Right now I'm thinking if I should spent 600€ on a new 70-300mm lens for my camera or 750€ on the Bioloid comprehensive kit. I can guess what you probably think :)

I have some knowledge about electronics, and plenty more about math/physics and specially programming. Ok, I haven't written a single line of c-code for something like 7 years, I'll probably have re-fresh my memory about that. Java is an everyday thing for me (working as a tech consultant for a small IT company).

So, before I'll actually order the brand new toy, I'd like to ask you a few questions. I apologize if you've been through the same questions with all the newbies. I've read some of the forums messages, but not nearly all of them.

1) First I was meaning to ask you about combining the different robotis servos to a same bus, but I think I got answer for that already. The problem is the voltage, right? DX-servos use a higher voltage then AX, right? But the net protocol is the same?

2) Is there an option / does the included software (on the controller + pc) allow you to send commands directly to the RS485 bus from your computer? I just mean, that testing / analyzing could be a lot easier. Of course, you could always write a piece of code to the controller which would read commands from serial-line and send it to the bus for the servos. Or has anyone hooked into the bus directly without the controller?

3) Continuing the last question, has anyone done their own modules, which you've attached to the RS485 bus?

4) About programming the motions for the robot. The steps you create with the motion editor (that's the name of the software, right?) are probably just "stupid" static steps, right?
What I'm aiming for over here is for functions like "step forward 5cm" and "step forward 2cm", not just "step forward" or "walk". Also "turn left 10 degrees" etc (I wish to include the height of the step too).
Also, I'd like some conditions like if a leg hits something while taking a step -> do this and this.
This probably can not be done with the tools included, and needs to be programmed. However, if you can get the data out of the motion editor in somewhat readable format, for lets say "step 5cm" and "step 2.5cm" (and maybe a couple of others) you should be able to approximate a process for "step 4cm" from the earlier data.
Or course, the other way to do is just to calculated it yourself, but then again with this many DOF it can be a bit pain.
Has anyone done something like this?

5) Expanding the controller: has anyone hooked anything extra to the controller? Gyros etc? I guess there are some pins not used, I2C bus for example would be very nice. There are so many cool little devices for that.

6) Control modules: ok, so there is at least cm-2 and cm-5, what's the difference? The voltage? Cm-2 for dx and cm-5 for ax?

7) One a bit more general question, that kind of materials do you typically use for the structure of your robots? I guess many people cut & bend aluminum?

8) Last important one, are there any reasons why I should go buy some other kit then Bioloid? :)


Hm, I think that's it for now... thanks, hope I made some sense.

Cheers,
Juha

p.s. I know you can't expect to make some kind of Robocop/cylon/c3po out of these kits :)
Hello fellow robotiers.

I just found your nice forum last week, while ones again just surfing around the web for different robotics solutions (like I do so often).

I've been reading these sites for quite some time, and every now and then been thinking that I should actually do something about my interest in robotics one day, and actually try to build something.

The main problem has been, that if I spend many €€€ on some system, it should be the kind which can serve as base for something that can be expanded as far as possible (yeah, you've probably heard this one before...). I don't really want just some toy that moves its joints according to a pre-programmed steps and nothing else.

For example, using just regular servos don't really get you far. I've even been thinking about making my own to be able to chain them, get feed back etc. So, as you might guess, running into the Bioloid/robotis stuff kind of got me interested in this thing again.

Right now I'm thinking if I should spent 600€ on a new 70-300mm lens for my camera or 750€ on the Bioloid comprehensive kit. I can guess what you probably think :)

I have some knowledge about electronics, and plenty more about math/physics and specially programming. Ok, I haven't written a single line of c-code for something like 7 years, I'll probably have re-fresh my memory about that. Java is an everyday thing for me (working as a tech consultant for a small IT company).

So, before I'll actually order the brand new toy, I'd like to ask you a few questions. I apologize if you've been through the same questions with all the newbies. I've read some of the forums messages, but not nearly all of them.

1) First I was meaning to ask you about combining the different robotis servos to a same bus, but I think I got answer for that already. The problem is the voltage, right? DX-servos use a higher voltage then AX, right? But the net protocol is the same?

2) Is there an option / does the included software (on the controller + pc) allow you to send commands directly to the RS485 bus from your computer? I just mean, that testing / analyzing could be a lot easier. Of course, you could always write a piece of code to the controller which would read commands from serial-line and send it to the bus for the servos. Or has anyone hooked into the bus directly without the controller?

3) Continuing the last question, has anyone done their own modules, which you've attached to the RS485 bus?

4) About programming the motions for the robot. The steps you create with the motion editor (that's the name of the software, right?) are probably just "stupid" static steps, right?
What I'm aiming for over here is for functions like "step forward 5cm" and "step forward 2cm", not just "step forward" or "walk". Also "turn left 10 degrees" etc (I wish to include the height of the step too).
Also, I'd like some conditions like if a leg hits something while taking a step -> do this and this.
This probably can not be done with the tools included, and needs to be programmed. However, if you can get the data out of the motion editor in somewhat readable format, for lets say "step 5cm" and "step 2.5cm" (and maybe a couple of others) you should be able to approximate a process for "step 4cm" from the earlier data.
Or course, the other way to do is just to calculated it yourself, but then again with this many DOF it can be a bit pain.
Has anyone done something like this?

5) Expanding the controller: has anyone hooked anything extra to the controller? Gyros etc? I guess there are some pins not used, I2C bus for example would be very nice. There are so many cool little devices for that.

6) Control modules: ok, so there is at least cm-2 and cm-5, what's the difference? The voltage? Cm-2 for dx and cm-5 for ax?

7) One a bit more general question, that kind of materials do you typically use for the structure of your robots? I guess many people cut & bend aluminum?

8) Last important one, are there any reasons why I should go buy some other kit then Bioloid? :)


Hm, I think that's it for now... thanks, hope I made some sense.

Cheers,
Juha

p.s. I know you can't expect to make some kind of Robocop/cylon/c3po out of these kits :)
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by hivemind » Mon Aug 28, 2006 3:47 pm

Post by hivemind
Mon Aug 28, 2006 3:47 pm

Welcome to the forums.

As a robonova user I cannot answer your Bioloid specific questions, such as the motion editor. But I know a lot of the robots you will see here are not just pre-programmed robots as you stated, but more of a creation that everyone can adapt.

The robonova uses a piece of software called "RoboBasic" which uses a point to point technology and command and capture techniques so just about anyone can make a moventment sequence for it. For example, i could clock a button, several of my robots servos would go limp (lets sa a leg) and i could move them, click the button again to turn the motors back on, and the computer would read the position. With a little work, some physics and time, I would have a nice walking gait, purely my own creation.

The Kondo robots and the Manoi use the Heart2Heart software and the KHR-1 even has a 3d physics model posted here on the forums.

The vstone robots are also very nice, but I am not as familiar with their software.

Regardless of the robot you choose they are all open to start as a base. I decided to use a robonova because I liked the command and capture control of it, as well as the nice clean look of the wires. So far i have 6 additional servos in my robot and have created brackets of my own. I designed them on the computer and then fabricated them out of extra-strength aircraft aluminum. I have seen a lot of aluminum used by other users, like beermat and bauermech. But i have seen Viking use carbonfiber which looks very nice. I have even seen robots have wood on their brackets.

Additionally I have two gyros and a 3-axis accelerometer on my robot to help make it more autonomous. So i can create a walking gait and then switch on the gyros and it will stabalize. Similar things are available to the Kondo robots and Bioloid as well (although I have heard people have had trouble with this?).

If you are looking are not worried about money and want to learn a lot and have the best servos, then i suggest you check out the robotis website (same company that makes bioloid) and look at the DX-117 servos and their control board. They use the RS-485 daisy chain, the ATmega128 (also used in robonova, and kondo i believe) So you can use C to use your robot which is much more powerful then the other robots.

Just my $.02, definitely take a long look around and know what you want before you jump on anything :)
Welcome to the forums.

As a robonova user I cannot answer your Bioloid specific questions, such as the motion editor. But I know a lot of the robots you will see here are not just pre-programmed robots as you stated, but more of a creation that everyone can adapt.

The robonova uses a piece of software called "RoboBasic" which uses a point to point technology and command and capture techniques so just about anyone can make a moventment sequence for it. For example, i could clock a button, several of my robots servos would go limp (lets sa a leg) and i could move them, click the button again to turn the motors back on, and the computer would read the position. With a little work, some physics and time, I would have a nice walking gait, purely my own creation.

The Kondo robots and the Manoi use the Heart2Heart software and the KHR-1 even has a 3d physics model posted here on the forums.

The vstone robots are also very nice, but I am not as familiar with their software.

Regardless of the robot you choose they are all open to start as a base. I decided to use a robonova because I liked the command and capture control of it, as well as the nice clean look of the wires. So far i have 6 additional servos in my robot and have created brackets of my own. I designed them on the computer and then fabricated them out of extra-strength aircraft aluminum. I have seen a lot of aluminum used by other users, like beermat and bauermech. But i have seen Viking use carbonfiber which looks very nice. I have even seen robots have wood on their brackets.

Additionally I have two gyros and a 3-axis accelerometer on my robot to help make it more autonomous. So i can create a walking gait and then switch on the gyros and it will stabalize. Similar things are available to the Kondo robots and Bioloid as well (although I have heard people have had trouble with this?).

If you are looking are not worried about money and want to learn a lot and have the best servos, then i suggest you check out the robotis website (same company that makes bioloid) and look at the DX-117 servos and their control board. They use the RS-485 daisy chain, the ATmega128 (also used in robonova, and kondo i believe) So you can use C to use your robot which is much more powerful then the other robots.

Just my $.02, definitely take a long look around and know what you want before you jump on anything :)
Image
hivemind
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 211
Joined: Sat Jul 01, 2006 1:00 am
Location: between my computer and robot.

Post by inaki » Tue Aug 29, 2006 9:08 am

Post by inaki
Tue Aug 29, 2006 9:08 am

AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.

With regards to Bioloid kit:

You can send commands to the servos directly by means of CM5 controller. Of course you might hack the bus and place your own controller.

No known modules other than AXS1 made by Robotis. Again, the AX servos do not use RS485, but TTL serial.

In the motion editor you don't say 'step forward' or 'go to the left', you just program 'positions'. You move the servos of the robot by hand and then you take a snapshot of that position. With several positions chained you get 'motions'. To achieve things like 'play motion to_the_right for 2 seconds' you use Behavior Control Program(BCP), once you have your motions configured. The same goes for other things like: 'go backwards if the front leg is stuck', you use BCP for this.

There are probably many pins not used in the chip but are not easy to reach because they are not 'exported' to an expansion bus in the board. You should hook directly over the chip pins. Perhaps making your own board woul be better if you plan to go this way.

CM5 is used by Bioloid kit only. All other boards are used for DX servos.
You cannot use CM2 board with AX servos nor can use CM5 for DX servos either.
AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.

With regards to Bioloid kit:

You can send commands to the servos directly by means of CM5 controller. Of course you might hack the bus and place your own controller.

No known modules other than AXS1 made by Robotis. Again, the AX servos do not use RS485, but TTL serial.

In the motion editor you don't say 'step forward' or 'go to the left', you just program 'positions'. You move the servos of the robot by hand and then you take a snapshot of that position. With several positions chained you get 'motions'. To achieve things like 'play motion to_the_right for 2 seconds' you use Behavior Control Program(BCP), once you have your motions configured. The same goes for other things like: 'go backwards if the front leg is stuck', you use BCP for this.

There are probably many pins not used in the chip but are not easy to reach because they are not 'exported' to an expansion bus in the board. You should hook directly over the chip pins. Perhaps making your own board woul be better if you plan to go this way.

CM5 is used by Bioloid kit only. All other boards are used for DX servos.
You cannot use CM2 board with AX servos nor can use CM5 for DX servos either.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by Juha » Tue Aug 29, 2006 11:03 am

Post by Juha
Tue Aug 29, 2006 11:03 am

Hi guys, and thanks for your replies.

hivemind wrote:But I know a lot of the robots you will see here are not just pre-programmed robots as you stated, but more of a creation that everyone can adapt.


Yes, I'm sure they are. It's just that I'm trying to figure out how to do this with available platforms.

hivemind wrote:For example, i could clock a button, several of my robots servos would go limp (lets sa a leg) and i could move them, click the button again to turn the motors back on, and the computer would read the position.


Very nice. I've been thinking about the same thing, even if with a bit different approach. If you get feed back from servos (torque) you could make them "follow" you.

hivemind wrote:Additionally I have two gyros and a 3-axis accelerometer on my robot to help make it more autonomous. So i can create a walking gait and then switch on the gyros and it will stabalize.


Cool. Could you post me a link for example to the gyros/accelerometer you use?

Do you use the gyros to stabilize the torso or some other part of the robot, or do you actually use it (+ the accelerometer) to keep the robot from falling down? (sorry if it's a stupid question..)

hivemind wrote:Similar things are available to the Kondo robots and Bioloid as well (although I have heard people have had trouble with this?).


Yes, from what I've understood, is that attaching gyros etc to bioloid has been a bit pain.. and this is what worries me a little bit.

hivemind wrote:If you are looking are not worried about money and want to learn a lot and have the best servos, then i suggest you check out the robotis website (same company that makes bioloid) and look at the DX-117 servos and their control board.


Well, unfortunately the money typically is an issue with most of us :)

Yeah, dx-servos seem very nice.

hivemind wrote:Just my $.02, definitely take a long look around and know what you want before you jump on anything :)


Agreed ... Then again, I've been doing it for few years already :)

Every now and then I run into something cool and think "ok this is the thing I'm going to start with", but after a little more research I find something which sucks.

inaki wrote:AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.


Ok. They probably have some reason to have 2 different communication protocols, but it's a bit stupid.. would be so nice to mix AX and DX.

inaki wrote:You can send commands to the servos directly by means of CM5 controller. Of course you might hack the bus and place your own controller.


Sure you can. But I was wondering, if you could for example run the controller in somekind of "pass-through-mode" and send the commands from my laptop instead.

inaki wrote:No known modules other than AXS1 made by Robotis.


Ok. Well I could imagine people planning on these...

inaki wrote:In the motion editor you don't say 'step forward' or 'go to the left', you just program 'positions'. You move the servos of the robot by hand and then you take a snapshot of that position. With several positions chained you get 'motions'.


Obviously.

I'll try to explain again. Lets say you make a motion sequence like

servo 1 : +15 (degrees for example)
servo 2 : -20
servo 3 : +10
servo 1 : -15

Of course, actually making a step is lot more complex, but still lets say this would be a step for example. So what you end up with is a sequence for one particular step. It steps the foot lets say 5cm forward on the same level it started from (the floor).

What I was trying to say, is to create the sequence more dynamic so that you could make a step which would take the foot 2, 3 or 4cm forward.

Sure you might be able to make some kind of parser for example. You'd specify a sequence "template":

servo 1 : +x*3 (degrees for example)
servo 2 : -x*4
servo 3 : +x*2
servo 1 : -x*3

and then call "somemethod(5)" and this would create the original sequence (just multiplying probably would not be enough, you'd need sin() + cos() etc).

And how you could do the template, is first specifying steps for 1,2,3,4,5cm and then approximating the template from then (does not need to be done by hand).

inaki wrote: To achieve things like 'play motion to_the_right for 2 seconds' you use Behavior Control Program(BCP), once you have your motions configured. The same goes for other things like: 'go backwards if the front leg is stuck', you use BCP for this.


So BCP can run a "static" sequence, but it can get feed back from the sequence (some max torque met?) and make choices according to that data?

inaki wrote:There are probably many pins not used in the chip but are not easy to reach because they are not 'exported' to an expansion bus in the board.


Yeah this really sounds like a down side of the kit.

Cheers,
Juha
Hi guys, and thanks for your replies.

hivemind wrote:But I know a lot of the robots you will see here are not just pre-programmed robots as you stated, but more of a creation that everyone can adapt.


Yes, I'm sure they are. It's just that I'm trying to figure out how to do this with available platforms.

hivemind wrote:For example, i could clock a button, several of my robots servos would go limp (lets sa a leg) and i could move them, click the button again to turn the motors back on, and the computer would read the position.


Very nice. I've been thinking about the same thing, even if with a bit different approach. If you get feed back from servos (torque) you could make them "follow" you.

hivemind wrote:Additionally I have two gyros and a 3-axis accelerometer on my robot to help make it more autonomous. So i can create a walking gait and then switch on the gyros and it will stabalize.


Cool. Could you post me a link for example to the gyros/accelerometer you use?

Do you use the gyros to stabilize the torso or some other part of the robot, or do you actually use it (+ the accelerometer) to keep the robot from falling down? (sorry if it's a stupid question..)

hivemind wrote:Similar things are available to the Kondo robots and Bioloid as well (although I have heard people have had trouble with this?).


Yes, from what I've understood, is that attaching gyros etc to bioloid has been a bit pain.. and this is what worries me a little bit.

hivemind wrote:If you are looking are not worried about money and want to learn a lot and have the best servos, then i suggest you check out the robotis website (same company that makes bioloid) and look at the DX-117 servos and their control board.


Well, unfortunately the money typically is an issue with most of us :)

Yeah, dx-servos seem very nice.

hivemind wrote:Just my $.02, definitely take a long look around and know what you want before you jump on anything :)


Agreed ... Then again, I've been doing it for few years already :)

Every now and then I run into something cool and think "ok this is the thing I'm going to start with", but after a little more research I find something which sucks.

inaki wrote:AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.


Ok. They probably have some reason to have 2 different communication protocols, but it's a bit stupid.. would be so nice to mix AX and DX.

inaki wrote:You can send commands to the servos directly by means of CM5 controller. Of course you might hack the bus and place your own controller.


Sure you can. But I was wondering, if you could for example run the controller in somekind of "pass-through-mode" and send the commands from my laptop instead.

inaki wrote:No known modules other than AXS1 made by Robotis.


Ok. Well I could imagine people planning on these...

inaki wrote:In the motion editor you don't say 'step forward' or 'go to the left', you just program 'positions'. You move the servos of the robot by hand and then you take a snapshot of that position. With several positions chained you get 'motions'.


Obviously.

I'll try to explain again. Lets say you make a motion sequence like

servo 1 : +15 (degrees for example)
servo 2 : -20
servo 3 : +10
servo 1 : -15

Of course, actually making a step is lot more complex, but still lets say this would be a step for example. So what you end up with is a sequence for one particular step. It steps the foot lets say 5cm forward on the same level it started from (the floor).

What I was trying to say, is to create the sequence more dynamic so that you could make a step which would take the foot 2, 3 or 4cm forward.

Sure you might be able to make some kind of parser for example. You'd specify a sequence "template":

servo 1 : +x*3 (degrees for example)
servo 2 : -x*4
servo 3 : +x*2
servo 1 : -x*3

and then call "somemethod(5)" and this would create the original sequence (just multiplying probably would not be enough, you'd need sin() + cos() etc).

And how you could do the template, is first specifying steps for 1,2,3,4,5cm and then approximating the template from then (does not need to be done by hand).

inaki wrote: To achieve things like 'play motion to_the_right for 2 seconds' you use Behavior Control Program(BCP), once you have your motions configured. The same goes for other things like: 'go backwards if the front leg is stuck', you use BCP for this.


So BCP can run a "static" sequence, but it can get feed back from the sequence (some max torque met?) and make choices according to that data?

inaki wrote:There are probably many pins not used in the chip but are not easy to reach because they are not 'exported' to an expansion bus in the board.


Yeah this really sounds like a down side of the kit.

Cheers,
Juha
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by Robo1 » Tue Aug 29, 2006 11:40 am

Post by Robo1
Tue Aug 29, 2006 11:40 am

my little bit of advise,

If you a newbie I would say stick to the khr or robonova as there are lots more posts and people with the robot. This is because there are more people who can help and more threads about what other people have done/doing.

But apart from that you can use any model for a starting point, I've got a khr-2 and love playing with it and have many plans. your talk about making servo, is similar to my idea off adding a new pic to each or groups of servos and having a single controller to send them a position. this way hopefully it will speed up the cycle time of the whole system.

hope this helps

bren
my little bit of advise,

If you a newbie I would say stick to the khr or robonova as there are lots more posts and people with the robot. This is because there are more people who can help and more threads about what other people have done/doing.

But apart from that you can use any model for a starting point, I've got a khr-2 and love playing with it and have many plans. your talk about making servo, is similar to my idea off adding a new pic to each or groups of servos and having a single controller to send them a position. this way hopefully it will speed up the cycle time of the whole system.

hope this helps

bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Juha » Wed Aug 30, 2006 2:26 pm

Post by Juha
Wed Aug 30, 2006 2:26 pm

Robo1 wrote:If you a newbie I would say stick to the khr or robonova as there are lots more posts and people with the robot.


Yes, this is one important thing too.

Robo1 wrote:your talk about making servo, is similar to my idea off adding a new pic to each or groups of servos and having a single controller to send them a position. this way hopefully it will speed up the cycle time of the whole system.


I've seen really cool solutions like this.. where you have for example i2c bus where you attach the servos. Also, if you made the servos from scratch, you could put more torque instead of speed (I think torque is typically what we're missing, these servos tend to be quite fast).

But then again, making lets say 20 of these... can be quite a big work, and end up costing a lot too.

inaki wrote:AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.


I actually have to get back to this: yes, after checking the manuals with a bit more time, the communication of AX and DX is totally different.

About the AX communication, in the end the system is very simple. It's just that you have to be aware that it does not allow you to do certain things. Like slaves can't initiate transmission.

Lets say you make your own module with a pressure sensor(s). You place at the bottom of the foot, and you want to know, when the foot hits the floor (or something else).

You can't expect this module to send you the data when some condition is met. Instead (as far as how I understood it) the master has to poll the slave (sent request, change direction of the bus, read reply, change direction back). Then again, this should not be a problem since the bus is quite fast, and little data is needed to be sent.

Also slave-to-slave communication is not directly supported, but can of course be done on software level (routing messages through master).

So after checking a bit more deeply in to this.. I think it's safe to say, that you can quite easily:
a) make new modules, just get some chip with UART + few transistors to fix it to half-duplex
b) replace the controller with your own version

Especially since the software level communication protocol is quite well descibed in the manuals.

I've been meaning to buy this atmel programmin board, I might have to do that if I actually end up buying bioloid kit :)
Robo1 wrote:If you a newbie I would say stick to the khr or robonova as there are lots more posts and people with the robot.


Yes, this is one important thing too.

Robo1 wrote:your talk about making servo, is similar to my idea off adding a new pic to each or groups of servos and having a single controller to send them a position. this way hopefully it will speed up the cycle time of the whole system.


I've seen really cool solutions like this.. where you have for example i2c bus where you attach the servos. Also, if you made the servos from scratch, you could put more torque instead of speed (I think torque is typically what we're missing, these servos tend to be quite fast).

But then again, making lets say 20 of these... can be quite a big work, and end up costing a lot too.

inaki wrote:AX and DX servos cannot be mixed in the same chain because they use different communication methods. AX servos use TTL serial while DX servos use RS485 and CAN.


I actually have to get back to this: yes, after checking the manuals with a bit more time, the communication of AX and DX is totally different.

About the AX communication, in the end the system is very simple. It's just that you have to be aware that it does not allow you to do certain things. Like slaves can't initiate transmission.

Lets say you make your own module with a pressure sensor(s). You place at the bottom of the foot, and you want to know, when the foot hits the floor (or something else).

You can't expect this module to send you the data when some condition is met. Instead (as far as how I understood it) the master has to poll the slave (sent request, change direction of the bus, read reply, change direction back). Then again, this should not be a problem since the bus is quite fast, and little data is needed to be sent.

Also slave-to-slave communication is not directly supported, but can of course be done on software level (routing messages through master).

So after checking a bit more deeply in to this.. I think it's safe to say, that you can quite easily:
a) make new modules, just get some chip with UART + few transistors to fix it to half-duplex
b) replace the controller with your own version

Especially since the software level communication protocol is quite well descibed in the manuals.

I've been meaning to buy this atmel programmin board, I might have to do that if I actually end up buying bioloid kit :)
Juha
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 30
Joined: Fri Aug 25, 2006 1:00 am
Location: Helsinki, Finland

Post by limor » Thu Sep 07, 2006 10:11 am

Post by limor
Thu Sep 07, 2006 10:11 am

Juha,

I would recomend that you go straight for the AVRStudio development environment to acheive your goals.
The communication bus is quite basic and can be tweaked around and an Atmel programmer is not needed since the CM5 comes with a bootloader which can read code through the serial line.

Here is an example (taken from example.c that was posted on the thread "August update") of code (C/C++) used to send a servo to a given position:
Code: Select all
 // print to and wait for anything from serial port attached to PC
  TxDString("\r\n\n Example 8. Go 0x3ff with Speed 0x3ff -- Any Key to Continue."); RxD8();
 // gbpParameter[] is a global var..
  gbpParameter[0] = P_GOAL_POSITION_L;

  gbpParameter[1] = 0xff; //Writing Data P_GOAL_POSITION_L
  gbpParameter[2] = 0x03; //Writing Data P_GOAL_POSITION_H
  gbpParameter[3] = 0xff; //Writing Data P_GOAL_SPEED_L
  gbpParameter[4] = 0x03; //Writing Data P_GOAL_SPEED_H

 // bID is the servo ID; transmits the data to RS485 port
  bTxPacketLength = TxPacket(bID,INST_WRITE,5);
  bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE); // wait for servo to respond


There is no example code for the sensor or servo side of the bus but there is a small example in example.c

Code: Select all
  TxDString("\r\n\n Example 2. Read Firmware Version. -- Any Key to Continue."); RxD8();
  gbpParameter[0] = P_VERSION; //Address of Firmware Version
  gbpParameter[1] = 1; //Read Length
 // sends to servo bID
  bTxPacketLength = TxPacket(bID,INST_READ,2);
 // and now wait for a response from the servo
  bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE +
         gbpParameter[1]);

// print stuff to the PC's serial line
  TxDString("\r\n TxD:");
  PrintBuffer(gbpTxBuffer,bTxPacketLength);
  TxDString("\r\n RxD:");
  PrintBuffer(gbpRxBuffer,bRxPacketLength);
  if(bRxPacketLength == DEFAULT_RETURN_PACKET_SIZE +
          gbpParameter[1])
  {
    TxDString("\r\n Return Error      : ");
    TxD8Hex(gbpRxBuffer[4]);
    TxDString("\r\n Firmware Version  : ");
    TxD8Hex(gbpRxBuffer[5]);
  }


This code is very "low level" and does not utilize any of the many advanced C++ encapsulation libraries and shortcuts that are out there.
info about the registers and ports of Atmega128 and development libraries can be found on avrfreaks and google.
Juha,

I would recomend that you go straight for the AVRStudio development environment to acheive your goals.
The communication bus is quite basic and can be tweaked around and an Atmel programmer is not needed since the CM5 comes with a bootloader which can read code through the serial line.

Here is an example (taken from example.c that was posted on the thread "August update") of code (C/C++) used to send a servo to a given position:
Code: Select all
 // print to and wait for anything from serial port attached to PC
  TxDString("\r\n\n Example 8. Go 0x3ff with Speed 0x3ff -- Any Key to Continue."); RxD8();
 // gbpParameter[] is a global var..
  gbpParameter[0] = P_GOAL_POSITION_L;

  gbpParameter[1] = 0xff; //Writing Data P_GOAL_POSITION_L
  gbpParameter[2] = 0x03; //Writing Data P_GOAL_POSITION_H
  gbpParameter[3] = 0xff; //Writing Data P_GOAL_SPEED_L
  gbpParameter[4] = 0x03; //Writing Data P_GOAL_SPEED_H

 // bID is the servo ID; transmits the data to RS485 port
  bTxPacketLength = TxPacket(bID,INST_WRITE,5);
  bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE); // wait for servo to respond


There is no example code for the sensor or servo side of the bus but there is a small example in example.c

Code: Select all
  TxDString("\r\n\n Example 2. Read Firmware Version. -- Any Key to Continue."); RxD8();
  gbpParameter[0] = P_VERSION; //Address of Firmware Version
  gbpParameter[1] = 1; //Read Length
 // sends to servo bID
  bTxPacketLength = TxPacket(bID,INST_READ,2);
 // and now wait for a response from the servo
  bRxPacketLength = RxPacket(DEFAULT_RETURN_PACKET_SIZE +
         gbpParameter[1]);

// print stuff to the PC's serial line
  TxDString("\r\n TxD:");
  PrintBuffer(gbpTxBuffer,bTxPacketLength);
  TxDString("\r\n RxD:");
  PrintBuffer(gbpRxBuffer,bRxPacketLength);
  if(bRxPacketLength == DEFAULT_RETURN_PACKET_SIZE +
          gbpParameter[1])
  {
    TxDString("\r\n Return Error      : ");
    TxD8Hex(gbpRxBuffer[4]);
    TxDString("\r\n Firmware Version  : ");
    TxD8Hex(gbpRxBuffer[5]);
  }


This code is very "low level" and does not utilize any of the many advanced C++ encapsulation libraries and shortcuts that are out there.
info about the registers and ports of Atmega128 and development libraries can be found on avrfreaks and google.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK


7 postsPage 1 of 1
7 postsPage 1 of 1