Author Topic: Razer Tartarus v2 Mechanical Switch and RP2040 Mod  (Read 3651 times)

0 Members and 1 Guest are viewing this topic.

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« on: Sun, 11 February 2024, 08:22:20 »
Hey all,  so I'm about two thirds of the way through this project so I thought I'd start writing it up.

I have always been a fan of the Nostromo style keypads for gaming.  Have my thumb be able to quickly do 4 keybinds using the D-Pad have become something I couldn't be without.  I started using these with the original Belkin Nostromo n52, then moved on to the Razer n52te, then the Tartarus v2 (I also have an Orbweaver kicking around, but that will be another story...).

My biggest gripe with these pads? Obselence through lack of software support... not to mention the dumpster fire that is Razer Synapse.

The goals of this project.
  • Replace the Mecha-mebrane switches with real mechanical switches.
  • Convert to QMK based MCU
Parts
  • Custom keypad PCB
  • Custom D-pad PCB
  • Custom Space PCB
  • RP2040 Stamp
  • 1N4148WS Diodes SOD-323
  • JST connector for USB cable (harvested)
  • TTC 11 encoder (harvested)
  • Wheel click tact switch (harvested)
  • Thumb button tact switch (harvested)
  • 4 x Kailh Mini Micro switches
  • 20 x Kailh Choc Mini Red switches
  • Keycaps

Teardown

Taking this apart is pretty straight forward.



These are the main screw locations holding the casing together. Once removed, it's fairly easy to finish disassembly. Note the screw hidden under the label.

Designing the PCBs

This was my first foray into PCB design.  It's been quite a learning curve...  Luckily another member had already completed a similar project and shared his PCB designs on Github.

https://geekhack.org/index.php?topic=107213.0

From these, I had a good headstart with board outlines and initial measurements.  I had to do a bit of reading up on how keyboard diode matricies work in order to redesign this PCB for QMK rather than direct connection...



I had hoped I would be able to direct connect the D-Pad and Space PCB but unfortunately QMK doesn't like mixing matrix and direct connection. So I had to redesign both of these to connect into my main matrix.



Then closed my eyes and hit the order button on JLPCB.  I was fully expecting this to never work in a million years...

A couple of weeks later, they arrived.


« Last Edit: Sat, 24 February 2024, 11:01:53 by Lostdotfish »

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #1 on: Sun, 11 February 2024, 08:22:38 »
Putting it all together

Once my PCBs arrived, I started by hand soldering the diodes to the reverse of the main PCB.  I have an Andonstar microscope, so this was fairly easy. Doing this without magnification however would be tough. The SOD-323 diodes are very small.



In this image, you can also see the harvested JST connector so that I can use the original USB cable.

Flipping the main PCB over, I soldered in the RP2040 Stamp.  I chose the stamp as it breaks out the USB data pins for easy routing to the JST connector.  All the other RP2040 boards would have been more difficult to route the USB.  I didn't design the PCB with pads for the castelated Stamp and was intending to use pin header.  I ended up using a few pins (4, 1 in each corner and then 4 more for the USB D+ and D- and power and GND), then once they were soldered in and aligned, I could solder directly to the plated holes and it wicked through both the Stamp and the PCB making good connection.



Here you can also see the harvested EC11 encoder and wheel tact switch.

A quick test with QMK before adding the D-Pad and Spacebar.





Building up the D-Pad



Here you can see the replacement Kailh mini micro switches and the harvested tact switch.  You also need to harvest the plastic parts of the D-Pad .

Once this was done, I hard wired the D-Pad and space bar to the main PCBs.  From a matrix point of view, the dpad forms a new row and connects to each of the 5 columns on the main PCB.  The spacebar connects to a further new row and the rest of the row is declared as not connected during the firmware editing.




Here it is all buttoned up for the first time.



Now all I need to do is order some keycaps.


« Last Edit: Sat, 24 February 2024, 11:08:57 by Lostdotfish »

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #2 on: Sun, 11 February 2024, 08:22:48 »
Building QMK

QMK is actually really easy to work with.  You need to edit 4 files.

info.json

This is where you tell QMK that you are using a RP2040 and let it know which GPIO pins your matrix is hooked up to.  Initially I had my rows and columns in the wrong order and it resulted in my keymap being upside down and inverted.  Changing the order of the GPIO pins in the config sorted this out.

