Hexapod Futaba servos! Left right have switched! [FIXED!]

??? :open_mouth:

This is not how things work around here. The phoenix code is used by a lot of people. If everybody starts dropping there changed code on this forum with the question “what’s wrongâ€

Oh yes offcourse, my footer says it all. But that’s not the point I’m trying to make here…

I’m sorry, I didn’t realize i whas doing something wrong.

I really tried to get it to work. Tried different things, but just couldn’t get it to work. And since i’m a total newbie/Noob, i wouldnt know how to solve this. That’s why i asked.

I think that there are some definitions missing but i tried to implement (copy and adjust) some but it was no succes. Still freezes on “cross” button. I wouldn’t know where to put it either. That’s what i wanted to know… Maybe an example??? anyone???

Also i believe this is a forum and i can ask whatever i would like to. If you don’t feel like spending this time for me, that’s ok. But maybe someone else has more time to spend.

Thanx anyway!

We do want to help you solve your problem, but no one has any idea what you’ve done to the code. Just saying “Here’s 20 pages of code, what did I do wrong” isn’t enough info. Give us more information, and we can do the same.

Xan is the author of the program. He is quite brilliant! If you want to edit his code you do want his help!

If you are building a Phoenix like hexapod then the only thing in the code you need to alter is where you define the leg and body dims. If the bot is not working it’s likely a hardware issue and not a software one. We have asked you to post an image because it WILL help us to help you.

I understand,

but i only posted the code because i believe one needs it to tell me where to implement the definitions??

I adjusted the “cross button test” code for the attack mode. As explained in my first post. It’s compiling but freezes the robot on press. before pressing i can use the hexapod as normal.

Dunno, never done it, but it might be in this location…

[code];--------------------------------------------------------------------
;[BODY DIMENSIONS]
CoxaLength con 29 ;Length of the Coxa [mm]
FemurLength con 90 ;Length of the Femur [mm]
TibiaLength con 125 ;Lenght of the Tibia [mm]

CoxaAngle con 60 ;Default Coxa setup angle

RFOffsetX con -36 ;Distance X from center of the body to the Right Front coxa
RFOffsetZ con -95 ;Distance Z from center of the body to the Right Front coxa
RMOffsetX con -63 ;Distance X from center of the body to the Right Middle coxa
RMOffsetZ con 0 ;Distance Z from center of the body to the Right Middle coxa
RROffsetX con -36 ;Distance X from center of the body to the Right Rear coxa
RROffsetZ con 88 ;Distance Z from center of the body to the Right Rear coxa

LFOffsetX con 36 ;Distance X from center of the body to the Left Front coxa
LFOffsetZ con -95 ;Distance Z from center of the body to the Left Front coxa
LMOffsetX con 63 ;Distance X from center of the body to the Left Middle coxa
LMOffsetZ con 0 ;Distance Z from center of the body to the Left Middle coxa
LROffsetX con 36 ;Distance X from center of the body to the Left Rear coxa
LROffsetZ con 88 ;Distance Z from center of the body to the Left Rear coxa
;-------------------------------------------------------------------- [/code]

Like I said there is no reason to change anything in the code till you know the hardware (electronics and mechanics) is assembled and known to be correct…

Here an image of the Hexapod’s rear legs.

http://web2.twitpic.com/img/18671292-6adc96fb627eda17864caf218ef4108f.4a65ef02-full.jpg

Are those futaba S3003 servos?

If so it’s not going to work. They have roughly half the required torque for the size bot you are going for. I don’t think it’s going to take a single step. :frowning:

It is allready walking. Just the left and right is switched around. and yes they’re the futaba S3003. They’re not really powerfull but even with extra ballast it’s still walking fine…

Any chance the Futaba S3003 rotation is reverse to the Hitec HS-645 servo rotation?

Ooh, I wouldn’t know. How can i check this?

I chose for the futaba S3003 because i saw on the internet that a lot of phoenix’es where using them…

Just checked with an HS-645:

900 turns the servo counter-clockwise
1500 centered
2100 turns the servo clockwise

You could ask an old guy who’s been around a while…

Hitec pulses are CW.

Futaba pulses are CCW.

Yes they are reverse…

Quit lying…

JK he right.

Back to the “whats wrong” with the attack (cross), I just took a quick look at it, and the com specifications are different from the servo output code.

Examine both, and I think you’ll see that one is a com, and the other is directly defined. i38400 and 38400 ? Use the com SSC_BAUTE in the attack code.

The Futaba servos run the reverse direction of the Hi-Tec servos. Time to get out the “3000- x” and swap all of the Futaba. Hard to believe the S3003 servos can move a Phoenix!

But yeah, that’s a lot to ask.

Alan KM6VV

I cant seem to find a string “3000-x” in my file.

Can you tell me wat the baute rule schould be exactly? I have no idea wat it means to use the com baute way.

And how should i swap the servo’s? Every leg can be build only one way right? I’d like to know what to change to the setup…

Thank you…

*edit) It seems that i really misinterpretet your message. If i understand right you tell me to buy new servo’s? That’s no option. These servos cost me everything i had…

Because you need to add it in? Your Futaba servos move the opposite direction as a HiTec servo does with the same pulse. So you need to find where the code sends the pulses the SSC-32 and subtract each value from 3000 to invert each pulse.

In pseudocode, that would be 3000-ServoPulse do that for each servo.

In the attack mode part of the code, the baud rate should be i38400. You have it set to just 38400.
There is also a constant in the code that you may want to consider using. So if you set the baud rate to SSC_BAUTE then it would work the same as entering it as i38400.

Hope this helps.

In this case I think “move” is a relative term…

Based on a friend’s DIY hexapod, the S3003/3004 servos can move the legs IF the 'bot is up on a can of CD’s. They may barely support the weight of the 'bot, if helped up. They couldn’t make it walk. Still an interesting build, as the servos were apparently free/cheap.

Yeah, I guess that’s relative motion. Still some fun!

Alan KM6VV