Author Topic: Maltron 3D ergonomic rewiring + Teensy project  (Read 5802 times)

0 Members and 1 Guest are viewing this topic.

Offline escapu

  • Thread Starter
  • Posts: 6
Maltron 3D ergonomic rewiring + Teensy project
« on: Thu, 10 September 2020, 17:05:58 »
Hi everyone - this is my first post, I’m new to keyboard building and English isn't my first language so please go easy on me.

I am a software engineer by trade, and I have always had problem with RSI, so I have basically stuck with Microsoft natural keyboards & Kensington trackballs for the past 20+ years. I have used mechanical keyboards, but never to an extent where I've built my own.

I have always been interested in 3D ergonomic keyboards like Maltron & Kinesis, however not wanting to drop £400+ on a keyboard that I wasn't sure I could get used to, I have never taken the plunge. About 7 years ago(2013), I picked up an old second hand AT/PS2 Maltron keyboard (pre-L89 layout, from 1998) off ebay for about £65, thinking I could use a usb converter to TRY and see if it suits.

A couple of issues became apparent pretty quickly.
1) The keyboard just wouldn't register my keypresses fast enough - I'm still not sure whether it's the converter or n-key rollover issue (the keyboard seems to have one diodes per row), but I have to type really slow, like at 2 keys per second, otherwise it will miss my key press. (is that what ghosting is?)
2) I just can not get used to some of the layout, and my hand knows some of the shortcuts for the IDE better than I do, (with some key shortcuts requiring 3+ keys at the same time) I need the layout to be at least roughly similar to the ISO / Mac layout.

So after emailing Maltron about perhaps getting them to ‘upgrade’ the innards and getting refused, I chucked it in storage thinking I just wasted money.

Come 7 years & a pandemic later, it looks like I have finally come across a group of enthusiasts on web who shares instructions to build your own keyboards with programmable microprocessors are being made cheap enough it seemed obvious that I had get my keyboard back out to get it rewired.

I thought I'd share my project so it will motivate myself to finish, perhaps get some advise when I get stuck, and in the end, maybe it will help some other people too :D

I have soldered before, I know basics of electrics & electronics, but I’ve never had to apply all that to a practical use before. Although I work with computers, high level programming is my bread and butter, so wish me luck on my journey and hopefully this post will keep getting updated until I succeed/fail :D

-R

251506-0
Sorry Its a bit dusty - it has been in storage for past 7 years.

251508-1
Seems to be Cherry MX Black - I think I will replace with Gateron Reds

251510-2
Opened up the back - Its really nice to see the insides signed with date & build number

251512-3
Current PCB

251514-4
Also interesting to see the switches are only pressure fitted

Offline escapu

  • Thread Starter
  • Posts: 6
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #1 on: Thu, 10 September 2020, 17:12:21 »
I have started out by thinking about wiring matrix.

251516-0
First, add the extra keys to Kinesis layout on http://www.keyboard-layout-editor.com to make it look the same

251518-1
copy the raw data & plonk it into https://kbfirmware.com/ - notice how it created a matrix of 10 rows and 20 columns

251520-2
which, just for fun, I reduced down to matrix of 9 rows and 18 columns. Maybe I will regret this when it comes to wiring.

-R


Offline Rayndalf

  • Posts: 474
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #2 on: Thu, 10 September 2020, 17:49:28 »
The simpler the matrix the better, IMO a teensy with more pins may be worth the ease of wiring. Something like those amoeba single key PCB could also simplify wiring.

I use a Kinesis as my daily driver and I love the placement of the arrow keys, pg up/down and home / end. Maltrons are pretty rare, so it'd be easy enough to trade it for a Kinesis if you think that would work better.

Here's a deathtrap I threw together at some point.

