Phoenix and Ps2 controller

Hi everyone.

Got my phoenix robot together and decided to see about trying a ps2 controller on the thing, I had in my stash of things an extension cable for a ps1 controller a long time ago so the wire colors didn’t quite match up with the ones provided, no big deal I pinned them out and made a list to correct this

Once I tossed the code on the robot
photri01.bas Tripod gait

I Turned on my robot, I had set up the ssc32 to zero all servo’s on initial turn on so it stands “all the joints are calibrated” and my ps2 remote lights up I can turn analog on and off on the remote. The ABC lights all turn on when I press the respective buttons on the BB2.

None of the buttons on the remote make the robot move at all after I pressed reset on the bot board2 the phoenix elongates its legs downwards "since its sitting on a 100 pack of dvdr’s and appears to be slowly walking “obviously suspended in air it isn’t going anywhere”

When I press some of the buttons the phoenix does things not as expected but I notice the analog sticks make it speed up and slow down…

So yeah… anyone have any ideas?

–Aaron

remove all jumpers on the button ABC. its the input for the ps2 controller.

Yea, like t4ndu said. Remove the jumpers. I had similar problems, on a different hex, until I removed the jumpers. Then, all was good.

well then, whiskey tango foxtrot?

Here is what my bb2 looks like

http://img176.imageshack.us/img176/6957/bb2zz4.jpg

Here is what my phoenix looks like when I turn it on the SSC32
http://img152.imageshack.us/img152/6702/pheonixon1vv0.jpg

Then when I turn on the BB2
http://img152.imageshack.us/img152/4113/pheonixonyt5.jpg

and then its beeping at me all the time!

–Aaron

The program starts beeping when the PS2 remote isn’t connected. I’ve noticed on one of your pictures that you still have the ck jumper in place. Start by removing this one and try it again. If it doesn’t help you should check the ps2 wires. Maybe kurt can help you out with the colors. He tested a lot of ps2 remotes and maybe one of the has got the same colors or maybe he knows where to look…

Good luck

Xan

As Xan mentioned, the beeping in this case usually means the PS2 controller is not initializing properly. But it might also happen if the BAP keeps rebooting. So you might put some different sound command at the start of the program to eliminate this possibility. If you keep getting the start up sound you know there is a different problem, If you get startup sound repeating, I would start checking power, shorts, …

Assuming this is not the case, I can not tell much looking at your picture as the colors don’t match and it is hard to see any details of your controller wires. Also I don’t know from your description if you are using a lynxmotion PS2 controller or one that you had sitting around?

In the photri01.bas, I don’t remember if it still had a NAP statement in the program? If so you probably should convert to a pause. That is covered in one or more of the threads.

From the description it sounds like you are getting some communication, but when you say you press some buttons, but it does not do as expected, what buttons? What did it do? What did you expect?

Kurt

Xan/Kurt

The wire colors do not match, so you are correct in noticing this.

I had built a old ps1 - parallel port adapter back from windows98 days I had in a drawer since no one in there right mind would use that os and usb ps2 adapters in the mail I decided to hack the end off and use this extension cable, I spent about 5 minutes pinning out this cable to determine where each wire should go and made an adapter for this so I could plug it into my BB2.

I did not modify this code at all “my goal was not to”…??? Still need to wrap my head around some features here and there and everywhere…

This is what exactly happens

I turn on the botboard first, then the ssc32, all the legs go to center position like it should, then i press reset it goes into the tall stance like in the 2nd photo and starts walking in place I can tell cause it looks exactly like the tripod gate from looking over head, If I were to set this on the ground it would topple over, I dont have a way of making a video or I would show you guys…

When its walking “being suspended in the air by the 2 dvd cases” pressing buttons on the remote appears to either slow it down or speed it up so i know the buttons are “doing something”

I have my ssc32 setup like this

So… I’m kinda clueless as to what the configuration problem is, It’s almost like the offsets are all adding or subtracting a large value from these servos

01,02, 05,06,09,10,17,18,21,22,25,26 the coxis servos appear to be in the correct orientation its just that the legs get extended downwards as if it were to be lifting up off the ground “as shown in my 2nd picture”

So what do you guys think?

–Aaron

–Xan I also removed that CK jumper that did not do anything…

