Author Topic: [TMK] Alternative Controller for HHKB  (Read 515276 times)

0 Members and 1 Guest are viewing this topic.

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #150 on: Mon, 10 February 2014, 01:32:48 »
hasu, would it possible to alter the actuation point? or even better, to get the actual resonance number from the capacitive switch?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #151 on: Mon, 10 February 2014, 01:56:54 »
Matt3o,
no it is not possible to tweak actuation point with this controller. You will need to change digital potentiometer value but HHKB doesn't has signal lines of digipot on its connector.
I'm not sure what is "resonance number" but I think the answer is also no probably.

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #152 on: Mon, 10 February 2014, 02:02:12 »
Matt3o,
no it is not possible to tweak actuation point with this controller. You will need to change digital potentiometer value but HHKB doesn't has signal lines of digipot on its connector.
I'm not sure what is "resonance number" but I think the answer is also no probably.

thanks. Am I right in saying that on the Leopold that seems actually possible?

Offline joneslee85

  • HHKB Scrub JP
  • Posts: 399
  • Location: Sydney, Australia
  • Professional Rubyist programmer!
    • Ruby Journal
Re: Alternative Controller for HHKB
« Reply #153 on: Mon, 10 February 2014, 03:55:09 »
Hey hasu

Is the power input enough to build a USB 3 hub board for this controller?
TOO MANY KEYBOARDS THAT I COULD NOT COUNT! BUT I AM STILL USING MY MODEL F77

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #154 on: Mon, 10 February 2014, 06:28:41 »
Matt3o, I guess so.

joneslee85, hmm, I think how much you can get power depends on capacity of your USB host power supply.
But I don't know about USB3 at all and not sure what you are asking honestly.

Offline naasfu

  • The Curator
  • * Destiny Supporter
  • Posts: 4081
  • CURSE YOU HE-MAN
Re: Alternative Controller for HHKB
« Reply #155 on: Wed, 26 February 2014, 01:31:15 »
Hey hasu, can you please add me to your wait list for your HHKB controller?  I would very much love to have one of these.  I'd like to program other Fn layouts, and especially try SpaceFN using a hardware implementation, since the software approach hasn't been working out too well for me so far.

Thanks!   :thumb:
a cute stray cat combination that comes out happily when you look at your face is cute

WANTED: gib clacks        post your mspaints!        post your rubber domes!

Offline grantr

  • Posts: 2
Re: Alternative Controller for HHKB
« Reply #156 on: Wed, 05 March 2014, 16:55:52 »
I've been watching this project with great interest for years, and planned to design a board myself until I saw hasu was making one of his own! Please add me to the list for one controller.

Offline esoomenona

  • Gnillort?
  • Posts: 5323
Re: Alternative Controller for HHKB
« Reply #157 on: Wed, 05 March 2014, 20:02:30 »
Can't wait until I get one of these things. I've just been contemplating all the possibilities in my mind!

Offline argcargv

  • tempting the banhammer
  • Posts: 190
  • Location: michigan
Re: Alternative Controller for HHKB
« Reply #158 on: Tue, 11 March 2014, 21:50:19 »
Hi Hasu,

I know you've been very busy, any updates on the project?
Thanks!

 :thumb:

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #159 on: Wed, 12 March 2014, 21:59:22 »
I was working on power selector circuit and PCB design these days. After several checks it will be sent to PCB manufacturer in a few weeks. Five(or ten at most) PCBs will be ordered for this batch.

* HHKB_controller_circuit_140313.pdf (168.28 kB - downloaded 815 times.)

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #160 on: Thu, 13 March 2014, 03:47:02 »
hasu, do you have any idea what's the second header/connector for in each and every topre PCB?

Offline RESPRiT

  • Posts: 414
  • Location: Seattle
  • HHKB = ❤
Re: Alternative Controller for HHKB
« Reply #161 on: Thu, 13 March 2014, 04:25:20 »
Any estimate on the costs? I'm very interested in one of these :D
;)

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #162 on: Wed, 26 March 2014, 18:44:55 »
I am loving the HHKB Type-S I bought. After reading a blog post I have found and read over this wonderful thread.