Offline escapu

  • Thread Starter
  • Posts: 6
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #3 on: Thu, 10 September 2020, 18:06:12 »
Oh wow. My first reply! Thank you - I didnt realise that single key PCBs were even a thing! This will make things much much easier - and now Im starting to think maybe I can add LEDs even.
As to Kinesis, I have considered it, but I think I need my arrow keys in 凸 layout.. Can't teach the old dog of my brain to learn new layout haha.
I am currently thinking that I will move the 10keys to leftmost of the centre section, so I can fit the arrow keys to bottom right. I haven't finalised the layout as programmable boards have the luxury to do so right?

Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #4 on: Fri, 11 September 2020, 05:26:50 »
mac's definitely do not play well with full n-key roll over (NKRO), this is a voodoo trick that only usually only works on windows. 6-key roll over is standard on usb and all you need. some older protocols were only 2-key roll over (no 4-key commands/shortcuts)

what adapter were you using?

before you do a full rewire, try a different converter. you can build one with a teensy 2.0 and can remap the keys in the converter. it's a great trick for older boards.
- Hasu's TMK PS2 to USB
      GH page - https://geekhack.org/index.php?topic=14618.0
      online keymap editor for hasu's projects - http://www.tmk-kbd.com/tmk_keyboard/editor/
      git - https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb
      full list of hasu's converters - https://geekhack.org/index.php?topic=72052.0
- Soarer also has one - https://geekhack.org/index.php?topic=17458.0


--


if doing a full rewire, here are some helpful tutorial/build logs
 - https://geekhack.org/index.php?topic=87689.0
 - https://deskthority.net/viewtopic.php?t=1067

i see you already found the kbfirmware site. (good place to start) it's a slightly older version of QMK but a good way to get your matrix & wiring figured out for a handwired board.
- i'd suggest using a teensy ++2.0 (which is AT90USB1286 in the controller selection in kbfirmware)
- you can start with the kbfirmware site or we can help you compile QMK from source. it's really not that bad and with your experience with being a programmer, it should be easy.

basically, there's:
- a config file - where you specify which pins used on controller, etc
- the keyboards electrical matrix and physical switch layout (just placement of switches, not the keymap)
- the keymap - this is where you specify what the switch will register when pressed. easy to do by hand but there are a couple WYSIWYG frontends as well (QMK Configurator, VIA). though QMK Configurator probably won't work for this instance and i haven't tried VIA for a teensy++2.0 powered board yet though it may be possible.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline escapu

  • Thread Starter
  • Posts: 6
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #5 on: Fri, 11 September 2020, 08:03:30 »
The converter I had was again 7 year old off the shelf model.
251553-0
Again, thank you very much. I did not know ps2 to USB converting controllers were even a thing.
As I would need a Teensy ++ 2.0 anyway for full wiring, it really would be a good idea to try that out first, and avoid rewiring!

Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #6 on: Fri, 11 September 2020, 09:31:15 »
my guess is it's something with the converter that's causing issues. (could be missing a pullup resistor)

teensy 2.0 has a different processor than teensy++2.0 (confusing, i know)
- teensy 2.0 & pro micro are ATMEGA 32U4
- teensy++2.0 is AT90USB1286

for full rewire - teensy++2.0
for converter - teensy 2.0 or pro micro (super cheap, make sure to get 5v 16Mhz, as there is also a 3.3v 8Mhz version which you don't want)
« Last Edit: Fri, 11 September 2020, 09:33:17 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline escapu

  • Thread Starter
  • Posts: 6
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #7 on: Sat, 31 October 2020, 20:06:29 »
Wow it's already been over a month since I started this.
Gathering parts from overseas has taken some time, but just wanted to post a short update of where the project currently is.

I contemplated the converter route as advised above, but looking at the diodes on the modifier keys only, I assumed that it was inherently the keyboard's limitation and went full rebuild. (By that time I had already ordered the switches so some of that decision was made for me)

254966-0
Removed all the keycaps
254968-1
Then all the switches & wires (and gave it a good wash)

Then I had a realisation of how cramped the case is to solder,
and had a go at a protototype to make sure I can follow instructions.

254980-2
study the diagram for the amoeba pcb (Thank you for letting me know these exist again btw!)
254970-3
Then start soldering. It's been something like 15 years since I last soldered even, so my first go at SMD is quite atrocious.
254972-4
Through-hole soldering is a bit better.
254974-5
Repeat 6 times
254976-6
Connect rows
254978-7
Connect columns
254982-8
Then study the Teensy++2.0 pinouts
254984-9
Then solder the rows and columns to some random pins without special functions.

« Last Edit: Sat, 31 October 2020, 20:35:10 by escapu »

Offline escapu

  • Thread Starter
  • Posts: 6
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #8 on: Sat, 31 October 2020, 20:23:13 »
..cont

Then pretty much going to https://docs.qmk.fm/#/hand_wire to follow the instruction which is laid out very well to follow.

Tested it out, and it seems to be NKRO for at least 6 keys being pressed at the same time which is good enough for me.

Apart from that I have also completed what layout I could live with and finished it in the layout editor.
The layout pretty much follows OSX UK ISO full size keyboard layout, so I don't have to re-learn everything from scratch.

254986-0
I can play around with more layers to move my hand less when Im comfortable with the physical position later.

Some more things to sort out;
1) LEDs, the amoeba PCB support non-RGB LED matrix, and my Gateron switches are with RGB LED slots, so it feels like an awful waste to not put LEDs in. I just can't seem to find a good enough guide on web that will allow me to figure out how I can drive these LEDs in matrix though. I have seen some people say they wired it in series which means the LED matrix wiring needs to be done differently so I am still researching how I can attach & drive LEDs with what I have. I don't want/need RGB, so just plane white LEDs that are on all the time should be okay with me, but I need to decide on LEDs before the switches get soldered on to the PCBs. Diode, capacitor and transistor calculation is not so straightforward either :(

2) Keycaps - The current keycaps seem to be DSA profile, which is hard to get in the first place, especially with all 1u + 2u duplicates. Any pointing towards a site with stock would be appreciated too.

I will update when I have made more progress.
Thanks all.

Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #9 on: Sun, 01 November 2020, 12:56:14 »
6key roll over is the standard over usb. the full key roll over is usually firmware trickery/voodoo (and usually only workd on windows). if on a mac, max is 6key roll over as well. NKRO usually causes more problems than it's worth.

layers... try the common Fn+number = Fkey (ex. Fn+1=F1) to start with. it's very common & very comfortable & super easy to transition to. i work in design programs all day & do more shortcuts than actual typing and i love this, started a long time ago with the introduction of the 60% form factor.
- i can help you with firmware if you get stuck.

1. leds... you'll probably need a mosfet to drive all the leds. leds don't draw that much power individually, but that many can draw a good bit, probably more than the controller can handle, so a mosfet is usually used to help drive the leds.
- you can see what keeb.io uses to drive the in switch leds on their boards
- also see this thread
- there's also a calculator on digikey
- depending on the leds you choose, 470ohm seems to be a pretty common choice

most in-switch rgb leds are recessed or mounted below the pcb (with a cutout in the pcb for the light to shine through)
255012-0
255014-1

2. DSA... do a search, available from many vendors, depends how much you want to spend & how long you want to wait... here are a couple
- signature plastics
- kdbfans
- some on amazon as well
- kprepublic
- drop (massdrop)
- aliexpress

sidenote: switch might not fit down through cutout with amoeba pcb attached. check first, would hate for you to prep everything this way & find out they don't fit & have to desolder everything & start over.

- if adding in-switch leds, the led will have to be removed to be able to remove the top part of the switch housing (if the case supports switch top removal, depends on the cutouts, but highly recommended). that way you can change up your switch without desoldering anything. just remove the top (as long as they are of the cherry/gateron 4-tab variant, this does not work for kailh/outemu one long tab on two sides) and you can swap out your spring, stem & topcap, leaving the bottom part of the housing in the plate (and still soldered).
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline phillismable

  • Posts: 13
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #10 on: Tue, 08 February 2022, 09:18:20 »
Hi is there any progress on this build as I'm trying to figure out what to do with my Maltron.

Thanks

Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #11 on: Tue, 08 February 2022, 10:17:06 »
@phillismable, what do you want to do with it?
- reprogram?
- redo entirely? only using shell?
- just change switches?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline phillismable

  • Posts: 13
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #12 on: Thu, 10 February 2022, 04:08:37 »
Hi,

I was wondering how far along you were with your build as I was following it as a guide.  :D

