geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Marcel on Sun, 18 October 2015, 13:24:30

Title: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sun, 18 October 2015, 13:24:30
Hi Guys !

I know, you warned me when I came here for the first time, once you started, you can't stop, but I did it anyway...
As my first custom keyboard is successfully finished, it's time to build a second one !

For this one, I will build it from scratch, with the following goal/constraints :

 - Custom ortholinear layout inherited from TypeMatrix :  http://www.keyboard-layout-editor.com/#/gists/e0c3da6999850f83d1ae
 - Size slightly reduced to 85 keys ( so ~80% board ? )
 - Keycap DSA blank from SignaturePlastics
 - Switches MX Clear + MX Brown for pinkies (I like this mix, it's really comfortable)
 - Cherry stabilizer (no costar)
 - Orange LED backlit
 - Wooden case (The_Beast and Nubbinator 's work are really inspiring! )
 - Traditional TMK firmware on a Teensy 2.0
 - Plate mounted with PCB

As I didn’t cover some of these topic in my previous build, I will need some help soon :-)
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: suicidal_orange on Sun, 18 October 2015, 13:51:20
Wood?  Sounds good!

I think you covered everything I know in your first build so I'll just sit back and enjoy the pics :)

Although if you haven't already considered it you could probably save yourself quite a lot of cash if you were to cut down the plate from a POS board like this one (http://www.ebay.co.uk/itm/ACCESS-KEYBOARDS-AKE0CUD514-Cashier-Checkout-QWERTY-Keyboard-USB-2-0-PoS-/361411542547?hash=item5425ce7e13:g:NcgAAOSwBLlVTj6e[/url) (which probably comes with MX blacks - I'd check with the seller first but there are definitely MX ones out there) rather than getting one custom cut.  Then you'd need matrix caps for the 2u keys though, but it's just been grab bag time so there should be plenty out there.  An extra (unassigned) switch is cheaper than a stabiliser and works just as well :thumb:
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sat, 24 October 2015, 09:10:03
Hi !

