What's new

Worklog Original PS2 Controllers and Pressure Sensitivity

Legend

.
Joined
May 10, 2019
Messages
88
Likes
165
Location
Canada Boi
Portables
2
So I'm in the process of designing a PS2 portable (worklog coming soon enough) and I was stuck deliberating which type of controller I wanted to use in it. Upon doing some research I found a few good options:

- Original Dualshock 2
- Aftermarket Controllers
- PS2+
- Those little boards with the epoxy chip on them that a user here sells on aliexpress

After scouring some worklogs, I first realized that there is not nearly enough PS2 worklogs lol, but the conclusion I came to was this:

The first thing I looked at was the PS2+ and it was the first runner up, however I remember there being talk back in the day of it not working with some games and it was never made clear (or maybe I didn't look hard enough) that those issues were fixed and if they weren't, I don't necessarily have the tools or know-how to fix them, so I scratched that idea but still wanted something that I could implement cleanly into a custom board.

After doing some more research, I ended up finding out that the PS2 had analog buttons (or pressure sensitive buttons) and started looking into that as well as the few games that support them. There's a lot of folks who used aftermarket controllers in their portables but they didn't have pressure sensitive buttons and I couldn't implement one in a clean manner so I scratched that idea. I then looked into those little boards that a user here sells on Ali, and while I could implement it half cleanly (if that makes sense lol) by soldering it in the same manner as the GC+ with its castellated pads, it to did not support pressure sensitive buttons.

So with the limited information I had on the original DS2, I set out to figure it out so I could have absolute full functionality (aside from rumble) as well as try to implement pressure sensitive buttons in a fully custom build. Now I knew this would be difficult as I think there's a total of 2 worklogs pre 2018 (pre the development of the PS2+) that used the original DS2 and there's not a lot of information on BB about using them, however I did remember there being talk about having to use resistors for each button etc.

I started by peeling open the 4 Controllers I had as there's a stupid amount of different controller revisions to look for the best one to work with and I landed on the one that uses the SD731A chip as it seemed like it'd be the easiest to reverse engineer, so started poking, probing and Sanding to see what everything connected to

1000004194.jpg

Without sharing the billion photos I took of the process, I ended up with a really bad compendium style photo that I did on my phone so here it is lol. I was also looking into the button film to see how it worked and I asked on the discord what this "extra random button was" and couldn't get an answer so when doing my pinout, it was labeled as random. Little did I know how important it would be (I'll get into this later)

1000004465.jpg


I figured out that the little black film between the contacts had a high resistance (varies between buttons) but the resistance was lowered to pretty much 0 depending on how hard you pressed. With this information, I set out to find something similar and ended up finding what is called velostat. Velostat is pretty much the same stuff they used in the button film and I was able to source a sheet of it to try out.

After finishing the pinout of the SD731A, I designed a quick and dirty test board that had different types of contacts (clicky and membrane) all for the X button so I could test it. I also included connections for the switch style joysticks that were converted to analog sticks to try them out.

1000004238.jpg

1000004239.jpg

I had made a few mistakes that I'll get into after but this is why we make test boards lol. I have the big contact for testing membrane buttons and the 2 smaller contacts to test dome switches similar to the 3DS or Switch.

So i ordered everything and waited, and when it all finally came in, I assembled the board and had a chance to test it this past weekend. JLC also did a really good job with the logos as I've heard they can be a hit or miss
1000004425.jpg

1000004424.jpg

1000004439.jpg


After assembling the board, I was excited to test it out but upon plugging it in, the gamepad tester on the PS2 was showing it freaking out so I hit my first roadblock.
1000004461.jpg


After messing with it for a bit I was concerned that maybe the decoupling Caps were causing my issue, namely the fact that I replaced the electrolytic cap with a ceramic, so I put the original one on and was still having the same issue. After some more head scratching for a bit, I thought that I had maybe fried the chip with heat when taking it off the original board. I searched around and found out that the "extra random button" on the original button film was actually a (7k - 10k) resistor that needed to be connected to 3v3, so I bodged a 10k resistor and that calmed the inputs down. I was once again excited but upon trying my button connections, I wasn't getting any input at all.

