Tenkeyless Maltron

User avatar
werther_de_goethe

14 Feb 2016, 19:53

Why a tenkeyless Maltron? (Because people who ask why break nothing because they don't get anything done)

Actually, I just type a lot of plain text plus a few programming symbols, so the central key area was generally useless for me. And it meant fewer keys to put diodes in, fewer key modules to buy, fewer keys to buy, fewer things to go wrong, smaller number of controller I/O pins, etc. (And I like the look.)

When I ordered the shells, I had them go ahead and glue in the runners that align the bottom plate because I figured they'd have a better chance of getting them to align right than I would. Some thinks it impedes access to the function row, but that area is tight no matter what. I also had them leave the USB and LED holes un-punched.
view of case from top
view of case from top
IMG_1649.JPG (702.7 KiB) Viewed 4405 times
view of case from bottom
view of case from bottom
IMG_1650.JPG (873.23 KiB) Viewed 4405 times
view of bottom plate
view of bottom plate
IMG_1648.JPG (690.8 KiB) Viewed 4405 times
I z-bent a length of .5" aluminum bar, drilled it to attach the PCB, and sanded + gouged the inside of the case to get a good adhesion and attached it with JB Kwik / Kwikweld.
JB weld
JB weld
IMG_1658.JPG (519.92 KiB) Viewed 4405 times
Then, after measuring against the PCB, I cut and drilled the USB hole.
USB hole
USB hole
IMG_1661.JPG (795.17 KiB) Viewed 4405 times
(using Cherry MX reds, obviously) I cracked open 82 switches and install diodes. For parts of the installation I was using a wire-wrap tool to give the wire a tight connection to the post, but one pin on the cherry module is too thin to withstand the twist, so I routed the diode to that pin and soldered it and used the stronger pin to attached the column wires.
modules + diodes
modules + diodes
IMG_1659.JPG (409.5 KiB) Viewed 4405 times
bag of dioded modules
bag of dioded modules
IMG_1660.JPG (522.91 KiB) Viewed 4405 times
I started with the function row, and instead of working from the back, threaded the wire through the holes, soldered it and placed the switch. At the end I realized i should've done this row last, because I had to pop them back out to attach and feed through the column wires. For the first couple of switches I burned the insulation off with the soldering iron, but didn't like the results. So I started feeding lengths through an OK machines ST 100 stripper (straight down through the blades at intervals) and pulled the wire out and broke the rest of the insulation with my nails and pulled a gap in it. The insulation on this 28AWG wire-wrap wire worked nicely that way.
stripped wire
stripped wire
IMG_1677.JPG (962.65 KiB) Viewed 4405 times
sewing
sewing
IMG_1663.JPG (800.27 KiB) Viewed 4405 times
f-row backside
f-row backside
IMG_1666.JPG (465.48 KiB) Viewed 4405 times
popped module
popped module
IMG_1675.JPG (591.51 KiB) Viewed 4405 times
Then it's just a matter of working through all the column and rows.
rows
rows
IMG_1669.JPG (754.26 KiB) Viewed 4405 times
cols
cols
IMG_1678.JPG (847.11 KiB) Viewed 4405 times
Then wiring up a cross-connect to the rows on each side, and attacking ribbon cables and connectors for the columns, rows, and a capslock LED. Instead of drilling a hole, I fitted the LED in the switch. To get both the LED and diode in, I put heat-shrink tubing on the LED's leads, which meant I had to re-drill the hole in the module.
cabling
cabling
IMG_1684.JPG (816.9 KiB) Viewed 4405 times
TO BE CONTINUED...
Last edited by werther_de_goethe on 14 Feb 2016, 21:48, edited 3 times in total.

seaworthy

14 Feb 2016, 20:08

Wow. Very cool and ambitious project; It would be very interesting to see a video of you typing on it once completed. Good luck buttoning it up.

User avatar
werther_de_goethe

14 Feb 2016, 20:17

(CONTINUED)

Then onto the controller board. By disabling JTAG, the adafruit atmega32u4 breakout board has enough pins to handle a 7x12 matrix and an LED or two.
controller bottom
controller bottom
IMG_1686.JPG (678.11 KiB) Viewed 4386 times
controller top
controller top
IMG_1688.JPG (704.41 KiB) Viewed 4386 times
controller installed
controller installed
IMG_1689.JPG (835.59 KiB) Viewed 4386 times
Then all was left was the keys. These are Signature Plastics DSA GDE PBT. Due to the warpy nature of PBT and the vagaries of holes in the case, some keys had to be filed to deal with rubbing. The blue LED won't shine through the key cap, but it reflects off the bottom and lights up the surrounding case and can be seen quite plainly even in a lit room. The 8 home-row keys are deep dish.
near complete
near complete
IMG_1689-1.JPG (792.05 KiB) Viewed 4386 times
keys in place
keys in place
IMG_1691.JPG (736.36 KiB) Viewed 4386 times
TMK was the basis for the firmware. But I decided on an alternate debounce algorithm based on a continually updated window of anded intervals.

Relevant portions from config.h and matrix.c:

config.h:

Code: Select all


#define DEBOUNCE_MAX_SAMPLES    10
/* The minimum period in micro seconds (u) of positive key press */
/* equals whole sample window */
#define DEBOUNCE_SAMPLE_WINDOW  5000
...
matrix.c

Code: Select all

static uint8_t DEBOUNCE_INDEX = 0;
static double DEBOUNCE_SAMPLE_DELAY = (double)DEBOUNCE_SAMPLE_WINDOW / (double)DEBOUNCE_MAX_SAMPLES;

static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_2d_debouncing[MATRIX_ROWS][DEBOUNCE_MAX_SAMPLES];
......
void matrix_init(void)
{
......
    // initialize matrix state: all keys off
    // samples all zeroed
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
	for(uint8_t j=0; j < DEBOUNCE_MAX_SAMPLES; j++) {
            matrix_2d_debouncing[i][j] = 0;
        }
    }
}
......
uint8_t matrix_scan(void)
{

    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {

        select_row(i);
        _delay_us(30);  // without this wait read unstable value.
        matrix_row_t cols = read_cols();
        unselect_rows();

        matrix_2d_debouncing[i][DEBOUNCE_INDEX] = cols;
    }

    DEBOUNCE_INDEX++;

    if (DEBOUNCE_INDEX >= DEBOUNCE_MAX_SAMPLES) {
        DEBOUNCE_INDEX = 0;
    }

    for (uint8_t i=0; i < MATRIX_ROWS; i++) {

        matrix[i] ^= matrix[i]; // xor to all 0s
        matrix[i] = ~matrix[i]; 

        for(uint8_t j=0; j < DEBOUNCE_MAX_SAMPLES; j++) {
            matrix[i] &= matrix_2d_debouncing[i][j];
        }
    }
    
    // will call _delay_ms() instead if arg > ( 768 / CPU_FREQ_IN_MHz )
    _delay_us(DEBOUNCE_SAMPLE_DELAY);

    return 1;
}
......
And here's the layout:
maltron tenkey dvorak
maltron tenkey dvorak
tenkey-dvorak.jpg (134.85 KiB) Viewed 4386 times
Because of the physical layout on the maltron, it made more since to put the capslock on the left pinky, for me. Re-mapping it on the standard keyboard was only ever a hack. And the maltron allows for true symmetry with the modifiers. (I've never been able to touch-type the right ctrl and alt keys on the standard keyboard). And I'm a unix admin, so the the modifiers and escape are laid out for easy access in vi or emacs. And 5 and 6 are split as the should be. (I'm too used to typing ctrl-8 with my middle finger).

User avatar
vivalarevolución
formerly prdlm2009

15 Feb 2016, 01:57

Cool. What was the motivation for this? Save money from the normal Maltron? Create a programmable Maltron?

If the price isn't too high and you're willing to share firmware, I might follow your lead.

User avatar
werther_de_goethe

15 Feb 2016, 03:44

seaworthy wrote: Wow. Very cool and ambitious project; It would be very interesting to see a video of you typing on it once completed. Good luck buttoning it up.
It's like being sent back for remedial typing. Movement is more conservative than a flat keyboard. I want to keep leaping too far and hit the bottom of the number row with my fingernail.

User avatar
werther_de_goethe

15 Feb 2016, 04:21

vivalarevolución wrote: Cool. What was the motivation for this? Save money from the normal Maltron? Create a programmable Maltron?

If the price isn't too high and you're willing to share firmware, I might follow your lead.
With all the customization: diodes on every switch, layout, LED placement, using mx reds, custom controller, and SP key caps, it seemed like it would be just as easy to get the thing and put it together myself as it would be to try and tell someone else to do it.

I plan to upload the firmware source. I'm doing a little cleaning on it at the moment.

Pricing:

(roughly)(prices include shipping within US)

£104.00 for 2 custom-punched shells (£36.00 per shell) (£32.00 shipped from UK to US. The shipping for one was the same as for two, so I said why not get two.)

$37 for usb extender and break-out board

$36 on ribbon cables and proto board

$69 on wire-wrap wire, LEDs, diodes, connectors (of course I bought a whole box of various sizes on connectors and pins, so it cost a little more than it would piece-meal.)

$87 on key caps (1 std base blank pbt, 2 number pad sets, and 2 sets of single deep dish keys)

$61 on switches and a pair of mx key top removal tools from mechanicalkeyboards.com

$10 on jb weld and aluminum bar

TOTAL: ~$450

But then of course there's the time and work. (And I've come the believe the people at maltron earn everything they get to put one together---I just spent an hour figuring out how two rows seemed to apparently this evening decide to short together near the controller and produce double key presses.) Of course, I already had wire strippers, a soldering iron, solder, flux, multi-meter, mini needle-nose pliers, clamping tweezers, a manual wire-wrap tool, heat-shrink tubing, resistors, and such.

jacobolus

15 Feb 2016, 04:38

I wonder if anyone has tried designing their own DIY keyboard using vacuum formed plastic.

User avatar
vvp

15 Feb 2016, 10:23

Nice! Pinkie columns doe not look that well accessible but very good overall. And the case is pretty cheap.

I can recommend using enamelled (magnet) wire for connecting matrices or pins on a generic PCB. No need for wire strippers. Much quicker work. For more info, read the text around the last image of this post: post247068.html#p247068

User avatar
werther_de_goethe

15 Feb 2016, 16:24

vvp wrote: Nice! Pinkie columns doe not look that well accessible but very good overall. And the case is pretty cheap.

I can recommend using enamelled (magnet) wire for connecting matrices or pins on a generic PCB. No need for wire strippers. Much quicker work. For more info, read the text around the last image of this post: post247068.html#p247068

Yes, I knew about enamel wire. If I do another one, that's probably what I'll use. The thing I'd most like to find is some right-angle 2.54mm break-away headers with extra long pins on the board side so I could wire wrap to them like I did with the atmega headers. But no luck with that yet.

User avatar
werther_de_goethe

15 Feb 2016, 16:55

Firmware source is here.
Attachments
maltron_tenkeyless_src.tar.gz
(6.34 KiB) Downloaded 168 times

nothing4me

19 Jun 2016, 08:51

Is it possible to laser scan the case? Or maybe take a bunch of pictures so I could turn it into a model? That way anyone can print this themselves.

Thank you!

Post Reply

Return to “Workshop”