I received the DSA keycaps from Signature Plastics.
I put two of them on a random plate, with a DCS R2 to compare :
(http://www.lps-it.fr/pub/ThinkMatrix/keycaps-2.jpg) (http://www.lps-it.fr/pub/ThinkMatrix/keycaps-1.jpg)
The DSA are wider and shorter by around 1mm. I will have to take this into account while designing the case.


Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sun, 15 November 2015, 13:31:27
Hi guys !

I have some issue with the design of the backlight. As I have 85 keys, I wanted to put 85 leds, one in every switch. By putting these leds in an array of 43 pairs of 2 leds in series, it should fit within the 500mA allowed the USB.

I plan to use a PNP on high side, to be able to use the ground plane and simplify the routing on the PCB.
Here is the schematic :
(http://www.lps-it.fr/pub/ThinkMatrix/Backlight.jpg)

With let's say 8mA per pair of LED (which should be bright enough), that's 350mA for the whole array (x43). That good and leave ~150mA for the teensy and few other leds (num lock..).
But the LED are given for a voltage between 1.9 and 2.2 ... and Vce(sat) of Q2 is around 1.08V, so I may not have enough voltage to put leds in series 2 by 2. And putting all LEDs in parallel drive too much current.

Second issue, in my schematics, I have another 40mA lost by the transistors to switch Q2, that seems a lot. I could probably lower Ib Q2, but the gain of Q2 is not linear and is somewhere between 30 and 100... difficult to calculate something accurate... (See datasheet of PN2907).

Do you have some tips ?

Thanks,
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sun, 24 April 2016, 12:19:37
After few month scratching my head, I discovered that the relationship between forward voltage and current of a LED is not linear when they are not used at their nominal power. I found a nice post explaining this stuff :
http://electronics.stackexchange.com/questions/76367/accounting-for-led-resistance (http://electronics.stackexchange.com/questions/76367/accounting-for-led-resistance)

Basically, I'm somewhere on the corner of the curve :
(https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Diode-IV-Curve.svg/500px-Diode-IV-Curve.svg.png)
So dropping the calculator and going the old-school way with a bunch or resistors and a metrix on a breadboard is the best way to get the exact values...

And I received my new plates ! (Thanks Jack !)
(http://www.lps-it.fr/pub/ThinkMatrix/plate-tm.jpg)

Now, I will have to play with the Teensy 2.0...
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sun, 03 July 2016, 05:17:29
Hey mates !

After a lot of work, I finally finished the design of the PCB. At 1.92V the leds draw only 7mA, so I was able to fit all 86 leds  with a total current below 300mA. I hope I didn’t make any mistake calculating the current through the transistors...
With 85 switches, 85 diodes, 89 leds and 48 resistors, the PCB is quite busy but everything fits. The ground plane was a bit tricky to do with all these tracks and putting the controller in a corner didn’t helps...

I received the PCB and all missing parts, it's time to soldier this !

(http://www.lps-it.fr/pub/ThinkMatrix/all_parts.jpg)
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: suicidal_orange on Sun, 03 July 2016, 05:47:27
Looking good, hopefully there are some stabilisers I'm not seeing in the pic :)
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Tue, 12 July 2016, 14:13:00
Half way done :

(http://www.lps-it.fr/pub/ThinkMatrix/pcb.jpg)

I was a bit disappointed though as I discovered that I made two errors in this PCB.
First one, I put few resistors too close to the Cherry stabilizers and it just won't fit. I had to soldier them on the back side and review the inner size of my case as it make the whole board thicker.
Note for next time : make sure the clearance around the stabilizers is good enough. They are not symmetric !

Second one, the module I used in KiCad Eeshema has a wrong labeling on few pins which are swapped. I fixed this with a bunch of wire. Working but a bit ugly.
Note for next time : don't blindly trust files found on Internet, double check twice !

Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Thu, 14 July 2016, 15:23:31
Backlight testing :

(http://www.lps-it.fr/pub/ThinkMatrix/backlit.jpg)

Woohoo ! It's working !
All my calculations with the transistors are correct :-)
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: suicidal_orange on Thu, 14 July 2016, 15:35:36
Congrats!  Great choice of LED too, I think.  Not 100% sure they aren't red :))
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Sat, 16 July 2016, 10:31:59
Thanks !

Well, the LEDs are supposed to be orange, but it's a kind of dark orange ;-)

Final assembly done :

(http://www.lps-it.fr/pub/ThinkMatrix/inside.jpg)
(http://www.lps-it.fr/pub/ThinkMatrix/teensy.jpg)

Now I need to work on the firmware and find a CNC router to drill a wooden case...
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Rhedone on Thu, 21 July 2016, 04:02:09
Looks amazing, i'm looking forward to seeing it all done
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Data on Thu, 21 July 2016, 08:32:10
Yeah this is neat.
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: suicidal_orange on Thu, 28 July 2016, 03:22:13
Still waiting on a pic of the finished board with caps :)
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: predat on Sun, 28 August 2016, 10:42:47
Great project !
I'll really love to see the finished product.
Do you think it's possible for you to provide your DXF and KiCad files ?
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Tue, 11 October 2016, 13:49:32
This is it. After one year of work (and few break) I'm finally typing this post on my new keyboard !
Working on the firmware, I discovered another small error: I placed all diodes the wrong way around. I had to flip the matrix in TMK code. No big deal but not the easiest to read.

The wooden case gave me some trouble. As I didn't find any CNC router nearby, I went the old school way with two pieces of wood handcrafted with only a chisel and a hammer. It took me ages and it's not as neat as what The_Beast did but I'm quite happy with the result :

(http://www.lps-it.fr/pub/ThinkMatrix/case-inside1.jpg) (http://www.lps-it.fr/pub/ThinkMatrix/case-inside2.jpg) (http://www.lps-it.fr/pub/ThinkMatrix/case-inside3.jpg)

I used the traditional mix of linseed oil and turpentine for the finish coat, it give a nice color and smell like old wood :

(http://www.lps-it.fr/pub/ThinkMatrix/case-finish.jpg)

Here is the final result :

(http://www.lps-it.fr/pub/ThinkMatrix/case-full.jpg) (http://www.lps-it.fr/pub/ThinkMatrix/case-leds.jpg)

I also added a hole on the back to access to the Teensy button, useful for testing !

(http://www.lps-it.fr/pub/ThinkMatrix/case-hole.jpg)

And at night with the backlight ! (yes, it's useless but that's part of the fun :-) )

(http://www.lps-it.fr/pub/ThinkMatrix/case-backlight.jpg)

I will release all files soon, I need to clean up the firmware a bit.
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: menuhin on Wed, 19 October 2016, 03:17:33
Artfully done! The layout and the whole keyboard.  :thumb:
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: AMongoose on Wed, 19 October 2016, 06:38:24
awesome work on the case, looks great!
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: tjweir on Wed, 19 October 2016, 09:24:58
Looks amazing, great work!
Title: Re: Custom mechanical TypeMatrix, version 2
Post by: Marcel on Wed, 19 October 2016, 13:49:44
 :)

For all technical details, I published everything here :  https://github.com/nagius/tmk_thinkmatrix

Next time, I will put the status leds on PWM outputs, not only the backlight. To be able to dim them without using an iron could be nice.