Phoenix code my MG90 hexapod

Ah - ok. In that case, when you center all servos, it should be fine. Did you try walking?

Lol…You ever do something embarrassingly stupid that you dont want to admit but you have to???

Yea well…looks like i had few things backwards. 1st i thought pins 0,1 and 2 would be tibia0 femur1 coxa 2. So i had that out of order. Then i hadnt realized that 0, 1, and 2 were right rear and and not left front. Im re-wiring now hopefully tgat does the trick.

We’ve all been there… no worries.

Ok I made a video of what it’s doing now. I have no idea what I’m doing wrong here.

youtu.be/uLhi0l9Szag

Is there not a height measurement i need to make?

You likely have two of the servos in each leg plugged in incorrectly - the initial guess being the two servos in the shoulders. Try swapping these.

Ok I spent yesterday making sure all the servos were plugged into the right pin channels. So I have that right, now. I haven’t tried to run it yet but I had a question.

Is there a certain position I need to put the bot in for its first walk. For example most bits that I’ve seen in start up have the femurs and tibia so up so the body is on the ground.

Double checked the wiring one more time using the sequencer utility and calibrated them and all my servos are definitely attached to the right channel pins.

Ok when i first turn on the bot and and then the controller im forced to hit the analog button to get the controller to send commands. Then when you hit the triangle or use the D-pad it brings the tibias up and down but not the femurs. There are no steps either when using the D-pad or the Triangle button, its allthe way up or all the way down. It wants to walk but it wont cause i cant bring the femurs down.

Also im using 1500Mah 11.1v battery with a 9a 5v bec and im getting no battery life. Maybe 5 minutes of trying to experiment. Should i get a 12A or higher?

youtu.be/pIUmaxqD_p8

Based on the video it really does seem like you have the servos plugged into the wrong pins.
lynxmotion.com/images/html/build99f.htm
Consider changing them around a bit. Note that “vertical” means the vertical axis of rotation…

Ok if you look at the config code i posted above, thats what i used to wire the servos. 0=coxa or horizontal 1=vertical or Femur 2= Knee or tibia and so on. I made a vid using the sequencer to show how i have it wired. Hopefully it will finish uploading soon.

Ok here is the vid. I only went through the first leg but i assure you they are all hooked up the same.

youtu.be/0XV5gDv_k60

Head scratcher… likely one of three issues:

  1. Still a chance the servos need to be re-plugged, but from what we can see - seems correct
  2. Issue with the mode of the PS2 controller; don’t necessarily button mash, but reach through the mode section at the bottom of the assembly guide.
  3. Level shifter issue; in rare instances the level shifter is / is not needed and can cause issues.

What battery are you using to power the servos? What chemistry, capacity, voltage and continuous discharge rate?

Uggg i wish yall had customer service after 3pm central and on weekends.

Ok heres what we know.

No level shifter. We tried for over a week to use it but in the end i had to straight wire the RX straight to the botboarduino.

The SSC-32 board works and controls all the servos.

The servos are wired right to the board and the boards are correctly wired to each other.

Im using 7.4v 1000mah lipo for logic and a 11.1v 1500mah lipo battery connected to a 9A 5v BEC voltage regulator.

Yea button mashing bad!!!

When the power is added and the the start button is pushed the femurs come all the way up and will not lower using the d-pad or the triangle button.

When an analog stick is moved it thrashes around wildly trying to walk and the femurs move up and down with the motion but since the start up position is so high the legs wont reach the floor properly.

I think it has something to do with the hex config file. There are measurements called startup feet positions that i think need to be changed since im using a smaller bot and other measurements needed changing. I think its trying to over compensate and therefore wont let me adjust the height of the femurs. For instance it has the CHexInitY is listed at 80mm. Seems like that should be lower since my bot is smaller with shorter legs.

I really think the above is it. Since i had to change the coxa, femur and tibias length, shouldnt i have to change other measurements. Also we have entered alot of Z and X measurements but not a Y.

My question is how do i figure out those measurements?

Can you try the Phoenix code without modifications?

I can try that here shortly but take a look at this…

notes-for-phoenix-code-t9190/90

Aside from what was mentioned previous as possible causes, we cannot see any major difference between your setup and a normal Lynxmotion hexapod. The power configuration is a bit odd, but seems fine. It seems like the robot wants to walk, so it really seems like the two servos are reversed…

Got busy today and couldnt get around to doing anything. Im gonna try it with the unmodified code when i get a chance after i get up.

Hi Duhjoker,

I didn’t read trough the whole thread so it could be that I simply missed something.
The code is designed and tested using Hitec HS-645mg servo’s. These servo’s have a certain relation between pulse length and angle. Default a pulse length of 1500 = 0 deg and brings the servo to the middle position. Please compare the pulse length from the HS-645mg to the servo’s you are using. Make sure that your servos are using the same pulse length for +/-90 deg. Also take a close look at the direction (clockwise or counter clock wise).

I hope this helps.

Xan

The PWM is the same for these servos. 1500= centers them while 500 and 2500 take them fully left or right.

Ok im pleasantly surprised. I uploaded the unmodified code to the board then procrastinated for an hour before trying it so i could be calm in case it didnt work but that serns to have worked.

I can now adjust the height and it walks albeit a lil sloppy but it works. Also now having a small problem of when i hit start to lock the board the legs now come all the way down (lol) propelling the body up.

I still think the IK measurements in the hardware config needs to be changed to match my bot which i presume would take out the sloppiness.

Xan, to do this would i just need to figure the new feet start positions or do i actually need to change a bunch of code. Would you mind helping me explore this option? Or would you already know how to remove the slop?