I spent a few more hours scratching my head and searching around. I went as far back as modretro and even the benheck forums as I figured the resistor on every button thing was my issue. I found some info that said each button needs a 20k - 27k resistor on it so I hooked up a 20k resistor in many different orientations and still got nothing, so it was back to searching.

A few more hours later I was doing some laundry and thinking about my issue and it dawned on me. I had designed my board without the resistor I was missing in mind because of the way everything was connected. I thought that the buttons common was 3v3 with the way everything was connected on the original board, and I was confused at some of the button diagrams online as Start, Select, and Analog had a different common than the rest of the buttons but to me it looked like everything was connected to 3v3 (not having that resistor in mind initially).

I ended up figuring it out. Start, Select, and Analog use regular ol 3v3 as their common, and the rest of the buttons use the resistor (or pin 11 on the SD731A) as their common. My issue was that I had everything connected to 3v3. So I bodged a wire between the resistor and pin 11 of the chip and got some input finally!

My boards contacts seemed to have been noisy and was registering random button presses as I was trying things so I initially put a small piece of velostat between 2 wires instead of using the pads and was getting the pressure sensitive inputs I was looking for.
1000004466.jpg

1000004467.jpg


After this, I really wanted to try the pads as I wasn't getting a consistent output without noise using the bare wires, so I connected one of my other boards to the input wires and was able to try it without the noise and everything worked perfectly! I was getting no noise and perfect input from 0 to 255 depending on how hard it pressed.
1000004464.jpg

1000004468.jpg

1000004469.jpg

1000004470.jpg


I also figured out that the sensitivity of the button presses can be adjusted via the value of the resistor connected between pin 11 of the chip and 3v3 but everything seemed to have worked great so I don't think I'll need adjustment. I'm also realizing that the noise was present because I was using my bare finger, so I didn't need to use my separate board but I'll still have a gnd plane in the final revision etc.

Later last night I also tested my joysticks and they work great! My only issue is that I need to invert the right stick as I need the physical orientation to be a certain way, but I think it's as easy as swapping vcc and gnd on the potentiometers to achieve that but I'll test it after. The only other thing I need to test is it in games as I've heard that if there isn't a resistor on every button, that it will register as a DS1, but with the velostat acting as a resistor, I'm not sure ill need resistors on every button but that's still to be tested.

In conclusion, I'm super proud of achieving pressure sensitivity and am excited to be one of the first to implement it into a custom board for a absolute fully functional PS2 controller In a portable!

If you've made it this far, thanks for reading this long winded post! I'll be coming out with the worklog for the portable soon enough!
 

Legend

.
Joined
May 10, 2019
Messages
88
Likes
165
Location
Canada Boi
Portables
2
Pressure sensitivity aside, this post was made to put out some information for noobs or others in general as there's not a lot out there without turning some old stones so to speak, so here's my pinout and notes on specifically the SD731A chip (note that the pinouts for other chips are not the same as this one).

You'll also notice that i was vague on the Rumble connections as I do not desire it in my portable. I also haven't included the resistor or value of the resistor for the analog led as I do not use it.

Button Connector Pinout

1 - L2
2 - L1
3 - DU
4 - DL
5 - DD
6 - DR
7 - SELECT
8 - ANALOG
9 - START
10 - 3v3 for start, select, and analog
11 - 7k - 10K resistor
12 - Common for pressure sensitive inputs
13 - SQUARE
14 - X
15 - CIRCLE
16 - TRIANGLE
17 - R1
18 - R2

Microcontroller (SD731A) Connections:

1 - Right Rumble Control?
2 - LED
3 - R3
4 - Right X-Axis
5 - Right Y-Axis
6 - 3v3
7 - GND
8 - L3
9 - Left X-Axis
10 - Left Y-Axis
11 - Pressure sensitive BTN Common
12 - Rumble Connection
13 - Rumble Connection
14 - Rumble Negative?
15 - Rumble Negative?
16 - L2
17 - L1
18 - DU
19 - DL
20 - DD
21 - DR
22 - SELECT
23 - ANALOG
24 - START
25 - R2
26 - R1
27 - TRIANGLE
28 - CIRCLE
29 - X
30 - SQUARE
31 - 3v3
32 - GND
33 - Not Connected
34 - GND
35 - GND
36 - 0.12uF capacitor to GND
37 - ACK
38 - DAT
39 - CMD
40 - ATT
41 - CLK
42 - Rumble Negative?
43 - Rumble Negative?
44 - Rumble Positive

