PS2 Motor Controller header

Playstation 2 Motor Controller

I’m a big fan of the Playstation video game consoles, so when I learned about the PS2X library by Bill Porter, I had to try it out.  PS2X makes it easy to interface Arduino microcontrollers with Playstation 2 controllers.  After wiring everything up and testing it with the sample program, I set out to find something more interesting to do with it.  The result is a stepper motor that is controlled by the Sony controller.  Here’s a video of it in action:

PS2 motor controllerI used an Arduino Uno to run the program, with an Arduino motor shield to drive the motor.  The motor itself is a ~6V bipolar stepper ripped out of an old Okidata line-feed printer.  I used an official Sony DualShock 2 controller, connected via a cheap aftermarket extension cord that I cut so I could use it on the breadboard.  You may notice the wire colors look wrong, this is because the extension cord colors are in the wrong places vs. the official wiring.  An Adafruit 20×4 LCD display with the i2c/SPI backpack provides feedback on button pressure / joystick position and motor RPM.

If you’d like to try it out, and you can download the program here.  The motor I used has 7.5 degree steps, so if yours is different, you’ll need toOKI stepper motor update the code accordingly.  And if you don’t plan to use the LCD panel that I used, you’ll want to remove the code for that.

The only problem I’ve seen (as shown in the video) is that PS2X sometimes doesn’t support the analog controls and/or rumble motors when it should.  I’ve seen this in both my program and the sample program that comes with the library and I can’t make any sense of it, especially since I’m using an official PS2 controller.  It happens enough that I wouldn’t feel comfortable relying on those functions in a project where they would be necessary.  Despite these issues, it was still a blast being able to connect a PS2 controller to the Arduino and see what can be done with it.

14 thoughts to “Playstation 2 Motor Controller”

  1. Hey there, nice project 🙂
    I was wondering, could you tell me how to connect the ps2 controller to arduino? I found the link including the library and setup but still i get error “No controller found…” Did you use 5v? 3.3?



      1. Good luck! I followed the wiring instructions on the PS2X website, and used 5v as everything I’ve read indicates it’s okay for official PS2 controllers. However, now that I think about it I wonder if using 3.3v instead might solve some of the issues I’ve had. I might try it if I set this up again in the future.

    1. The info and code I’ve posted is all I got – if you are looking to try something different, you’ll have to look around and experiment a bit. Good luck!

  2. Hello dear,
    I have a question or a problem,
    I’m using the PS2X arduino library, and only recognizes the PLAYSTATION2 Joystick me, and no buttons.

    What I can do?


    1. Sorry Peter, I haven’t seen that issue so I’m not sure what to suggest. You might try the website for the PS2X library and see if there is a forum or help section there. Good luck!

  3. I don’t know electrons .but i am really interesting in this project.could u pls give me diagrams of how to connect ps2 joystick to arduino and how to connect arduino to motor.
    Thank you!

    1. Hi Ed, wiring instructions for the controller are on the PS2X website. To connect a motor, you need a motor shield, and the shield you buy should have documentation on how to wire it. Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *