Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Arduino PS2 Analog Thumbstick Test 001

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
21,625
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 5, 2009

This is my latest creation using the Arduino Microcontroller (and an old PS2 controller :P SALVAGED!!!) I have seen loads of videos of people hooking up thier arduino to the wii Nunchuck and using the joystick and the accelerometer. However I wondered if there was a more economical (cheap ass) way to get a joystick for the arduino. I then found a small breakout board on http://www.sparkfun.com/ which I bought on impulse when buying my arduino starter kit. Its just a board that allows you to connect a thumbstick (like the PS2 analog thumbsticks) to the arduino with 5 header pins. You could buy the thumbsticks ready to go on the site but i didnt as I had an old PS2 at home that I dont use and I have 2 controllers for it (I already stole the motor out of one before XD ). So I tried to remove the thumbstick from the PS2 controller's main board but this was easier said than done as I have no device for removing solder other than a soldering iron :P . So with some persuasion in the form of a pliers I freed it from the board and melted the bits of solder off the many pins. Then I plugged it into the breakout board and resoldered all the pins (better than I normally would, im a total soldering newb :P ). Then I just soldered in 5 header pins into the board and plugged them into a breadboard. Then I just hooked it all up to the arduino, wrote a quick program and uploaded it to the arduino and boom it worked. The stick is made up of 2 petentiometers and a button (when u press the stick down). The program I wrote just gets the input from both potentiometers and prints them as x and y values through the serial to the computer. The values it prints here are raw but they could easily be mapped to proper values to control 2 servos, or too control the RGB values of an RGB LED. This is a very cheap way to incorporate a joystick into your arduino at low cost (the board was like €1.50 and the stick would be about the same if you dont have an old PS2 controller, in which case you would already have 2 sticks). It was also very easy, the hardest part was removing the thumbstick from the PS2 controller board, and that would have been easier if I had a solder sucker and a newer soldering iron. I would recommend people to try this it works well and there is plenty you could do with it. There is even (if i recall) a way to make your computer think the arduino is a HID controller which means you could effectively make your own controller with this and a few buttons. I am very excited about this and can't wait to see what I can do with it... (joystick, 2 servos, arduino, tiny wireless cam, PAN AND TILT CAMERA!!!!!! XD ). And if you read all that text, fair play to you, give yourself a pat on the back XD.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (89nephilim)

  • Did you have to buy headers with the Breakout Board for the thumb joystick?

  • @T86157 I honestly can't remember for the life of me, either they came with it or the arduino I forget, sorry.

  • w8 is the ps2 thumsick the same from a ps3??

  • I wouldn't know to be honest, but i'd guess it is. You can find the specs if you google it.

  • wow so i ould do gamecube pad too? the actual joystick unit has the wires that just plug right into arduino? so cool.

  • Actually its not that easy, I used a breakout board for the stick that I got from Sparkfun's online store. Only cost like 2 bucks and it works great but without it it might not be too easy.

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • @T86157: You can use a voltage-divider! Put an 10kOhm Resistor between the analog input and the GND. Then you connect the adc-pin from the joystick to the analog input (where the resistor to GND) and the other legs to 5v and GND. I think, I make a video about this!

    MfG

  • I just bought myself a couple of breakout boards for the joystick potentiometers. I have one more question: I get analogRead values of 0 when I barely move it down for vertical and right for horizontal. Is there a way to fix this so that I can read a larger range? So far I get roughly 0 to 1023 for both vertical and horizontal reads but one side like I've said, goes to 0 much more quickly than the other side reaching the max analogRead value I get.

  • I just got done unsoldering some joysticks from an xbox controller from the thrift shop. Now it's time to hook it up to my arduino!

    +1 on the desoldering pump. Makes things SO much easier. My desoldering pump broke while I was removing the joysticks :( Now it's temporarily held together with duct tape. I may just have to go out and get a new one. I also want to try solder wick and see how that compares,

  • HEY, AS LONG AS ITS FUN TO MESS WITH

    

  • I have one of these I've managed, after much poncing about, to solder to a piece of 100mil matrix board :P

    I read your whole description and I'll say this: Get a desoldering pump! You can get em all over the place, and they're immensely handy :D

    A question regarding the thumbstick: What's the range of values you get out of it? If I hooked up an 8bit ADC to the centre pins of the pots (which I'm going) will I get 0 to 255, with the centre at 128? or will the range at the extremes be more limited?

  • I wonder if it would work with my Snake Chaser!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more