Connecting Playstation 2 controller to arduino

Control Boards, Controllers, Tethers, Ect.
Kjetil
Posts: 65
Joined: Dec 11th, 2010, 4:18 pm
Location: Norway

Connecting Playstation 2 controller to arduino

Post by Kjetil »

I`m planning to connect a Playstation2 controller to my control system.

I have searched and not found a code, and how to wire the controller to the arduino.

I would like to have a analog output for each joystick (4 in total, 2 for each joystick)
and digital (on/off) for the rest of the buttons on the controller.

Have anyone code and wiring for this, or a tip for where I can find it?

Thanks in advance
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: Connecting Playstation 2 controller to arduino

Post by KR2_Diving »

Kjetil wrote:I`m planning to connect a Playstation2 controller to my control system.

I have searched and not found a code, and how to wire the controller to the arduino.

I would like to have a analog output for each joystick (4 in total, 2 for each joystick)
and digital (on/off) for the rest of the buttons on the controller.

Have anyone code and wiring for this, or a tip for where I can find it?

Thanks in advance
Hey Kjetil,
Have a look at the link below. I have been able to build exactly what you are describing, and I have posted the code in the link below.

viewtopic.php?f=15&t=831

Hope this helps!

Ryan
"KR2_Diving"
Kjetil
Posts: 65
Joined: Dec 11th, 2010, 4:18 pm
Location: Norway

Re: Connecting Playstation 2 controller to arduino

Post by Kjetil »

Thanks for the information.

I have connected the controller but getting an error that the controller is not connected. Do I need to add any resistors between any of the wires?
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: Connecting Playstation 2 controller to arduino

Post by KR2_Diving »

Kjetil wrote:Do I need to add any resistors between any of the wires?
Sometimes yes. On my controller, I needed to connect a 10K resistor between the brown wire and the 3.3V connection...

There are more details and an FAQ section on this site:
http://www.billporter.info/2010/06/05/p ... rary-v1-0/

This is also where I got all my code.

Happy to help!

Ryan
"KR2_Diving"
Kjetil
Posts: 65
Joined: Dec 11th, 2010, 4:18 pm
Location: Norway

Re: Connecting Playstation 2 controller to arduino

Post by Kjetil »

Thanks again, everything is working fine. Just need to adjust the code.
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: Connecting Playstation 2 controller to arduino

Post by KR2_Diving »

Great to hear!

Keep us posted!

Ryan
"KR2_Diving"
Swa31s
Posts: 3
Joined: Mar 4th, 2013, 1:30 pm

Re: Connecting Playstation 2 controller to arduino

Post by Swa31s »

Hello

Can someone help me. I have a not original ps2 controller that I wanna use to control my rov.
But after opening the connector. I found out that I dont have a 3,3v-5v wire/pin.

I thought that maybe the controller uses the 7v that controls your dualshock.
Put when I connect a battery to it the led turns on but the motors start spinning to.

Does someone has some experience with that kind of controller?
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: Connecting Playstation 2 controller to arduino

Post by KR2_Diving »

Hmmm... i am no expert, but I would have thought that was one part of the controller that you could not do without!

How many wires are there in the cable?

Have a look at this site, check out the comments on the bottom of the page. There is a lot of troubleshooting included in the comments...

This page also included a very scientific analysis of the controller. It may provide some clues or other things for you to look into.

Hope this assists.

Let me know what you have for wires inside the cable. (Number of and color of.)
Swa31s
Posts: 3
Joined: Mar 4th, 2013, 1:30 pm

Re: Connecting Playstation 2 controller to arduino

Post by Swa31s »

Thx for the reply

I know these sites but nothing about no 3,3v wire.

I´ve try to upload a pic but I get an error message.
The colors are totaly in different order. I´ll try to explain.

Pin1 / pin2 / pin3 / pin4 / pin5 / pin6 / pin7 / pin8 / pin9
Brown / Blue / Yellow / Orange / no pin / Black / Red / no pin / Green
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: Connecting Playstation 2 controller to arduino

Post by KR2_Diving »

This is just a thought, but perhaps the 3.3v is generated inside the controller, from the 5v supply?

It may be worth opening the controller up to see what is inside...
Post Reply