geekhack

geekhack Community => Keyboards => Topic started by: bladamson on Thu, 23 December 2010, 09:00:48

Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 09:00:48
So yea, as mentioned in a previous thread, I had thought my Model M was worn out beyond repair, so I ordered a rather used F from clickykeyboards, 'cos I've been wanting one for years anyway.  I since managed to fix the M, mostly, but the F has already shipped, so that's a good rationalization for keeping it anyway. :P


Part 1:

When the thing gets here, in addition to transplanting in the pipe, backspace, and enter from a broken model M donor board, I have been thinking about fiddling with the numpad as well.  It seems like the only time I ever use the numpad is for punching in credit card numbers, which doesn't happen all that often.  So I want to transplant the cursor control keys from the donor M into the F numpad, something like this:



If I do this, I'll either have two dead keys or I'll need to find some springs and rocker thingies somewhere.

Does anyone have a handful of these that they'd be willing to part with, perhaps out of a dead XT donor?

I'd need two, or maybe four if I should decide that I need to move hyper and super down by the spacebar.  Though I seldom have the (dubious) pleasure of having to use Emacs.  


Part 2:

I'll also occasionally want to attach this thing to my laptop, for long hacking sessions away from home.  Remapping the keypad scancodes in the OS on the laptop won't be a huge issue, since the laptop doesn't have a keypad anyway.  And except for the two additional keys, all of the keys will produce standard scancodes anyway, so I can just ignore the relabeled keys if I need to and treat it like a normal keypad if I have to.  However, this isn't the case with the relocated pipe key, since the original pad is covered by the backspace key.  I'm thinking about remapping this one in hardware by cutting a couple of traces on the board and running a couple of jumper wires.  It looks like I can do the front of the board without any of the jumper wires getting in the way of the keyswitches, like so:



Hopefully if it goes wrong, I can just tack across the cut traces with solder and be back to stock.

Does anyone have a decent photo of the back of this board?  I can't see through the board well enough in that picture to tell if the other pad is in the same column or not...

Has anyone ever tried this?
Title: Model F hacks
Post by: msiegel on Thu, 23 December 2010, 10:19:45
it's in the same column.

the top row pad to the right (under the original small backspace) is in a column all by itself.

i'll try to get a shot of the back tonight.

this sounds like a cool hack :)
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 10:52:14
Quote from: msiegel;267785
i'll try to get a shot of the back tonight.


Thanks!

Since it's a scratch-n-bang model, I'm thinking about dumping the case into black rit dye, too.  From some of the dings in the seller's picture, it kinda looks like the case is painted though? O_o  Not sure how well dye will take to that...  Might do the keys too, iunno...

Where'd you get your hammers and springs for the additional keys?  If you've got a few extras, I'd happily trade you (or anyone else) some M parts or a few bucks.  My donor board is a 1391401, 19AUG88, with a dead column.  It's missing esc, leftarrow, and f10, and I'd like to keep the backspace, pipe, enter, and maybe spacebar for my F.  It seems a shame to spend a bunch on a probably-functional F-XT and then tear it up just for four parts (why on earth do they cost so much?  They won't work on anything newer than 1982. o_O).
Title: Model F hacks
Post by: msiegel on Thu, 23 December 2010, 11:04:35
Quote from: bladamson;267797
hammers and springs for the additional keys?  If you've got a few extras, I'd happily trade you (or anyone else) some M parts or a few bucks


after counting my parts, i'd be happy to send you a half dozen model F/AT spring/plate assemblies from a board i'm converting :)

even better if you have a model M Right-Arrow & Ctrl to trade :D
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 12:10:02
Quote from: msiegel;267808
after counting my parts, i'd be happy to send you a half dozen model F/AT spring/plate assemblies from a board i'm converting :)

even better if you have a model M Right-Arrow & Ctrl to trade :D


Oh sweet.  Very very awesome.

Hmmm, let's see....  I used to have two working Ms and two broken ones, but I seem to have lost two of them last time I moved (and one of the working ones at that. D:= ).

I have two extra control keys, which I can part with no problem.  One is a little shiny and the other one looks fine.

I only have one right arrow, though, on the keyboard I am using, which I was planning on transplanting to the F (if I don't dye all the keys black).  I'm not sure yet if I will dye them or not, kinda depends on the condition of the board.  I mean, I dunno.  If it's sparkly looking with only a ding or two on the case, it'd be a shame to dye all those old keys that are impossible to replace...  Unless I replace them all with dyed M keys and keep the old ones around. :3

I guess if you want the right arrow super-bad and can't find one anywhere else, I don't think I'd cry too hard if I had to let it go.  It's a little shiny though.

Clickykeyboards has one right arrow cap in stock for $1, too.  http://www.clickykeyboards.com/index.cfm/fa/categories.main/parentcat/10191

I have some other stuff for trade too.  Gonna make a new post about that.

I'll send you a PM with my contact info!  Thanks again!
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 12:55:48
Happy news:

I found another '91 M while I was digging through my junk!  So yes, I have a right arrow key for you for sure, though it also is a little shiny.

Edit- Grumble, it has nonfunctional ZXC keys.  Maybe I can engineer one working M out of both of those broken ones...
Title: Model F hacks
Post by: Soarer on Thu, 23 December 2010, 13:32:32
I don't suppose that means you have a spare space & backspace does it? :-) (http://geekhack.org/showthread.php?t=13632)
Title: Model F hacks
Post by: ch_123 on Thu, 23 December 2010, 13:50:00
Model Ms are pretty easy to repair. All you need to do is remove all the rivets, use a silver conductive gel pen to fix the traces, and then do the bolt mod described elsewhere on this site.
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 14:23:20
Quote from: Soarer;267909
I don't suppose that means you have a spare space & backspace does it? :-) (http://geekhack.org/showthread.php?t=13632)


I am not entirely certain yet.  Probably, as I see no need to type on two Ms at once, even if one of these is fixable, and I'm not sure I completely trust the suggested conductive ink fix.

As soon as I get a new nut driver and open it up and verify that it is indeed the keyboard matrix that is causing the trouble, I will know for sure.  The one of these with the whole column flaky may be a cold-solder joint on the controller, or at least I have my fingers crossed for that.  I'd rather not part out one that can be fixed in a robust way.

The Model M that I am typing this on is going to get rit-dyed solid black as soon as I get my F remapped.  When I do that, I'll use an extra keypad 0/insert for backspace and will definitely be able to let go of a backspace cap.
Title: Model F hacks
Post by: Soarer on Thu, 23 December 2010, 14:52:41
See how it goes then :-) I hope you get that M working again even if it means I can't have some keys!

If you can get hold of a Teensy, I could send you a hex file to load onto it to make a PS2 to USB adapter that works with all the AT-F codes :-)
Title: Model F hacks
Post by: msiegel on Thu, 23 December 2010, 16:38:43
the back side