I really want to try this mod so I can make my board programmable but I don't want to wait a long time (many months). Bluetooth would be nice but it is not necessary. What would you suggest I do?

1) Try to wait (Not sure on the ETA which could be a long time)

2) Order my own PCB - I found Revision A on your github. (I'm not sure how much SMD soldering this involves)

3) Use a teensy. (Not properly mounted)

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #163 on: Wed, 26 March 2014, 19:50:50 »
Nice, I'd encourage 2) or 3), of course :D

3) will be cheapest and quickest way and in my case strong double sideded tape worked well to stay board on. You may need a receptacle for HHKB like this, I have some extra PM me if you want.
http://deskthority.net/workshop-f7/hardware-dvorak-hhkb-t3415.html#p66362

2) is also an option if you want cleaner and good looking controller. Now Rev.B design is available, but not be confirmed yet. You had better wait for the confirmation of the design. I got Rev.B PCB and components yesterday and can let you know whether the design is good or not in next couple days.
https://github.com/tmk/HHKB_controller/tree/preB

I use elecrow.com for manufacturering the PCB and it is one of Fusion PCB service providers. I can recommend them. Around $35US per 5 PCBs.
HHKB connector is available at Digikey. But problem of this route is shortage of ATMega32U4, it will not be available until May or June. You can still try Ebay sellers or Chinese market, though.
http://www.digikey.jp/product-detail/ja/S13B-ZR-SM4A-TF(LF)(SN)(P)/455-1703-1-ND/926830

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #164 on: Wed, 26 March 2014, 20:05:23 »
Thanks for the quick reply Hasu.

$35 for 5 PCB's insn't bad and I am sure I could give away the extras. Looking on octopart there appear to be a few left on newark.com but I'm sure they will run out in their next batch. The scarcity of the ATMega32U4 and SMD soldering (I haven't worked with anything that small yet) are what scare me.

I think I will probably end up purchasing a teensy because as you said it is the "cheapest and quickest" way. I will pm you about it.

Feel free to add me to the list if you want. I would be happy to try out revision C or whatever is available when I am next on the list. Thanks.
« Last Edit: Wed, 26 March 2014, 21:29:34 by Smasher816 »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #165 on: Wed, 26 March 2014, 21:23:36 »
I have nine extra header connectors. I can send it at only shipping cost from Japan, maybe around $2US? PM me.
http://www.digikey.com/product-detail/en/B13B-ZR(LF)(SN)/455-1668-ND/926575

Cable is not included, you still need to solder 13 wires on its 1.5mbm pitch pins. With this you can make a harness for Teensy like this.
http://deskthority.net/workshop-f7/hardware-dvorak-hhkb-t3415.html#p66362

EDIT: you can calculate shipping here, I'm in Tokyo, Japan. This page is Japanese, use Google translate. Weight is around 20g maybe.
http://translate.google.co.jp/translate?hl=ja&sl=ja&tl=en&u=https%3A%2F%2Fwww.post.japanpost.jp%2Fcgi-charge%2F&sandbox=1
EDIT2: ah, sorry this page doesn't work with Google translate.
« Last Edit: Wed, 26 March 2014, 21:42:08 by hasu »

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #166 on: Wed, 26 March 2014, 21:33:51 »
$2 is great. I was expecting international shipping to be much, much more expensive. Just domestic shipping from EliteKeyboards is $14.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #167 on: Sat, 29 March 2014, 11:28:39 »
USB part of Rev.B PCB works well now.
« Last Edit: Tue, 01 April 2014, 23:01:53 by hasu »

Offline RESPRiT

  • Posts: 414
  • Location: Seattle
  • HHKB = ❤
Re: Alternative Controller for HHKB
« Reply #168 on: Sat, 29 March 2014, 11:41:04 »
USB part of Rev.B PCB works well now.
Show Image


