Author Topic: Homemade keyboards - PCB crafting - Teensy tinkering.  (Read 39994 times)

0 Members and 1 Guest are viewing this topic.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« on: Tue, 22 February 2011, 09:45:39 »
This is my go on a custom layout keyboard. My idea was to keep everything as familiar as possible while improving a little on the horrible stagger of the regular qwerty layout.

I made a pcb design using the software from http://expresspcb.com/ which I then printed and ironed onto a copper laminate for etching. The home brew etching method worked like a charm. I used a single-sided pcb and a lot of jumpers to connect the columns, the rows are drawn solid.

The resulting pcb design. Not all solders came out great... I relly regretted my decision on using wires to connect the controller when soldering them. It was a mess getting everything into there =P Next time I will use narrower traces, to be able to draw them all up to the controller, and minimize the use of wires.


And the front with some blank filco keys. The switches are the plate mounted ones. I didn't care much to have to drill all those extra holes... I used a dremel drill stand and good quality carbide drill bits. The drill stand was not quite sturdy enough to handle the 4mm bit so some of those holes got a bit large. All the switches are straight enough not to jam the keys at least. The wider ones will have stabilizers to keep them in place too. Also I might get a plate cut for me at some point in the future.


Using a teensy as the controller.


Here is the code. I'm certainly no ace at c programming so there is surely a lot that can be done to improve on it. This example.c file contains all my own code. It goes together with the usb_keyboard project.

The key mapping layout somewhat arbitrary. I will be trying different ones, moving keys around.

This code is somewhat outdated and contains at least one pretty severe bug. Updated code will be available in my keyboard design guide.
Code: [Select]
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include &quot;usb_keyboard.h&quot;

#define bool            uint8_t
#define true            1
#define false           0

#define _PINB           (uint8_t *const)&PINB
#define _PORTC          (uint8_t *const)&PORTC
#define _PORTD          (uint8_t *const)&PORTD
#define _PORTF          (uint8_t *const)&PORTF

#define NULL            0
#define NA              0
#define KEY_MACRO       0
#define KEY_FN          0
#define FN_KEY1_ID     11*6+0
#define FN_KEY2_ID      2*6+0
#define MACRO_KEY_ID    0*6+0

const uint8_t is_modifier[84] = {
  1,               1,               1,               0,               0,               0,  // COL  0
  NA,              NA,              0,               0,               0,               0,  // COL  1
  1,               0,               0,               0,               0,               0,  // COL  2
  1,               0,               0,               0,               0,               0,  // COL  3
  0,               0,               0,               0,               0,               0,  // COL  4
  0,               0,               0,               0,               0,               0,  // COL  5
  0,               0,               0,               0,               0,               0,  // COL  6
  0,               0,               0,               0,               0,               0,  // COL  7
  0,               0,               0,               0,               0,               0,  // COL  8
  0,               0,               0,               0,               0,               0,  // COL  9
  1,               0,               0,               0,               0,               0,  // COL 10
  1,               0,               0,               0,               0,               0,  // COL 11
  NA,              NA,              0,               0,               0,               0,  // COL 12
  1,               1,               0,               0,               0,               0   // COL 13
};