Code: [Select]
{
    "manufacturer": "n",
    "keyboard_name": "tartarus_mech",
    "maintainer": "n",
    "bootloader": "rp2040",
    "diode_direction": "COL2ROW",
    "features": {
        "bootmagic": true,
        "command": false,
        "console": false,
        "extrakey": true,
        "mousekey": true,
        "nkro": true
    },
    "matrix_pins": {
        "cols": ["GP5", "GP4", "GP3", "GP2", "GP1"],
        "rows": ["GP9", "GP8", "GP7", "GP6", "GP10", "GP11"]
    },
    "processor": "RP2040",
    "url": "",
    "usb": {
        "device_version": "1.0.0",
        "pid": "0x0000",
        "vid": "0xFEED"
    },
    "layouts": {
        "LAYOUT_tartarus_5x6": {
            "layout": [
        {"matrix": [0, 0], "x": 0, "y": 0},
        {"matrix": [0, 1], "x": 1, "y": 0},
        {"matrix": [0, 2], "x": 2, "y": 0},
        {"matrix": [0, 3], "x": 3, "y": 0},
        {"matrix": [0, 4], "x": 4, "y": 0},
        {"matrix": [1, 0], "x": 0, "y": 1},
        {"matrix": [1, 1], "x": 1, "y": 1},
        {"matrix": [1, 2], "x": 2, "y": 1},
        {"matrix": [1, 3], "x": 3, "y": 1},
        {"matrix": [1, 4], "x": 4, "y": 1},
        {"matrix": [2, 0], "x": 0, "y": 2},
        {"matrix": [2, 1], "x": 1, "y": 2},
        {"matrix": [2, 2], "x": 2, "y": 2},
        {"matrix": [2, 3], "x": 3, "y": 2},
        {"matrix": [2, 4], "x": 4, "y": 2},
        {"matrix": [3, 0], "x": 0, "y": 3},
        {"matrix": [3, 1], "x": 1, "y": 3},
        {"matrix": [3, 2], "x": 2, "y": 3},
        {"matrix": [3, 3], "x": 3, "y": 3},
        {"matrix": [3, 4], "x": 4, "y": 3},
        {"matrix": [4, 0], "x": 0, "y": 4},
        {"matrix": [4, 1], "x": 1, "y": 4},
        {"matrix": [4, 2], "x": 2, "y": 4},
        {"matrix": [4, 3], "x": 3, "y": 4},
        {"matrix": [4, 4], "x": 4, "y": 4},
        {"matrix": [5, 0], "x": 0, "y": 5},
        {"matrix": [5, 1], "x": 1, "y": 5},
        {"matrix": [5, 2], "x": 2, "y": 5},
        {"matrix": [5, 3], "x": 3, "y": 5},
        {"matrix": [5, 4], "x": 4, "y": 5}            ]
        }
    }
}

keymap.c

Here we tell QMK what key to send of each switch.  We also tell it what the wheel should do.

Code: [Select]
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /*
     * ┌───┬───┬───┬───┬───┐
     * │esc│ 1 │ 2 │ 3 │ 4 │
     * ├───┼───┼───┼───┼───┤
     * │ b │ q │ w │ e │ r │
     * ├───┼───┼───┼───┼───┤  Keypad
     * │ n │ a │ s │ d │ f │
     * ├───┼───┼───┼───┼───┤
     * │ m │ z │ x │ c │ f │
     * ├───┼───┼───┼───┼───┤
     * │ 5 │ 6 │ 7 │ 8 │ 9 │  D-Pad
     * ├───┼───┼───┼───┼───┤
     * │ 0 │   │   │   │   │  Spacebar
     * └───┴───┴───┴───┴───┘
     */
    [0] = LAYOUT_tartarus_5x6(
        KC_ESC,   KC_1,   KC_2,   KC_3,   KC_4,
        KC_B,   KC_Q,   KC_W,   KC_E,   KC_R,
        KC_N,   KC_A,   KC_S,   KC_D,  KC_F,
        KC_M,   KC_Z, KC_X, KC_C,  KC_V,
        KC_5,   KC_6,   KC_7,   KC_8,   KC_9,
        KC_0,   XXXXXXX,   XXXXXXX,   XXXXXXX,   XXXXXXX
    )
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
    [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN)  },

};
#endif

rules.mk

We enable the encoder wheel here.

Code: [Select]
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes

config.h

And here we tell QMK how the encoder is hooked up and what its resolution is.

Code: [Select]
// Copyright 2024 n (@n)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