Wow, very cool hasu! Do you know if you'll be able to send out copies with the PCB and the stuff pre-soldered? If not, I might just order the stuff separately and try building it myself, but something put together already would be ideal :P
;)

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #169 on: Sat, 29 March 2014, 11:41:57 »
really impressive. Hasu, not that I was expecting anything less from you of course :)

Offline Sifo

  • Alter
  • * Exquisite Elder
  • Posts: 7487
  • Location: #GOLDSPRINGS, #LEGITBALLIN
  • Illustrious
Re: Alternative Controller for HHKB
« Reply #170 on: Sat, 29 March 2014, 18:59:36 »
:( If I can get my hands on one of these I'd get an HHKB already. Love your work as usual hasu.
I love Elzy

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #171 on: Sat, 29 March 2014, 19:42:23 »
Now this controller distribution has a GB thead, I'll keep infomation and waiting list updated there.
http://geekhack.org/index.php?topic=56494.0

Four or five controllers will be available from this revision. I'll PM top four of the list soon.

RESPRiT, you can get assembled PCB from me but it'll take very long time. I added you to the waiting list. But you can send PCB data to FusionPCB, get componets from Digikey and assembled it yourself.

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #172 on: Fri, 11 April 2014, 14:14:08 »
I wonder how hard it would be to port the schematic to use with freescale arm k20 chip. I am going to try to build something similar based on mchck (https://mchck.org) and its toolchain.

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #173 on: Fri, 11 April 2014, 17:45:01 »
Hey Hasu, I just want to let you know that I got my teensy all soldered up and it works fine (I'm typing on it right now).

I have one issue. I want the bottom row to have the small key as alt and the big key as Super (LGUI).

I edited keymap_hhkb.c to this:
Code: [Select]
    KEYMAP(ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSLS,GRV,   \
           TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSPC,       \
           LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,             \
           LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0,             \
                LALT,LGUI,          SPC,                RGUI,RALT),

then ran
Code: [Select]
make clean
make KEYMAP=hhkb
make teensy

I then used the magic command to reboot into bootloader and flashed the teensy. When the controller booted back up it still had the old layout. I have no idea what is wrong, any help would be greatly appreciated.

Here is the output - http://ix.io/bDA



EDIT: Pressing the button on the teensy then running "make teensy" programmed the new layout. Maybe the magic reboot is acting up for some strange reason. I'm not sure.
« Last Edit: Fri, 11 April 2014, 17:57:12 by Smasher816 »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #174 on: Fri, 11 April 2014, 18:01:17 »
egdmitry,
I think not so hard if you are familiar with that chip. Alt Controller schematic is very simple and straight.
See this, you need only circuit on first page unless you want wireless option. Also 'Matrix Power Control' is not needed.
Note that HHKB works with 5V level I/O. If your chip don't have 5V tolerant port you'll need voltage translator.
http://geekhack.org/index.php?action=dlattach;topic=12047.0;attach=60715

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #175 on: Fri, 11 April 2014, 18:15:13 »
Smasher816,
Great! Post pic of your controller, it'll help others interested in.

Hmm, it seems to fail to start Teensy bootloader becuase firmware configuration is for TMK controller board(Atmel DFU) in default.
You need to change it for Teensy(halfKay), see Bootloader size in Makefile. Use 512 instead of 4096.
Code: [Select]
# Boot Section Size in *bytes*
#   Teensy halfKay   512
#   Teensy++ halfKay 1024
#   Atmel DFU loader 4096       (TMK Alt Controller)
#   LUFA bootloader  4096
#   USBaspLoader     2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #176 on: Fri, 11 April 2014, 19:09:19 »
egdmitry,
I think not so hard if you are familiar with that chip. Alt Controller schematic is very simple and straight.
See this, you need only circuit on first page unless you want wireless option. Also 'Matrix Power Control' is not needed.
Note that HHKB works with 5V level I/O. If your chip don't have 5V tolerant port you'll need voltage translator.
http://geekhack.org/index.php?action=dlattach;topic=12047.0;attach=60715

Hasu, thanks a lot for the information. Why is 5v strictly required? I thought HHKB used a pretty simple matrix interface when I would scan the keyboard by applying voltage to rows and getting signals from cols. Is this different for HHKB?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #177 on: Fri, 11 April 2014, 19:45:50 »
No so simple as most keyboards, HHKB(Topre version) has multiplexer, decoder and capacitive sensor in its PCB. These chips require 5V.
See this memo.
https://raw.github.com/tmk/tmk_keyboard/master/keyboard/hhkb/doc/HHKB.txt

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #178 on: Fri, 11 April 2014, 21:13:47 »
Thanks Hasu,

Changing the bootloader size appears to have fixed my problem. I just flashed a new firmware without opening the case :)

I didn't take much/any pictures during the soldering process (and my camera is a potato). I would however be happy to write up my process and some tips that I think could be helpful.

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #179 on: Fri, 11 April 2014, 23:33:41 »
I ended up spending a long time (over an hour) writing stuff. Anyone interested in using a Teensy as a HHKB controller should check this out :)

http://geekhack.org/index.php?topic=57008.0

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #180 on: Sun, 13 April 2014, 01:22:21 »
Nice, I'd encourage 2) or 3), of course :D

3) will be cheapest and quickest way and in my case strong double sideded tape worked well to stay board on. You may need a receptacle for HHKB like this, I have some extra PM me if you want.
http://deskthority.net/workshop-f7/hardware-dvorak-hhkb-t3415.html#p66362

