Hexapod ,Need some help ~~

Hi, I bought a SSC-32 , Atom pro and BotBoard II from this site ,and I followed the tutorial lynxmotion.com/images/html/build139.htm .
my servo channel numbering is as below:
Servo Channels and Schematic Label Explanations
RRH / 08 Right Rear Horizontal Hip LRH / 24 Left Rear Horizontal Hip
RRV / 09 Right Rear Vertical Hip LRV / 25 Left Rear Vertical Hip
RRK / 10 Right Rear Knee LRK / 26 Left Rear Knee
RMH / 04 Right Middle Horizontal Hip LMH / 20 Left Middle Horizontal Hip
RMV / 05 Right Middle Vertical Hip LMV / 21 Left Middle Vertical Hip
RMK / 06 Right Middle Knee LMK / 22 Left Middle Knee
RFH / 00 Right Front Horizontal Hip LFH / 16 Left Front Horizontal Hip
RFV / 01 Right Front Vertical Hip LFV / 17 Left Front Vertical Hip
RFK / 02 Right Front Knee LFK / 18 Left Front Knee

and also using lynxmotion.com/images/files/phoenix1.3.bas sample code and modified some
codes which are PIN [NUMBERS] as above ,then program onto Atom Pro .

Every thing is Ok as this tutorial specifys ,then I applied power to both boards and PSX controller work.
But, when I press “start” key on PSX controller , the Hexapod stands up , and these servos go with wrong and unexpected angle and position.

Can somebody help me solve this problem or spot where the problem might be?

Truly appreciate.

The problem might be when you assembled the robots leg. Have you built three right legs and three left legs? So the right and left mirror each other? Also it might be worth checking to see if the servo orientations are correct with the servo horns facing the right way. Please refer to assembly instructions. Hope this helps. Good luck.

:User responce by cell phone

Good idea innerbreed, that could be it. But he never mentioned what servo brand he is using. It could be that they have the opposite response as Hitec servos do. That would also look pretty chaotic in operation.

miaojack, check your servos to see which direction they move with longer pulses. A Hitec servo will move the output shaft in the CCW direction with pulses less than 1500uS and it will move in the CW direction with pulses longer than 1500uS.

another good idea jim. didnt think of that.

Thanks for yours response.

  1. I using GWS S03T 2BB MG servo (do you both ever hear that ?)
  2. I already followed the tutorial, maybe I missed something ,I 'll review again.

If you have more info , please give me a hint .

Best regards,

miaojack, check your servos to see which direction they move with longer pulses. A Hitec servo will move the output shaft in the CCW direction with pulses less than 1500uS and it will move in the CW direction with pulses longer than 1500uS.

I have heard of them but I have never used them. Please do the test above so we know if they are the same as Hitec servos.

I’m using GWS S03N servos in a MicroMouse. The GWS S03TXF is 69 oz/in, somewhere in-between a '422 and a '475/485. So the torque is a little low, below that of the minimal '475 recommended for a 'hex. I don’t remember if the direction is different, let me know if you can’t determine it.

I’d bring up each servo individually with one of the PowerPod tools, or SEQ and insure the “home” is set properly. You can also verify the servo channel assignment this way.

Also the hex bots can be built with either half left/ half right legs, or all legs the same. Make sure yours match! Although legs can be “flipped” in the software.

Another thing to watch is the “front/back” of SSC-32 board. There are two ways to “wire up” the 'bot. A #define (conditional compile statement) in the software covers that.

Alan KM6VV

I had do the test above , It’s really different . Using LynxTerm to test ,the result as below:
800 -> CW, which means goes right
1500 -> middle
2200 -> CCW,which means goes left

How to do for this different??
Thanks for your response.Please give me more hint .

Best regards,

Yes the program will need to be modified for those servos. I will not be able to help you with this. You are at the mercy of the programming gurus here…

if the servos are in reverse and you need to reverse the command in the code you will need to locate the servodriver sub and change the output.

[code]ServoDriver:
;Front Right leg
serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,“P”,dec TOINT(TOFLOAT(-RFCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RFFemurPin,“P”,dec TOINT(TOFLOAT(-RFFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RFTibiaPin,“P”,dec TOINT(TOFLOAT(-RFTibiaAngle+90)/0.10588238)+650]

;Middle Right leg
serout SSC_OUT,SSC_BAUTE,"#",dec RMCoxaPin,“P”,dec TOINT(TOFLOAT(-RMCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RMFemurPin,“P”,dec TOINT(TOFLOAT(-RMFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RMTibiaPin,“P”,dec TOINT(TOFLOAT(-RMTibiaAngle+90)/0.10588238)+650]

;Rear Right leg
serout SSC_OUT,SSC_BAUTE,"#",dec RRCoxaPin,“P”,dec TOINT(TOFLOAT(-RRCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RRFemurPin,“P”,dec TOINT(TOFLOAT(-RRFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec RRTibiaPin,“P”,dec TOINT(TOFLOAT(-RRTibiaAngle+90)/0.10588238)+650]

;Front Left leg
serout SSC_OUT,SSC_BAUTE,"#",dec LFCoxaPin,“P”,dec TOINT(TOFLOAT(LFCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LFFemurPin,“P”,dec TOINT(TOFLOAT(LFFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LFTibiaPin ,“P”,dec TOINT(TOFLOAT(LFTibiaAngle+90)/0.10588238)+650]

;Middle Left leg
serout SSC_OUT,SSC_BAUTE,"#",dec LMCoxaPin,“P”,dec TOINT(TOFLOAT(LMCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LMFemurPin,“P”,dec TOINT(TOFLOAT(LMFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LMTibiaPin,“P”,dec TOINT(TOFLOAT(LMTibiaAngle+90)/0.10588238)+650]

;Rear Left leg
serout SSC_OUT,SSC_BAUTE,"#",dec LRCoxaPin,“P”,dec TOINT(TOFLOAT(LRCoxaAngle +90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LRFemurPin,“P”,dec TOINT(TOFLOAT(LRFemurAngle+90)/0.10588238)+650]
serout SSC_OUT,SSC_BAUTE,"#",dec LRTibiaPin,“P”,dec TOINT(TOFLOAT(LRTibiaAngle+90)/0.10588238)+650]
[/code]

what i mean is this:
we will start with the right front leg.

serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,"P",dec TOINT(TOFLOAT(-RFCoxaAngle +90)/0.10588238)+650] serout SSC_OUT,SSC_BAUTE,"#",dec RFFemurPin,"P",dec TOINT(TOFLOAT(-RFFemurAngle+90)/0.10588238)+650] serout SSC_OUT,SSC_BAUTE,"#",dec RFTibiaPin,"P",dec TOINT(TOFLOAT(-RFTibiaAngle+90)/0.10588238)+650]

now it should be:

serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,"P",dec TOINT(TOFLOAT(RFCoxaAngle +90)/0.10588238)+650] serout SSC_OUT,SSC_BAUTE,"#",dec RFFemurPin,"P",dec TOINT(TOFLOAT(RFFemurAngle+90)/0.10588238)+650] serout SSC_OUT,SSC_BAUTE,"#",dec RFTibiaPin,"P",dec TOINT(TOFLOAT(RFTibiaAngle+90)/0.10588238)+650]
i have removed the - just before RFCoxaAngle near the end of each line.

you will need to do this for all the servos that are working the other way.

good luck, hope this helps. :wink:

Thanks for your help.
In my understanding , all the servo must be reverse .
the codes would be like as below:

ServoDriver:
  ;Front Right leg
  serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,"P",dec TOINT(TOFLOAT(RFCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RFFemurPin,"P",dec TOINT(TOFLOAT(RFFemurAngle+90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RFTibiaPin,"P",dec TOINT(TOFLOAT(RFTibiaAngle+90)/0.10588238)+650]

  ;Middle Right leg
  serout SSC_OUT,SSC_BAUTE,"#",dec RMCoxaPin,"P",dec TOINT(TOFLOAT(RMCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RMFemurPin,"P",dec TOINT(TOFLOAT(RMFemurAngle+90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RMTibiaPin,"P",dec TOINT(TOFLOAT(RMTibiaAngle+90)/0.10588238)+650]

  ;Rear Right leg
  serout SSC_OUT,SSC_BAUTE,"#",dec RRCoxaPin,"P",dec TOINT(TOFLOAT(RRCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RRFemurPin,"P",dec TOINT(TOFLOAT(RRFemurAngle+90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec RRTibiaPin,"P",dec TOINT(TOFLOAT(RRTibiaAngle+90)/0.10588238)+650]

  ;Front Left leg
  serout SSC_OUT,SSC_BAUTE,"#",dec LFCoxaPin,"P",dec TOINT(TOFLOAT(-LFCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec LFFemurPin,"P",dec TOINT(TOFLOAT(-LFFemurAngle+90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec LFTibiaPin ,"P",dec TOINT(TOFLOAT(-LFTibiaAngle+90)/0.10588238)+650]
   
  ;Middle Left leg
  serout SSC_OUT,SSC_BAUTE,"#",dec LMCoxaPin,"P",dec TOINT(TOFLOAT(-LMCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec LMFemurPin,"P",dec TOINT(TOFLOAT(-LMFemurAngle+90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec LMTibiaPin,"P",dec TOINT(TOFLOAT(-LMTibiaAngle+90)/0.10588238)+650]
 
  ;Rear Left leg
  serout SSC_OUT,SSC_BAUTE,"#",dec LRCoxaPin,"P",dec TOINT(TOFLOAT(-LRCoxaAngle +90)/0.10588238)+650]
  serout SSC_OUT,SSC_BAUTE,"#",dec LRFemurPin,"P",dec TOINT(TOFLOAT(-LRFemurAngle+90)/0.10588238)+650]     
  serout SSC_OUT,SSC_BAUTE,"#",dec LRTibiaPin,"P",dec TOINT(TOFLOAT(-LRTibiaAngle+90)/0.10588238)+650]

If I 'm right,the hexapod will walking correctly . am I right ?

Try it and tell us if it’s right. lol :slight_smile:

yes this should be correct. im guessing that when you started it, either side when either up and the other down…?
anyway have you tested it yet?
if it doesn’t can you post a picture of the robot so i can see the assembly. :wink:

Thanks guys, It’s works~~~

great. happy its work for you. look forward to seeing your project.

um, got any good idea’s for reversing 1 femur servo in version 2 of Xan’s code or 1 tibia , or 1 coxa etc…

That seems a bit tricky. ok you could try adding - to the pin in the bytetable like this on the one you with to reverse:

cCoxaPin 	byteTable -cRRCoxaPin,  cRMCoxaPin,  cRFCoxaPin,  cLRCoxaPin,  cLMCoxaPin,  cLFCoxaPin

it compiles but iv not tested it,

or in [Main] you may be able to do this for cRF etc:

;Sync BAP with SSC while walking to ensure the prev is completed before sending the next one IF (GaitPosX(-cRF) OR GaitPosX(cRM) OR GaitPosX(cRR) OR GaitPosX(cLF) OR GaitPosX(cLM) OR GaitPosX(cLR) OR | GaitPosY(cRF) OR GaitPosY(cRM) OR GaitPosY(cRR) OR GaitPosY(cLF) OR GaitPosY(cLM) OR GaitPosY(cLR) OR | GaitPosZ(cRF) OR GaitPosZ(cRM) OR GaitPosZ(cRR) OR GaitPosZ(cLF) OR GaitPosZ(cLM) OR GaitPosZ(cLR) OR | GaitRotY(cRF) OR GaitRotY(cRM) OR GaitRotY(cRR) OR GaitRotY(cLF) OR GaitRotY(cLM) OR GaitRotY(cLR)) THEN

I tried a few code options but was getting a headache so I opted to alter the mechanical design instead…it was quicker and works just fine.
thanks for the code thou.