const uint8_t layer1[84] = {
//ROW 0            ROW 1            ROW 2            ROW 3            ROW 4            ROW5
  KEY_MACRO,       KEY_LEFT_SHIFT,  KEY_LEFT_CTRL,   KEY_TAB,         KEY_ESC,         NULL,    // COL  0
  NA,              NA,              KEY_A,           KEY_Q,           KEY_TILDE,       KEY_F1,  // COL  1
  KEY_FN,          KEY_Z,           KEY_S,           KEY_W,           KEY_1,           KEY_F2,  // COL  2
  KEY_LEFT_ALT,    KEY_X,           KEY_D,           KEY_E,           KEY_2,           KEY_F3,  // COL  3
  NA,              KEY_C,           KEY_F,           KEY_R,           KEY_3,           KEY_F4,  // COL  4
  NA,              KEY_V,           KEY_G,           KEY_T,           KEY_4,           KEY_F5,  // COL  5
  KEY_SLASH,       KEY_BACKSLASH,   KEY_LEFT_BRACE,  KEY_RIGHT_BRACE, KEY_5,           KEY_F6,  // COL  6
  KEY_SPACE,       KEY_B,           KEY_QUOTE,       KEY_MINUS,       KEY_EQUAL,       KEY_F7,  // COL  7
  NA,              KEY_N,           KEY_H,           KEY_Y,           KEY_6,           KEY_F8,  // COL  8
  NA,              KEY_M,           KEY_J,           KEY_U,           KEY_7,           KEY_F9,  // COL  9
  KEY_RIGHT_ALT,   KEY_COMMA,       KEY_K,           KEY_I,           KEY_8,           KEY_F10, // COL 10
  KEY_FN,          KEY_PERIOD,      KEY_L,           KEY_O,           KEY_9,           KEY_F11, // COL 11
  NA,              NA,              KEY_SEMICOLON,   KEY_P,           KEY_0,           KEY_F12, // COL 12
  KEY_RIGHT_CTRL,  KEY_RIGHT_SHIFT, KEY_ENTER,       KEY_BACKSPACE,   KEY_DELETE,      NULL     // COL 13
};

const uint8_t layer2[84] = {
//ROW 0            ROW 1            ROW 2            ROW 3            ROW 4            ROW5
  NULL,            KEY_LEFT_SHIFT,  KEY_LEFT_CTRL,   KEY_TAB,         KEY_ESC,         NULL, // COL  0
  NA,              NA,              KEY_DELETE,      KEY_INSERT,      NULL,            NULL, // COL  1
  KEY_FN,          NULL,            KEY_LEFT,        KEY_HOME,        KEY_PRINTSCREEN, NULL, // COL  2
  KEY_LEFT_ALT,    NULL,            KEY_DOWN,        KEY_UP,          KEY_SCROLL_LOCK, NULL, // COL  3
  NULL,            NULL,            KEY_RIGHT,       KEY_END,         KEY_PAUSE,       NULL, // COL  4
  NULL,            NULL,            KEY_PAGE_DOWN,   KEY_PAGE_UP,     NULL,            NULL, // COL  5
  NULL,            NULL,            NULL,            NULL,            NULL,            NULL, // COL  6
  KEY_SPACE,       NULL,            NULL,            NULL,            NULL,            NULL, // COL  7
  NULL,            KEYPAD_0,        KEYPAD_PERIOD,   KEY_NUM_LOCK,    NULL,            NULL, // COL  8
  NULL,            KEYPAD_1,        KEYPAD_4,        KEYPAD_7,        KEYPAD_PLUS,     NULL, // COL  9
  KEY_RIGHT_ALT,   KEYPAD_2,        KEYPAD_5,        KEYPAD_8,        KEYPAD_MINUS,    NULL, // COL 10
  KEY_FN,          KEYPAD_3,        KEYPAD_6,        KEYPAD_9,        KEYPAD_ASTERIX,  NULL, // COL 11
  NA,              NA,              NULL,            NULL,            KEYPAD_SLASH,    NULL, // COL 12
  KEY_RIGHT_CTRL,  KEY_RIGHT_SHIFT, KEY_ENTER,       KEY_BACKSPACE,   KEY_DELETE,      NULL  // COL 13
};

const uint8_t *layout = layer1;

uint8_t *const row_port[6]  = { _PINB,  _PINB,  _PINB,  _PINB,  _PINB,  _PINB};
const uint8_t   row_bit[6]  = {  0x01,   0x02,   0x04,   0x08,   0x10,   0x20};
uint8_t *const col_port[14] = {_PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTC, _PORTD, _PORTD, _PORTF, _PORTF, _PORTF, _PORTF, _PORTF, _PORTF};
const uint8_t   col_bit[14] = {  0x01,   0x02,   0x04,   0x08,   0x10,   0x40,   0x40,   0x80,   0x01,   0x02,   0x10,   0x20,   0x40,   0x80};

bool pressed[84];
uint8_t queue[7] = {0,0,0,0,0,0,0};
uint8_t mod_keys = 0;

void init(void);
void send(void);
void poll(void);
void key_press(uint8_t key_id);
void key_release(uint8_t key_id);

int main(void) {
  init();
  for(;;) poll();
}