(http://geekhack.org/attachment.php?attachmentid=14218&stc=1&d=1293146645)
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 17:05:57
Woohoo!  Thanks!

So it's definite that the front is the only part that needs to be hacked then!  Excellent!

Anything else you need besides 1x Ctrl and 1x Right arrow?  Do you need the plungers too, or just the caps?
Title: Model F hacks
Post by: Sam on Thu, 23 December 2010, 17:15:58
Quote from: bladamson;267797
It seems a shame to spend a bunch on a probably-functional F-XT and then tear it up just for four parts (why on earth do they cost so much?  They won't work on anything newer than 1982. o_O).


They only cost so much if you've overpaid.  There's a constant stream of people who find these and think they're worth a fortune.  They're not. The going price is about $10 + shipping.  Anything much higher than that will in all likelihood go unsold.
Title: Model F hacks
Post by: msiegel on Thu, 23 December 2010, 17:28:55
Quote from: bladamson;268031
Woohoo!


:)

i do need 4 more of these stabilizer guides (just the white part) for my mod. if you have spares, that would great.

(http://geekhack.org/attachment.php?attachmentid=14220&stc=1&d=1293149156)

never mind about the Ctrl and Right Arrow, i've decided not to resurrect that other board.

i'll try to get some shots of the extra model f parts i have later tonight :)
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 18:34:05
Groovy.  I pulled 4 white spacers out of the '91, along with a right arrow and right control (it is less worn than the left one).  I have three more white spacers spare and two of the offset blue ones if you need more.

Both keycaps exhibit slight shininess, but you can only see it at a very horizontal angle.  The keycaps are both deloused, but a couple of the spacers may need an itty bitty bit of interior delousing around the top with a pipe cleaner.  I don't really have anything to stick down on there that I'm not afraid will scratch.

Sorry about not having pictures.  I don't own a camera, not even a cell phone camera, as I live way back in the middle of nowhere where there's no cell service.  If you want pictures, I can borrow a camera from a friend, but probably won't be able to until Tuesday-ish.

I'll mail the spacers Tuesday-ish as well.  If you decide that you want those two keycaps after all or anything else before then, let me know. :)

I'm pretty interested in the shell as well as some spring/hammer assemblies and four of those stem thingies that your spacer is stuck into in that picture, I think.  Possibly any non-M-sized keys that you're disposing of, too, if I decide to do the flat black dyed F thing.  I'll send some money for shipping or whatever, esp if the shipping cost with the shell is nuts.

Thanks again!


Oh yea:  Is there any noticeable difference between the F and M stems?  They're completely interchangeable, right?
Title: Model F hacks
Post by: Daniel Beaver on Thu, 23 December 2010, 18:39:41
Quote
Oh yea: Is there any noticeable difference between the F and M stems? They're completely interchangeable, right?


Model M stems are all part of an integrated full-board stem assembly, so you can't just swap out stems. Model F's have individual plaster pieces for each stem. The stems themselves are pretty much dimensionally equivalent (the wiki has more info in that regard).

If you want to add keys, you need to find someone who has a junk Model F that you can cannibalize for extra stems and (more critically) hammers. Anything short of that isn't going to work.
Title: Model F hacks
Post by: bladamson on Thu, 23 December 2010, 18:58:34
Quote from: Daniel Beaver;268097
If you want to add keys, you need to find someone who has a junk Model F that you can cannibalize for extra stems and (more critically) hammers. Anything short of that isn't going to work.


By "stems", you're meaning the piece that the spacer guide thingamabob is stuck into in msiegel's picture?

So I need them for the M-spacebar-swap and for adding two keys to the keypad then, but not for the M-backspace-pipe-and-enter-swap, correct?

And the model M keys/plungers/whatever fit into them properly?  Or is there a step in the backspace/enter swap that I'm missing?

Adding four of those to the wishlist in the previous post, then. :3  Hehe.
Title: Model F hacks
Post by: bladamson on Fri, 24 December 2010, 05:08:08
Hmm, I had a thought...  (Yes, scary, I know...)

Considering how into fabricating parts you are, msiegel, I wonder how much it would cost to have fabricated, in small quantities, parts that would fit into an M: an F-like front plate, an F-like foam pad, and an F-like capacitive matrix board with (if needed) a teeny bit of logic at the top to convert the capacitance matrix signal levels into something that an M logic board could read.

Then the keyboard hobbyist could buy this kit, perhaps at-cost, along with a couple of XT-Fs for the barrels, springs, and hammers, and bolt the whole deal onto their M backplate, thus producing a keyboard with the superior M layout, superior F keyswitches, and no wonky OS-level keysym remapping required.

Probably too expensive, eh?  Probably cheaper to build a new logic board to put into a 3270 board with swapped out keys, huh? :<

It'd be a pretty sweet keyboard, though......
Title: Model F hacks
Post by: bladamson on Fri, 24 December 2010, 08:20:33
Here's a better list of the Model M loot I have for trade.

http://www.adamsoncomputing.com/ModelM_ModelF_Parts_List.html (http://www.adamsoncomputing.com/ModelM_ModelF_Parts_List.html)

Soarer, you're welcome to a spacebar and backspace if the shipping costs to where you are aren't too insane.  The spacebar has a little bit of a shiny spot on it though. ;<
Title: Model F hacks
Post by: Soarer on Fri, 24 December 2010, 08:34:07
That's great, thanks! I wouldn't mind taking the opportunity to get a couple of other keys, so I'll think about which and send a PM shortly, if that's ok. :-)
Title: Model F hacks
Post by: msiegel on Fri, 24 December 2010, 10:32:57
The sun came up! It's time for a survey of the shell :)

It has tons of scuffs and a little worn paint, some scratches on the underside of the bottom half, bit of sticky gunk, but apparently no chips or dings.

Huh, it's missing a foot.

(http://geekhack.org/attachment.php?attachmentid=14229&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14230&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14231&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14232&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14233&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14234&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14235&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14236&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14237&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14238&stc=1&d=1293210662)
(http://geekhack.org/attachment.php?attachmentid=14239&stc=1&d=1293210662)
Title: Model F hacks
Post by: msiegel on Fri, 24 December 2010, 10:49:48
Quote from: bladamson;268227
I wonder how much it would cost to have fabricated, in small quantities, parts that would fit into an M: an F-like front plate, an F-like foam pad, and an F-like capacitive matrix board with a teeny bit of logic


if all goes well, we'll find out in 2011 :)

although my goal isn't to fit an f into an m, i will be replacing all the electronics and structural components.

current design for colemak layout - you can see why i need extra stabilizer guides :)

(http://geekhack.org/attachment.php?attachmentid=14240&stc=1&d=1293212145)
Title: Model F hacks
Post by: bladamson on Fri, 24 December 2010, 11:16:46
That is.....  Unspeakably awesome.  Lol.

So you're planning to make an eventual production run of these things, or at least the parts?  Are you going to have the post-prototype barrels and hammers fabbed too, or just reuse XT scraps or something?

Thanks for the enclosure pics!  I sent you a PM.
Title: Model F hacks
Post by: msiegel on Fri, 24 December 2010, 12:30:15
:)
for the prototype i'm using barrels and spring/flyplate assemblies from a gutted model f. i'm now developing new sensor electronics.

current plan is to create a flat top plate and backplate in wood, with aluminum foil for electrical shielding. since adjacent barrels don't have space between them, they may keep *themselves* aligned, without a need for extreme precision in the top plate.

overall my goal is to develop a working prototype i can use and enjoy, and to share design specs for others to fabricate their own versions -- or send away for cnc fab in different materials.

i'd love to have cad models and specs for brand new springs and injection-molded barrels & flyplates, but i don't know anyone who wants to do it, open source and for free :)
Title: Model F hacks
Post by: Soarer on Fri, 24 December 2010, 13:20:58
Tin foil hats and self-aligning barrels? Sweet!

I suspect the barrels won't play nice. They have a nub for alignment. Maybe if you made a slot for that to fit in, and used some hot glue to set them straight, you could avoid precision machining...? [ Just thinking out loud :-) ].
Title: Model F hacks
Post by: Daniel Beaver on Fri, 24 December 2010, 14:23:26
Quote from: bladamson;268106
By "stems", you're meaning the piece that the spacer guide thingamabob is stuck into in msiegel's picture?

Yes. You can only get them out of Model Fs.

Quote

So I need them for the M-spacebar-swap and for adding two keys to the keypad then, but not for the M-backspace-pipe-and-enter-swap, correct?

Yes. The big backspace mod only requires spacers and keys. The spacebar/alt swap (http://geekhack.org/showpost.php?p=226708&postcount=200) requires three extra of those stem pieces, as well as three hammers.

Quote

And the model M keys/plungers/whatever fit into them properly?  Or is there a step in the backspace/enter swap that I'm missing?

Adding four of those to the wishlist in the previous post, then. :3  Hehe.

Yes, Model M keys should work.

I have extra Model F hammers and stems in storage if you really needed them. I am, however, currently living about 1500 miles away from them, and I would rather not have to call up a friend to drive out and rummage around for them, ship it to me, etc. Hopefully someone else on the board can help you out in that regard.
Title: Model F hacks
Post by: msiegel on Fri, 24 December 2010, 14:31:47
i'll be shipping model f parts out to bladamson next week :)
Title: Model F hacks
Post by: bladamson on Fri, 24 December 2010, 14:54:58
Quote from: Daniel Beaver;268357
I have extra Model F hammers and stems in storage if you really needed them. I am, however, currently living about 1500 miles away from them, and I would rather not have to call up a friend to drive out and rummage around for them, ship it to me, etc. Hopefully someone else on the board can help you out in that regard.


Thanks for the offer, but yea, M. is sending me a pile of stuff after Christmas. ^_^
Title: Model F hacks
Post by: Sam on Fri, 24 December 2010, 18:15:01
Quote from: msiegel;268304
if all goes well, we'll find out in 2011 :)

although my goal isn't to fit an f into an m, i will be replacing all the electronics and structural components.

current design for colemak layout - you can see why i need extra stabilizer guides :)

Show Image
(http://geekhack.org/attachment.php?attachmentid=14240&stc=1&d=1293212145)


Nice job on the staggering.  What's that green dot for?  A trackpoint?  Best of luck on your project, I'll be very interested to see how it turns out.
Title: Model F hacks
Post by: msiegel on Fri, 24 December 2010, 18:35:05
thank you :D

that's an led. i did leave space in the middle of the home row for something, but i haven't decided if anything will go there yet :)
Title: Model F hacks
Post by: bladamson on Sun, 26 December 2010, 07:58:05
Hm!  I just got bored and read up on Colemak.  Pretty cool.  I think I'm gonna make my //e platinum keyboard into a colemak. :3

In other news, there's too much snow here for me to get my motorcycle to the paved road, so shipping of your model M parts may be delayed until Tuesday or Wednesday, at which time the weather report is calling for temperatures that should be high enough to unmelt the roads, and I'll be able to make it into town to the post office.  I'm sorry. :<
Title: Model F hacks
Post by: msiegel on Sun, 26 December 2010, 22:53:11
no hurry. i have circuitry to design... and not being an EE, this is a very slow process :)
Title: Model F hacks
Post by: bladamson on Mon, 27 December 2010, 05:14:20
Quote from: msiegel;269317
i have circuitry to design... and not being an EE, this is a very slow process :)