NOTES:

- Start, Select, Analog pulled high to 3v3
- Rest of buttons use pin 11 as common
- 10k pullup between pin 11 and 3v3
- All buttons pressure sensitive aside from analog, select, and start
- If using tact switches instead of velostat, Resistors on each button ranging anywhere from 17k - 27k are needed
- Resistors may also be needed when using velostat but further testing is required
- L3 and R3 pulled to GND to activate
- SOT-23 Diode Anode from GND to 2 cathodes (ACK & DAT)
- 0.1uF Caps for all X and Y analog stick signals to ground
- 0.22uF decoupling Caps from 3v3 to GND
- 0.12uF cap from pin 36 to GND
- 220ohm Resistors through CMD, ATT, and CLK
- 22ohm Resistor through ACK and DAT
- 22uf 6.3v electrolytic cap from 3v3 to GND

Please note that this information is subject to change and i will update it as I test more things out!
 

Stitches

2 and a Half Dollarydoos
Staff member
.
.
Joined
Feb 5, 2017
Messages
4,181
Likes
3,279
Location
Banana Bender Land, Australia
Portables
6
I swear every time I tell a bright eyed new member with big ideas "nah that feature doesn't exist outside of first party hardware", one of you fuckers reaches into The Drawer of Infinite Bullshit and pulls out a gold plated IT DOES NOW.........

Excellent work btw, very excited to see this be a viable feature to add to portables!
 

Legend

.
Joined
May 10, 2019
Messages
88
Likes
165
Location
Canada Boi
Portables
2
*Crucial Update:

So this update is all about resistors. When doing my research into this, I found out that if your using regular tact switches with a DS2, there needs to be resistors in the range of 17k - 27k (from what I've gathered) between every button and it's common (aside from start, select, analog) or else the PS2 will register the controller as a DS1.

This is because the the button ribbon in the DS2 has a specific resistance between each buttons contacts that drops to 0 ohms depending on how hard you press. Take that resistance away, and for some reason the ps2 will think it's a dualshock 1 because pressure sensitive buttons are missing.

Long story short, people used to have to use resistors when using tact switches in order for the controller to register as a dualshock 2 as having the resistors in place made the controller think there was pressure sensitive buttons even when there wasnt. That brings me to my testing today.

I was really hoping that the velostat being between the 2 contacts would have enough resistance without being pressed for the controller to register as a DS2, however unfortunately we're going to need resistors between every button as the velostat being connected between the pads doesn't register any resistance until it's pressed. With that being said, I conducted the following tests:

First I kept a 10k resistor between pin 11 and common and put a 20k between the button contacts and while it worked. The sensitivity was too high so even the lightest press was registering around 220 on the gamepad tester, and that's too close to 255 so that was a no go. I was trying to achieve at least around 60, if not a lower number by the time the dome switch had clicked.

I then hooked up a 10k potentiometer between pin 11 and common to try different resistances as I went and while it worked out fine, I could not find a sweet spot without having to press too hard to get to 255. We don't want to have to put 20 screws in our custom boards in order to be able to achieve a pressure sensitivity lol, so I focused my attention to the resistor between the button contacts.

I ended up finding a potentiometer that went to about 20k ohms so after messing around with both resistances, I ended up finding what seems like a good sweet spot so that we have a range of near 0 to 255 when pressed without pressing too hard:

- 8.6k ohm Resistor between pin 11 and 3v3
- 17.6k ohm Resistor between button contacts

The resistances could probably use even more dialing in, and I'm sure it's maybe going to be different for each button and on a case to case basis, but that seemed to work with my one button on my specific setup, so take those resistances with a grain of salt but know that they are needed.

My case design is getting to a point where I'd like to get a test print so I'm gonna make a custom board for the one side to test fitment as well as do some further testing with the buttons

Until next time!
 
Top