PS2 robot controller & PS2 controller cable

hello,

I have a few questions about the playstation controller; a lynxmotion one.
It came with the wireless “thingy”
For the rest have I bot board II with a basic stamp, it is connected serial with a SSC-32. On the SSC-32 is a lynxmotion arm connected (six servo’s)

The wireless thing:

gray, single pin

green, single pin

white/black
red two pins

blue
yellow
pink
brown four pins

Now with pin goes where??

I read on this forum about numbers 12,13,14 & 15 or the PS2 connection… but I think the PS2 one is not used if you use a SSC-32?
I tried the wireless thingy on both options… the four pins for data, and white/black is ground, red is 5V…

so what the function of green and grey, (NC and 7.2V??)
And do you need a pull up resistor (1K) or is it already in the bot board? This one also gives confusing :wink:

Found a test program on the forum, when i debug it shows a value that never changes… If I only connect the power wires, debug windows shows the same values…
A green led burns on the wireless thingy, and a red one blinks… until i turn the controller on… then it stays on… are they connected properly?
I tried of course different programs for testing… but no success so far…

Just hope that someone can help me out here, Im trying now for two nights… but no success.
I tried to give as much information as possible, if something is unclear about my story, im happy to share more!

thanks for possible answers and/or solutions,

Robert

Apologies for the bad grammar, English is not my native language…

Sorry the Basic Stamp can’t properly communicate with the PS2 controller. You must invert the data, which requires circuitry than is not on the board. If you’re using an Atom Pro there are lots of guides.

lynxmotion.com/images/html/build034.htm

lynxmotion.com/images/html/build148.htm

Thank you for the reaction… kinda explains why I could make it work…

So how do can you invert the data? and what means “can’t properly communicate”
I thought that I readed somewhere that you only cant use the left joystick properly…

Im kinda stuck with the basic stamp now, so I want to make it work with this one…
If there is a way, then I would like to know that way… :slight_smile:

Robert

the Basic Atom has options for it’s shift in command. You can tell it if the data is inverted or not. The Basic Stamps shift in command has no options. So you must build an inverter for the I/O line. The old Mini Atom Bot Board had this inverter built into the PS2 port. But we dropped it on the Bot Board II to allow for more room on the board.

And, yes with this inverter on the data line it was able to work, except for the left joystick…

You can google for information on making a TTL inverter.

Hi there,

Im looking on the net, and most stuff that i find about a ttl inverter is nothing more then the file I attached…

It looks to simple to be wright!.. so is it??

thanks for the help btw!

Robert

Robert,

Your drawing does not show an inverter.

A TTL inverter is something like a 74LS04 chip, pick your package. Put it in the data line, so that it inverts coming from the PS2 RCVR and through the chip (follow the arrow). Into pin 1 and out of pin 2 is typical. Power (5V) to pin 14, ground pin 7.

Finding a schematic for the old BB I would probably show you this.

HTH

Alan KM6VV

This is a transistor based inverter.

http://www.ehobbycorner.com/images/discrete_logic_not.gif

Here is a link to the ABB PDF. The schematic is on the last page.

lynxmotion.com/images/data/abbpdf02.pdf

That should get him going!

Alan KM6VV

Thx guys for all the help!

So the inverter is just a transistor… Is it possible that the diagram showing here is then the solution to the little problem?
I found on the web that this diagram does the same as the previous diagram… The transistor can be removed, the only difference is a software difference:

"The following section of the second program is the key.
" High PsxClk ’ Change this to low if you use the transistor
"if you wish to use the transistor in the diagram change it to this.
" Low PsxClk ’ Change this to high if you omit the transistor.

found the code as well,

’ {$STAMP BS2}
’ {$PBASIC 2.5}
buff VAR Byte(6)
idx VAR Nib
idy VAR Nib
tmpout VAR Byte
PsxAtt PIN 9 ’ PSX joystick interface
PsxClk PIN 8
PsxCmd PIN 10
PsxDat PIN 11

MAIN:
DO
GOSUB Get_PSX_Buttons
DEBUG HOME, BIN8 buff(0)," “,BIN8 buff(1),” “,CR’HEX2 psxID,” ",HEX2 psxSta,CR
DEBUG "psxJoyRX = ",DEC3 buff(2) ,CR
DEBUG "psxJoyRY = ",DEC3 buff(3) ,CR
DEBUG "psxJoyLX = ",DEC3 buff(4) ,CR
DEBUG "psxJoyLY = ",DEC3 buff(5),CR
LOOP
’ ----- Subroutines ]-----------------------------------------------------

Get_PSX_Buttons:
DIR10=1
DIR11=0
High PsxClk ’ Change this to low if you use the transistor
LOW PsxAtt
FOR idy = 0 TO 2
LOOKUP idy,$01,$42,$00],tmpout
FOR idx=0 TO 7
PsxCmd=tmpout.LOWBIT(idx)
PULSOUT PsxClk,2
NEXT
NEXT
FOR idy = 0 TO 5
FOR idx=0 TO 7
tmpout.LOWBIT(idx)=PsxDat
PULSOUT PsxClk,2
NEXT
Buff(idy)=tmpout
NEXT
HIGH PsxAtt
RETURN
END

I don’t have time to try it now, guess if you people say that this could/will work, then im gonna try it this weekend.

Robert

Yes there is a software method of fixing the shift in command. However it uses a lot of resources from an already limited platform. This leaves very little program room and variable storage for your robot code. From what I remember it runs pretty slow as well. It’s a dead end…

You have the BB2, I’d recommend getting a BasicAtom or BasicAtomPro, and stepping up a bit! Much more speed.

Alan KM6VV

Yes I am afraid it is…

Tried it out, but I think its a mission without an end!! haah in Dutch its sounds better :slight_smile:
Only sucks that I bought the basic stamp a few months ago, and the controller a few days ago… bad luck

Guess that in the near future ill buy a AtomPro or so… If I get the basic stamp to work (properly) then ill post it here…

Robert