I hear ya there. X_x
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 10:00:05
How's your research into capacitive switches going?

I'm looking at teensy boards, thinking about slotting one into the F/PC, and wondering what the easiest way to convert capacitance changes into TTL levels is. :3
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 10:17:31
Hmmmm

http://sensi.org/~svo/capsensor/index.en.html (http://sensi.org/~svo/capsensor/index.en.html)
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 10:38:31
Looks like he's using the AVR's ADC for that one though.  You'd think that you could like...  Use a TTL buffer or something with just the right value resistors to make the output flop between 0 and 1 when the key was pressed...  I guess that would probably end up being temperature sensitive though, wouldn't it? :s

I don't really know what I'm talking about. >_>

Looks like it would indeed be easier to just decode XT scancodes in software hahaha.
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 11:27:02
Spoiler Alert

don't tell Sam this approach, he's working on his own version and doesn't want to be tainted... :)

i've been slowly building a test circuit in LTSpice simulator, based on insights gleaned from the original patent docs. once the model is working i'll prototype it on a breadboard using the existing model f "switch" pcb (minus the microcontroller card).

the circuit sends a 0.2us five volt pulse through one of the pads and sees if the pulse travels through the pad on the back side. if the flyplate (aka hammer) is close to the pads, the signal will couple all the way through.

i considered using the avr's onboard adc or comparator to do the detection, but it's way too slow! :) so i'm using an external comparator chip. come to think of it, that external comparator is sensitive enough that i might be able to ditch some of the other components... thanks for the idea :D

i don't quite have the simulated circuit working yet -- still figuring out how to use hysteresis for the comparator, but it shouldn't be too much longer.
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 11:32:10
Quote from: bladamson;270678
Looks like he's using the AVR's ADC for that one though.  You'd think that you could like...  Use a TTL buffer or something with just the right value resistors to make the output flop between 0 and 1 when the key was pressed...  I guess that would probably end up being temperature sensitive though, wouldn't it? :s

I don't really know what I'm talking about. >_>

Looks like it would indeed be easier to just decode XT scancodes in software hahaha.


i like your idea... i don't have any of those parts handy, but maybe a 555 could be rigged up to test, once i try this other way :)

/not an ee
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 13:14:11
loot4bladamson

(http://geekhack.org/attachment.php?attachmentid=14380&stc=1&d=1293736226)

there are some extra dampened cream alps in there... i may have killed 1 or 2 of the oranges :P
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 15:52:54
Zomgwow.

That's a lot of lewt. XD

Do you really wanna get rid of all that stuff? :3

Awesome. :3  That mac keyboard is going to rawk. :3
Title: Model F PC and AT hammers and barrels compared.
Post by: bladamson on Thu, 30 December 2010, 15:56:40
Left: Model F/PC
Right: Model F/AT
 

Result: Very very slight difference in shape at the hinge, but identical curvature.  They both work fine in either type of barrel.
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 16:08:51
Left: Model F/PC
Right: Model F/AT

   

Result: They are functionally identical except for the little post that keeps them from rotating.  They could be interchanged if (1) the post was cut off, which might lead to key instability, or (2) the faceplate drilled to accommodate the differently placed post.

In practice, the foam would probably do an excellent job of keeping them from moving once the board was reassembled, and cutting the post would probably be just fine.

Also, the foam in the F/PC board is of much much higher quality than that in the F/AT.  The PC foam looks and feels new, whilst the AT foam is starting to degrade from age.

The boards have a very slightly different feel.  The PC board is stiffer and pingier.  The AT board is also very pingy, but not quite as much.  The force of actuation between the two seems about the same, but the AT seems to have a sharper force-curve leading up to actuation, ie the PC is relatively stiff throughout key travel, whereas the AT is less stiff leading up to the point of actuation.  This may just be an artifact of spring age and wear.

I prefer the feel of the AT.
Title: Hardware Pipe Mod
Post by: bladamson on Thu, 30 December 2010, 20:55:43
Getting ready to cut it up...



Mod complete.



Jumpers.  Pipe is moved down onto the pad underneath of backspace.  The wire on the right jumps the numpad back to the uC (see A).  Wire is stolen from an old PATA cable, so the insulation melts really easily when being soldered. -_-'



(A) The trace that was cut for the remap also needed to run to the numpad, so it's jumped back here to the uC.



This trace was cut, so we have to run a jumper to the other side for the numpad. (see A)



Jumper for the numpad, with space left for the tabs to fit back the way they're supposed to (see A).  Here you can see the cut and short jumper that move the pipe key down into the next row (It will now produce the same scancode as the original pipe pad, and the keyboard will work as normal if you put the stock keys back onto it).



Now it's time to put the board back together and see if it still works (place your bets, folks)!  If it doesn't, the mod should be reversible by removing all jumpers and soldering across the two cut traces.

Lol, I hope I didn't break it. XD
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 21:02:54
awesome! *crosses fingers*
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 21:04:59
Yea, I'm afraid to put it back together.  If I broke it, I'm gonna cry. >_>

So I'm "waiting for the soldering iron to cool down so the cats don't get into it..."
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 21:08:57
if you did break it, i'll send you a new pcb :D

(after my own frankensteinian experiments ;)
Title: Model F hacks
Post by: Soarer on Thu, 30 December 2010, 21:22:32
Poor F :-(

For once I'm glad your pictures are small and unclear! :-p
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 22:14:27
Timeforatest!



Well,themodsareallfine,butasyoucansee,Ididn'tgetthespacebarhammerbackinright!!

:P

Timetotrythatfishinglinething,Iguess.:3

\\\\\||||

Woot,ANSIlayoutmodelFwithoutanyOS-levelkeysymremappingrequired!
Title: Model F hacks
Post by: msiegel on Thu, 30 December 2010, 22:16:33
yes!it'sperfect!:D:D
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 22:18:35
MaybeifIshakeitreallyhard.....
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 22:21:25
Imustsay,evenafteronlytypingonthisthingforafewminutes,myModelMseemssquishyandnastyandsluggishincomparison.

TheFisthebestestkeyboardevar!!!
Title: Model F hacks
Post by: bladamson on Thu, 30 December 2010, 22:23:12
Ok, back to the M until I get this spacebar sorted. :3

Edit: Grumble, it's midnight here and I have an on-site service scheduled for 7, so....  I'll have to finish this tomorrow. D:=

The verdict so far:  Absolute success, other than not getting the spacebar hammer back in right.
Title: Model F hacks
Post by: bladamson on Fri, 31 December 2010, 19:02:04
Annnnnd the hacking re-commences.  I haz fishing line nao. :3
Title: Model F hacks
Post by: bladamson on Fri, 31 December 2010, 19:22:02
And now I have a spacebar, woot.
Title: Model F hacks
Post by: msiegel on Fri, 31 December 2010, 19:37:36
well done! this is great :D

we now know that the sensor/detector circuits can handle a fair amount of stray capacitance (here in the form of added wires :)
Title: All done!
Post by: bladamson on Sat, 01 January 2011, 00:32:05
Phew!  Most of the time since the last post was spent sorting out my model M caps lol.  But at least now I can sort of find what I am looking for.

All done.  I had to transplant an F and J with pips from the stash of Model M loot.  I decided not to do anything with the two extra pads under the spacebar, as I didn't want to jerry-rig an M spacebar into it and then have my glued-in guides break while I'm in the middle of working.



ANSI Backspace, Pipe, and Enter.  The pipe pad was moved in hardware, so I can plug this thing into someone else's computer and it'll just work.



Cursor control group.  These are all remapped in X11, so when it's plugged into someone else's computer, it acts like a normal numpad.  The PgDn key produces an F11 scancode without any hackery.  The LeftArrow key produces scancode 7c, which I've mapped to F12 in the kernel keyboard driver.  Everything else is done with xmodmap, so when numlock is on, it acts like the usual numpad.  There's some way that I can supposedly make shift+numpad produce numpad cursor control scancodes when numlock is on, but I haven't gotten that far yet (and probably won't fool with it until I need to for some reason or another).



Misc control group.  The 4 keys in the center (along with Pause) are used to control my debugger: Resume, Step, Toggle Breakpoint, and an unused key that I haven't found anything to do with yet.  I'll need to figure where to get some blank keycaps and how to print on them....  I might just slap some from a Model M terminal board in there, if I can get hold of some.



All in all, this keyboard totally rocks.  It feels 10x better than my M.  I feel like I am typing faster already, but it might just be all the noise. XD  The springs sing when I am typing on it, and the whole keyboard hums very faintly for just a moment when I let off the keys, as if my keyboard drawer is acting like a resonator.  It's very interesting.  I've been wanting one of these for years, and I'm happy that I finally splurged on one.
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 00:42:33
Quote from: msiegel;271390
we now know that the sensor/detector circuits can handle a fair amount of stray capacitance (here in the form of added wires :)


I ran that long wire as close to the plate (chassis ground) as I could everywhere on purpose, hoping that it would help deaden any extraneous noise that it produced.

Though I doubt that a keyboard is as susceptible to cross-talk as higher frequency circuits.
Title: awesome
Post by: msiegel on Sat, 01 January 2011, 00:44:12
Quote from: bladamson;271464
this keyboard totally rocks


:D

(http://geekhack.org/attachment.php?attachmentid=14439&stc=1&d=1293865181)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 00:57:34
Broken image!  ;_;

Edit:  I seeee it now! \o/
Title: Model F hacks
Post by: Soarer on Sat, 01 January 2011, 03:58:32
Sweet! I approve of the 2x4 nav block ;-)
Title: Model F hacks
Post by: Daniel Beaver on Sat, 01 January 2011, 11:26:57
Good to see that you appreciate the King of Keyboards.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 13:26:31
Quote from: ripster;271618
Model M Mini is the King


maybe the Prince ;)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 16:23:23
It's good to be a^Hthe Queen. :P
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 18:08:41
Matt, would you be willing to share your capacitance-sensing circuitry so far?  Maybe two heads are better than one. :P

I'm assuming that, at least for a single key, it may be possible to set it up like an rc circuit such that the change in capacitance swings the output voltage above or below TTL threshold, so that it registers as a 1 or 0 at the receiving end.

However, I'm not sure if it would go all wonky if multiple keys in the same row or column were held down. :3

And I don't have the proper equipment to measure the change in capacitance between open and closed key states on the PC/F. :3

Mayhaps the easiest way to experiment might be to rig up an rc circuit with a trimpot with wide variance and feed it into a TTL buffer driving an LED.  Then you could twiddle the resistor until pecking the key turned the LED on and off, back and forth until you were in the middle of the range somewhere, then remove the resistor and measure it with an ohmmeter. :3

This -has- to be how they were doing it.  In 1980, ADCs were huge and expensive, so I don't think there's any way that's what the model F uC is doing.  They've -got- to be generating 1s and 0s with an RC circuit some way, right?
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 18:34:48
here's the circuit i've been working on.

given a 0.5us pulse at the input end, a nice 3.6V signal comes out the output if the switch is closed (>= 3pF capacitance).

but... i was just fooling around with it, and it looks like with that pulse width the signal coming straight out of the switch is >= 2.5V!

so maybe it's possible to pulse and read the switches directly from digital i/o pins of an avr :D ??

OOPS - CORRECTION: i left D1 in the loop as well. but it's still super simple :)

(http://geekhack.org/attachment.php?attachmentid=14448&stc=1&d=1293928419)
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 18:52:56
Quote from: bladamson;271756
In 1980, ADCs were huge and expensive, so I don't think there's any way that's what the model F uC is doing.  They've -got- to be generating 1s and 0s with an RC circuit some way, right?


maybe *not*! :O

the capacitive BS patent doesn't mention an RC oscillator, iirc...

i'm beginning to think that square silver mystery component on the controller pcb is not an oscillator at all, but is actually a custom chip comprised of 1) a 5-way analog switch used to select each row, and 2) a high speed comparator with latching output.
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 19:12:20
Keep in mind that I don't have -any- clue what I am doing.  Analog makes my brain melt.  But I was thinking something like this, where you asserted low on some row to scan it, waited ~20ms, and read all the columns, taking advantage of the wide tolerances of what a TTL chip will detect as a 1, and feed it through a buffer so that the uC gets a more solid signal. :3  Then you'd fiddle with the resistor values until it was behaving.

Surely it's not this easy though, or the F wouldn't have all that extra junk on it. :P



On second thought, I think you might need to move the columns to the other side of the caps and move the resistors to between the C? and ground. >_>  Yea, I think so....  Aaaaa I dunno!

But....  Yea, I dunno what I am doing. D:=  I had these classes like 10 years ago and haven't used it since and have forgotten everything. :3

Nevermind.  Lol.
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 19:24:13
Quote from: msiegel;271772
maybe *not*! :O

the capacitive BS patent doesn't mention an RC oscillator, iirc...

i'm beginning to think that square silver mystery component on the controller pcb is not an oscillator at all, but is actually a custom chip comprised of 1) a 5-way analog switch used to select each row, and 2) a high speed comparator with latching output.


Yea, I think this ought to be doable with a DC circuit rather than a uh.....  whatchacallit, sinusoidal steady-state RC circuit?
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 19:26:00
Aha, like so:

http://en.wikipedia.org/wiki/RC_circuit#Series_circuit (http://en.wikipedia.org/wiki/RC_circuit#Series_circuit)

Gurglemath. >_>
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 19:30:17
i think half the junk (ICs) on that pcb is column selection logic. rather than let a column float if it's not selected, it's pulled down to ground to suppress noise.

in the next couple of days i'm planning to start hardware experiments. the simulator is really great, in that i've only killed off half my teensy's analog input pins so far XD

but it's about time for the rubber to meet the road.

i don't have an o-scope, so i like those testing ideas. keep em coming! :D
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 19:32:39
Quote from: bladamson;271778
Aha, like so:

http://en.wikipedia.org/wiki/RC_circuit#Series_circuit (http://en.wikipedia.org/wiki/RC_circuit#Series_circuit)

Gurglemath. >_>


gah! D:

yeah, dc-like approach ftw XD
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 19:42:53
Quote from: msiegel;271780
i think half the junk (ICs) on that pcb is column selection logic. rather than let a column float if it's not selected, it's pulled down to ground to suppress noise.


But if you pull it to ground, won't it provide a second ground path and change the voltage at C# when a key in another row is pressed in the diagram above?  Or do you think it's not enough to matter?

Hmmmmmmmmmmmmmmmmmm...


Quote from: msiegel;271780
in the next couple of days i'm planning to start hardware experiments. the simulator is really great, in that i've only killed off half my teensy's analog input pins so far XD

but it's about time for the rubber to meet the road.

i don't have an o-scope, so i like those testing ideas. keep em coming! :D


Hmm, I have an old all-analog 40MHz B&K o-scope that I bought at a hamfest many years ago for $30. >_>  No probes for it though, and the shipping to san fran for you to borrow it would be pretty excessive.  It's like 40 lb.  <_<
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 19:55:38
Quote from: msiegel;271772
i'm beginning to think that square silver mystery component on the controller pcb is not an oscillator at all, but is actually a custom chip comprised of 1) a 5-way analog switch used to select each row, and 2) a high speed comparator with latching output.


The PC board only has like...  6 lines going from the uC to the silver thingy.  So there must be a decoder in there.  I bet the uC has a counter in it and sends a binary digit to the silver thing and it decodes it and maybe does some tri-stating and uh, stuff, maybe?  And then it looks like there is a uhm...  A silver barrel thingy with one end hooked to the ground plane and the other end hooked to one of the pins on the silver thing.  Aha, it's a 6 uF capacitor, must just be a filter cap or something.

Surely in 1980, if the thing was using an oscillator, there'd be an external crystal instead of some special something built into the silver thing.

Edit:  But wait, there -has- to be an oscillator on this thing somewhere.  These things generate their own clock at the connector...

Ok, I see where there is a clock signal coming out of the silver thing and going to the connector.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 19:56:28
haha, that's the problem with old o-scopes XD

i'mma try onboard adc and digital inputs and see what i can find out :)

the key to ibm's design seems to be capacitive coupling.

rather than measuring the *capacitance* and seeing how much there is, like in a topre... we just drive a column and try to read that signal back from each row. within the driven column, the signal will couple strongly to each row's pad that a flyplate is near.

it's brilliantly simple, but may need amplifiers or sensitive comparators in the detector. or not. :eyebrows: we'll see... :D
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 19:59:41
Quote from: bladamson;271796
The PC board only has like...  6 lines going from the uC to the silver thingy.  So there must be a decoder in there.  I bet the uC has a counter in it and sends a binary digit to the silver thing and it decodes it and maybe does some tri-stating and uh, stuff, maybe?  And then it looks like there is a uhm...  A silver barrel thingy with one end hooked to the ground plane and the other end hooked to one of the pins on the silver thing.  Aha, it's a 6 uF capacitor, must just be a filter cap or something.

Surely in 1980, if the thing was using an oscillator, there'd be an external crystal instead of some special something built into the silver thing.


oops, ninja'd :)

yes, no crystal! it's quite a mystery :D

there's a partial schematic of the pcb somewhere... where did i see that...
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:01:17
Quote from: msiegel;271800
oops, ninja'd :)

yes, no crystal! it's quite a mystery :D

there's a partial schematic of the pcb somewhere... where did i see that...


This PC board only has 20 components on it (no LEDs to mess with, I guess).  I can try to draw one for you if you want.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:02:31
no, thanks; i'm sure we can find it :)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:04:53
Mmm, Ima draw one anyway. :P  Maybe it will help me grok. :P
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:05:49
ok. i can't find it! but kishy will know :)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:29:45
The silver thing has an orange thing marked "123" "8527" hooked to it, in parallel with what looks like a mylar capacitor.  If you look at the silver thing with the writing right-side-up, they're connected to the 2nd pin on the right from the bottom.  Does yours have this?  What the heck is that orange thing?  A potted inductor? Precision resistor?  Crystal maybe even?  Part of an oscillator circuit?  O_o

Many pins on the right-hand side of the uC are not connected to anything.  Very strange...

Surely it is asserting the rows and reading the columns....  Yea, it would have to be with the way things are set up.  And the columns are hitting that uC directly, there's no pull-up resistor pack or anything.  The board -must- be producing something close enough to logic levels for the uC to read...

Edit: Could the silver thing be asserting a square-wave DC pulse on the rows, and then the uC clocks up with the silver thing's crystal, and the low capacitance of the keys when they are up act like a low-pass filter or something and block the pulse from reaching the uC?
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:43:24
Herpderp!

I'm not smart enough for this hahaha.

I think I will just concentrate on making an XT protocol converter with a Teensy. :3
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:44:16
XD
Sam found us the schematics:

http://kbdbabel.org/schematic/

this stuff is very educational :D
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:49:41
Aha, so the silver thing is just a decoder?

Why the heck didn't they just build that into the uC? O_o
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:51:52
yes, pin G looks like a strobe to input a new row selection on D0-D2 :)

it might have comparators or amplifiers in it.

also, what do you make of those two capacitors hanging off of it... maybe the thing contains an oscillator after all?
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 20:53:36
Oh, it's ultra speshul. =:O

IBM octal capacitive keyboard matrix receiver with 8-to-1 multiplexer (ibm-8273565.sym) (http://www.gedasymbols.org/user/alexander_kurz/symbols/ibm-8273565.sym)

Aaaaa!

It's from this page: http://www.gedasymbols.org/user/alexander_kurz/ (http://www.gedasymbols.org/user/alexander_kurz/)

From the sound of that, it must be asserting columns and reading rows. :3
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:56:10
hmm, the matrix is clearly 16x8.

seeing as the 16 are attached to gate outputs, it looks like columns are driven and rows do the sensing.

which makes that silver thing the detector :)
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 20:57:36
Quote from: bladamson;271834
Oh, it's ultra speshul. =:O

IBM octal capacitive keyboard matrix receiver with 8-to-1 multiplexer (ibm-8273565.sym) (http://www.gedasymbols.org/user/alexander_kurz/symbols/ibm-8273565.sym)


from the page:

Quote
documentation: best guess


:lol:
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 21:02:45
But but but but!!!  Wtf!

With that multiplexer hoochadoowhatsie, that severely limits its ability to detect multiple held keys. D:=

Edit: So....  How much do ya want to bet that there are a bunch of comparators inside the silver thing, and those two weirdo capacitors are reference capacitors for key up and key down capacitance or something.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 21:06:13
during the scan cycle, imagine each pad getting its own pulse. i'm pretty sure the pads can all be sensed independently.

the multiplexer just selects one row at a time to look at :)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 21:06:48
Quote from: msiegel;271839
during the scan cycle, imagine each pad getting its own pulse. i'm pretty sure the pads can all be sensed independently.

the multiplexer just selects one row at a time to look at :)


Ahhhhhhhhhhhh ok that makes sense.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 21:06:51
Quote from: bladamson;271838
reference capacitors


aha! good idea :D
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 21:07:38
Lol.  We should use IRC or google chat or something.
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 21:08:44
better documentation this way XD

i'm heading out of here to do some work... later :)
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 21:14:06
So like....  Possibly the uC is like "Ohai silver thing, I wanna read row 3", and it gets decoded inside and row 3 is routed into a comparator.  Then the UC pulses a column and the comparator is like "Ohai, I'm done (put a bit on OUT and assert G)"?
Title: Model F hacks
Post by: bladamson on Sat, 01 January 2011, 21:16:40
Quote from: msiegel;271843
i'm heading out of here to do some work... later :)


Ah right, I should write some code anyway. :P
Title: Model F hacks
Post by: msiegel on Sat, 01 January 2011, 21:38:06
Quote from: bladamson;271844
So like....  Possibly the uC is like "Ohai silver thing, I wanna read row 3", and it gets decoded inside and row 3 is routed into a comparator.  Then the UC pulses a column and the comparator is like "Ohai, I'm done (put a bit on OUT and assert G)"?


yeah, something like this seems likely :)

and now back to our regularly scheduled programming... :washing:
Title: Model F hacks
Post by: bladamson on Sun, 02 January 2011, 19:42:35
Moved this reply over here to avoid filling that guy's thread with geekspam. :P

Quote from: msiegel;272150
on the ATmega32U4 that's used for teensy, the analog input pins go through a multiplexer to a single adc.


Drat, I thought that might be the case. :P

Quote from: msiegel;272150
however, docs claim the adc can do 15ksps... which might just be fast enough :D


Hmmm 156 scans per second I guess, with an 8x12 matrix.  Maybe guess-rounded down to 100 to account for setup time.  I bet that would work.  Surely the switch is held closed for >10ms.
Title: Model F hacks
Post by: msiegel on Sun, 02 January 2011, 19:57:18
another consideration is "transposition" errors: if the scan cycle is too slow, then two keys pressed in rapid succession (as when "rolling" during fast typing) might register in the wrong order.

the scan cycle will have to be several times the maximum rate of key "roll" to ensure keys register in the right order... 100-500 cycles/sec? hmm, how fast is key roll? :)
Title: Model F hacks
Post by: msiegel on Sun, 02 January 2011, 20:09:24
same as "credit card" test! :D

let's say you're typing at a rate of 1 character per second, using a "roll". here's what typing "hi" looks like:

second: keys-depressed
0:
1: h
2: h i
3: i
4:

if the scan rate is one cycle every *two seconds*, then it's too slow!

0: no keys are depressed
2: h and i were pressed, but in what order?
4: no keys are depressed
Title: Model F hacks
Post by: msiegel on Sun, 02 January 2011, 20:23:10
we should figure out a good minimum scan rate.

200 wpm is about 20 characters per second.

at 5x oversampling, minimum scan rate needs to be 100 cycles per second.

isn't that what model m uses? XD
Title: Model F hacks
Post by: bladamson on Sun, 02 January 2011, 21:10:12
I think that's totally doable with a 15KHz sample rate! \o/

Edit: And if that's too slow, we can two teensies, each scanning half the keyboard at the same time, talking together via UART maybe. :3
Title: Model F hacks
Post by: msiegel on Sun, 02 January 2011, 22:21:54
i just did an experiment:

