Author Topic: Amkey capacitive keyboard controller  (Read 7278 times)

0 Members and 1 Guest are viewing this topic.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Amkey capacitive keyboard controller
« on: Sun, 07 September 2014, 20:49:03 »
Xavierblak got in touch with me a few weeks ago after acquiring a triplet of rather interesting keyboards. Fast forward to today, and here is one sitting on my desk.
76472-0

His thread has lots of information and far nicer photos than my iPotato managed to produce; check it out. In short, it's a linear, capacitive, foil-and-foam keyboard unit out of a B52 Stratofortress. The keys are engraved and filled sphericals; not as much depth and weight as the beautiful Honeywell and IBM sphericals, but still nice keys. Any shortcomings are made up by the terrific legends; “WPN DELIV”, “RDR JAM”. Oddly enough there's an “MSN” keycap too...

The key-feel is quite nice, much nicer than I expected. Much smoother than the horrible Cherry MX linears I've tried (how is that company one of the only remaining mechanical keyswitch manufacturers remaining? Race to the bottom? I digress...). Nice “clop” on bottoming out.

The “pad card” is quite interesting. The bottom side is simply a hashed ground fill (pretty!), with some hookups for the columns, no direct part played in the capacitive sensing:
76466-1
The top side of the pad card is where the interesting stuff happens:
76468-2
The funny bits (looking a bit like Chinese characters) inbetween the key pads is simply more ground fill. The capacitive part is formed by the over-under pairing of the two rectangular pads. The pads with vias connected to them are columns; the other side are rows.

This is quite a different system from what IBM used; they used capacitive coupling through no less than three capacitors formed by pads and the flyplate. The system Amkey used here I can see is more prone to stray capacitance (probably why they used a hashed ground fill rather than a solid ground plane, to mitigate some of that), but is resistant to electrical inteference without having to use the massive heavy bottom plates fitted to the Beamsprings and Model Fs.

There are two connectors; one 32-position pin header across the top (columns), and one 16-position pin header down the left-hand-side (rows). That sounds like a rather fearsome amount of rows and columns until you starting buzzing it out and realise both connectors have interleaved ground pins. Every even-numbered pin is ground. This is more noise shielding (the keyboard is quite open in construction, you can see why it might be necessary).

Let's take a look at the controller (don't you love that curvy hand-routing; one day Kicad, one day...):
76470-3
Here we start to get an idea of how they're doing the sensing. The big AMD chip is some sort of micro; the chip at the bottom with the label an EEPROM. At the top right there is an 74154 to break out the 16 connections for the columns, so the micro only needs to drive four lines. The interesting stuff is over on the left, by the 16-pin row connector.

Here we have an MC14051 analogue multiplexer, to break down the 8 row sense lines into a single output. This is fed to the MC1357. What's that you ask?! Why, it's an FM amplifier! Something you would normally find inside an FM radio or a TV. Why is it here? Well, bearing in mind RF/radio is not exactly my area of expertise, the MC1357 is a certain type of FM chip. It's got a quadrature detector in it. This gives us a clue. Quadrature detectors are designed to carefully follow oscillating signals and pick out when they start deviating from a certain frequency. They are tuned to a certain frequency (the knob on your radio!), and then feed the signal through a capacitor which shifts the phase and allows the detector to measure how far the signal deviates from the centre frequency. Sound useful? In this implementation, the capacitors within the keyboard are used as part of the circuit, varying the centre frequency and with the use of a little comparator (8-pin LM393 at the top left) to scale the signal back to TTL we can read the pressed keys.

It's an inventive use of a part designed for something completely different, but would be highly effective and reliable. On the negative side, you could see you'd need to hit each column with a few square wave cycles before you'd be able to read the result, so it's not quite as fast as the IBM dV/dT method that I pinched for my controllers.



So! After I finish shipping Batch 2 of the ibm-capsense-usb controllers, I will have one left—a Model F USB controller. This conveniently has 16 columns and 8 rows. Then we will see if I can apply the IBM dV/dT sensing method to these capacitive boards. If it works, I may be able to get by with a simple adaptor board that adapts a Model F USB controller to the Amkey connections. I'm hoping I don't have to go to a more involved sensing method like the original Amkey circuit, which looks rather fiddly and slow and would be a bit of a departure; the Amkey circuit does look more tolerant of individual deviations between keys, which IBM was always careful to avoid. That said, with the SPI DAC I'm using in the modern ibm-capsense-usb controllers, I could change the setpoint many times per scan and still have an acceptable scanrate. Experiments must be performed  :D
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Amkey capacitive keyboard controller
« Reply #1 on: Sun, 07 September 2014, 20:54:40 »
It's always fun reading keyboard science!

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Amkey capacitive keyboard controller
« Reply #2 on: Sun, 07 September 2014, 21:14:26 »
Wow, excellent writeup!

It's really amazing how they used such a different technique. Analog capacitive stuff was really quite the art back in the day.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #3 on: Mon, 08 September 2014, 06:02:03 »
Before I left work today, I ran a signal generator through one of the columns, outputting a square wave. About the only recent use I've had for a signal generator... maybe since I was doing the first steps on the Beamspring controllers? Anyway, on the rows I saw a nice big fat juicy 300mV peak-to-peak swing from a 5V square wave into a column, which is very healthy. That was with the key pressed; take your finger off and it drops back to just a few tens of millivolts. Bodes very well for hooking up to a Model F USB controller :)
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Amkey capacitive keyboard controller
« Reply #4 on: Mon, 08 September 2014, 08:44:35 »
Nice work.
  Quoting me causes a posting error that you need to ignore.

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #5 on: Mon, 08 September 2014, 10:45:33 »
I'm glad the board made it to you safe and sound. I'm excited to see the progress on this thread.  :D

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #6 on: Tue, 09 September 2014, 02:39:22 »
Well... some pretty good news. Tonight (after missing the post office for Batch 2 of the capsense controllers  :( ), I had a play with the keyboard.

I needed to break out all the pins to wires; the method I used to do that was era-approriate for the keyboard: wire-wrap. I realised I had a bunch of long pin headers and some wire-wrap wire, so I made a wire-wrapping tool out of an old ballpoint pen and got to work. Here's the hideous results:
76607-0

I then started hooking these up to the Model F USB controller. It got a bit hairy when I realised I had the controller backwards but that was fixed with a long ribbon cable:
76609-1
76611-2

Does it work? Kind of! I have a bunch of faulty connections (I tried just blobbing solder in there on the controller without stripping the wire; it often works with that thin Kynar insulation as it just burns off, but not 100% in this case), but nevertheless I was able to set a manual threshold voltage on the controller and press keys and get responses :D It's missing some columns and one or two rows, but nevertheless I can damn near use the thing.

Interestingly, changing the threshold voltage actually changes the “activation point” of the linear keys. I will have to be careful with my so-called debounce filter (there's nothing really bouncing here of course), as without the mechanical hysteresis of the IBM beam/buckling spring there's the potential to get some rapid toggling of state if the key is held half-down.

It's a bit over-sensitive and fiddly at the moment, but that fact that it's working at all in that state (with wires tangled everywhere, no proper grounding etc.) is excellent news. I'll have a bit more of a play with it to see if I can't get all the keys working (might have to tweak some constants inside the keyboard scanning logic), and then it will be a matter of deciding whether I can get by with a simple Model F USB -> Amkey adaptor, or whether I want to design a full controller. I'm leaning towards the second in terms of tidiness and cost at this stage.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Amkey capacitive keyboard controller
« Reply #7 on: Tue, 09 September 2014, 02:50:05 »
I am watching.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #8 on: Tue, 09 September 2014, 15:21:15 »
Nice. Didn't expect to see any wire wrap in this thread  but it seems fitting some how.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #9 on: Tue, 09 September 2014, 20:08:19 »
Well, I'm typing this post on the damned thing now. No weird key repeats, no glitches or ghosting, no scan issues at all! The only problem is proving to be me not knowing where to put my hands; I've mapped the whole thing up a row so I can use the bottom-most row as a many-keyed spacebar. The lack of a backspace in the usual place is also proving a bit mind-boggling for some reason. I imagine if you're into Maltrons and matrix boards and other weird things this will all feel perfectly natural but it's freaking me out  ;D

I simply fixed the dodgy connections I'd made yesterday, found a voltage threshold where all the keys worked properly (140 seems good), and set about mapping all the keys. There's no calibration nodes in the matrix, so setting a fixed voltage threshold override will be necessary, but there haven't been any nasty suprises! The hardest problem has been figuring out what scancode to map to each key... there's certainly no shortage of them! I've doubled up on a bunch of scancodes; for example, the three keys at the right of the main block on the third row are all Enter (including WPN DELIV... satisfaction every line ending).

I've got the whole setup propped up on books at the moment (there's obviously all my hairy prototype wiring hanging loose in there at the moment), excuse messy desk:
76659-0

Underneath there's this mess:
76661-1

Seeing how well it works is making me think again about maybe doing a simple adaptor. But then again a whole new controller would be the same size of PCB (due to the right-angle orientation of the connectors), and a single board would be so much tidier.

Getting stuck into designing the PCB(s) might have to wait a couple of days, but hopefully I'll be able to get stuck in soon.

Thanks xavierblak! Never thought to try one of these controllers with a non-Beam/Buckling spring keyboard. I'm surprised how straightforward it has adapted to a very different sensing scenario (linear, no mechanical hysteresis, top-side two-capacitor pad card etc.). What other crusty capacitive boards are out there waiting to be revived?!
« Last Edit: Tue, 09 September 2014, 20:10:28 by xwhatsit »
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Amkey capacitive keyboard controller
« Reply #10 on: Tue, 09 September 2014, 21:53:06 »
that's awesome.

I was thinking about what you said with the activation point and debounce. If you are getting analog-esque switching out of this, you can implement a scmitt trigger (honeywell hall effect style) and be set!

The switch doesn't really "bounce" between activated and non-activated, but if you have a hard-limit type threshold of actuation, you can get bouncing issues, as it can still "wobble" especially with stray EMI in your office, etc. THis is one good reason to have a schmitt trigger, even implemented in software.
https://en.wikipedia.org/wiki/Schmitt_trigger

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #11 on: Tue, 09 September 2014, 22:15:35 »
Yes exactly—not bounce, but signals very close the threshold. The same problem can happen with the beamsprings, it's just largely mitigated by the mechanical hysteresis built in. However, on key release the flyplate can come down a little slow and with fast scan rates you can have the same problem.

There are two things that help getting around this with this controller implementation

Firstly, the LM339 comparators used in the row input stage have a small amount of hysteresis built in; this is necessary because they're effectively a massively high gain opamp, and will oscillate like a hummingbird if given half a chance. This helps when the threshold is close during a strobe. This isn't such a problem anyway, as we're sampling of course, so momentary oscillations are not really a problem.

Secondly, within the firmware, there's an accumulator for each node in the matrix that effectively implements a schmitt trigger set/reset. If you had a key that was reading high one scan, low the next, and kept repeating this on/off behaviour indefinitely, then the key state would never actually be changed by the firmware. You'd need a certain number of high reads (without too many low reads) in order to move the accumulator away from the centre and towards the high setpoint to allow the firmware to report the key as on. Same story for the key being reported off.

Unfortunately, as I'm using comparators on the input stage instead of ADCs (for reasons of scan-rate speed—this could only be mitigated with a really expensive multi-channel (not multiplexed!) ADC), a neato variable activation point for each key isn't really possible. As mentioned earlier, I can get some minor adjustment in sense height simply by changing the threshold voltage slightly. The sense height seems pretty consistent across the board; unless my fingers are lying to me, it feels like they trip when the foil first touches the pad card (you can feel this I think—it's pretty subtle—about a third of the way through the key travel).

So yeah... I wouldn't like to turn off the “debouncing” code inside the firmware (really a software schmitt trigger as you correctly identified), but it seems to be working pretty much as is. If there were issues around keys repeating etc. then I'd first start increasing the constants controlling the hysteresis. I think you'd still be able to get funny repeating keys if you purposely tried to hold the key right at the activation point for a long period, but hey I can do that with a linear Cherry or even a rubber dome as well.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #12 on: Tue, 09 September 2014, 23:03:38 »
Start with the basics...
76679-0
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #13 on: Wed, 10 September 2014, 11:42:11 »
Glad everything looking to be working out well. Time to continue research/planning for a case for this bad boy. I was surprised by the number of industrial enclosure manufactures that offer wedge style enclosures. Not super ergonomic but it may be a viable option.

One idea that I had thought of before that might be worth mentioning. As far as addressing the lack of a normal space bar. One solution I considered was if I got a plate cut  to mount this keyboard to. I could add a hole for a cherry mx switch to allow for a space bar below the keyboard. If you have any extra I/O on that board an input for a switch could be useful. I'll have to try out the spacing to see if this is actually do-able though.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #14 on: Wed, 10 September 2014, 22:41:04 »
There is a 6-position pinheader on the controllers with four GPIO (plus 5V and GND); this could definitely be used for a spacebar with a tiny bit of code. I wanted to make this arbitrarily mappable as far as possible at some point anyway (at the moment there's a few discrete settings for it, such as the solenoids on some IBM terminal boards, lock LEDs, Caps/Shift/Fn lock switches etc.).

You could retrain your hands to press the key marked Space of course... I don't know if I could do that though! Let alone the loss of a mod key (normally Alt for me). I think the reason why just moving up a row is hard is because the stagger between Q and A is smaller than the stagger between A and Z.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #15 on: Fri, 12 September 2014, 05:13:32 »
I think I've finished the controller... it's essentially the same circuit as the Model F USB, just with different pinouts to the keyboard itself etc.

top:
76898-0

bottom:
76900-1

I've placed all the components (apart from the 90° right-angle pin header/expansion header) on the bottom, unlike the original controller. All of the components are pretty low-profile so it won't really increase the thickness very much. It was just much more simple to lay it out this way, meaning much less crossing over of some of the delicate stuff near the columns/rows connectors to the keyboard.

It's a relatively large board compared to the other ones, just because the row/columns headers are placed physically quite far apart. You pay by the bounding rectangle at OSH Park, so it comes out as a relatively pricy board. I may get it fabbed at another fab I use sometimes for larger stuff. They also seem to have a faster turnaround time, and I don't have to stick with the skody old purple. The quality isn't quite as good as OSHPark (especially silkscreen and solder mask resolution/alignment), but it's perfectly acceptable for something with a relatively low-spec board like this. I wouldn't necessarily these guys for an 0.5mm BGA though...

Anything you spot that won't fit your plans xavierblak?
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #16 on: Fri, 12 September 2014, 10:55:43 »
Wow looks great!  :thumb:  The speed that you've turned this around in is making me feel lazy.

Let me know if the boards end up being more expensive that anticipated. I know low quantity boards can be expensive.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Amkey capacitive keyboard controller
« Reply #17 on: Fri, 12 September 2014, 23:24:53 »
Wow looks great!  :thumb:  The speed that you've turned this around in is making me feel lazy.

Let me know if the boards end up being more expensive that anticipated. I know low quantity boards can be expensive.

Actually from OshPark it isn't bad.  They do have a size limit per board and small run boards have to be ordered in multiples of 3.  But for small runs it is 5USD per square inch, for medium quantity runs (over 150 square inches) the price drops to 1USD per square inch.  For my enablers buy (over 2000 square inches) they ended up charging me 0.95USD per square inch but then sent me a TON of extras.  Bonus is they are located in a no sales tax area.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline CPTBadAss

  • Woke up like this
  • Posts: 14365
    • Tactile Zine
Re: Amkey capacitive keyboard controller
« Reply #18 on: Tue, 16 September 2014, 22:13:18 »
How in the world did I miss this thread?! YOU GOT THE B52 WEAPON DELIVERY BOARD WORKING?!?!?!?!

* CPTBadAss is unashamed in his love for xwhatsit

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Amkey capacitive keyboard controller
« Reply #19 on: Tue, 16 September 2014, 23:01:17 »
How in the world did I miss this thread?! YOU GOT THE B52 WEAPON DELIVERY BOARD WORKING?!?!?!?!

* CPTBadAss is unashamed in his love for xwhatsit
Of course he did.

Like the awesome pro he is, he already laid the groundwork with his capacitive controller, and just adapted it for this specific case. I bet it would also work with keytronic, alphameric, and other capacitive keyboards.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #20 on: Sun, 28 September 2014, 00:47:51 »
Sorry for lack of updates; the PCB fab has been dragging their feet a bit (I had a pile of new shiny white solder-mask Model-F-USB and Beamspring-USB PCBs on the same order). However they were shipped on Friday. Normally stuff shipped from China takes an age, but they're using DHL so should get to me reasonably quickly, hopefully this week. Looking forward to putting the first controller together! When bringing up a new board there's always a bit of the nervousness of pulling your freshly-souped film out of the developing tank... is it going to be completely clear or black or are you going to have beatiful negs?
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #21 on: Mon, 29 September 2014, 10:06:55 »
Yah, I'm pumped! Got my bombs all ready to go.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #22 on: Fri, 03 October 2014, 05:56:57 »
Yay! Shiny white goodness arrived this afternoon!
78743-0

Sadly I made a balls-up; hopefully my only mistake:
78745-1

That shouldn't really be an issue; having 48 pins holding the thing on is more than solid enough. Still looks a bit ugly though :(

I won't have a chance to put this together this weekend (almost had to fly overseas for work), but I'll be tackling it ASAP in order to put my mind at rest :)
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #23 on: Fri, 03 October 2014, 19:38:43 »
Awesome! Cool to see the pcb is a reality.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #24 on: Mon, 06 October 2014, 20:21:16 »
Manage to get onto this today (yesterday and the weekend were a write-off; there was a major substation fire which knocked electricity out to half of the city from Saturday to late last night—not my house, but my reflow oven is somewhere else :) ).

Good news, it works :D

Bad news is now I have to scratch my head and figure out what to map where—a bit of a headache!

The other two controllers for xavierblak will have to wait a few days while parts I ordered arrive. I didn't manage to time the arrival of these very well with the arrival of the PCBs, sorry (I also ran out of 2x3 right-angle header pins, so no expansion port on this first controller just yet). On the plus side xavierblak won't have to put up with horrible colour-clash green header pins. I think the white/black/silver colourscheme will look quite nice...

79076-0

79078-1

Oh this is my keyboard-feet solution:
79080-2

A bit slidey but I ran out of more rubber feet. More of them arriving in a few days as well.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline jsquared

  • Posts: 9
Re: Amkey capacitive keyboard controller
« Reply #25 on: Mon, 06 October 2014, 20:49:02 »
This is too cool, thanks for sharing! Great inspiration for my next flight sim project.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #26 on: Mon, 06 October 2014, 21:03:05 »
Hey now there's a cool idea. Anybody know anyone who wants to build a really realistic B52 sim :D ?
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #27 on: Wed, 08 October 2014, 10:52:09 »
Good news, it works :D

Awesome  :D

Hey now there's a cool idea. Anybody know anyone who wants to build a really realistic B52 sim :D ?

Hah that'd be great. I still wish I could find an actual photo of one of these installed in the plane.

Offline jsquared

  • Posts: 9
Re: Amkey capacitive keyboard controller
« Reply #28 on: Wed, 08 October 2014, 12:01:58 »


Hah that'd be great. I still wish I could find an actual photo of one of these installed in the plane.

I went on a hunt for this also, and also came up empty. The closest I could fine is this image of the EW Officer position showing a keyboard/trackball combo HID which doesnt match at all:



 I think I have a clue as to why, though. 

The original government auction site listed a part number and application, "P/N MPTK-129-7770109-110, Application: Stratofortress B-52 Aircraft".

If you google that part number you get a few more results (mostly pointing to liquidation auctions with few details), and also some small pieces of additional information about the item, including this:

"Iii end item identification: b-52 weapon sys tnr"

I'm thinking the reason we don't see this in any cockpit or interior shots of the B52 (either for the EW position, gunner position, or the lower deck radar/nav seats) is because it's used by the controller of the B52 training simulator, specifically the Weapons Systems trainer. This makes a little more sense too when you think of the key legends on the board itself: playback, malf(unction), init(iate) cond(ition), auto (takeoff), auto land, etc. 

Pretty cool! I was looking for a while for detail shots of a B52 weapo0n trainer but only saw some exterior images and a shot of the testing seat, not of the controller itself.  Would be interesting to see the whole shebang and maybe catch a shot of this board in action.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Amkey capacitive keyboard controller
« Reply #29 on: Wed, 08 October 2014, 13:40:04 »


Hah that'd be great. I still wish I could find an actual photo of one of these installed in the plane.

I went on a hunt for this also, and also came up empty. The closest I could fine is this image of the EW Officer position showing a keyboard/trackball combo HID which doesnt match at all:

Show Image


 I think I have a clue as to why, though. 

The original government auction site listed a part number and application, "P/N MPTK-129-7770109-110, Application: Stratofortress B-52 Aircraft".

If you google that part number you get a few more results (mostly pointing to liquidation auctions with few details), and also some small pieces of additional information about the item, including this:

"Iii end item identification: b-52 weapon sys tnr"

I'm thinking the reason we don't see this in any cockpit or interior shots of the B52 (either for the EW position, gunner position, or the lower deck radar/nav seats) is because it's used by the controller of the B52 training simulator, specifically the Weapons Systems trainer. This makes a little more sense too when you think of the key legends on the board itself: playback, malf(unction), init(iate) cond(ition), auto (takeoff), auto land, etc. 

Pretty cool! I was looking for a while for detail shots of a B52 weapo0n trainer but only saw some exterior images and a shot of the testing seat, not of the controller itself.  Would be interesting to see the whole shebang and maybe catch a shot of this board in action.

That's a cortron inc keyboard, either hall effect (magnetic valve) or foam&foil, depending on age. This amkey would likely have been in use in the 1980's before they switched to the more modern cortron keyboard you see in the picture there.

The cortron keyboard is backlit.
« Last Edit: Thu, 09 October 2014, 16:22:43 by dorkvader »

Offline jsquared

  • Posts: 9
Re: Amkey capacitive keyboard controller
« Reply #30 on: Wed, 08 October 2014, 14:40:18 »
double post

Offline jsquared

  • Posts: 9
Re: Amkey capacitive keyboard controller
« Reply #31 on: Wed, 08 October 2014, 14:40:32 »
That's a cortron INC keyboard, either hall effect (magnetic valve) or rubber dome, depending on age. This amkey would likely have been in use in the 1980's before they switched to the more modern cortron keyboard you see in the picture there.

The cortron keyboard is backlit.

I kind of suspected that it was an interim design used for a short time, do you know where the Amkey was used in the plane by chance?

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Amkey capacitive keyboard controller
« Reply #32 on: Thu, 09 October 2014, 09:06:44 »
Can you post any pics of the bottom of the keys, or whatever it is that contacts or gets near the PCB that triggers a key stroke?
  Quoting me causes a posting error that you need to ignore.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Amkey capacitive keyboard controller
« Reply #33 on: Thu, 09 October 2014, 12:55:30 »
Can you post any pics of the bottom of the keys, or whatever it is that contacts or gets near the PCB that triggers a key stroke?

Like any capacitive keyboard, it is a "non-contact" design. You could set the threshold to actuate at the very bottom of the keystroke, but basically what you get is an increase in capacitance as you press the key. Once it gets past the threshold you set then the controller decides a keypress has occurred.
more info in this post:
http://geekhack.org/index.php?topic=62553.msg1464586#msg1464586

Does it work? Kind of! I have a bunch of faulty connections (I tried just blobbing solder in there on the controller without stripping the wire; it often works with that thin Kynar insulation as it just burns off, but not 100% in this case), but nevertheless I was able to set a manual threshold voltage on the controller and press keys and get responses :D It's missing some columns and one or two rows, but nevertheless I can damn near use the thing.

Interestingly, changing the threshold voltage actually changes the “activation point” of the linear keys. I will have to be careful with my so-called debounce filter (there's nothing really bouncing here of course), as without the mechanical hysteresis of the IBM beam/buckling spring there's the potential to get some rapid toggling of state if the key is held half-down.


Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #34 on: Thu, 09 October 2014, 15:21:02 »
I think there's some good pics in the original thread here; they're those shiny mirror-looking things. I think (which would borne out by the name foil-and-foam) that they're a sort of foil, but covered with a plastic clearcoat so are non-conductive on the surface. Certainly they didn't bell out when I ohmed them with my meter.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #35 on: Thu, 09 October 2014, 17:27:26 »
So my cow-orker (who madly decided “this is the keyboard I'm going to use today”) took the thing and started mapping usable keys onto it, an exercise which has proved reasonably frustrating, mostly because of the lack of a spacebar.

However we got to wondering how many keys it had; not being very good at counting we came up with various answers until we finally settled on 129 keys.

129 keys?! My controller can only support a maximum of 128 (16 columns and 8 rows), and of course the keyboard itself can only support up to 128, as it has just that—16 columns and 8 rows. After mapping every key on the keyboard to something we discovered the unfortunate fact that the Tab key on the top-left of the keyboard and the Tab key on the numpad are in fact internally connected together on the keyboard itself, so are inextricably linked together as the same key.

This would be a problem on a smaller keyboard, but is probably not as much of a big deal on this behemoth, which has keys to spare. Still, somewhat unfortunate! Amkey must have designed their keyboard and then realised they had one key too many, so just found two similar keys and wired them together.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Amkey capacitive keyboard controller
« Reply #36 on: Thu, 09 October 2014, 17:36:36 »
I think there's some good pics in the original thread here; they're those shiny mirror-looking things. I think (which would borne out by the name foil-and-foam) that they're a sort of foil, but covered with a plastic clearcoat so are non-conductive on the surface. Certainly they didn't bell out when I ohmed them with my meter.

Ah - forgot about that thread // thanks!
  Quoting me causes a posting error that you need to ignore.

Offline xavierblak

  • Posts: 202
  • Location: NY
Re: Amkey capacitive keyboard controller
« Reply #37 on: Fri, 10 October 2014, 12:19:05 »
Amkey must have designed their keyboard and then realised they had one key too many, so just found two similar keys and wired them together.

Hah I like this thought. They were designing the perfect keyboard with no regard for electrical design and then couldn't give up that one key when they realized they were one over their row/column count.

I'd say 129 keys sounds right considering the part number is MPTK-129-7770109-110. I wonder what the other parts of the part number indicate.

Offline xwhatsit

  • Thread Starter
  • Posts: 297
  • Location: NZ
Re: Amkey capacitive keyboard controller
« Reply #38 on: Fri, 10 October 2014, 16:46:28 »
Hehe that happens way too often in engineering/design. That's why chip manufacturers and the like offer all the different variants; aim for the lowest flash/RAM/etc. chip, inevitably overshoot, buy the step up for 20% extra.

I'm going to wildly guess that the K in MPTK stands for “Keyboard”  :D

Here are the other two controllers going in the post on Monday:
79363-0
79365-1
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless