Phoenix code on Arduino and SSC-32u

Has anyone had any success running CH3R code on regular Arduino Uno and not Botboarduino?
I’ve verified that I can communicate with SSC-32 via TX/RX and Software serial. For example I can move one of the tibias using

mySerial.println ("#2P1100S750");

But I’m not getting any response when I’m running BotBoarduino_CH3R_PS2 sketch… It compiles ok.
Will it do anything if Joystick not connected? I think it’s not communicating with SSC-32 for some strange reason…

I’m building a phoenix hexapod with MG996R servos, Arduino and SSC-32U controller.
At this point I feel very lost as I’m not sure what exactly is happening with this robot. I have few question, hoping someone can answer or at least provide me with some information :slight_smile:
I’ve tried using Arduino UNO and as far as I can tell everything was hooked up right. I used latest “BotBoarduino_CH3R_PS2” sketch and PS2 controller. It doesn’t communicate with SSC-32U using that sketch. I wrote simple test sketch to send predefined commands with Software Serial and SSC-32U responded. What is so different between Uno and Botboarduino that it prevents it from working?
I found an old Arduino program that works on Arduino Mega. Its older version of Phoenix code,that’s very slim (and I made it even slimmer by removing Sound and XBee functionality).
You can see code here.
I uses second UART on Mega and it actually works! Well kind of . I can control my hexapod to a point. It doesn’t really walk, it kind of stumbles and falls sometimes. It can turn and body translations work. Something is really off tho. It hits servos when legs are moving, and worst part it moves WAY TOO FAST. I can’t find a way to slow it down. I’ve attempted to calibrate, measured leg lengths, etc. but it has very little effect. For example when I press “start” on PS2 controller, Hexapod stands up very tall. If I walk in this positoin, it will fall.
Are all my issues due to MG996R servos instead of more expensive ones used in original design? I can’t afford spending $600 on those right now :frowning: MG996R are actually faster, and have more torque so it should work in theory. They are of course lower in quality… But I’ve seen youtube videos where people successfully used them on the same frame…
This one is total mystery to me. When I power on my hexapod, it goes into a “seizure”. Meaning all servos go nuts and it curls into a little ball. I know this happens because servos do not receive control signal. Once I press start on PS2 controller it “uncurls” and works normally. I even programmed simulated “start” right a program startup so this doesn’t happen. But official Lynxmotion Phoenix code doesn’t have this, so why those robot don’t go into a “seizure” when the powered on? There’s only one switch, that powers both SSC-32U and controller boards, so there must be a period of time servos don’t receive control signal… How can this be explained?
Finally, I know this one might be difficult to answer. I tried to modify original “BotBoarduino_CH3R_PS2” sketch to work on Arduino Mega using Serial1 instead of SoftwareSerial. After uploading Mega goes “heywire” and communication port becomes unavailable, so Arduino IDE no longer sees it. This is strange, since I’m not using Serial, but Serial1 for all communications with SSC-32U. I can’t explain why it’s happening

Here’s a video my “drunk” hexapod:

BTW I’m powering it with 3S Lipo (4500 mA) battery and 30 Amp 12 to 6V regulator (which I realized was too big and heavy to mount into the frame, but great for testing)…

Preliminary replies:

  1. The Uno uses the same main chip as the BotBoarduino (328). Just be sure all of the connections are correct by verifying in the code. Same for connections to a PS2 receiver.
  2. Perhaps a power issue?
  3. Very specific to your code if the Phoenix code works well.
  4. This will take some thinking…

Thanks a lot for replying!

  1. I thought so, too. I will try again, I think maybe I was using too high baud rate for SoftwareSerial linrary. PS2 was wired correctly, I was able to check it with PSX library example.
  2. Unlikely. I’m using 30c lypo and 20Amp regulator…

In regular phoenix code how do you slow down movements? Its very difficult to tune positions when legs flying at insane speed, colliding etc. :slight_smile:. Is there a global var?

Can you raise the hexapod’s body off the ground so its legs dangle, and see if the motion makes sense?
Did you calibrate each servo’s position so the robot is perfectly level?

Yup, I put it on tall CD-r case :slight_smile: At 1500 all servos set to correct position, well at least femur and tibia. Coxa angle confuses me a bit at front and back. Servos come too close especially on front, but if mov them apart they start hitting middle legs.
Again if I could find a way to slow down global speed, it would be easier to judge if movements mak sense. As is legs are moving way to fast for my eyes…

BTW I really appreciate your help! I know you guys don’t support Phoenix code and unusual configurations :slight_smile:

Double-check the servo pulses as compared to a standard Hitec 422 / 645 servo to check that it’s rotating in the correct direction (at each position), and also double-check your mounting. You may need to do this joint by joint.

Will do! Thanks for the suggestion!
BTW are Hitec 422 strong enough to handle all the load on their own?

In the shoulder, yes, but the 422 is not enough to support the weight of a hexapod vertically against gravity; for this you really need the 645MG.

I have an Arduino Hexapod sketch for the SSC-32.
It may be that the code does not run with the new SSC-32U. The initialization does not seem to work.
thanks for your help

The Arduino Sketch asks the SSC-32 the last two letters “GP”.

if ((cbRead > 3) && (abVer[cbRead-3]==‘G’) && (abVer[cbRead-2]==‘P’) && (abVer[cbRead-1]==13))
return true;

The new SSC-32U has the ending … SB
Therefore he does not recognize him
Someone has an explanation?
Thank you

Where did you find the code? Can you provide a link?

oh Sorry
the Code is from :

It is about that of Kurte.(Arduino_Hex)
It works almost down to the uncontrolled movements.

I guess SSC32U because it has more recent firmware (2.50USB)
Do you have a solution?

Thank you

Not sure about that code - even if it’s based on Kurte’s. Try this instead: … tBoarduino
Note that you need to have the PS2 connected correctly (test that first).
This is made for the BotBoarduino and SSC-32. Connections can be found here:

Thank you, i will try.
The controller with the Ps2 controller works perfectly.
Even when the keys are pressed, something happens.
Only the leg function is out of control

excuse my English. Is Goggle Translater

I forget to say,
I have an Arduino Mega and SSC-32U

In theory there should not be any changes to the code, but we have not tried with a MEGA. Do you get any compile errors?

Thanks for your help.
Works fine. After pressing Start, everything goes into basic position. Then the legs move a little. If I move the yoistick move the legs partly, but I will check
Thank you

Hello,I have a new problem,
After I have pressed the start button, the hexapod goes into the basic position.
Then, however, different servos twitch irregularly.
The other functions go, but at a standstill always with this twitch.
Sometimes everything is OK.
Is there a solution for this.
Batteries are full. It stands on CD spindle.

Thank you

(Arduino Mega + SSC32U + (BotBoarduino_CH3R_PS2))

Can you provide a video?