New Controller for KishSaver and Other Model F

User avatar
rindorbrot

16 Feb 2014, 10:47

Ahh ok, I already wondered why there was no mapping for the right alt key in all of the keymaps.
I guess then this will only be a temporary solution for me until the complete replacement controller is finished.

But it's definitely better than nothing and still nice work hasu!

User avatar
Muirium
µ

16 Feb 2014, 15:11

hasu wrote:This converter with special serial no. 002 is on the way to AU. Enjoy, 002 :D
Image
Okay, just taken the case off my Kishsaver, and what do I see? Different cable colours!
Something's Kishy.JPG
Something's Kishy.JPG (429.58 KiB) Viewed 11774 times
Mine is a late dated one (1986) with some differences to the other three Kishsavers I've seen (I proxied for Tinnie, and I took photos when I had them, which I need to wiki…) so I expected there could be interesting times ahead.

I've tested the pins on the cable, and 2 goes to white; 3 goes to red; 4 goes to black, and 5 goes to yellow. Reckon I'm safe following your pinout above? I wonder if they monkeyed around with the controller as well as the cable!

User avatar
Soarer

16 Feb 2014, 15:41

Yeah, along the top row of pins, from left to right in that pic it's: nc, +5V, nc, GND, Data, Clock, nc.

User avatar
Muirium
µ

16 Feb 2014, 15:44

Cool, that's my interpretation too. Let's try this out…

User avatar
rindorbrot

16 Feb 2014, 15:50

Mine ('82) has the same cable colours as snoopy's.
Also what Soarer says is my observation, too.

User avatar
Muirium
µ

16 Feb 2014, 16:42

Yup, looks like it works! Just a few unresponsive keys (in hardware) that I need to fix, but the protocol is fine as I type this on it now! Big thanks, guys.

Now how I do define my own keymap? That right Shift and feels-like-an-HHKB delete but it's a trap! is killing me! The documentation doesn't say where to include my file…

User avatar
rindorbrot

16 Feb 2014, 17:18

Just put it in tmk_keyboard-master\converter\ibm4704_usb, right next to the others ;)
I have already completed mine, now all I have to do is waiting for the Teensy to get here...

User avatar
Muirium
µ

16 Feb 2014, 17:51

I have a spare one in my drawer… never want to run out of Teensies!