/*
 * Feature disable options
 *  These options are also useful to firmware size reduction.
 */

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
#define ENCODERS_PAD_A { GP28 }
#define ENCODERS_PAD_B { GP29 }
#define ENCODER_RESOLUTION 1
« Last Edit: Sat, 24 February 2024, 11:18:05 by Lostdotfish »

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #3 on: Sat, 24 February 2024, 11:19:50 »
And that's it.

I'll update again when the keycaps are here - but for now the project is complete.  I am more than a little surprised that this actually worked out.  The whole time, I thought I was killing a perfectly working Tartarus.

Off to enjoy some gaming without needing Razer Synapse ever again!

Offline blondie

  • Posts: 47
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #4 on: Wed, 13 March 2024, 08:34:43 »
This is great. I like seeing new stuff added to QMK, and I never understood the bloated gaming software needed to run these peripherals (and which I can't run anyway under Linux).

I guess the idea is to use this in conjunction with a mouse in the right hand. It would be awesome if there were  a 3D printable model of the Tartarus so that you could have a second one for the right hand. This could be useful for games which use two analog joysticks, or perhaps a small trackball or trackpad could be used in its place.

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #5 on: Wed, 13 March 2024, 14:12:51 »
This is great. I like seeing new stuff added to QMK, and I never understood the bloated gaming software needed to run these peripherals (and which I can't run anyway under Linux).

I guess the idea is to use this in conjunction with a mouse in the right hand. It would be awesome if there were  a 3D printable model of the Tartarus so that you could have a second one for the right hand. This could be useful for games which use two analog joysticks, or perhaps a small trackball or trackpad could be used in its place.

Yeah, so generally this in your left hand and mouse in your right.  For FPS games it makes things like slide shotting or fast switching etc really efficient, especially with key actions mapped to the d-pad.  I generally have jump, crouch, reload and action/interact on the d-pad.  I find this just generally makes my left thumb more useful - as it can hit 4-5 keys vs just being the spacebar masher on a keyboard.

I'd love to progress this into a more open source solution that uses 3d printed parts.  It would be awesome to have the d-pad element become a modular piece.  Then you could drop in one with a d-pad, one with analogue thumbstick, one with multiple smaller buttons (like the Razer Naga mouse).


Offline MizterWizter

  • Posts: 2
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #6 on: Wed, 13 March 2024, 18:04:35 »
Will the files for the PCBs you designed be available at some point?

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #7 on: Thu, 21 March 2024, 04:16:48 »
Will the files for the PCBs you designed be available at some point?

They could do with a gentle revision before I'd want to set them free and I haven't had time.

If you wanted to have a go as they are, I could send you a set if you cover the pcb and postage costs.

Offline Axiom_

  • Posts: 21
  • Location: Sydney
    • Atelier Axiom
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #8 on: Thu, 04 April 2024, 00:20:24 »

Yeah, so generally this in your left hand and mouse in your right.  For FPS games it makes things like slide shotting or fast switching etc really efficient, especially with key actions mapped to the d-pad.  I generally have jump, crouch, reload and action/interact on the d-pad.  I find this just generally makes my left thumb more useful - as it can hit 4-5 keys vs just being the spacebar masher on a keyboard.


Your process documentation is outstanding, you made it very easy to follow along.

I've always loved the idea of the Nostromo style pads. However, I feel like 19 keys on the keypad are just excessive.

I'm curious to know what you'd consider as the bare minimum number of rows and columns of keys required for the majority of your usage.

Offline Lostdotfish

  • Thread Starter
  • Posts: 13
Re: Razer Tartarus v2 Mechanical Switch and RP2040 Mod
« Reply #9 on: Tue, 16 April 2024, 08:24:45 »

Yeah, so generally this in your left hand and mouse in your right.  For FPS games it makes things like slide shotting or fast switching etc really efficient, especially with key actions mapped to the d-pad.  I generally have jump, crouch, reload and action/interact on the d-pad.  I find this just generally makes my left thumb more useful - as it can hit 4-5 keys vs just being the spacebar masher on a keyboard.


Your process documentation is outstanding, you made it very easy to follow along.

I've always loved the idea of the Nostromo style pads. However, I feel like 19 keys on the keypad are just excessive.

I'm curious to know what you'd consider as the bare minimum number of rows and columns of keys required for the majority of your usage.


I used to use the earlier versions of this pad with less keys. It's fine but I do find that I use most of the pad on a lot of the games I play.