void send(void) {
  uint8_t i;
  if(pressed[FN_KEY1_ID] || pressed[FN_KEY2_ID])
    layout = layer2;
  else
    layout = layer1;
  for(i=0; i<6; i++)
    keyboard_keys[i] = layout[queue[i]];
  keyboard_modifier_keys = mod_keys;
  usb_keyboard_send();
}

void poll() {
  uint8_t row, col, key_id;
  _delay_ms(5);
  for(col=0; col<14; col++) {
    *col_port[col] &= ~col_bit[col];
    _delay_us(1);
    for(row=0; row<6; row++) {
      key_id = col*6+row;
      if(!(*row_port[row] & row_bit[row])) {
if(!pressed[key_id])
 key_press(key_id);
      }
      else if(pressed[key_id])
key_release(key_id);
    }
    *col_port[col] |= col_bit[col];
  }
}

void key_press(uint8_t key_id) {
  uint8_t i;
  pressed[key_id] = true;
  if(is_modifier[key_id])
    mod_keys |= layer1[key_id];
  else {
    for(i=5; i>0; i--) queue[i] = queue[i-1];
    queue[0] = key_id;
  }
  send();
}

void key_release(uint8_t key_id) {
  uint8_t i;
  pressed[key_id] = false;
  if(is_modifier[key_id])
    mod_keys &= ~layout[key_id];
  else {
    for(i=0; i<6; i++) if(queue[i]==key_id) break;
    for(; i<6; i++) queue[i] = queue[i+1];
  }
  send();
}

void init(void) {
  uint8_t i;
  CLKPR = 0x80; CLKPR = 0;
  usb_init();
  while(!usb_configured());
  _delay_ms(1000);
  // PORTB is set as input with pull-up resistors
  // PORTC,D,F are set to high output
  DDRB  = 0x00; DDRC  = 0xFF; DDRD  = 0xFF; DDRF  = 0xFF;
  PORTB = 0xFF; PORTC = 0xFF; PORTD = 0xFF; PORTF = 0xFF;
  for(i=0; i<84; i++) pressed[i] = false;
}
« Last Edit: Tue, 05 April 2011, 12:31:12 by PrinsValium »

Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #1 on: Tue, 22 February 2011, 10:36:25 »
Awesomeness!
I like your choice of layout.

Offline kill will

  • Posts: 231
    • http://www.jerseyshoredailies.com
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #2 on: Tue, 22 February 2011, 13:00:57 »
WOW i am very impressed.  Excellent work and design.
I <3 BS

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #3 on: Tue, 22 February 2011, 13:35:35 »
Thanks =) I think I might be on to something good here. Next I think I will do a full sized one. After attaching this one to something sturdier for a base, perhaps, at least. I like them full size ones better. Keycaps there will be plenty of, same cost ordering a few as ordering tons of them from SP...

Offline Half-Saint

  • Posts: 371
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #4 on: Fri, 04 March 2011, 03:31:18 »
Maybe do a two-side PCB next time? Easier to do the teensy wiring :) Apart from that, excellent job!
IBM Model M (6) - Acer Alcatel 6312-KW - IBM Model M Space Saver - IBM Model M 122-key - Cherry G80-3000 (2) - IBM Model F AT - TG3 BL82A (2)

[SIGPIC][/SIGPIC]
_______________________________________________
My geek blog: http://onlyageek.blogspot.com/
Flickr: http://www.flickr.com/photos/mr_mayhem/

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #5 on: Fri, 04 March 2011, 04:12:47 »
I just thought it might be hard to make a 2-sided pcb myself at home. I might try that anyhow I think. Also I have been trying out Eagle to design pcb layouts. It can output gerber files and I have understood that many sites producing custom pcbs uses this format. So I might get the "real" thing with solder masks, through plated holes, silkscreen layer and so on.

I also fixed a few problems in the code and now I am working on navigation and numpad layers as well as macro programmability.

All in all, I am a bit surprised over how smoothly everything came together. I'd dare to say that anyone with decent hand tool skills and some basic programming knowledge should be able to put together a home built keyboard. It takes some money, but I don't think it would have to be silly amounts...