2) is also an option if you want cleaner and good looking controller. Now Rev.B design is available, but not be confirmed yet. You had better wait for the confirmation of the design. I got Rev.B PCB and components yesterday and can let you know whether the design is good or not in next couple days.
https://github.com/tmk/HHKB_controller/tree/preB

I use elecrow.com for manufacturering the PCB and it is one of Fusion PCB service providers. I can recommend them. Around $35US per 5 PCBs.
HHKB connector is available at Digikey. But problem of this route is shortage of ATMega32U4, it will not be available until May or June. You can still try Ebay sellers or Chinese market, though.
http://www.digikey.jp/product-detail/ja/S13B-ZR-SM4A-TF(LF)(SN)(P)/455-1703-1-ND/926830


Hi hasu,

Your work is awesome! And now I'm considering order my own pcb board with your GitHub KiCAD project!

I have't decided to use Rev.A or Rev.B yet. Is the Bluetooth mod confirmed to work now?

And how can I find the list of elements used by the project?(like one ATMega32U4, one RN42..)  I provide the plot files in the GitHub repo to the manufactor, but they said they can only produce the raw board unless I give them the list of elements.

Thanks!

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #181 on: Sun, 13 April 2014, 02:06:45 »
I just found the BOM(Bill of Matrials) file. So the only problem is Bluetooth status. Hope there is good news! Can't wait for the new controller!

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #182 on: Sun, 13 April 2014, 03:14:28 »
I just found the BOM(Bill of Matrials) file. So the only problem is Bluetooth status. Hope there is good news! Can't wait for the new controller!

Hi hasu,

It looks like the BOM.txt file lacks slot number for each material, I try to generate BOM sheet in KiCAD, but still lacks of some information. could you provide the BOM sheet you sent to http://elecrow.com?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #183 on: Sun, 13 April 2014, 04:06:00 »
Smasher816, nice write up! Thanks.

Xe0n0, elecrow.com(or other fusion PCB serivces like seeedstudio will also work) don't need BOM file to manufacture PCB, just send gerber files; plot/HHKB_controller_fusion_B140314.zip.

And order components at digikey(or mouser?) according to BOM.txt.

Use Japanese products to help our sinking economy if possible :) like Panasonic or KOA for resistors, Murata or Taiyo Yuden for capacitor, Alps for switch and Hirose/JST for connector. They are reliable enough, I think.

EDIT: Bluetooth option of Rev.B is not confirmed at all yet, I have no time to do that.(And Rev.A has apparently a problem on power control.) If you want wireless connection you have to wait, but  both Rev.A and Rev.B are confirmed for USB.
« Last Edit: Sun, 13 April 2014, 04:19:23 by hasu »

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #184 on: Sun, 13 April 2014, 08:53:48 »
Smasher816, nice write up! Thanks.