I was looking for a number keypad as I hate the one in the middle of the Maltron as I have an artifical right shoulder and moving my hand in instead of out to the side hurts. 
Then I saw this www.amazon.co.uk/Koolertron-Programmable-Mechanical-Keyboard-46-Macro/dp/B076WZHKBZ

And I thought hmmmmm I can add that to the Maltron have the best of both worlds, then as happens things snowball and ideas come thick and fast.
So basically Maltrons shape on a full sized keyboard, with the central control layout for apps like photoshop resolve visual studio.

I want to remap the centre part of the keyboard (28 keys) change them to blank keycaps and reprogram them when I want to, to whatever I want.    :thumb:
Usemacros if possible as I spend too much time in Visual Studio, so have it programable as much as possible.
I hate where the current cursor keys are as prefer the standard layout,
And basically bring the Keyboard in to the new CENTURY just to show Maltron what they are missing as it's also a bloody great gaming keyboard for FPS as your hands don't get tired.


So Far:
I've changed out the switches to Clicky Blue one's as the Browns weren't tactile enough for me and did nothing to make me love the board. Then decided I needed to rearrange some keys, so did a bodge job on swapping over the Tab and Backspace keys, increased my workflow no end with just those changes.

Ordered some nice Blue and White DSA Keycaps that will be here in March, will also order an Ergodox set in Black, that way I can have Black thumb clusters and cmd keys and white letters.

Parts List:
I have ordered 300 1n4148 diodes, a new soldering station as my 10 year old Iron sucks balls, some good solder and flux. Should all be here for the weekend.

Today my new Teensy 4.1 (Without Pins) arrived from Amazon.  I will learn more about that tomorrow when I have free time (Friday).

I've already built my keyboard layout, and I have a json file that was built from it from KBFirmware, and that's as far as I've got to.

So, so far I'm not doing too bad.... but I could do with a helping hand.

I'm having huge issues sourcing keyboard wire, I want some of the wire that Maltron used when they built it, I've called and emailed and have no reply from them which is a shame.  :(
I think it's .3 magnet wire enamal coated but with a solderable core, if anyone knows what it is and where to buy it please let me know as it will make the build so much cleaner for a first time build.

I think at some point I'm going to buy the Koolertron just so that I can tear it down to see how they have their's working, and then graft it to the side of the Maltron.

Let me know what you think, many thanks


Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #13 on: Thu, 10 February 2022, 04:47:54 »
yes, the wire is magnet wire. enamel coated solid core copper wire.
- i've never used it, but i hear the enamel coating can be difficult.

really any wire will do.
- i've used the wires out of a network cable cat5/6, etc... they are solid core 24-26 gauge with insulation that can easily be stripped or separated.
- solid core is easier to work with than stranded wire for building the matrix for these keyboards

Some good handwiring articles:
https://geekhack.org/index.php?topic=87689.0
https://deskthority.net/viewtopic.php?t=1067

as far as controller....
i wouldn't have picked a teensy 4.1 (currently not natively supported by qmk, unless you've found a work around. ARM, ChibiOS).
https://github.com/kinx-project/kint/issues/5
https://giters.com/qmk/qmk_firmware/issues/12843

i would have chosen the Teensy++ 2.0 (fully supported in qmk and is also one of the processors you can choose in kbfirmware.com)

kbfirmware is a good starting point, but if you're familiar with code then try building your firmware from the current source code.
kbfirmware is based off an old snapshot of QMK (from 2017 i believe)
- if you need help, i've done firmware for a number of handwired boards. i've even been able to use VIA for ones that are not in any repo.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline phillismable

  • Posts: 13
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #14 on: Thu, 10 February 2022, 06:36:56 »
The Teensy 2.0++ AT90USB1286 were all out of stock when I looked the other day, but just sourced on from Manchester, I can always use the other board at some point when I'm better at doing this type of thing.  :D


Thanks for the heads up probably saved me a day of frustration  :thumb:

Will let you know how things progress  many thanks

Offline nevin

  • Posts: 1646
  • Location: US
Re: Maltron 3D ergonomic rewiring + Teensy project
« Reply #15 on: Thu, 10 February 2022, 07:31:47 »
no problem.

there are a bunch of arm boards that are slowly being supported through ChibiOS but noting is official in qmk yet.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68