Actually you know I was thinking about something, I have my botboard and ssc32 connected like this


Rather then have the board connected to the other board, I have the thing wired up to a switch so that the botboard and the SSC32 are connected to there own respective switch? I turn the ssc32 on then the botboard on.

Let me know if this is a problem.

Hi again,

Not sure, what PS2 controller are you using?

I have a sneaky suspicion that you have the left and right transposed. Think about it. The horizontal servos will not show much wrong, but the vertical ones will. The bot should be in a crouched position on startup. Opposite as what you are seeing. Make sure the left is the robots left, not your left.

I’m using a real ps2 controller.

The only thing I have reversed is the orientation of the ssc32 in relation to where the 2 holes for switches are located so it is rotated 180 degrees “this shouldn’t cause a problem”… at least as far as I know… and I know a little :stuck_out_tongue:

  • To clarify something as it might have been misunderstood.

When I turn on the botboard2 light comes on no beeping,

I turn on the SSC32 then all the legs get centered.

The ps2 controller analog light is not on and is un-responsive, all the buttons do nothing.

I hit the reset button then the legs droop down and it starts walking but incorrectly.

Hope this helps.

–Aaron

You have the left legs plugged into where the right legs go, and vice versa. No kidding. Really…

well I hope that wasn’t a smart ass statement :\

That should only reverse orientation, all the legs are still in the correct pin, none of the pin orientations have been changed.

–Aaron

Smart ass statement on a Monday following a two week shutdown… :open_mouth: No, and I hope you didn’t take it that way. But really dude, it’s crystal clear. The legs need to move in the opposite direction. This will happen if you swap left for right.

Or in other words. The front of the bot should have the servo horns facing the same direction. If I assume your images are showing the front of the bot then it’s wrong. If the (vertical) servos are facing the opposite way, then they will move the opposite direction. The horizontal servos are always installed the right way.

Trust me, I’m right. :wink:

Just checking :slight_smile:

well I’m going to have to question that a sec “no disrespect” but if the order the servos are connected on the SSC32 are
pin 00 servo
Pin 01 servo
pin 03 servo
pin 04 blank

then they are all plugged in like this
If Pin 00 is is always the inner most servo
pin 01 is the servo in the middle and the 3rd servo is the outer most joint, then that’s how they are all setup.

the point that concerns me is the fact it moves when it shouldn’t and it doesn’t stand correctly…

I guess my thinking is that the robot should still stand and attempt to move correctly even if the ssc32 is reversed 180 degrees if the bones are still connected in the right order you just reverse whats forward and reverse for the robot… unless my thinking on this is flawed somehow…

–Aaron

Everything you have said with exception to the “moves when it shouldn’t” is dead on accurate for the left to right swap scenario. The moving when it shouldn’t is also a known phenomenon as you stated you are using a Sony brand controller and they are notorious for not returning 128’s when the sticks are released.

What is the front of your bot? Power switches in front or rear…

Also I thought Xan put a commented section of code to handle which way the SSC-32 is installed. Did you change this section of the code?

I never touched any section of the code.

too tell you the truth I dont know what the front or the rear of the bot is.

How’s about I take it apart and correct that and get back to you :slight_smile:

As for the sony brand remote isnt this a bit weird that I cant use an actual sony brand control? or can I use it…

–Aaron

As for the Sony brand controller, there has been a recent thread on this, where someone complained that their robot (I believe another phoenix) was walking when it should not be. I am in the process of trying out several different PS2 controllers and found that the Sony one was quite a bit off. I thought about suggesting that the person could add in a calibrate function, but found if you move one of the analog sticks and released it, it was not returning consistently to the same spot. The other idea was to add some dead band code in that says if you are within X units of center, treat it as you are at center…

Kurt

That explains a lot. lol :wink:

Ok borrowing your linked image…

Be careful to notice all of the vertical servos are facing forward. If you can make sure the servos illustrated are connected to the channels also illustrated, viola! that little bugger will start to act a lot like everyone else’s. 8)

Yeah the only reason I reversed it was because the switches would have been right in the way of the stupid serial port connector on the SSC32… you know its too bad the ssc32 doesn’t have a serial header coming off it so you can mount the ssc32’s serial port in another location.

–Aaron