Xe0n0, elecrow.com(or other fusion PCB serivces like seeedstudio will also work) don't need BOM file to manufacture PCB, just send gerber files; plot/HHKB_controller_fusion_B140314.zip.

And order components at digikey(or mouser?) according to BOM.txt.

Use Japanese products to help our sinking economy if possible :) like Panasonic or KOA for resistors, Murata or Taiyo Yuden for capacitor, Alps for switch and Hirose/JST for connector. They are reliable enough, I think.

EDIT: Bluetooth option of Rev.B is not confirmed at all yet, I have no time to do that.(And Rev.A has apparently a problem on power control.) If you want wireless connection you have to wait, but  both Rev.A and Rev.B are confirmed for USB.

Hi hasu,

Thanks for your information!

Just checked for fusion PCB service. It seems it will only produce the PCB board, and I have to soldering components by myself.

I try to figure out the all the material I have to buy and how to install them, so I combined the BOM.txt with material list generated by KiCAD. I post it here, just need some help to clarify some details.

Code: [Select]
USB-mini connector  1   Hirose UX60SC-MB-5ST                                J1 
Chip                1   ATMega32U4-AU           TQFP                        1   
Xtal                1   HC49 16MHz  SMT                                     X1 
Capacity            2   22p                     1608                        C5 C6   
Capacity            6   0.1u                    1608                        C3 C7 C8 C9 C10 C13
Capacity            3   1u                      1608 +-10%                  C4 C11 C18 
Capacity            3   10u                     3216                        C1 C2 C14   
Capacity            1   22u                     3225 or 3528 or 3216        C12
Capacity            1   47u                     3225 or 3528 or 3216        C15
Resistor            2   ?R                      ?                           R17 R18
Resistor            2   15k                     ?                           R9 R24 
Resistor            10  10K                     1608                        R1 R6 R7 R8 R11 R12 R15 R16 R22 R23
Resistor            5   1K                      1608                        R4 R5 R10 R21 R25   
Resistor            2   ? R470                                              R13 R14
Resistor            2   22                      1608                        R2 R3   
Resistor            1   0                                                   R19
PPTC500mA           1   TYCO nano                                           PPTC1   
FET-PMOS            2                                                       Q4 Q5   
FET-NMOS            3   SOT23                                               Q1 Q2 Q3   
15pin connector     1   DF14A-15P-1.25H                                     CN1
13pin connector     1   S13B-ZR-SM4A-TF                                     CN2
LED                 9   2012                                                D1 D3 D4 D5 D6 D7 D8 D9 D10
Diode Schottky      1   SOD123                                              D2 
Bluetooth           1   RN42                                                U5 
Lipo Charger        1   LTC4054                                             U4 
Lipo connector      1   JST PH2                                             P100   
3.3V Regulator      1   TAR5SB33                                            U2 
Inductor?           1   L100u                                               L1 
SW-PUSH             1   Alps SKHH or SKHL                                   SW1
SW-SLIDE            1   DPDT                                                SW2
5V Boost converter  1   HT7750A                                             U3 

Is resistor valued R and 15k also the type 1608? (Resistor valued R is not included in BOM.txt, so it will be embed in PCB board?)
Value of resistor on R19 is 0...And it's marked with "Resistor is not implemented", so I just ignored the slot?
What's the proper type of the inductor "L100u" on L1?
I try to check your photo on http://geekhack.org/index.php?topic=56494.0 for detail, but this picture is not clear enough...Do you have an updated an closer photo of the Rev.B board? It would be easier soldering with that.

PS: I contact a manufactor and they told me they can help do the SMD things if I provide BOM sheet with detail slot number.

Again thanks!
« Last Edit: Sun, 13 April 2014, 09:18:30 by Xe0n0 »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #185 on: Sun, 13 April 2014, 12:03:23 »
All resistors are 1608 metric size. R19 should not be implemented, it is for factory reset of RN42 and will be short with tweezer when reset is needed.
As for L1 around 6mm inductors will fit, I use TOKO.
http://www.toko.co.jp/cgi-bin/database_en/database.cgi?cmd=dp&Tfile=Data&num=716

You can see full resolution photo at imgur: http://i.imgur.com/SaHVCL7.jpg?1

This board uses land patterns for hand soldering(a bit large than reflow one) you may want to check foot print of your component with datasheets and change them if you want manufacturer to reflow production.

EDIT: And note that reset switch should be "side push type" and short stem length, that is,
SKHHLMA010, SKHHLNA010 and SKHHLPA010 will fit. SKHLwill not fit for current PCB foot print.
http://www.alps.com/products/WebObjects/catalog.woa/E/HTML/Tact/SnapIn/SKHH/SKHH_list.html
« Last Edit: Sun, 13 April 2014, 12:36:40 by hasu »

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #186 on: Sun, 13 April 2014, 19:43:59 »
No so simple as most keyboards, HHKB(Topre version) has multiplexer, decoder and capacitive sensor in its PCB. These chips require 5V.
See this memo.
https://raw.github.com/tmk/tmk_keyboard/master/keyboard/hhkb/doc/HHKB.txt

Thanks for the information! Is there some well-defined hardware layer API tmk_keyboard depends on to port it to other hardware? For example, sending hid reports APIs and getting HHKB states. Sorry, haven't looked at tmk_keyboard in details yet, was playing with hid keyboard implementation for my board which seems to be working now so now I am going to move on with experimenting with HHKB part. In theory this will make tmk_keyboard work with teensy 3.0/3.1 as well.

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #187 on: Sun, 13 April 2014, 20:09:27 »
All resistors are 1608 metric size. R19 should not be implemented, it is for factory reset of RN42 and will be short with tweezer when reset is needed.
As for L1 around 6mm inductors will fit, I use TOKO.
http://www.toko.co.jp/cgi-bin/database_en/database.cgi?cmd=dp&Tfile=Data&num=716

You can see full resolution photo at imgur: http://i.imgur.com/SaHVCL7.jpg?1

This board uses land patterns for hand soldering(a bit large than reflow one) you may want to check foot print of your component with datasheets and change them if you want manufacturer to reflow production.

EDIT: And note that reset switch should be "side push type" and short stem length, that is,
SKHHLMA010, SKHHLNA010 and SKHHLPA010 will fit. SKHLwill not fit for current PCB foot print.
http://www.alps.com/products/WebObjects/catalog.woa/E/HTML/Tact/SnapIn/SKHH/SKHH_list.html

Thanks hasu!

I guess R17, R18 is just for measure the voltage, some R17 = R18 should be ok. But what exactly value would you use? I not sure about that...

reset switch is the switch at SW1?


Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #188 on: Sun, 13 April 2014, 23:32:28 »
egdmitry,
unfortunately no documentation and its API is result of ad hoc extensions. You can fork and redesign better API yourself. And you may want to see HaaTa's kiibohd controller which supports Teensy3.
https://gitorious.org/kiibohd-controller


Xe0n0,
I don't decide its value yet. I have no experince with ADC, I have to learn it and read datasheet. I f you want wireless option you also have to learn and debug it.
Yes, I mean SW1 with reset switch.

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #189 on: Tue, 15 April 2014, 12:23:49 »
egdmitry,
I think not so hard if you are familiar with that chip. Alt Controller schematic is very simple and straight.
See this, you need only circuit on first page unless you want wireless option. Also 'Matrix Power Control' is not needed.
Note that HHKB works with 5V level I/O. If your chip don't have 5V tolerant port you'll need voltage translator.
http://geekhack.org/index.php?action=dlattach;topic=12047.0;attach=60715

Hasu, do I understand right that this is only for input/power and row/col select could be done by using 3.3v?

Thanks.

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #190 on: Tue, 15 April 2014, 13:53:36 »
I have taken a look at data sheets. Multiplexer's minimum high control input is said to be 3.15v for 4.5v vcc and 4.2 for 6v. Not sure what it would be for 5v, hopefully, below 3.3v.  Decoder's high-level control input is 2-7v, low-level 0-0.7v (requires 5v vcc to operate) which is good for me. Not sure what's the decoder output, I guess, it just pulls to vcc on high state, right? TP1684(1) - "Key" probably uses 5v for high state, so I might be able to just use a voltage divider for that one.

So I guess the bottleneck is the multiplexer here. I might have to use 3 transistors to control it with proper 5v voltage.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #191 on: Tue, 15 April 2014, 18:09:57 »
You have read datasheets and know problem to be solved now.
I think it is time to try it. Let us know your result.

Offline Xe0n0

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #192 on: Wed, 16 April 2014, 08:44:52 »
Hi hasu,

I've also ordered a teensy++ for test use. What type of wire did your use to connect teensy++ with the 13pin connector? I can not find the right wire on digitkey...not familiar with those electronic components

Thanks!

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #193 on: Wed, 16 April 2014, 09:06:37 »
Hi hasu,

I've also ordered a teensy++ for test use. What type of wire did your use to connect teensy++ with the 13pin connector? I can not find the right wire on digitkey...not familiar with those electronic components

Thanks!

I used a teensy 2.0 and did a big write up on it, so feel free to ask me if you need some help.

With the 2.0 you have holes that you can solder wires to. If you get one with pins you use a wire with male heads (https://www.google.com/search?q=male+wire). You can find them at almost any local electronics store, or online website (ex: amazon).

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #194 on: Sat, 26 April 2014, 02:57:52 »
I have tried reading the "KEY" voltage with a voltmeter while asserting LOW on all other signal lines and then pressed "2" (actually I tried a bunch of keys) — voltage always stays at 5 volts. I am confused, what am I doing incorrectly?
« Last Edit: Sat, 26 April 2014, 04:55:29 by egdmitry »

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #195 on: Sat, 26 April 2014, 04:53:28 »
I have checked the decoder, it seems selecting the column correctly (and selecting nothing when the enable is high). The multiplexer is harder to verify, since all the inputs are 5v independent of the column choice (not sure how it works exactly).

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #196 on: Sat, 26 April 2014, 05:12:13 »
Hmm, output of KEY may not be held so long. If so you can't see the voltage change with voltmeter.

See this chart, it looks like LS145-D is a strobe rather than enable. I mean, KEY doesn't continue to output signal long even if you keep D line low.


Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #197 on: Sat, 26 April 2014, 15:06:56 »
Hmm, output of KEY may not be held so long. If so you can't see the voltage change with voltmeter.

See this chart, it looks like LS145-D is a strobe rather than enable. I mean, KEY doesn't continue to output signal long even if you keep D line low.

Hm, interesting. But the graph shows that enable goes high before KEY goes high, so it may be just responding to enable. What would happen if you held an enable low for a longer period of time? Would key output duration be still the same as in the graph?

I also wonder what method of capacitive sensing the chip uses. It looks like a decoder sets a column low to discharge all the capacitors in that column and then the chip looks at a row and measures recharge speed or something. I am just guessing. Although looking at the graph it is able to identify the key state immediately as enable goes low...

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #198 on: Mon, 28 April 2014, 13:43:04 »
I have verified, it only holds the line for 22.5us independent of how long the enable pulse is.

62852-0

Offline egdmitry

  • Posts: 15
Re: Alternative Controller for HHKB
« Reply #199 on: Wed, 30 April 2014, 20:51:57 »
An update if you are interested: I got it all working and I am typing now on it (no tmk_keyboard code at the moment unfortunately). I am going to try to fork and generalize tmk framework so that it could run on any architecture, even on x86 (for testing purposes or as a part of something similar to keyremap4macbook). In general, the framework should be able to get a list of currently pressed keys, be able to output pressed keys as well and also have some generalized way to access timeouts/timers/delays. Does this sound reasonable?
« Last Edit: Wed, 30 April 2014, 21:33:58 by egdmitry »