Annoyingly, two keys on my Kishsaver are definitely in need of care. S barely registers (so I have my mouse hovering over a virtual keyboard for when it fails, as it comes and goes in spurts (ugh, I need to use words with less S's in them!)) and quote is entirely buggered. Extra problematic as an HHKB arrow on a 60%! That one has a bent spring.

Maintenance is easier on a Model F, right? As you don't have to bolt mod just to get inside. The trouble lies in the foam instead?

Incidentally, I have an "ISO" model. Left Shift is shorter than Hasu's, and I have a <> key (which the converter maps to ±§). For a while, I had four of them…

Image

User avatar
rindorbrot

16 Feb 2014, 18:03

Hasu has his modded to have an ANSI Layout, they all initially come like in your picture.
Here's how mine looked before bringing it to the paint shop, where it is currently getting a nice fresh paint!
Image

But of course I took out the inside prior to that, so I can still play around with it case-less at the moment.
I wanted to go with a split right Shift at first, but unfortunately only 1x and 1.75x is possible (not 1.75x and 1x like I wanted), so I left that standard.

User avatar
Muirium
µ

16 Feb 2014, 18:20

Ah right, I see. Usually I'm an ANSI guy too, but short left shift has never been my objection: just that double deck return. Not a problem on the little Kishy!

Are those German caps your own addition too?

My paint is in good shape, but I really have to do something about these two dodgy keys. Seems I'm a faster typist than Hasu, too, as dropped double letters are coming up a fair bit all over the keyboard.

Still great to have it up and running this soon, though! Unbelievably compact for a buckling spring. My fingers are wondering what the hell is going on with this heavy metal HHKB!

User avatar
rindorbrot

16 Feb 2014, 18:22

Yes, the keycaps are borrowed from my ISO DE Model M, which is now naked :twisted:
That's why I still have that WTB thread open for a second set of caps ;)

REVENGE

17 Feb 2014, 02:34

hasu wrote:This converter with special serial no. 002 is on the way to AU. Enjoy, 002 :D
Image

For those who are interested, my converter has some limitations:
1. Keyboard(6019284) has only *3-byte* key buffer.
2. Keyboard has same scancode on both Alt key. You can't use different scancodes on those.
3. My converter is naively *polling* at not so fast speed.
Due to 1. and 3. you probably will see missing keys and transposing keys at very fast typing.(my wpm is less than 60 and I don't have a problem) To solve or mitigate this problem we can use *interrupt* method instead of polling.

Replacing controller board doesn't has these limitations. It is still very intriguig option to squeeze every last drop of its power out of this keyboard.
I tried it out last week, there is some lag with the use of function shift layers, so it's not as responsive as a Poker, for example.

Ingenious reverse engineering BTW. :)

User avatar
wcass

03 Mar 2014, 03:56

Yes, those are Teensy++ mounted upside down.
Image

User avatar
Muirium
µ

03 Mar 2014, 09:59

Good job I've another Teensy++ coming from Jdcarpe. Now, however do we get these guys?

User avatar
wcass

05 Apr 2014, 05:42

Haata has got the user interface working. He said that he would be working on “key mapping stuff” this weekend. Auto-calibration is still a ways off, so even with this progress you would still need a scope to “tune” the controller.

All three guys are looking forward toward the ARM architecture used on the Teensy 3. These chips have more speed, power, and functionality; cost less, and are easier to source than the chips used on the Teensy++. Moving to the new chip will cut the number of discrete components – perhaps very significantly. The Teensy++ version of the controller has about 250 through holes in less than 10 square inches so it can be a challenging build even for an experienced assembler.

User avatar
rindorbrot

05 Apr 2014, 09:19

Good to hear that you make progress. Keep up the great work!

User avatar
Muirium
µ

05 Apr 2014, 10:49

Indeed. And now I'm pleased I slipped a Teensy 3.1 into my order alongside a Teensy ++. I'm good with either version, and can scope if necessary.

nourathar

13 Apr 2014, 18:35

great work !
Also for me the 'scoping' would be fun ! Not a lot of experience doing such things, but I have access to one and to somebody who could help...

User avatar
wcass

22 Apr 2014, 16:08

It looks like the DPH controller ready for public beta. Auto-calibration is working so no scope is needed. The first thing you will probably want to do is to order PCB and parts.

The files needed to make the PCB are here
https://gitorious.org/ibm-capsense-pcb

The above has a BOM, but here is another that is all sourced out
https://www.mouser.com/ProjectManager/P ... 2e26f4ea5b

Teensy++ 2.0 (no pins)
http://www.pjrc.com/store/teensypp.html

After you have built your controller, or at lease after you get your Teensy, you will need to build the firmware and program the Teensy. The code and instructions are here
https://gitorious.org/kiibohd-controller/capsense-beta

You should be able to get everything for about $50. If you want/need one of these but all this looks like too much for you, remember that there are folks in this community that contract out their skills.

User avatar
Monster-Toys

25 Apr 2014, 15:15

Very cool :)
So... who can build one for me? :oops:

User avatar
wcass

25 Apr 2014, 23:24

The listing below has ten guys in the US that do PCB assembly, but only one in Europe.
http://geekhack.org/index.php?topic=458 ... #msg962858

There is probably a thread here at Deskthority where members can offer services, but I can't find it. If you know where it is, please share the link!

User avatar
Muirium
µ

25 Apr 2014, 23:37

Don't think there is such a thread here. I'm interested in making one of these for my Kishsaver, and could likely do more of them, but I'm all out of keyboard cash right now as two big caps GBs pounced together! I do already have a couple of Teensy 2++ waiting though.

User avatar
Monster-Toys

26 Apr 2014, 10:17

If you really do so, please put me onto your list (of course i would pay in advance). Time is not a big problem, i am not on the run. :)

User avatar
Muirium
µ

26 Apr 2014, 11:19

Cool. If I can source some PCBs, I'll let you know. If anyone else in Europe is interested, I could get on with this fairly soon. Just depends on parts.

User avatar
wcass

02 Jun 2014, 05:05

I built mine and and am here to report.

The toughest part was getting the ribbon cable off of the old controller. After spending about a half hour on that and getting nowhere, i gave up and just cut it as close to the controller as i could. It worked out just fine. More on that in a minute.

Take what I advise here with a grain of salt. I am not an expert with a soldering iron - in fact, i suck.

My assembly order was from shortest component to tallest. I started with the diodes, then standard resistors, the chips, switch, resistor array, then capacitors. The diodes, chips, resistor array, and that one odd capacitor have to go in one specific direction; don't put these in backwards or it will not work. This is where i stopped to take the picture in my last post.

Parak used diode leg trimmings to mount his Teensy; I chose to use standard header pins. I only had 32 instead of the 43 that there are holes for, but this turned out OK - the controller only uses 31 pins. I soldered the pins onto the Teensy first and then checked the fit on the PCB. It looked really tight, so i mounted the controller in the keyboard to get a better idea. The Teensy comes very close to the barrel plate, but does not touch. But the opening for the USB cable was too small for my cable to fit inside. It turns out that this is a known issue - some mini USB connectors have larger heads than others. The smallest ones will fit with no problem; average size and larger need to have the the casing trimmed off. I kept the controller mounted and with USB cable connected while I soldered the Teensy onto the controller PCB so that i was sure that they would fit properly.

The final step was to connect the ribbon cable. I cut the old controller off, so i now had to strip some insulation from the cable. I used a razor knife to cut a line about 5mm back, flip the cable to the other side and cut on top of the first cut; use tweezers to grab a spot of insulation between the wires and pull. I tinned the wires to prevent the strands from splitting as i fed all 30 through the holes on the controller PCB (the second toughest part of building this).

And pictures.
DPH side.JPG
DPH side.JPG (423.62 KiB) Viewed 11015 times
DPH bottom.JPG
DPH bottom.JPG (532.21 KiB) Viewed 11015 times
DPH top.JPG
DPH top.JPG (789.33 KiB) Viewed 11015 times

User avatar
Muirium
µ

02 Jun 2014, 15:48

That ribbon connector! I feel your pain.

Xwhatsit sent me a prototype of his Model F controller, to test with my Kishsaver. He modified the design after my feedback, making the ribbon cable pin holes bigger after the fight they gave me!

Anyway, once installed, it works very nicely. His design is all surface mount, so it's quite a lot smaller than the original IBM controller, and gives a lot of space inside the little Kishsaver.
Spoiler:
Image Image Image
It's exciting how we have several ways to get these guys back to life now! Great work on all fronts, gentlemen.

User avatar
wcass

02 Jun 2014, 20:15

I didn't have problems with the size of the holes, but rather just getting all the wires lined up to the holes. The wires are all the same length, so all 30 need to enter the holes at about the same time. When attempting to do this, usually one or two wires would be leaning slightly one way or another.

Building the firmware for the DPH controller in Windows is complicated. You Linux/Unix guys will have no problems.

In Windows, ... start by downloading software.
You will need Cygwin, CMake, PJRC VSP driver, and Atmel AVR Toolchain
If you don't already have a Windows text editor that speaks Unix properly (Notepad and Wordpad do not; Notepad++ does), you will need to download one or use an editor under Cygwin.

Install Notepad++ (if required).
Install PJRC Virtual Serial Port driver.
Install CMake (suggest you install to the default folder).
Install Cygwin. Avoid installing to any folder with a space such as C:\Program Files
Make sure that the following components are installed:
•make
•git (needed for some compilation info)
•cmake
•gcc-core
•gcc-g++
•libusb1.0
•libusb1.0-devel
Run Cygwin Terminal once to create a user profile. Exit Cygwin.
Run Atmel 8bit AVR Toolchain - this will extract files to a folder. Enter that folder, select all files and folders and Cut.
Navigate to the folder that you installed Cygwin to. Paste the files and folders. You will be merging some folders - that is OK.
Navigate to the home sub folder inside your Cygwin folder; here you will find your user profile. Enter that folder.
Open .bashrc with your Unix compatible text editor.
Add the following line to the end ...
alias wincmake="PATH='/cygdrive/c/Program Files/CMake 2.8'/bin:\"${PATH}\" cmake"
The above line presumes that you are running a 32bit version of Windows and you installed CMake to the default directory. If you have a 64bit version of Windows, your line should look something like ...
alias wincmake="PATH='/cygdrive/c/Program Files (x86)/CMake 2.8'/bin:\"${PATH}\" cmake"
If you did not install CMake to the default directory, you will need to change this line appropriately.
At this point, your Windows box should have everything it needs to build and make the firmware.