cut the controller card off of the switch matrix pcb, and get a 2V battery pack.
set multimeter to DC V mode and hold leads together to calibrate: 0V.
on the switch matrix pcb, attach battery pack (-) lead to ground pin.
attach (+) lead to target row pin.
place a hammer on the target switch.
touch (-) lead to target column pin.
(theoretically, target switch pads are now charged to 0Vpress multimeter probes against target column and row pins.
take reading, repeat 3x to verify.

result: no detectable change.

conclusion: either 2V is too low a voltage to couple through the pcb (maybe), or maybe a cheap multimeter can't detect the potential on a capacitor that's in the low pF range (likely).

or... doin it rong XD

:-/ ?
Title: Model F hacks
Post by: bladamson on Sun, 02 January 2011, 23:50:08
I think you need to jigger something up with a resistor and maybe an additional capacitor so that it acts like an rc voltage divider, then send a pulse and see what happens on the other end.  If there's enough coupling (switch closed), the pulse at the other end should be able to pass a certain voltage threshold, and then you know to register a keystroke.

I doubt the capacitance of the switches is great enough to discharge enough to deflect your your meter before the charge is gone.  Likely what little charge there is is bleeding off before you can even get the meter probes on it. :<

But.....  I don't remember much of this stuff at all.  It's very likely that I am totally wrong about something here. <_<

Edit:  I think your best bet is to program the AVR to do this for you, and have it print the results of the ADC to the usb monitor or something.

Edit: And I remember reading something somewhere about the AVR pins being protected from overvoltage by schottky diodes, so that "maybe an additional capacitor" comment above was along the lines of decreasing the reactance of the circuit so that the voltage going to the ADC will be great enough to push through the overvoltage diode.

Edit: I have no freaking clue what value resistor and capacitor would be needed to make it work right though. X_x
Title: Model F hacks
Post by: msiegel on Mon, 03 January 2011, 00:12:19
i'll make a couple more passes in the simulator, try to line up a few simple tests for the avr (and hopefully "safer" ones :)

from the manual:

(http://geekhack.org/attachment.php?attachmentid=14460&stc=1&d=1294035105)
Title: Model F hacks
Post by: dec.net on Mon, 03 January 2011, 04:56:31
As stated elsewhere, I have no idea what I'm talking about, but wouldn't it make sense for the purpose of testing to connect the switch output to some amplifying/stabilizing device, such as either a plain transistor or even an op-amp? That way you could perhaps have a look at what's going on at reasonable current levels (as in detectable by multimeters). I'd very much suppose there is something similar going on somewhere in the controller circuits to make those weak tiny signals from the switches actually usable. If you then added in another small capacitance to even out the voltage between pulses, you pretty much have a stable switch voltage, I suppose.

Chris

PS: Also of course, I'd try finding some source of AC for more actual pulses to measure for each key trigger. I'd suppose a signal generated by your soundcard run through an audio amplifier would very much suffice; if you got a high quality card, you can easily generate a 20 or even 48kHz pulse signal with any old free signal generation software; then level it in with your multimeter and the amplifier volume, and there you have your replacement pulse signal, perfect for testing. Just don't forget to disconnect the other speaker while you're at it.
Title: Model F hacks
Post by: bladamson on Mon, 03 January 2011, 12:51:45
Quote from: dec.net;272278
PS: Also of course, I'd try finding some source of AC for more actual pulses to measure for each key trigger. I'd suppose a signal generated by your soundcard run through an audio amplifier would very much suffice; if you got a high quality card, you can easily generate a 20 or even 48kHz pulse signal with any old free signal generation software; then level it in with your multimeter and the amplifier volume, and there you have your replacement pulse signal, perfect for testing. Just don't forget to disconnect the other speaker while you're at it.


The original electronics are definitely doing it with a 5v digital signal some way.  I think it can be done with a 5v square pulse rather than a sinusoidal signal.
Title: Model F hacks
Post by: dec.net on Mon, 03 January 2011, 13:18:48
Yes, I agree, that's what I meant - I suppose you could generate something quite "square-pulsey" with a good quality (read: high sampling frequency) soundcard. A decent pro-sumer sound card can go up to 192KHz Sampling frequency, which leaves 96Khz as the highest useable frequency; there are at least three octaves of frequency headroom for a 20KHz (or what was the frequency that the original controller is using?) squarewave.

Chris
Title: Model F hacks
Post by: bladamson on Tue, 04 January 2011, 03:43:52
Go do your SEO somewhere else, Steve-o. -_-'

Edit: Nevermind!  Spammy post was deleted I guess. :P
Title: Model F hacks
Post by: bladamson on Thu, 03 February 2011, 14:08:22
Hey Matt!  Sorry for kinda disappearing.  Work got kinda busy for a while. :3

How are things going with your capacative hackery?
Title: Model F hacks
Post by: msiegel on Thu, 03 February 2011, 14:54:51
Quote from: bladamson;289397
Hey Matt!  Sorry for kinda disappearing.  Work got kinda busy for a while. :3

How are things going with your capacative hackery?


howdy! :)

i breadboarded a circuit that's able to read the state of a pair of 10pF capacitors, as a mockup of the pcb pads... but then i tried it with the real pcb and it doesn't work!

testing with the real pcb, even when the hammer is not present the circuit always reads back as if the switch is "closed": 5v goes in, and > 0.85v is seen on the sense line. i suspect the problem is EMI.

so next i'll try adding some shielding. the model F has tons of shielding so i'm guessing it's probably required for this system to work :D
Title: Model F hacks
Post by: dfj on Mon, 23 May 2011, 13:25:50
Bah, sorry, I've been messing around with this problem on and off for the last 6 months... come say hi to us on #geekhack some time, I'm way behind in my posts here....
  I've managed to get it to full nkro on the 122, via clocking the teensy's comparator clock aggressively... but my code is an horror story, and I'm still not rock-solid stable, with occasional phantom makes and breaks - so, not ready for release open source release yet. :( My goal has been to read the matrix significantly more quickly than the IBM hardware does, and to that end I'm using a somewhat different approach. That said, I'll be more than happy to share what little I've discovered about how IBM is doing things. My approach is intended to reduce the scan-time of the board from IBM's roughly 16ms down to the 3-6ms range, so as to make crossing shots within a frame a little easier when gaming. :P

thanks,
dfj
Title: Model F hacks
Post by: msiegel on Tue, 24 May 2011, 09:58:32
that's outstanding! congratulations :D

do you double scan each switch to reduce the effects of noise? ibm mentions this technique in the patent; i wasn't sure the teensy's onboard comparator was fast enough to handle the workload...
Title: Model F hacks
Post by: hasu on Tue, 24 May 2011, 21:59:33
Though I don't know how fast Realforce does,
I believe that HHKB scans 8x8 matrix every about 15ms(66Hz) from logic analyzer chart.

This is HHKB scanning chart, the time scale is not clear... sorry.
(http://geekhack.org/attachment.php?attachmentid=12824&d=1286712182)


This chart is from:.
http://geekhack.org/showwiki.php?title=Island:12047
Title: Model F hacks
Post by: dfj on Tue, 24 May 2011, 23:33:39
Ah, just checked out yer HHKB matrix mods - sweet stuff. Looks like the HHKB pro is doing pretty much the same thing as the F, except using the pair of a TP1684 and a trusty 74HC4051 instead of the proprietary 8273565 that the 8 sense line F's used (there is also a four sense line version used by some IBM keyboards - not all strictly Model F).

      So - a Teensy(++) has a tolerable mux on the ADC lines, but, internally, just one adc - a binary sequential comparator.  If you set the hi-power to the adc bit on the teensy, then you can get the comparator running closer to the main-clock on the thing - though I lose some accuracy when I bring it above a MHz. I'm not at all clear from the datasheets what the max rate actually is, it can be set up to half the main clock-rate, though this is suggested for running at lower rates than 16MHz. Since it loses accuracy on the comp at such rates, (and thus precision on the adc), it's kinda academic how fast one can push it without breaking it. :)

       I'm still working out the right combination of sample-rates, strobes, offset voltages, actuation thresholds, etc... that will be happy on such hardware. I have a few op-amps lying around - if I can restrict it to readily available ones, then I will be cool with using one, but I kinda want a method that is viable to open-source without requiring folks to buy a stack of weird components. right now I'm getting by with just a mess of resistors and just the teensy for an IC - it would be nice to get this to work, but it is fiddly. :)
     
Roughly how long is the strobe and how long is the relaxation before the next strobe on the hhkb pro? Also how long after the start of the strobe does the capsense take its test? On my F, the strobe is about 30us, with the relaxation about 60us. IBM does this 8 times per column, though, the '122' key boards have 16 columns. (127 actual key locations and 1 internal test location :) there is a bit of a gap between strobe groups, so the end result is closer to 15ms rather than the 12 that might be possible if they were packed.
     
So yeah, I'm around - feel free to say if yer on irc, and for the love of $%&*& someone send me a pm next time Hasu posts a cute hax! I don't always remember to come poke around here on the forum enough. :P

 until,
dfj
Title: Model F hacks
Post by: dfj on Wed, 25 May 2011, 00:02:23
Yeah, I'm currently doing a double sense, since I'm not so  stable yet... the IBM F does not seem to actually do this, though... I  think it would add 16 bytes to the RAM image of the controller, on top  of the 8 required to retain the actual current key state, plus 10-16 for the  event buffer. The 8048 only had 64 bytes of ram - space is _tight_. From our probing it is clear that the keys are all scanned in sequence, so the whole matrix would need to be stored as a tentative version... hmm, I suppose the second pass can check as it goes, so that doesn't require a full copy...

  So : the real reason we know the F does not do this, even without looking at the firmware, is that we can bounce a key by flicking it with our finger, and see the make, and then break about 16ms later... hence there was only time for two scans, not four scans.
  See - my other post above/below to hasu - the teensy comp is accurate and fast enough... getting the right threshold set, this is a trick. :) For folks willing to solder this together, mind, tuning a pot isn't the end of the world. A teensy etc... could run the code to help the geekhacker adjust the pot, presumably.
Title: Model F hacks
Post by: JohnElliott on Thu, 26 May 2011, 16:38:28
Quote from: dfj;351121
Yeah, I'm currently doing a double sense, since I'm not so  stable yet... the IBM F does not seem to actually do this, though... I  think it would add 16 bytes to the RAM image of the controller, on top  of the 8 required to retain the actual current key state, plus 10-16 for the  event buffer. The 8048 only had 64 bytes of ram - space is _tight_. From our probing it is clear that the keys are all scanned in sequence, so the whole matrix would need to be stored as a tentative version... hmm, I suppose the second pass can check as it goes, so that doesn't require a full copy...

 
It reads the keys in groups of 8 (so they can fit into a byte). Then, if that byte differs from the corresponding byte in the matrix, it does two further reads of that row. I think. The code starts at 0205h in the microcontroller ROM for the 84-key F, or 024Dh for the 122-key F, if you want to examine it.

(RAM in the 122-key F controller is laid out like this:
Code: [Select]

00-07 registers
08-09 stack, one level only
0A-29 Flags for keys, 2 bits per key. 0 = Make only, 1 = Make/Break, 3=Repeat
2A,2B Used when reading the keyboard
2C-3B Bitmap of pressed keys
3C-3E Buffer of scancodes to send to the host
3F Last scancode transmitted to host

The 84-key Model F drops the key flags, which gives it more space; the second register bank at 18-1F can be used as such, for example, and the output buffer is larger.)
Title: Model F hacks
Post by: dfj on Thu, 26 May 2011, 21:04:51
Ah - yer right, confirmed this on yer AT dump: the count to two is on the carry bit tested at 028c. :) bloody xrl's keep hurting me brain - xrl to test, then xrl again to recover yer value... :)
  So - this is great: on a possible change, read the column twice to confirm... this is what I will do: see, the question one might ask is, if one has a change, why not just read again to see if it is there? Well - I discovered that every time you hit a key, the hammer coming down often (i.e. unreliably) _generates_ a pulse on that sense line - this pulse is garbage, and just serves to wreck whatever else was reading at the time - since it hits the sense line regardless of strobe. Thus - the first sense is often pure trash, so - two more column probes of only that column are sweet stuff. depending on what yer offset current is like, the mini-pulse from a hammer coming down might disrupt sensing for up to a millisecond. on the F the offset is generated by the sense chip, so I don't rightly know exactly how it is powered... I see the same event when scoping the IBM controller, though the pulse is shorter than on my stuff - presumably they are driving the offset harder.
 
 fun stuff - thanks for pulling them bins! btw - did you do it with a home uC/breadboard, or do you have a fancy programmer for it? Once I remembered thta almost all these chips need to be _verified_ after burning, it became clear that a lot of them will be easily recovered since security and IP idiocy was not a factor at that point.

(I have a 1390131, I want to pull the stuff in case it is dual-mode, and detects XT machines... )

thanks,
dfj
Title: Model F hacks
Post by: JohnElliott on Fri, 27 May 2011, 02:13:49
Quote from: dfj;351887
fun stuff - thanks for pulling them bins! btw - did you do it with a home uC/breadboard, or do you have a fancy programmer for it? Once I remembered thta almost all these chips need to be _verified_ after burning, it became clear that a lot of them will be easily recovered since security and IP idiocy was not a factor at that point.

(I have a 1390131, I want to pull the stuff in case it is dual-mode, and detects XT machines... )

I used a Willem programmer with the 8048 adaptor board. I tried it on the XT model F keyboard controller as well, but that just returned zeroes, so I think it may well be protected. The Willem can burn 8048s (though sometimes it takes a couple of tries) but not 8049s, which is a pity, because I still haven't been able to test my 2k terminal-emulation firmware for the 122-key F.

Model Ms use 6805 derivatives rather than 8048s IIRC, which the Willem doesn't appear to include support for. Whether there is a way of reading these controllers electronically, or whether you have to break out the fuming nitric acid, I don't know.
Title: Model F hacks
Post by: looserboy on Fri, 27 May 2011, 09:05:17
its possible to do something with  at-8pin-modular plug connector model m keyboard?
change cable possible? - or adapters? for ps2?
Title: Model F hacks
Post by: dfj on Fri, 27 May 2011, 10:09:52
The 5-pin AT connector on a Model M? Yeah - a normal AT-PS2 dumb connector should work if you can find one. Will also work if you find a PS/2 cable from another M, but - then you'd have another M. :)
  Search around on this site, there's likely info to be had if you can't find one, and instead need to make one.
g'luck