Hexapod Build Help Needed

Hello!

I have spent easily 12+ hours on troubleshooting trying to get my custom hexapod to work, but have yet to get it to take its first steps. I think I might know what the solution is but I am not sure how to implement it. But first let me start with what it is doing.

Hardware:
Arduino Mega
SSC-32U
PS2 v4
Servos: HJ S3315D

Code:
Latest Phoenix Code from Kurt’s github

The Problem:
As soon as I press start on the PS2 remote the robot freaks out and holds the position below but you can hear some of the servos trying to rotate even more.

Things I have tried:
I connected straight to the SSC-32U and used the software utility to move the servos, they all move correctly and center well.
I checked the baud rate on the SSC-32U and the code, both are set to 38400.
I modified the dimensions of the legs and I only changed the value, not the negative or positive.

Possible Solution?
Do I need to modify any pwm center values in the servo driver code for the specific servos I am using?

I have encountered problem after problem trying to get this to work, so I could vary well be making this problem more complicated than it actually is. so please forgive me if this has already been answered.

Thank you so much in advance for your help!

Hi,

This behaviour shows that the robot is not well calibrated. Please start with downloading the LynxTerm software here and follow these calibration steps (up to Step 10).

Hope this helps,

Hello bdaouas,

I ran through the calibration steps with success but the end result is the same.

you may have noticed in the picture that all of the tibia and femur servos rotated in the same direction by the same amount(until they physically hit something), this is because the left side servos are mounted the same direction as the right side. So I think I need to change the direction of the servos in the code on the right side of the bot and adjust the start position trig. The coxa servos do not change positions because their start position is zero but I am sure once it starts moving half of those will be off.

Any idea what part of the code needs to be modified?

The next step after the calibration would be to use the special version of KurtE code that is intended to work with the SSC-32U and that you can find on Lynxmotion’s Github page here :


Two important considerations to mention :

  1. As indicated in the Readme of the BotBoarduino_CH3R_PS2 code, in order to compile this Arduino code, you will need to install the special version of the Bill Porter’s PS2X library that you can download here
  2. You will also have to modify the Hex_Cfg.h file based on the Phoenix configuration you have :

I have gotten the hex working mostly correct.
As I figured half of my servos needed reversing, this can be done in the Phoenix_Code script,
And then I adjusted the starting feet position, took a lot of adjustment.
Now the hex is walking, but the controller buttons do not line up with the correct hex movements, for instance, right on the right analog stick makes the Hex move forwards and forwards on the right stick doesn’t do anything. I will be looking into changing this, I guess the new PS2 V4 controller doesn’t match the code.