And also, my kaycaps are on a plane somewhere above the atlantic at the moment =D

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #6 on: Fri, 11 March 2011, 12:10:50 »
Double shots are in =D I was pretty sure I would be getting the inverse of that color scheme though... That doesn't really concern me a lot but some of the number labels seem to be of a larger font. That I will probably whine to SP about.


Hundred and one blank keys


Forty nine and two relegendable keys


Another day I will take pictures in better lighting...


The bizarre amount of wider keys are due to the fact they are not cheaper bought in smaller quantities. So I thought I might be able to pass some of them along to fellow geekhackers for a no profit price. Single width keys are usually bought in larger quantities and therefor possible to order more or less at will. Apparently SP are unable to do double shots keys wider than 2 units in the DSA family. All keys are of that profile for easy swapping.

Offline Agiel

  • Posts: 20
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #7 on: Sun, 13 March 2011, 17:44:23 »
Very nice. Everyone that does something about the horrible stagger gets a plus in my book. I'm a bit curious about the layout though. I don't know how you type, but to me the left side of the bottom row is off by one key.

See my sig for my dream keyboard :)
[SIGPIC][/SIGPIC]

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #8 on: Mon, 14 March 2011, 02:42:19 »
I have always used my ring finger to hit 'z' shifting that half of the bottom row by one key altogether. Also I wanted to have 'shift' there under my pinky like on an ANSI layout. The bigger difference for me will be to learn the new location of 'ä' and 'å'. I have some loose plans to build my own layout, and then that will be a even smaller issue =) The repositioning af the my right hand next to 'enter' and 'backspace' feels really good. I am pretty sure I will redo the number row on my next prototype, with all single with keys, and widening some of the wider keys to allow for stabilizers under more of them (most importantly the heavily used ones 'ctrl', 'enter' and 'bcksp').

Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #9 on: Wed, 16 March 2011, 05:51:53 »
I am curious, how does the position of the Å, Ä and B keys work for you, them being so far from the home position?
I also use to press B with my right index finger, but with symmetric staggering, the key is 1/4 key more to the left.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #10 on: Wed, 16 March 2011, 07:01:05 »
In my opinion the extra reach for the indexfingers make up for the decrease in pinky usage. A better layout would probably put some lesser used characters on those keys. But for now I am just trying to keep everything as familiar as possible. If I would have been a better typist perhaps it would have been a greater issue, I really don't know. I haven't been using the board a whole lot yet either. I'll have to put it to some use before I can have an honest opinion about it.

This morning I had an interesting idea. Instead of increasing the width of all modifier keys and stabilizing them it should be possible to take away 1/4" from all of them and make the whole thing the exact same size as a standard keyboard layout. That would allow me to use a casing from just about any regular keyboard. I will probably try this for the next prototype.
« Last Edit: Wed, 16 March 2011, 07:47:16 by PrinsValium »

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #11 on: Wed, 16 March 2011, 08:25:40 »
Just to show I am no better than anyone else... Last second I remembered I had read I needed to mirror the image before ironing it to the laminate. Made new prints, ironed them and put the pcb in its bath. After a while I started to have this feeling I hadn't really considered if I had been designing the pcb viewed from top or bottom and that I didn't really have any idea which pin was which at the swithes *doh*-moment =) Glad I started out small at least.

Offline regicide

  • Posts: 70
  • Location: Wellington, New Zealand
  • Software developer and Open source hacker
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #12 on: Wed, 16 March 2011, 19:20:44 »
Quote from: PrinsValium;312624
Show Image


Looking at both that and your PCB, are you not using the MX keys with fixing pins or did you do something else sneaky I am missing?
2 Kinesis advantages (MX browns)

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #13 on: Wed, 16 March 2011, 22:31:21 »
Quote from: regicide;312945
Looking at both that and your PCB, are you not using the MX keys with fixing pins or did you do something else sneaky I am missing?


No, I thought they would be more work than help. Omewhere around 50% extra holes to drill... There are plenty already. Also for them to do any good in switch alignment I guess they would have to be pretty tight and absolutely straight. As it is made now it is possible to give the switch a slight twist after soldering it. If it is a little more skewed it can be resoldered at a slightly different angle.

