Author Topic: dualsense 5 pcb sees dpad left after padhack  (Read 2857 times)

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
dualsense 5 pcb sees dpad left after padhack
« on: September 18, 2021, 10:12:08 PM »
so i successfully padhacked a dualsense 5 to create an all button controller for fighting games. it was working great for a number of days with no issues. now all of a sudden it thinks i?m pushing the dpad to the left. you can see my solder points in the picture. i didn?t know if it was a faulty switch or what was going on so i desolders the left dpad point and it still thinks i?m punching it. i?m out of ideas. any suggestions would be appreciated. I did do a recent controller update. i hope that didn?t break it. I thought but i?m not sure that it was working after the update.

https://imgur.com/gallery/5Sx07S6

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #1 on: September 19, 2021, 09:18:57 AM »
after desoldering everything that i soldered on it still doesn?t work. the board is clean. no messed up traces balls of solder or anything like that. I?m really stumped on what to do

Offline MCorgano

  • Motor Mouth
  • *
  • Posts: 89
  • Post quality +0/-1
  • Gender: Male
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #2 on: September 21, 2021, 05:27:31 PM »
IIRC the dpad pads are pulled to ground when activated (confirm this), so if the button is showing as stuck you must have a short somewhere. The pin for the dpad left is being pulled either to ground or to 3v3 (again I forget which)

For future mods like this, I know the ds4 had "remap kits" that act as a middleman to tap into the offset ribbon connection. If the ds5 has similar available, you could use that instead to make your connections, and would probably be easier to accomplish a reliable connection than trying to solder onto traces.

If you disconnect the wires for the dpad entirely and clean the solder points with flux / solder wick, does the problem go away?

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #3 on: September 21, 2021, 06:45:39 PM »
thanks for the reply. I don?t know what 3v3 is but yes when the trace is grounded it?s activated. i cannot find anything that could have caused a short. I also don?t see how you could tap in anywhere and bypass the traces that i used. The traces look very clean by the way but i could try flux and a desoldering braid to see if that helps. nothing else i?ve done helps.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #4 on: September 21, 2021, 07:59:35 PM »
so, fluxed and desoldered with braids. look really clean. still thinks i?m activating dpad left

https://imgur.com/gallery/P3oVX5o

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #5 on: September 22, 2021, 12:01:04 PM »
What are you using to determine it's DL that is stuck on? Just making sure you're not seeing the Left Stick pinned left instead.

3v3 is just another way of writing 3.3v or 3.3 volts, all mean the same thing.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #6 on: September 22, 2021, 05:41:05 PM »
i was using gamepadtester.com and the windows game controller properties. no question it?s dpad. now here?s where it gets interesting. i got sick of troubleshooting today so broke open another ps5 controller and did the same thing. wired it the same way. worked great for 20 minutes, then Dpad stuck left again!!  one thing i left out in previous post is that i was using an arduino to manage SOCD (simultaneous opposite cardinal directions), so what to do if i was pressing left and right at the same time. here is the link to the arduino code.

https://github.com/gilsrus/SOCD-Cleaner

so i?m guessing the arduino fried something. I was drawing 4.15V switched power for it from a solder pad near the dpad leads. i wonder if it?s possible that it fried a replaceable component? any suggestions would be helpful. thanks

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #7 on: September 22, 2021, 11:05:21 PM »
Looking at that code a bit, it looks like you are actively driving the lines HI for your 'button off' state, so that's most likely what killed it. The button lines are on a 3.3v rail, so that 4.15v is doing them no favors at all. You first off should be powering the thing from a 3.3v source in there, and most importantly setting your IO up as Inputs to be the 'button off' state. Only set it to an Output and drive it Lo when you want to press a button, when the button press is over with, set it right back to an Input and let the controller's MCU pull it back Hi on it's own. That way you are not messing with how the controller actually works at all and driving some external voltage in there that could, and most likely now has, fragged a couple of controllers.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #8 on: September 23, 2021, 09:35:42 AM »
thanks for the response. i didn?t realize the 4.15 V was going directly to the button traces. I thought that was going into the raw input of the arduino and that it would be regulated down. unfortunately i?m not good enough and code to figure out how set the outputs as inputs when not used. Any ideas on what specific component i could have damaged? and if it could be replaceable?

Also, if the button lines are already on a 3.3v rail why would driving them all the time with 3.3v hurt?  I understand why driving them with a higher voltage is bad.
« Last Edit: September 23, 2021, 09:39:19 AM by fluffhead »

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #9 on: September 23, 2021, 10:45:58 AM »
I'm a PIC user myself, so I have no idea which one of the umpteen AT boards you're using or how it might be setup power wise or what all of the already done for you library lingo is there. It could have a 3.3v Regulator built on there, it could be a 5v chip and the 4.15v is going to everything. This is the kind of stuff you'll run into and then learn the hard way before doing any kind of measuring, reading data sheets and poking around in there before wiring things together.

You can drive them with 3.3v if you want, and I never said that would hurt anything, but it's just inefficient to be doing it that way Plus it locks the button line off and then no other button press could be detected. Depending on what you're doing that may not matter, but it's still not the better way to do it, setting it up as an Input is so you don't have to worry about that and the controller can function as close to normal as possible.

You already have some IO setup as Inputs in that code, so it would be done the exact same way for the D-pad and any other buttons you are are trying to control. The 'setup' routine that gets run first in code is just to get things lined up and ready to go, that doesn't mean that you are then stuck with that IO in that configuration. You can change an IO from an Input to and Output or vice-versa on the fly at any point in your code. You'll never notice that it's making the changes, it will happen as far as you or the controller can tell 'instantly' when it happens. Unless it's some crazy speed critical timing thing that you're trying to do, you'll never know it's happening, and pressing buttons on the controller really isn't.

There is jack all between that DL line and the MCU, it goes straight to it, so there's nothing for you to replace and fix it, besides replacing the MCU with one from another DS5. Chalk it up to a $140 hard lesson learned and take a couple of steps back to learn what you're connecting to and the best way to do that before taking a run at it again.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #10 on: September 23, 2021, 12:40:40 PM »
so first thing i?m gonna do when i get home is check to see if the arduino (pro micro) is actually outputting >4V when set up this way. I?m also going to check i?d the button leads are actually getting 3.3 v. My next question if i?m dumb enough to try using an arduino again in this setup is do you know of anyplace on the board that i can draw 3.3v that?s switched on when the controller is on and switched off when the controller is off an and unplugged?

again thanks for the help and info.

also you said it’s always outputting voltage and that locks the button line off and no other button presses will register. This is confusing to me because even with the arduino working, i can press and combination of directions (up + left) and action keys simultaneously and they all register fine.
« Last Edit: September 23, 2021, 12:46:59 PM by fluffhead »

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #11 on: September 23, 2021, 02:49:17 PM »
another question. I can cancel out dpad left by grounding dpad right. I?m using 4 directional buttons. i?ve figured out how to emulate the left stick with my button switches, but it requires that I hold both buttons down for neutral. Can anyone think of a way to wire up a couple of keyboard switches with resistors or whatever so that one button is left, the other is right and it goes to neutral when neither is pressed?  if so i can still salvage my pcbs

Thanks!

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #12 on: September 23, 2021, 03:46:17 PM »
I've got my head in DS4 and XB1 land for some reason. The DS5 uses 1.8v logic buttons, so even at 3.3v you'd tank them. You'll need to use a chip that will still run down at a 1.8v source. You can get that 1.8v at either of the L3 or R3 buttons or the Sticks.

Pressing the D-pad Left and Right at the same time hardly works on any controller, because it's an illegal operation.

Install 2 Resistors per POT, wire up your switches across the Resistor (in parallel with them) and NEVER press both at the same time as that will cause the 1.8v rail to short to ground.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #13 on: September 23, 2021, 04:25:29 PM »
thank you so much. i?m not at home to test things out with a multimeter but now everything makes sense. pretty sure the arduino was outputting 3.3v.

yes very aware simultaneous opposite cardinal directions (SOCD) issues with dpads hence the reason for the arduino in the first place. not being allowed to press left and right at the same time is not an adequate solution playing fast action fighting games but maybe there is a way to wire it so that it can?t happen... maybe using the arduino?

so i highly doubt i can find an arduino that runs at 1.8V. it will still function fine without it, it?s just that some moves come out better with SOCD cleaning

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #14 on: September 23, 2021, 04:46:01 PM »
just thought of a solution to salvage the board. left stick emulation by soldering switches in parallel with 2k resistors but in series with 1 K resistors! it?s brilliant!

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #15 on: September 23, 2021, 07:41:58 PM »
it works! my controller is working perfectly. using a hybrid of dpad and left stick emulation.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #16 on: September 25, 2021, 03:44:11 PM »
So after getting one of my fried boards working i decided to poke around the other one. remember the issue was  the pcb was reading dpad left all the time. so i measured voltages and i?m getting 1.8 for each button trace except dpad left which is only about 0.6. there are a number of places on the board that can supply 1.8V so i connected one directly
to the dpad left trace. it worked - pcb is no longer showing dpad left. the problem is that when i ground the other buttons they still register, but when i ground dpad left, for a moment it registers, but then it seems that it?s caused a short and the controller turns itself off. Maybe there is somewhere else i can supply 1.8 V that won?t cause a short when grounded? i bet R3/L3 would work but when grounded those would register too. any suggestions? Thanks!
« Last Edit: September 25, 2021, 03:46:21 PM by fluffhead »

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #17 on: September 26, 2021, 04:58:33 AM »
Try installing a Pull-Up. Connect that DL line to 1.8v using a 100k and see if it still registers as not pressed. If that doesn't work go down to 10k and try. If it does work, there ya go, now when you ground out DL it will not short the 1.8v directly to ground.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #18 on: September 26, 2021, 11:12:59 AM »
Holy F#$king S#!t! You?re a F#$king Genius! It works! at 100k it was still showing dpad left. At 10k and 5.6K it showed neutral and activating dpad left worked, but it wouldn?t let go of left. At 1k it works exactly like it supposed to and doesn?t seem to short. The Dpad is completely fixed at far as i can tell!


So now going back to the arduino. the onboard led lights dimly when powered by 1.8v. i?m not getting any voltage from the switch outputs though. not sure why the led gets voltage but not the switches. Anyway, if i run it at 3.3 or 4.15 volts could i put resistors on the switch outputs to bring the voltage back down to 1.8v? i?m thinking about ohms law but i don?t know which is constant, current or voltage? If you can bring the voltage down, how do i figure out what size resistors to use?

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #19 on: September 26, 2021, 01:17:15 PM »
Hence the reason for setting the IO up as Inputs and only making them Outputs to activate them. That way it mostly doesn't matter what voltage you run the AT at, because when they are setup as Inputs (no pull-ups active) the only voltage on the AT lines will be the 1.8v that comes from the controller, no voltage from the AT gets to it. Then all you are doing when setting them to Outputs is driving them Lo, never Hi, so the controller will never get nailed with that 3.3v or more the AT is running at. The AT will essentially be acting the same way it does when you press a button manually, drive the button line Lo, then when you want to release the button set the IO back to an Input.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #20 on: September 26, 2021, 07:26:19 PM »
Ok now i?m finally following you. i didn?t understand before that when you activate the switch it?s lo and hi when not activated. Unfortunately my coding abilities are very limited, and i?m
just not confident in my ability to figure it out. i asked on arduino forum and they say to use one of these...
KeeYees 10pcs 4 Channels IIC I2C Logic Level Converter Bi-Directional Module 3.3V to 5V Shifter for Arduino (Pack of 10) https://www.amazon.com/dp/B07LG646VS/ref=cm_sw_r_cp_api_glt_fabc_R72A4J39NHNHAN2ATSQN?_encoding=UTF8&psc=1

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #21 on: September 27, 2021, 06:09:17 AM »
That's not really a true bi-direction level shifter there.

There are plenty of ways to do the button press by adding more hardware, actual level shifting ICs, 4066 switch ICs, Optocouplers, the easiest one would just be to use an NPN Transistor or N channel FET. AT to the Base/Gate, Emitter/Source to Ground and Collector/Drain to the button line. AT turns the Transistor/FET on, it grounds the button line. Then you need the obligatory support components for each Transistor as well, Resistor on the Base/Gate and the BE Resistor if a Transistor is used to make sure the Transistor turns off. If that setup sounds like that 'level shifter' looks, that's pretty much because it is. They just used FETs there on it for going in the other direction and that has it's limitations. Now would that thing work for your application? probably, but none of the aforementioned are as simple or cost effective as just setting the IO up as an Input though, plus you're already wired up for making the changes in the code versus tearing things back apart and adding in more hardware.

This is how it could be done on a PIC, no idea what the AT equivalent 'lingo' is there since it's pretty much all library driven for even the really simple stuff, which is why it's easy to get into coding with it, but then you have no idea what is really going on with it at the core.

TRISC0_bit = 1; // Set the TRIS up so the IO is an Input (no pull-ups activated if it has them) This is the button not pressed

// when it's time to press the button

TRISC0_bit = 0;  // Set the IO as an Output..
LATC0_bit = 0;  //  ..and drive it Lo

// then to release the button press just set it back to an Input again

TRISC0_bit = 1;

You can reconfigure the IO on the fly at any time in your code. You do not have to set them up in the beginning and that's what they are stuck being from then on, you can change them whenever. 
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline fluffhead

  • Chief squatting Hard
  • *
  • Posts: 19
  • Post quality +0/-0
  • Acidmods User
Re: dualsense 5 pcb sees dpad left after padhack
« Reply #22 on: September 30, 2021, 02:44:45 PM »
Once Again great advice!!👍👏 Got it working with some changes in the code and no level shifters and no voltage being applied. Here?s the code..
https://pastebin.com/H9YwvHTn

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal