Shop OBEX P1 Docs P2 Docs Learn Events
Playstation Controller Interface — Parallax Forums

Playstation Controller Interface

danr238danr238 Posts: 14
edited 2008-12-08 23:24 in Robotics
Hey everyone I'm having some troubles with getting my PS2 controller to work with my boe bot. I have tried codes that are known to work so I don't think it's the coding. I am using the lynmotion adapter cable to connect and am thinking my problem is with the connections. Anyone out there have pics or some suggestions on the matter for me? I have to have this done by monday for school and I would appreciate all the help!

Comments

  • GWJaxGWJax Posts: 267
    edited 2008-12-06 06:18
    I just found out that my son has a PS2 and a few controllers so I'm going to take them away from him because he has not played it inn about 2 yrs so he said I can have it, Yaaaah! I don't have a boebot but I can make one from scratch if I need to but any ways I'll check out the controller and let you know what I find when attaching it to a BS2 Stamp.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • Tom CTom C Posts: 461
    edited 2008-12-06 06:20
    danr238,

    Take a look at the N&V article and code that I have attached below. It may help.

    Also do a web search for "Mr Roboto".

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 12/6/2008 6:29:26 AM GMT
  • GWJaxGWJax Posts: 267
    edited 2008-12-06 07:05
    Will do Tom C, thanks this will help out alot of time for me.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • danr238danr238 Posts: 14
    edited 2008-12-06 14:04
    Thanks for you input Tom C and GWJax. I have a ton of information already (including the two downloads you suggested). I am a student just getting started in BS2 and my biggest problem is the connection of the lynmotion adapter to the board off the BS2. I attached the schematics of the connections below and am hoping someone could just connect it and maybe send an actual real life picture of their connections. If anyone could help me with this I really would appreciate it.
    640 x 320 - 29K
  • Tom CTom C Posts: 461
    edited 2008-12-06 17:54
    danr238,

    The Lynxmotion adapter is really designed for the Lynxmotion BBII.

    I have successfully used the Lynxmotion adapter with the Lynxmotion BBII.

    I am attaching·a link to several articles from Servo Magazine that provide you with the circuitry necessary to interface the Lynxmotion adapter to the BOE/BS2.· http://www.servomagazine.com/media-files/549/July06%20MrRoboto.zip

    If you cannot interpret the schematic in the articles in order to build the circuit, then you will not be able to interface the BOE·with the Lynxmotion adapter.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 12/6/2008 6:25:37 PM GMT
  • danr238danr238 Posts: 14
    edited 2008-12-07 00:23
    Thanks Tom C I appreciate all the help and I will give it a try tonight and hopefully have success. I don't want to see like an complete idiot when it comes to circuitry design, I am able to connect circuits but the biggest problem I had with the interpretation was that the ground from the schematics was connected on the adapter directly to the +5V connection coming from the adapter. I wasn't sure if I needed to remove that connection and ground it. But again thanks for the input and the download Tom.

    ·······
  • Tom CTom C Posts: 461
    edited 2008-12-07 00:40
    danr238,

    You will notice that the #1 pin on the Lynxmotion adapter is DAT and so is the #1 pin in the Jon Williams tutorial.

    Now that we have a reference, the #1 pin, you should be able to see a one for one correspondence between the Lynxmotion adapter pins and the pins in the Jon Williams tutorial.

    You will have to build the Jon Williams BOE to PS2 interface circuit to allow the BOE/BS2 to communicate with the PS2 Lynxmotion connector.

    This means you will have to add a pull-up resistor to the DATA (PSx dat) line and invert the PSx clock going to the Lynxmotion adapter from the BOE.

    The pin definitions are one to one on both the Lynxmotion adapter and the Jon Williams tutorial circuit.

    Hope this helps.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
  • danr238danr238 Posts: 14
    edited 2008-12-07 06:00
    Yeah it does help a bit but the problem I still am running into is that it says the black cable is connectioned to ground in John Williams article, but with the lynxmotion·adapter in hand I have the black cable connected to the same port as that of the red cable. I don't know if I should take the black cable apart from the red and ground it or what. I know this is probably a stupid question, but if you don't ask you will never know the answer. Also a quick question about the transistor connection. Again another simpleton question but you have to remember I am a student. Attached is a picture of it connected to my board let me know if that's correct if you could according to John Williams article (the red wire in the picture is my output). I again appreciate your help Tom C
    320 x 240 - 11K
  • GWJaxGWJax Posts: 267
    edited 2008-12-07 15:47
    Danr238, Your picture is incorrect, Your siginal line "Red Wire" is not connected to the BASE of the Transistor and is not connected to anything. Plus you need a 470 ohm resistor from the BASE, Center pin of the transitor to attach your siginal line "red wire" to the end of the other side of the 470 Ohm resistor "Yellow, Vilot, Brown" this will comlete your circuit..

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • danr238danr238 Posts: 14
    edited 2008-12-07 16:30
    The red line is the connection to the Lynxmotion adapter that is coming off the collector. Thanks for your input Jax
  • danr238danr238 Posts: 14
    edited 2008-12-08 00:57
    I still am kind of curious about the ground. Am I suppose to leave the black and red leads connected in the adapter or should i remove the black lead from the red and ground via vss on the board?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-08 01:25
    Just so you know, black is usually used for grounds. Red is usually used for the positive supply voltage. Other colors are used for other things and there's not any strict rule about which goes with what. Clearly, the Lynxmotion adapter doesn't follow the rules. Use the signal names given on the schematic for the adapter.
  • danr238danr238 Posts: 14
    edited 2008-12-08 01:26
    I don't know it's still not working. I started from the basic making the BJT as an inverter for an LED and everything worked out fine. The rest of the assembly is very straight forward so I'm not sure if I'm making a simple mistake and not realizing it. I wish my wife knew about electronics so I could have a second set of eyes look at the circuit build. Man it's driving me nuts not getting this figured out. I having a feeling my problem has to do with the grounding in the schematics. Oh well if anyone has any input let me know if not I will just have my professor take a look at it tomorrow.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-08 01:35
    It must be really confusing with the one set of colors in Jon Williams' article and another set of colors in the PS2 adapter cable diagram you included. Best is to compare the two and make a copy of Jon's figure with the color names you have, based on the positions in the cable socket. I get:
    Brown / Brown / Pin 1 / PsxDat
    Orange / Orange / Pin 2 / PsxCmd
    Green / Gray / Pin 3 / Switched +9V
    Shield / Black / Pin 4 / Ground
    Yellow / Red / Pin 5 / +5V Supply
    Blue / Yellow / Pin 6 / PsxAttn
    Black / Blue / Pin 7 / PsxClock (transistor collector)
    / White / Pin 8 / Not Connected
    Violet / Green / Pin 9 / Not Connected
  • danr238danr238 Posts: 14
    edited 2008-12-08 12:36
    Mike I appreciate your input. I will give it a try this afternoon and let everyone know how it goes. Thanks a bunch
  • danr238danr238 Posts: 14
    edited 2008-12-08 19:42
    Mike I knew it was a simple error on my part. I HAVE POWER! Goodness this has been frustrating all weekend. I don't have control using the coding but I do have power to the controller (Analog light works). Next step is to diagnosis my connection errors with the four pins. I think I might just have some things turned around. I check in later
  • GWJaxGWJax Posts: 267
    edited 2008-12-08 19:49
    Congrat danr238 on getting your power on! Now just double check your circuit and make sure your transistors are in the correct possition..

    Mike you beet me to the wire layout, lol good job!

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • danr238danr238 Posts: 14
    edited 2008-12-08 23:24
    Everything is working great. I only want to use it in the digital mode so I ridded the extra coding. Everything is working great thanks for your advice guys, especially Mike yous was the breaking point. I have everything working great except for the forward control on the pad it doesn't seem to be working (maybe the button has gone bad).
Sign In or Register to comment.