Surgically implanting a 3D-Touch Capacitive Trackpad in place of the original Analog Joystick.
PREFACE
Itās 2020 and in the pandemic boredom itāsĀ no easy jobĀ to survive from creativity suppression. Butā¦ when you realize that you own a toolbox with a plenty of electronics inside, itās not so hard to see the same old things lying on the desk, in a different way. Itās the case of my Nintendo Switch: I never had the occasion to disassemble the Joy-Con controller before. What a wonderful occasion to put hands on its inside and start a new journey.
āWell, let me look at the internet if someone crazy like a horse had the insane idea to replace the good old Analog Joystick with a Capacitive Trackpadā ā No results found.
MacGyver approves.
PHASE 0
I am used to start sketching ideas on a notepad and here is my first drawing about how I imagined the Joy-Con with a Capacitive Trackpad in place of the original Analog Joystick.
The best among the āProsā bullet-points is the NO-DRIFT statement. If you are here, probably you already know that some Joy-Con controllers suffer fromĀ Joystick Drift. Think about that for a second: no Joystick = no drift.
PHASE 1
First of all, youāre not a real nerd if you arenāt fascinated by transparent acid green stuff. Soā¦ a couple of keystrokes on Bezosās website have been typed in order to achieve a new dress for the Joy-Con. Dismounting the shellsĀ isnāt complicated, the only difficult part here is actually gently handling a pair of tweezers if you have a big hand.
The Analog Joystick is not a complex entity ā actually, itās a 2-CH potentiometer plus a push-button ā and itās attached to the main board by aĀ 5-positions FPC connector with 0.5mm pitch. I ordered aĀ flat and flexible ribbon cableĀ with the same specs in order to bring the signals out of the circuit.
Then, I re-assembled the Joy-Con and tested it directly with the Switch in order to check that everything worked fine.
Alright, I have to replace an analog potentiometer with a digital one.
PHASE 2
To do things in cleaner and more peaceful way, I draw inĀ KiCadĀ the schematics for a couple of components, IĀ imported their footprintsĀ and designed some break-out boards for them.
I chose to testĀ different kinds of digital potentiometers with different ranges of price and performanceĀ alongside with connectors for flat cables (one for theĀ Analog JoystickĀ input, one for theĀ Capacitive TrackpadĀ output). I ordered them online spending few bucks.
Within a week, I received the package fromĀ my favorite PCB dealer. With a solder paste spread and a hot-air gun job, the break-out boards were ready.
Now itās time to perform some tests.
PHASE 3
Inevitable to say that anĀ Arduino, a breadboard and a bunch of jumper wires come in help in order to coordinate the ensemble.
The whole testing setup involved:
- [0] 1 x Micro-controller
- [1] 2 x 12-bit, voltage output Digital-to-Analog Converter (connected via I2C)
- [2] 1 x 5-Positions 0.5mm Pitch FPC connector for the Analog Joystick
- [3] 1 x 5-Positions 0.5mm Pitch FPC flexible flat ribbon cable
- [4] 1 x 12-Positions 0.5 mm Pitch FPC connector the Capacitive Trackpad
- [5] 1 x 12-Positions 0.5mm Pitch FPC flexible flat ribbon cable
- [6] 1 x Digital 3D-Touch Capacitive Trackpad (connected via I2C)
Among all the digital potentiometers I broke-out and tested, I choseĀ the one that suited most, costed less and that, inevitably, got the job done. The first step was to check if all the components were correctly wired, alimented and responding. I flashed the standardĀ i2c_scannerĀ example into the board and the result was a success.
With few lines of code it was possible to initialize both theĀ DACsĀ and theĀ Capacitive TrackpadĀ on the I2C bus, then I focused on implementing an efficient strategy in order to explore how the digital potentiometers could emulate both the X and the Y axis of the original Analog Joystick.
Since the DACs have a resolution of 12 bits, they accept a value range that goes from 0 to 4095, so I passed it through a loop by steps of 10.
On the Switch console side, I fired up the theĀ Control Stick Calibration utility from the main settings, in order to see if something was gonna happen.
The Capacitive Trackpad is an interesting piece of electronics hosted in a very small and versatile form factor. Surprisingly, it also offers an amazing resolution of 2048 x 1535 x 63 (X x Y x Z) ā and yes it has 63 levels of pressure sensitivity (Iāll exploit this feature later in order to digitally emulate the Stick-Button press of the Analog Joystick).
Itās implicit to say that the second step was to implement a decent mapping in order to match the resolution of the potentiometers. Fortunately, the Arduino comes in help with theĀ mapĀ method so it was quite immediate to achieve decent results in almost no-time.
About theĀ pushStick();Ā method call instruction, since the corresponding pin on the Joy-Con side handles a simple close-circuit logic, I could emulate the button press via code.
Cool. The final result of the first prototype looked to me very promising.
PHASE 4
Alright. We have a plane here, now weād let it fly.
The following step I had in mind, was to create an embedded and more portable solution of the first prototype.
I decided to switch from UNO to a PRO MINI with its smaller package and to build a circuit board that could host it alongside with all the connectors and the digital potentiometers. In order to keep the optimization level high, I found that I could substitute the two single-channel DACs with aĀ double-channel oneĀ of the same family, saving some space on the PCB.
I fired up my faithful KiCad, I drew the schematics and then placed all the components at their place in a quite obsessive-compulsive (dis)order.
PHASE 5
Punctual as usual, the courier brought the green gold alongside with the other components.
Same ritual.
Solder party.
Testing with the digital multimeter.
PHASE 6
The PRO MINI needed to be alimented: I stole all the milliamps needed directly from the main board, siphoning them from an uncovered solder pad.
The main idea was to stick the board directly to the Joy-Conās back with a professional double-sided tape, make a hole in the plastic shell and then pass all the cables through it.
PHASE 7
The Capacitive Trackpad came out naked from its original package, so I had to design and develop a 3D enclosure by myself.Ā TinkercadĀ is very handy in this kind of situations: by adding and subtracting a couple of primitives shapes, the job is well done without complications.
After a quick slicing withĀ Cura, a few minutes of waiting time later and the 3D printer gave birth to the new born.
Super. It suited in perfectly at the first shot. I must say that the filament used preserved the mechanical properties very well. Nice jobĀ FILOALFA.
PHASE 8
Since the power implied in alimenting the PRO MINI relies directly on the Joy-Conās battery, I decided to add a small switch in order to turn off the implant while not in use, avoiding extra drains.
Safety first: I covered all the exposed electronics with a good piece of Kapton tape, in order to donāt short-circuit anything while your handās sweating.
FINAL RESULT
And here we go. Thatās how it looks in the end. Itās still portable, so it is possible to use it attached or in wireless mode.
Letās see it in action.
Enjoy the worldās first Nintendo Switch Joy-Con controller with a 3D Capacitive Trackpad.
NEXT STEPS
Doing things more seriously: in my plans thereās the idea to miniaturize the whole circuitry in order to create a smaller PCB that could suit directly inside the Joy-Con controller in place of the Analog Joystick small box thatās approximately 19 x 16 x 4 mm in size.
As you can see, the job is already ongoing.
I am aware that this could arouse interest in a small niche of fanatics, modders and gamers but its HARDWARE stuff, and it costs. This project implies a good amount of work that Iāll be happy to do with your support.
If itās something that market asks, I would be happy to co-finance the development of the first small batch that you could potentially buy onĀ TindieĀ in the incoming future.
This is explicitly a call to action. If you want to make this Joy-Con Touch Mod-Kit real,Ā donate.
Previously published at https://medium.com/@matteo.pisani.91/how-i-hacked-nintendo-joy-con-controller-8ac22d75b0b8