Noob needing Help Phoenix based hexapod

Hello All.

To start let me just say that unfortunately I’m a complete zero on programming and on robotics in general(coming from the RC helis/cars world).

Hoping that you could help me with the programming and the wiring part that is driving me crazy.

I’m trying to use an Arduino Uno to control the hexapod trough a SSC-32U Board via the PS2 V2 controller, till now without any success.

I’ve downloaded all the necessary code from github and have copied them to the arduino library(in attach I’ve included a picture of what my library looks like).
Please have in mind that all the arduino architecture is all new to me.

For testing and from the phoenix directory I’ve manage to compile and upload the “Chr3_RC_SSC32” to the arduino successfully.

For the “Phoenix_PS2_SSC32” I could not compile due to an error of Wprogram.h not found.

The arduino its connected to the PS2 V2 controller in the following order:

Arduino »»»»PS2 V2 controller

Pin GND to GND
Pin 3.3v to 5v
Pin 13 to CLK
Pin 10 to ATT
Pin 11 to CMD
Pin 12 to DAT

After powering up the arduino, the PS2 receiver starts blinking one red led and after turning on the remote, both red leds turn solid, so I think the wiring is correct.

For the connection between the arduino and the SSC-32U board the connections are:

Arduino »»»»SSC-32U

Pin TX to RX
Pin GND to G

To power the SSC-32U board I was using a 3.7v lipo connected to one ubec; and with the arduino powered up by the usb(pc), I was hoping to see some movement of the servo, after pressing all buttons on the lynxmotion remote, but nothing happened(I’ve also included a picture of the test setup).

For the SSC32-U board I’ve tried to test it also with the SSC-32 Servo Sequencer Utility, connecting the board to the pc by USB; the board is found by the utility on the correct COM port. I was hoping that I could test just one servo but again, without success; I’ve tried on both locations on the board(from 6 to 24 positions and so on), but the servo didn’t move after moving the slider on the utility.

For this test with the utility got sometimes an error of “cycle power”.

To end, what it makes me confused is still the arduino architecture, what is needed on the library to make it work; like, I’ve managed to upload the Chr3_RC_SSC32 code, but then, would not also be needed for instance the PS2X_lib on the arduino for the remote to work.

Thank you for any of your help .

Regards,


Hi,

Here are answers to your questions:

Please place the following code instead of #include “Wprogram.h”:

#if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif

The source code we provide on our GitHub has the following configurations:

#define PS2_DAT 8 #define PS2_CMD 7 #define PS2_SEL 6 // On the PS2 receiver this pin may be called ATT (attention) #define PS2_CLK 9We recommend that you change those settings to match your setup. The constants used by your code example can usually by found by looking for a line such as this one:

error = ps2x.config_gamepad(PS2_CLK, PS2_CMD, PS2_SEL, PS2_DAT);

It is possible your SSC-32U is set at the 9600 baud rate and that your code is trying to use a different baud rate (usually 38400 or 115200). Check the bottom of page 34 of the SSC-32U manual for more details on changing the baud rate of the board.

Does your UBEC include a boosting circuit to up the voltage or only a reduction circuit? Most UBEC need a voltage source higher than 5 V DC to be able to function properly and provided appropriate 5 V / 6 V DC power. The SSC-32U expects a nominal power input @ 6­-12 V DC (absolute 5.3 V DC minimum, not guaranteed to function properly). If your UBEC is unable to provide this minimum voltage with the 3.7 V DC LIPO then it will not be able to power the SSC-32U. You can power the logic of the SSC-32U directly by connecting a 6 V DC power source to the VS1 power input (please read the manual for more details on power options). Make sure the VS=VL jumper is removed. The VS1 power source will also provide power to the servos on that side. If you wish to use the servo channels on the other side, make sure to have the 2 jumpers VS1=VS2 in place properly (again, check the manual for details).

Since the SSC-32U is not powered by USB (only the FT232R chip is powered, this is a design choice for safety of the components) you will likely be unable to use it without appropriate power on the VS1 input. Please note that the VL power connectors should not be used in most cases (see the manual).

For a complete and integrated example using a Lynxmotion BotBoarduino (Arduino-compatible board with modifications for ease of servo control) & Lynxmotion SSC-32U, please see the Lynxmotion GitHub example available here. This example should compile for Arduino Uno without much difficulty.

Sincerely,

Thank you **scharette **for your help; got to wait for the weekend for some free time to have a better look on the subject. let me just say that the used ubec is a 15A - 5v / 6v capable.

thanks

Ok, then this probably mean that you have to supply the UBEC with roughly 0.5 V DC extra than the voltage it will be regulating at. Try that and see if it helps.

You can also try to connect with the SSC-32U (once powered properly) with our free diagnostic/calibration utility Lynxterm.

Sincerely,

Still fighting with the robot :slight_smile: ; here’s the update; I’ve connected to the ubec a lipo battery of 11.1v; the output from the ubec is 6.0v; I’ve connected the output of the ubec to the ssc-32u(VS1 screw terminal) to power the board. from here and after changing to the correct baud rate I’ve managed to use the servo sequencer utility on the PC with no problems controlling servos on vs1 row.

My question is that I was hopping to power both vs1+vs2 with only this battery having the jumpers on place, but according to the manual I cannot power both rows and the same time. Since the ubec has another output, to power VS2 I think I could use a free servo position. Would this be possible without frying the board?

Now with the arduino: still havent’ managed to get a conection between the arduino and the ssc-32u via TX-RX although the correct baud rate is beeing used between the code and the SSC-32u(38400) ; the code you indicated, I have compiled it and upload it correctly to arduino; For the ps2 V2 controller I’ve adapted the code to the arduino pin positions(8 11 10 12 and 10 11 12 13), but for some reason I cannot get a connection via tx-rx with the ssc-32u and still not getting any response from the ps2 controller input.

I’ve also tested with a second arduino uno board hoping that something could be wrong but got the same result with this second arduino board.
In the meantime I’ve order a botboarduino from robotshop. I’m praying for the SSC-32u hasn’t got any problem on the RX reception. Via USB from the PC it works perfectly, but from the arduino nothing.

Thanks

You can certainly power the VS1 and VS2 line from one line if you have the VS1=VS2 jumpers in place.

Regarding the PS2 controller, can you disconnect the microcontroller from everything else and just plug in the PS2 receiver and use the sample PS2 code (making modifications to the pinout as needed by the sample code).
This will allow you to see if the PS2 transmitter receiver and microcontroller are working properly; you’ll use the Arduino serial terminal to see which buttons are pressed in real time.

Hello and thank you for your reply.

already made some progress thanks to your help and giving a lecture on many previous posts in the forum;

I’ve already tested the ps2 example with success; I 've also managed to get the connection between my new board received botboarduino and the SSC-32u running the 3dof code.

Right now just have a quick and dumb question:

I intend to use the following setup: botboarduino powered by a 7.4v lipo through a 15 ubec providing 6v; on the other side power for the SSC-32u will be provided by a 11.1v lipo also conected to a second 15a ubec(6v output). this only batery provides power to both servo rows on the SSC-32u.

For the botboarduino I was hoping to power logic and VS by this same batery of 7.4v; i’ve conected the batery trough the ubec to the VS screw terminals, have the jumper on the VL=VS and the other jumper on the EXT position; the jumpers on the servo pins are on the 5V position.
The board on this configuration doesnt work properly like when it is connected by usb only.

Something must be wrongly connected or something with the jumpers positions.
Cant I use only this battery to power the entire botboarduino? what are my best options for this setup?

thanks in advance

Hi,

Please find attached an image of the typical wiring used for a SSC-32U with a BotBoarduino and a PS2 v3 receiver/adapter board with a single power source. In your case, you would wire it slightly differently by using two power sources.

If after following those diagrams it is still behaving weirdly, please attach one or more pictures clearly showing all your connections so we can help you fix this issue.

Also, please ensure that you always have a common ground between the two boards.

Sincerely,


hi.

Just to leave here an update; I’ve manage to follow the schematics/drawings informations. checked all connections and all seemed ok. the hexapod is up and running :slight_smile:; but still got a minor situation: I’ve fried up 2 servos. First they got warm and after a few minutes smoke started to come out. these two servos were hot(comparing to all the others) and stopped working. I’ve recheck the wirings and it seems that all is ok, but problably have to do with the low cost servos I’ve choosed(MG996R).

Nevertheless would like to request the pros here if you could have a look into the wirings for botboaduino+ssc32u.

Power configurations remains the same(botboarduino powered by a 7.4v lipo through a 15 ubec providing 6v;
on the other side power for the SSC-32u will be provided by a 11.1v lipo also conected to a second 15a ubec(6v output). this only batery provides power to both servo rows on the SSC-32u as you can see with picture here).

Thank you.



Hi,

First we have a few questions and points to check (see the attached image).

]Why is there a power connection going directly there? You should normally have all power going through either VS1, VS2 or both VS1 & VS2. You can rectify this by removing that connection at the top (near #1) and moving it to VS2. If this connection is from the same power source as VS1, you can simply disconnect it completely and activate your VS1=VS2 jumpers (see #2)./:m]
]If you are using one 6 V DC power source to power all your motors, you should rotate your VS1=VS2 jumpers 90 degrees to connect VS1 & VS2 together. If VS1 and VS2 are to be powered by two independent power sources, leave the jumpers as-is (deactivated) or remove them. Then, connect your two power source through the screw terminals./:m]
]What are two 2 wires and where are they going?/:m]

Now, concerning the servo motors, please be careful to respect their duty cycle. Most hobby grade servo motors are not meant to be used more than a few dozen minutes at most at a time (varies by brand/product, voltage used, load, etc.). Be careful also to respect their voltage range and their load requirements.

Sincerely,

Thanks scharette for the info; I’ve followed your instruction to turn the jumpers 90º and disconected the plug conected to vs2 that was powering this row. Maybe this was the reason for burning the servos. Funny or not , they were connected on vs2 row.

Regarding your note on point 3 about the 2 wires, the image doesnt show and is somewhat misleading, but its going to the ubec. No problems here :slight_smile:

Thanks

Hi,

With the SSC-32U properly setup for power and using a power source of the right voltage for your servomotors, you should not have any issues as long as you respect the limits of the servomotors, such as duty cycle and load restrictions.

We assumed the wires were from the UBEC, but it is always best to ask in these cases and not assume! :slight_smile:

Sincerely,