Offline regicide

  • Posts: 70
  • Location: Wellington, New Zealand
  • Software developer and Open source hacker
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #14 on: Wed, 16 March 2011, 22:52:53 »
Quote from: PrinsValium;313033
No, I thought they would be more work than help. Omewhere around 50% extra holes to drill... There are plenty already. Also for them to do any good in switch alignment I guess they would have to be pretty tight and absolutely straight. As it is made now it is possible to give the switch a slight twist after soldering it. If it is a little more skewed it can be resoldered at a slightly different angle.

So you bought the plate mounted switches with diodes?
I can understand your justification and in hind sight it was probably a good decision (having already purchased my keys with mounting pins I am stuck with them).

I previously found the guide for making the PCBs at home but the example PCB looked a little low quality, seeing your results has certainly changed my mind, I will give it a go for prototyping and depending upon results possibly even the final model.
« Last Edit: Wed, 16 March 2011, 23:00:03 by regicide »
2 Kinesis advantages (MX browns)

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #15 on: Thu, 17 March 2011, 00:16:24 »
Actually I put the diodes in myself. It was a bit harder to get a printout of the larger pcb on a suitable paper. I think there were some paper left in the toner which somehow let the etching agent seep through and affect the copper underneath (or I just left the laminate in for too long). Better paper probably helps, I read somewhere about using those waxed papers used to wrap sandwiches and stuff. It is not water soluble but dabbing it with alcohol on the back after ironing it should dissolve the wax enough to release the toner. I need to do more experimenting on paper qualities and ironing technique =) Mostly to achieve thinner traces of good quality. The traces I have now are probably something like 0.06" and I would like to get down to at least half of that. The pcb should probably be laquered to protect the copper over time. For prototyping it is a cool technique though.

Offline regicide

  • Posts: 70
  • Location: Wellington, New Zealand
  • Software developer and Open source hacker
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #16 on: Thu, 17 March 2011, 00:23:51 »
Quote from: PrinsValium;313084
Actually I put the diodes in myself.

Put the diodes in as in opened up each individual key and inserted it in the pre-cut holes? :o
2 Kinesis advantages (MX browns)

Offline Half-Saint

  • Posts: 371
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #17 on: Thu, 17 March 2011, 02:23:41 »
Quote from: regicide;313042
I can understand your justification and in hind sight it was probably a good decision (having already purchased my keys with mounting pins I am stuck with them).


You know, you could just cut the mounting pins. They're plastic after all ;)
IBM Model M (6) - Acer Alcatel 6312-KW - IBM Model M Space Saver - IBM Model M 122-key - Cherry G80-3000 (2) - IBM Model F AT - TG3 BL82A (2)

[SIGPIC][/SIGPIC]
_______________________________________________
My geek blog: http://onlyageek.blogspot.com/
Flickr: http://www.flickr.com/photos/mr_mayhem/

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #18 on: Thu, 17 March 2011, 03:16:46 »
Quote from: regicide;313087
Put the diodes in as in opened up each individual key and inserted it in the pre-cut holes? :o


Yes =) and yes, it gets old pretty quick.. It is not impossibly tedious though. I bought mine from mouser and they don't seem to stock the ones with diodes.

Offline regicide

  • Posts: 70
  • Location: Wellington, New Zealand
  • Software developer and Open source hacker
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #19 on: Thu, 17 March 2011, 04:06:01 »
Quote from: Half-Saint;313119
You know, you could just cut the mounting pins. They're plastic after all ;)
I don't like the idea of damaging my beautiful switches though :p
Although I have considered it, I guess if it means the switches last longer so be it, less stress on the solder and all >.>

Quote from: PrinsValium;313131
Yes =) and yes, it gets old pretty quick.. It is not impossibly tedious though. I bought mine from mouser and they don't seem to stock the ones with diodes.
I also got mine from mouser so had the same issue, I was going to mount all the diodes above the keys but noticed the drilled holes in the bottom and how they seemed to line up with the drilling patterns, but I hadn't found any documentation of anyone adding their own diodes.

Thanks again for all your great work, you got fantastic results and it was very educational for me :)

EDIT:
Any tips for taking apart the MX switches? Just took one of mine apart now using a pair of scissors to shimmy one set of the clips at a time, worked fine but seemed a bit delicate
« Last Edit: Thu, 17 March 2011, 04:37:56 by regicide »
2 Kinesis advantages (MX browns)

Offline cbf123

  • Posts: 82
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #20 on: Thu, 17 March 2011, 12:12:51 »
Quote from: PrinsValium;313084
It was a bit harder to get a printout of the larger pcb on a suitable paper. I think there were some paper left in the toner which somehow let the etching agent seep through and affect the copper underneath (or I just left the laminate in for too long). Better paper probably helps, I read somewhere about using those waxed papers used to wrap sandwiches and stuff.


When I was making custom boards for headphone amps I used the laser-printable plastic transparency sheets.   Worked nicely, could get quite fine lines.  Of course, photo-etching removes the element of risk of the ironing process.
Daily drivers are:
Microsoft Natural (the original, and still going strong)
Microsoft Natural Elite

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #21 on: Thu, 17 March 2011, 12:27:30 »
Quote from: regicide;313134
Any tips for taking apart the MX switches? Just took one of mine apart now using a pair of scissors to shimmy one set of the clips at a time, worked fine but seemed a bit delicate


I use a straight pointy pair of tweezers. Lift the clips on one side, pinch the switch to keep it from snapping back and lift the opposite tabs, Pretty much the same as you I guess, just not quite as cutting edge...

Quote from: cbf123;313333
When I was making custom boards for headphone amps I used the laser-printable plastic transparency sheets.   Worked nicely, could get quite fine lines.  Of course, photo-etching removes the element of risk of the ironing process.


Yeah, but photo-etching introduces a couple of extra steps and chemicals. Don't you need a UV-light for that also? Doing only a few prototypes I think it would probably be possible to order custom pcbs almost as cheap as getting all the equipment..

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #22 on: Tue, 05 April 2011, 12:36:49 »
I need to get a gray card... and some more sunlight =P A bit bummed I didn't get the bottom row keys. I didn't think I would use the caps on my filco I guess. I'll have to get some more =) I need to order a few extra anyhow to handle my latest plan. And I'll have to modify the mounts on one of the space bars to fit on the filco. It will be .25" too short but I dont think that will bother me much. I need to get some ISO enters too, they don't come in DSA though so DSC will have to do.


A shot of the inside of two of the keys. The colors are more accurate in this one.

Offline 7bit

  • Posts: 3629
  • Location: Deskthority.net
  • MX1A-G1DW
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #23 on: Tue, 05 April 2011, 12:45:19 »
Quote from: PrinsValium;309924
Double shots are in =D I was pretty sure I would be getting the inverse of that color scheme though... That doesn't really concern me a lot but some of the number labels seem to be of a larger font. That I will probably whine to SP about.
Show Image


Hundred and one blank keys
Show Image


Forty nine and two relegendable keys
Show Image


Another day I will take pictures in better lighting...
Show Image


The bizarre amount of wider keys are due to the fact they are not cheaper bought in smaller quantities. So I thought I might be able to pass some of them along to fellow geekhackers for a no profit price. Single width keys are usually bought in larger quantities and therefor possible to order more or less at will. Apparently SP are unable to do double shots keys wider than 2 units in the DSA family. All keys are of that profile for easy swapping.


Wait a second!

How comes you've got already what we are all supposed to wait for 6 weeks!!!

Do you've got a time machine?
Buy key caps here: Round 5
Buy switches here: CherryMX

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #24 on: Tue, 05 April 2011, 12:55:47 »
Quote from: 7bit;325080
Wait a second!

How comes you've got already what we are all supposed to wait for 6 weeks!!!

Do you've got a time machine?

Of course, doesn't everyone?? =D

Nah, I just beat you to it =P Paid a lot more per key probably though...
« Last Edit: Tue, 05 April 2011, 12:58:39 by PrinsValium »

Offline 7bit

  • Posts: 3629
  • Location: Deskthority.net
  • MX1A-G1DW
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #25 on: Tue, 05 April 2011, 13:18:28 »
Quote from: PrinsValium;325090
Of course, doesn't everyone?? =D

Nah, I just beat you to it =P Paid a lot more per key probably though...


Looking at the variable font sizes of the last picture, I really hope they will not do the same for the Round 3 keys!

I think I will send her the picture for clarification that we don't want the keys labeled that way!

1 3 5 6 9 are too small, 0 is no 0 it's an O!
CONTROL and META are too large compared to the other modifiers.
« Last Edit: Tue, 05 April 2011, 13:21:30 by 7bit »
Buy key caps here: Round 5
Buy switches here: CherryMX

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #26 on: Tue, 05 April 2011, 13:38:24 »
Oh, yeah, Melissa sent me new number caps of the correct font size and real zeros, no fuss.

They caps are 1mm thick at the very bottom, I don't know how much that means for the rest of the wall.
« Last Edit: Tue, 05 April 2011, 13:41:25 by PrinsValium »

Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #27 on: Tue, 05 April 2011, 23:51:17 »
Hey Prinz, mind posting or PM'ing your ExpressSCH/ExpressPCB files? I'm curious as to how you laid out the circuit. Growing up, my dad was an electrical engineer, so I've always had a fascination for circuits.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #28 on: Wed, 06 April 2011, 09:58:41 »
Quote from: daerid;325400
Hey Prinz, mind posting or PM'ing your ExpressSCH/ExpressPCB files? I'm curious as to how you laid out the circuit. Growing up, my dad was an electrical engineer, so I've always had a fascination for circuits.


Of course not. The design is really simple though, I am now working with KiCAD instead which is much nicer.

You will need the software from expresspcb.com to view the files I think. I was going to say it runs fine under wine but due to a OS reinstallation I had to reinstall that too and now it works really funky =P

Also printing it from within the program requires a printer to be installed, under wine, I'm not even going to try to get that to work.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #29 on: Wed, 06 April 2011, 10:10:26 »
Quote from: ripster;325154
Oh.  Not THAT thick then.  Filcos are .9.  Signature Plastic DCS a bit under .8.  Cherry Doubleshots 1.5mm.  Lol.

How uniform is wall thickness actually? Could there be other definitions that makes more sense than trying to measure the thickness at the very bottom with calipers? What about weighting 100 or so single width keys and dividing by the surface area.

Take for example SP's DSA product sheet. Taking the average of the top width and bottom width times the height times 4 plus the top width squared as the approximate area.

4*h*(W+w)/2+w*w = 2h(W+w)+w^2 = 2*0.291*(0.725+0.5)+0.5^2 = 0.96295 in^2

I have a bag of 101 keys lying around somewhere, but that's not here... The weight will have to wait until tomorrow.

Edit: that would of course require more intricate formulas for sloped keys like the DCS family.
« Last Edit: Wed, 06 April 2011, 10:17:04 by PrinsValium »

Offline vsedach

  • Posts: 1
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #30 on: Thu, 14 April 2011, 13:59:39 »
I absolutely love the key cap color scheme and lettering. Which colors and font did you go with? Also, if I'm not mistaken those are spherical-top key caps. Very retro.

Did you drill all the holes by hand? If so, any alignment issues? I remember hand-drilling PCBs in high school electronics class - even with a lot of prep and using a punch to mark holes I found getting good alignment difficult.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #31 on: Fri, 15 April 2011, 17:42:51 »
I believe the font size is 0.187" but I don't know for sure. That was mentioned in my conversation with Melissa at SP. The colors are Dark Gray (GC) and White (WFK). They are spherical, SP DSA, and uniform height for easy rearrangement.

I drilled all the holes with a mini dremel drill press, Some of them got a bit largish but some care during soldering made that a non-issue. I first used the edge of the pcb to align the board then relized It of course wasn't parallel to the rows of keys =P I had planned to sand it parallel but that step got lost along the way.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #32 on: Tue, 19 April 2011, 03:40:41 »
Take three cherry stems, put them in the filco space bar. Drill three holes in a stick, shoot some hot melt glue into there. Let cool and pull off the space bar. Meanwhile, cut off two cross mounts from a spare key, put them onto the outer stems and put some glue on them, mount the new space bar an apply some clamps. Wait for the glue to settle, pull the new space bar and voila, all SP double shot =)



I was a bit afraid the het melt glue wouldnt hold the stems in place but they are stuck solid in there. The space bar looks a little crooked from straight above I notice now, no problems though.

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #33 on: Fri, 20 May 2011, 16:05:59 »
I've been back to the design board again, had a piece of copper laminate left over... This time I tried printing my layout on oven tray paper but it didn't stick at all, it was just a mess of melted toner all over =P So I went back to glossy flyer paper. I think I did better this time, I don't preheat the copper at all, just tape the laminate to the printout and apply heat and pressure (sort of firmly) with a regular cheap clothing iron. I think the trick is to move around to get heat and pressure all over, the small steam holes in the iron sole is a large source for poor stickage. I also had a lot more patience while soaking. After a longer time in the water bath the paper separated from the toner almost by itself. I guess much of the improvement might be because of a different paper quality, I really have no idea though. And I finally found a good usage of wacky american paper sizes. Legal have got just those extra inches needed =)

Only a few jumpers


Taking a sodium persulfate bath


I think my etchant is getting depleted, there were some speckles of copper left here and there. I had to do some minor scraping. And then a lot of drilling...


Just some keys put on for show


The Teensy mounted on the back, sort of surface soldered =P The holes for the bottom left stabilizer shows what my dremel work station does to holes larger than ~2mm. Had to go use the real drill press (The one the kids mangles freely. It was unusually centered this particular day though). I had to use only a single wire this time and that was only because of a trace at the bottom that didn't quite make it onto the copper.
« Last Edit: Fri, 20 May 2011, 16:09:37 by PrinsValium »

Offline Dox

  • Posts: 312
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #34 on: Sat, 21 May 2011, 21:40:07 »
Awesome work PV! I can't wait to finish my own custom keyboard project.
ErgoDox x2 | DoxKB x2 |   IBM SSK   | HHKB pro2

Offline Wibox

  • Posts: 75
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #35 on: Fri, 03 June 2011, 16:02:55 »
Damn, that is really awesome and inspiring. Any plans yet for the housing?
!! YKBDS !! - KBC Poker (Ergo Clear Cherry) - Apple M0116 (Pink ALPS) - Apple M0115 (Orange ALPS) - Das Keyboard (Blue Cherry) - IBM Model F - IBM Model M - Dell AT101W (White ALPS) - Cherry POS 8000 (Clear Cherry) - Apple Extended II (Cream ALPS)

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #36 on: Sat, 04 June 2011, 07:03:04 »
Quote from: Dox;349659
Awesome work PV! I can't wait to finish my own custom keyboard project.

 
Quote from: Wibox;355315
Damn, that is really awesome and inspiring. Any plans yet for the housing?

 
Thanks =) I will be using a "recycled" keyboard casing.


I found a bug in my firmware too, If the key with keyid 0 does not contain a 0 in the layout vectors the keyboard won't work. I did a quick fix for that, I will leave the old code in the article for now though. Future code will be added in my new keyboard designing article.

Offline Dox

  • Posts: 312
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #37 on: Sat, 04 June 2011, 11:53:52 »
Quote from: PrinsValium;355472
Thanks =) I will be using a "recycled" keyboard casing.


I found a bug in my firmware too, If the key with keyid 0 does not contain a 0 in the layout vectors the keyboard won't work. I did a quick fix for that, I will leave the old code in the article for now though. Future code will be added in my new keyboard designing article.

 
Yeah I've found that bug while working on my own project using your code posted in this article. As I'm not too experienced in C so I've used a dirty workaround. I let the keyid 0 in the layout but didn't trace it on my PCB. Everything works fine but I'll make sure to check out your new code to see how you fixed it.
ErgoDox x2 | DoxKB x2 |   IBM SSK   | HHKB pro2

Offline bpiphany

  • Thread Starter
  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Homemade keyboards - PCB crafting - Teensy tinkering.
« Reply #38 on: Sat, 04 June 2011, 12:16:15 »
I basically just did this

Code: [Select]
uint8_t queue[7] = {255,255,255,255,255,255,255};

void send(void) {
  uint8_t i;
  for(i=0; i<6; i++)
    keyboard_keys[i] = queue[i]<255? layout[queue[i]]: 0;
  keyboard_modifier_keys = mod_keys;
  usb_keyboard_send();
}


I have plans to change the way keys are defined. I want to be able to have the definition combining keys with ant set of modifiers. This would be to be able to use for example US standard layout on the OS and still have a key producing any character usually shifted or whatever. This is like how it is done on the Kinesis.