Run Cygwin Terminal and type the following commands:
git clone https://git.gitorious.org/kiibohd-contr ... e-beta.git
cd capsense-beta
mkdir build
cd build
wincmake -G "Unix Makefiles" ..
make

If you followed these instructions and i didn't leave anything out, you will now have a 44kb file named kiibohd.hex
You will need to plug in your Teensy and press the button to get it ready to program. You can load that hex file on your Teensy with the PJRC tool Teensy.exe or load it directly from Cygwin with the command:
./load
Windows will start alerting you that new devices have been found, then you can start typing on your new keyboard.

Or, you could skip all that stuff above and just get someone to compile the hex file for you on Linux. That leaves you with the job of pressing the button and running Teensy.exe.

Debugging and changes to the keyboard layout are done using a command line interface over the virtural serial port. You can do this with Portable Putty.

User avatar
Muirium
µ

02 Jun 2014, 21:02

wcass wrote:I didn't have problems with the size of the holes, but rather just getting all the wires lined up to the holes. The wires are all the same length, so all 30 need to enter the holes at about the same time. When attempting to do this, usually one or two wires would be leaning slightly one way or another.
Same here. Larger holes would have just made it a bit easier, so they are now standard on the production type. I'm slow when it comes to detailed work, so someone faster could have done my install in under 2 hours, but not me! 2 minutes after that, all 30 pins were soldered in place. It was just a matter of geometry, like you say.

xwhatsit

06 Jun 2014, 03:47

Oh nice work! How does it go? I'm quite fascinated in how this controller operates in practice. That was a bit of cunning sneaking the USB plug underneath the attachment bracket :D

Such a different design. Really cool to see the different approaches taken to the same problem.

Ellipse

09 Oct 2014, 03:38

Has anyone managed to get Hasu's 4704 Kishsaver tmk_keyboard converter working with the 107-key 4704 keyboard (keyboard ID A5)? Compiling the code on github without modification worked 95% for the main 62-key section of the 107-key keyboard, but two of my 107-key keyboards have the same keys not emitting values or key codes - the 8* key, the =+ key, and the left CTRL key produce nothing. On my third one, the 7&, -_, and right control key do not emit codes or matrix values. Adding scan codes to the keymap_common.h file did not fix these 3 keys (although they successfully added some codes for the other keys).

The matrix debug option viewed using hid_listen shows no activity for these keys but by pressing 7& and 9(, I can see that the 8* key probably should be column 1 row 1, the += key should be column 6 row 3, and the lower left control key should probably be column 1 row 6). The columns go from 0 through 7 and the rows go from 00 to 0F.

I carefully read through the source code and 4704-specific and TMK general readme files for this github project but cannot figure it out. I read that there is a way to get the 4704 keyboard to list all its break codes by sending the FC "set key flag" command to the keyboard but do not know how to do so (I could not figure out how to use the console option either).

There are other great 4704 converters out there but I would like to get this one working beyond 95%. In my testing over a few days it produced no ghosting or transposed characters while typing at 80+ wpm.

The hid_listen message when plugging in the keyboard:
IBM 4704 Converter
Keyboard ID: A5
Enable break: x36 zc65:rFD c6B:rFD End

(Does FD in the row codes above indicate an error?)

my adjusted keymap_common.h file is below. I added some codes for 103 keys since I got an error when trying to add more than that. Pressing some keys outside of the main 62-key section result in Error: 78 or Error: 79 both with the unmodified compiled hex file and my adjusted one below.
Spoiler:
/*
Copyright 2011,2012,2013 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H

#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


// 32*8(256) byte array which converts PS/2 code into USB code
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];


/* Original keys */
#define KEYMAP( \
K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E,K07,K0B,K1E,K2E,K43,K44,K45,K46,K47, \
K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D, K48,K49,K4A,K4B,K4C,K4D,K4E,K4F,K50, \
K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D, K51,K52,K53,K54,K55,K56,K57,K58,K59, \
K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D, K5A,K5B,K5C,K5D,K5E,K5F,K60,K61,K62, \
K31,K41,K3F, K40, K42,K2F, K63,K64,K65,K66 \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
{ KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
{ KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_NO, KC_##K1F }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
{ KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
{ KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
{ KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
{ KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, \
{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
}

#endif

/*
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
{ K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, \
*/

Post Reply

Return to “Keyboards”