Author Topic: Building a modern PCB for the AEK/AEKII  (Read 21751 times)

0 Members and 1 Guest are viewing this topic.

Offline nerd05

  • Thread Starter
  • Posts: 8
Building a modern PCB for the AEK/AEKII
« on: Sun, 18 February 2018, 19:53:39 »
A couple of years ago I embarked on a super messy project to modernize my Apple Extended Keyboard by taking an M0115 that was junked and restoring it, giving it more modern affordances, like USB and NKRO support. I basically desoldered all the components off the board, sanded all the traces off and rewired brand new switches by hand  with diodes in series.

This approach works, but it's quite messy, and not that reliable. I usually have to crack it open every few months to re-solder some wire or diode that came undone.

I've got a couple more AEK keyboards (one of which is a new old stock AEKII) and I've really been wanting to modernize them as well but I want to do it right this time.

To that end, I'd like to build a new PCB that is a drop-in replacement for the existing PCB on the AEK and AEKII. (note: this is for US layout; sorry ISO fans!)

A few improvements I can envision this PCB would have:
  • using a USB connector instead of ADB
  • diodes for the keys to allow NKRO
  • programmable firmware

I a single PCB will support both the AEK and the AEKII (the AEK has a bulkier case but the PCB appears to be the same dimensions and the keys are in the same positions)

I'm open to other options/improvements that we could include in this PCB if it widens the appeal.

Ideally I'm hoping there's someone out there with experience designing and building a PCB who is interested in this project. I've never designed a PCB before and it's very intimidating; in particular because it seems a bit difficult to find companies that will print a PCB as big as this one. I think there are some good KiCad projects to start from like hasu's 60% ALPS keyboard but I would feel a lot more comfortable if I was designing it with someone who knew what they were doing.

I think all we need to design for this project is the PCB itself; everything else would be transplanted from the original keyboard (plate, key caps, stabilizer clips, and bottom and top case. If we wanted to get fancy we could design USB connectors that go where the ADB connectors go, but I think for now we should focus on the PCB.

Is anyone interested in this?

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Building a modern PCB for the AEK/AEKII
« Reply #1 on: Sun, 18 February 2018, 21:26:58 »
I know that Talking Tree has done some PCBs for people, especially if you’re looking to open source it.

Maybe add MX support, for a broader range of switches and keycaps that can be used? At that point you’re really just reusing the case, though. I’d be willing to help with a plate design, if there is interest in adding MX support.

You would get programmability, and a USB connection. I’d go with USB-C, being that it’s 2018 now.

I think it would be cool to build a modern AEK, with maybe Kailh Box Whites and those new XDA Oblique caps there is currently an IC for...
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #2 on: Mon, 19 February 2018, 00:45:27 »
Interesting; I hadn't thought about MX support. The challenge of using MX switches I think might be finding key caps that are compatible; the AEK uses a slightly nonstandard layout; the bottom row keys have different widths, and the numeric keypad is laid out a wee bit differently.

As a long suffering ALPS enthusiast I do love the idea of people being able to deck out their AEKs with custom layouts...

And thanks for the tip on Talking Tree; I'll reach out.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Building a modern PCB for the AEK/AEKII
« Reply #3 on: Mon, 19 February 2018, 05:37:53 »
For what I recall, the AEKII has wider left mods, so MX support won't just do unless someone provides a keyset for that.
That said, universal support is rather easy to achieve and I, personally, see no reason not to include ISO support which, by the way, only requires two extra pads.
I believe the GH80-3000 can be edited to achieve that.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Building a modern PCB for the AEK/AEKII
« Reply #4 on: Mon, 19 February 2018, 08:45:29 »
For what I recall, the AEKII has wider left mods, so MX support won't just do unless someone provides a keyset for that.
That said, universal support is rather easy to achieve and I, personally, see no reason not to include ISO support which, by the way, only requires two extra pads.
I believe the GH80-3000 can be edited to achieve that.

The only difference from a standard ANSI that I recall is the bottom row is 1.5-1.25-1.5-6.5-1.5-1.25-1.5, and the numpad doesn’t use the 2u vertical plus. But you could always just include standard ANSI locations for the MX switch pads, like on the GH80-3000.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline sleepybrett

  • Posts: 27
Re: Building a modern PCB for the AEK/AEKII
« Reply #5 on: Mon, 19 February 2018, 09:56:14 »
I'd be interested in discussing this project, I've been working on a pcb replacement for the ADB keyboard (alps, buy several of the switches are sideways. Was working on two layouts both to straight replace the pcb in the keyboard and also a 60% board for the caps.

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Building a modern PCB for the AEK/AEKII
« Reply #6 on: Mon, 19 February 2018, 11:40:16 »
ISO support would be easy to include in a new PCB. It would only require a different switch mounting plate than the ANSI version.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #7 on: Mon, 19 February 2018, 18:16:58 »
I would have figured supporting both ANSI and ISO layouts on the same board wouldn't be feasible but if it can be laid out to work with both then I'm all for it!

Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #8 on: Mon, 19 February 2018, 18:19:31 »
I'd be interested in discussing this project, I've been working on a pcb replacement for the ADB keyboard (alps, buy several of the switches are sideways. Was working on two layouts both to straight replace the pcb in the keyboard and also a 60% board for the caps.

Are you referring to the M0116? Because I just stripped one down for its switches and I would totally be down with either converting it to 60% or giving it a new PCB as well (it's such a nice case and the keycaps are such high quality)

Offline sleepybrett

  • Posts: 27
Re: Building a modern PCB for the AEK/AEKII
« Reply #9 on: Mon, 19 February 2018, 23:24:55 »
Nope, a little older. Shipped with the apple //gs.

https://deskthority.net/wiki/Apple_Desktop_Bus_Keyboard

We can compare notes, based on some of these partial key removal shots I've seen it looks like they are rotating the same keys, mostly the top row. Here's my shot of one that has been stripped.


Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #10 on: Sun, 17 March 2019, 12:13:13 »
This sounds like it'd be awesome!  I'm by no means an expert, but I'd like to try to help out with this.  I've made a couple of pcbs in KiCad.  Do you know what the dimensions for the pcb are roughly?  I've used jlcpcb a few times, and their maximum size is roughly 16x16 inches.  Plus they're hella cheap.

Sent from my VS996 using Tapatalk


Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #11 on: Wed, 27 March 2019, 12:01:40 »
Hey!  I've started working on this.  I made a github repo, and I can add you as a collaborator if you want.  So far I only have the dimensions and switch placement, I haven't started working on the actual pcb yet.  Should I try to make everything smd, or should I use through hole diodes?  I'm thinking about using an STM32F303 mcu, that seems to be a favorite in the community.  Were there any other features that anybody wanted?  There should be plenty of space on the pcb for any features.  I'm probably going to add support for MX-style switches and ISO layouts.  I'm thinking about using an usb-c daughterboard, and adding an option to replace the top-right button with a rotary encoder. 
The GitHub Repository

Another note, I'm basing all of my measurements off of my AEKII, and from what I can tell the switch plates are quite different(cutouts, size, and mounting points), but I don't think it's really a problem.  The leds appear to be in the same spot, which means it should be fine.  If someone who has an original AEK could send me the dimensions of the pcb and placement of any mounting holes, as well as a where a few switches are, that'd be awesome.

Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #12 on: Wed, 27 March 2019, 12:03:59 »
So awesome! I'll send dimensions tonight. A rough inspection made it seem the PCBs were pretty much the same but I wouldn't be surprised if there were a few different cutouts.

Offline nevin

  • Posts: 1646
  • Location: US
Re: Building a modern PCB for the AEK/AEKII
« Reply #13 on: Wed, 27 March 2019, 13:02:02 »
Cool! There isn't a lot of development for full size, let alone Alps. So this will be a much needed "breath of fresh air" into our hobby. Kudos!

If you get creative with the pads, different bottom rows could be possible, PC style numpad as well as MX support

Love the rotary encoder idea. something with a nice short, fat dial. bout 1.25" would cover the cutout for the power button. I envision it semi recessed, not really able to see the bottom of the dial. don't know that you'd want to go the DAS route, probably too complicated to get all the cutouts right to make the dial really large & out the edge of the keyboard.

Another thought would be splitting up the space bar. Either split or something like 1.25u - 2u - 2u - 1.25u for smaller space bars & a couple dedicated fn keys. (still think the space bar is the weakest part of just about any keyboard, loved the smaller spacebar on the ADB keyboard a.k.a. IIgs)

Also, check out what Delirious did in this thread TX84: Half plate alps TKL
and some special notes about alps spacebar stabs & plate file: https://geekhack.org/index.php?topic=99552.msg2729843#msg2729843
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #14 on: Wed, 27 March 2019, 13:18:11 »
For the possible layouts, I was thinking about doing the default 1.5, 1.25, 1.50, 6.5, 1.5, 1.25, 1.5, the normal 1.25, 1.25, 1.25, 6.25, 1.25, 1.25, 1.25, 1.25, and then 1.5, 1, 1.5, 7, 1.5, 1, 1.5.
Another thing that just occurred to me is that with any other keycaps, the F row is going to be really wierd.

Sent from my VS996 using Tapatalk


Offline nevin

  • Posts: 1646
  • Location: US
Re: Building a modern PCB for the AEK/AEKII
« Reply #15 on: Wed, 27 March 2019, 13:28:02 »
...Rotate an extra set of pads 90deg. for the non apple caps? You're going to have to do that for MX anyway right?

And there is a common plate cutout that supports Alps & MX as well as switchtop removal for cherry/gateron housings. Check the swill plate builder for details/example.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #16 on: Wed, 27 March 2019, 13:33:03 »
Yeah, that's a good idea.  I'm just thinking that they'll be recessed, because the stock keycaps have really long stems.  it should work, and maybe there's an adapter that lenghthens stems.
I'm not really thinking about custom plate design, because personally I'm gonna only replace the pcb.

Sent from my VS996 using Tapatalk


Offline nevin

  • Posts: 1646
  • Location: US
Re: Building a modern PCB for the AEK/AEKII
« Reply #17 on: Wed, 27 March 2019, 14:25:30 »
Oh yeah, that's true. MX compatibility disclaimer..... *if you you are using an AEK case & MX switches... SA caps only need apply... lol.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #18 on: Wed, 27 March 2019, 23:25:03 »
I got out the PCB for an AEK keyboard from storage!

I'm getting a width of 17.25" and a height of 6 3/8".

If there are any specific measurements you'd like i'd be happy to take them for you (but I don't have calipers)

https://www.dropbox.com/s/2zewvj8ajsgkvgy/IMG_1312.jpeg?dl=0
https://www.dropbox.com/s/lzz3nau5oychxth/IMG_1311.jpeg?dl=0

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #19 on: Thu, 28 March 2019, 09:15:52 »
Awesome!  That should definitely work.  Can you measure where those big holes are, from the bottom and from the sides?

Sent from my VS996 using Tapatalk


Offline nerd05

  • Thread Starter
  • Posts: 8
Re: Building a modern PCB for the AEK/AEKII
« Reply #20 on: Fri, 29 March 2019, 22:26:35 »
Sure! the holes on the left side of the keyboard are 74 and 112 mm from the left side, the leftmost hole is 92mm from the bottom and the inner one is 91mm from the bottom, and the holes are 16 and 18mm in diameter, respectively.

The top hole is 19mm and is 3mm from the top and just a hair under 160mm from the left of the board (and by left I mean the part of the board where that top cut off begins; if you were measuring from the very edge it would be 226 mm from the outermost left side.

That hole on the right is a 16mm hole and it starts 74mm from the right and is 92mm from the bottom.

And keep in mind that the measurements I am giving from the edges are from the side/bottom of the keyboard to the outermost edge of the circle, not its center.

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #21 on: Sun, 31 March 2019, 12:18:01 »
Awesome, thanks!  I'm gonna be out of town this week, but I'll hopefully have a rough design next week.
For the usb connector, I'm thinking about having an onboard plug, but also having some some kind of pins available to use for a breakout board like this. That way you could mount it where the adb port was.

Sent from my VS996 using Tapatalk


Offline jagger27

  • Posts: 178
  • Location: Canada
  • ne 1.5U supers???
Re: Building a modern PCB for the AEK/AEKII
« Reply #22 on: Sun, 31 March 2019, 15:32:00 »
Gonna keep a close eye on this project. Glad someone else had the same idea!

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #23 on: Fri, 05 April 2019, 00:01:27 »
Looks like a great project! Makes me want to get an AEK just so I can play too!

I'm loving the feature creep... let's make a modern AEK PCB! Programable, USB, NKRO, no ISO. Just scavenge from an AEK switches, caps, case.
  • oh, and ... MX switch support
  • oh, and ... custom layouts
  • oh, and ... split space bar
  • oh, and ... ISO (different switch mounting plate)
  • oh, and ... rotary encoder
  • oh, and ... rotate an extra set of pads 90deg, for non apple caps

;-)
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #24 on: Sat, 06 April 2019, 18:22:18 »
Started working on the matrix and schematic today, this is what I got. Instead of having 21 columns and 6 rows, I'm dividing it up into 15 columns and 11 rows, to save pins.  I considered using an IO expander, but that's above my level of skill.  Plus, it's unnecessary.  I think coding is going to be pretty easy.
I also got a blue pill in the mail today, and started messing around with that, to get some experience with arm processors.

I have bad internet and worse formatting skills, sorry.
« Last Edit: Sat, 06 April 2019, 18:37:37 by mythosmann »

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #25 on: Sat, 06 April 2019, 19:33:25 »
... Instead of having 21 columns and 6 rows, I'm dividing it up into 15 columns and 11 rows, to save pins...  I

Hi,
By my count you're only saving 1 pin (21+6=27, vs. 15+11=26) Do you really need that 1 "extra" pin?
Also, I just looked at the STM32F303 you mentioned earlier (I couldn't make out the MCU in the schematic)... nice chip, but looks like way more power than I've seen most keyboards use.

Still, you're jumping in and starting the PCB and I'm not, so my hat's off to you!
Thanks for your efforts!
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #26 on: Sat, 06 April 2019, 20:27:03 »
I'm actually just really bad at math, lol. Thanks for pointing that out. 
I haven't fully decided on what mcu I'm using. I was hoping to go for the atmega32u4, but it doesn't have enough pins.  I'm considering the at90usb also, but I haven't seen any boards that use it, making me think there might be an issue with using it.  I figure the stm32 is a safe bet, since there are several boards that use it, like the Planck, Preonic, and Clueboard.

sorry for bad formatting, I'm using Tapatalk on my phone


Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #27 on: Sat, 06 April 2019, 21:48:13 »
Agree, lots like the atmega32u4 supports a total of 26 GPIO lines. Not enough for the scanning (at 21*6, or 15*11) Grumble.
I think here may be a number of QMK boards that use a 3-to-8 or 4-to-16 mux to drive some of the columns.

Here's the theory: http://www.openmusiclabs.com/learning/digital/input-scanning-matrix/3-8-shift-mux/index.html

Or, just throw a larger processor at it.  :) We're not making 10,000 of these, and the one-time cost of the processor likely won't break any of us.
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #28 on: Sat, 06 April 2019, 22:08:44 »
A faster processor makes you type faster, right?
Jokes aside, it would actually be cheaper to use the stm32.  The specific one that I'm looking at is the f303cbt6.  On lcsc, they cost $2.35 each, where the atmegas cost like $3.50.  The Planck and all those use the f303cct6, which costs like  $5.35.  The only difference between the cbt6 and cct6 is memory size.  The cheaper one has 128k, which I think is enough.  Again, nothing's set in stone yet, I'd have to make sure the firmware isn't too big and all.

sorry for bad formatting, I'm using Tapatalk on my phone


Offline macclack

  • Posts: 501
  • Location: San Diego, CA
    • Macclack
Re: Building a modern PCB for the AEK/AEKII
« Reply #29 on: Sat, 06 April 2019, 23:36:09 »
I'm standing on the sideline applauding everyone's efforts. Wish I could contribute but I know nothing about PCB design.

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #30 on: Sun, 07 April 2019, 01:16:53 »
@mythosmann : Wishing something would make me type faster ;)
That STMf303CBT6 looks amazing... Floating point unit!?! .. makes me want to build a calculator into my AEK project.
Not that hard, especially if we bump the Flash storage.
Feature creep!

Today's quote: '...“but then the customer successfully broke that.”

Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Re: Building a modern PCB for the AEK/AEKII
« Reply #31 on: Sun, 07 April 2019, 06:46:37 »
ISO support would be easy to include in a new PCB.
I'm probably going to add support for MX-style switches and ISO layouts.
Support for ISO for Cherry MX and Alps in regular PC standard key sizes would be relatively easy... That's only three alternative footprints for existing keys and one additional key.

Support for both original ISO and ANSI AEK/AEK II keycaps however would require almost twice as many footprints because for some reason, Apple decided to shift all alphanumeric keys 0.25u to the right on ISO AEK/IIs compared to ANSI. The keys on the left are wider and the keys on the right are narrower. Only the bottom row is the same.
That would make it more complicated... and I don't think anyone expects you to support that.
But if you do decide to, I think the easiest way to realise it would be as more complex footprints.
You would not need additional holes for Cherry MX, but the footprints would need to be different for each key also on the left and right sides.

One more suggestion (just to make it more complicated ;) ): If you are going to support the original keycaps, and Cherry MX plate then ... why not also support vintage SMK switches?
SMK Alps Mount would fit the original Apple keycaps, and in the same plate as Cherry MX. The clicky SMK "Monterey" switch variety is well liked, and feel like something in-between a Cherry MX Blue and Blue Alps.

The pads could fit on the opposite side of the centre from the pads used by Alps/MX (... as long as you don't use that space for SMD backlight or for support of PCB-mount Cherry MX without plate).

ANSI+standard ISO+AEK ISO+MX+SMK and different key sizes could become quite complicated however.
Look at Caps Lock, for instance:
• Centred/ANSI AEK (1.75): Alps, MX, SMK
• ISO AEK (2.0): Alps, SMK
• Stepped Alps (1.5+0.25): Alps, SMK (MX in this size exists but is rare)
• Stepped MX (1.25+0.5): MX (I have never seen Alps in this)
That's eight switch footprints in one ... but wouldn't it be glorious? ;)

Should I try to make everything smd, or should I use through hole diodes?
I think a DIY PCB should be sold either populated with everything but the switches, or with nothing at all.
If populated: SMD diodes and SMD controller. I think through-hole soldering at factory is expensive.
If blank: through-hole diodes and DIP socket for a generally available separate controller board. Never expect customers to solder SMD.
BTW, there are keyboards with diode-footprints that support both: the through-hole diode goes over the SMD pads.

Were there any other features that anybody wanted?  There should be plenty of space on the pcb for any features. ...  I'm thinking about using an usb-c daughterboard, and adding an option to replace the top-right button with a rotary encoder. 
I think (support for) a USB hub would be a nice touch, so that you could connect a USB mouse to it like on the original keyboards.
If not built into the board itself, how about a footprint for soldering a NanoHub onto the board? You would need to have additional separate headers for USB in and out, but it would greatly simplify the work for someone who wants to add this board.
(The ideal would be a USB C hub and connect either side like on the original, but there are no USB C mice ...)

Agree, lots like the atmega32u4 supports a total of 26 GPIO lines. Not enough for the scanning (at 21*6, or 15*11) Grumble.
There would be a maximum of just under 110 keys. You could optimise that down into a logical keyboard matrix of 11×10 => 21 GPIO lines, but it would make things more difficult for the circuit designer.
You would also need three GPIO pins for indicator LEDs, and those should be driven with PWM.
On the ATmega32U4 the pins preferred for this are PB5, PB6 and PB7. Now we are up to 24 lines.
Next, a rotary encoder could perhaps be part of the matrix even, because you normal people would not be able to turn it very fast anyway... but I would choose pins PB0 and PB1 because those could be used with Pin Change Interrupt, and that would be easier to code firmware for.

But yeah, I think AT90 or STM would be preferred anyway ...

BTW, I have also had another weird idea for some time that would not work with ATmega32u4:
Have routed channels in-between key sections ... so that section could be broken off. That way, the same PCB could be used for a Alps 60%, ... or a Alps TKL... or whatever.
The matrix would have to be divided into sections, each section for a different part of the PCB, and each section as square as possible to reduce the number of lines that go onto each (breakable) bridge between sections.
« Last Edit: Sun, 07 April 2019, 07:18:58 by Findecanor »

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #32 on: Sun, 07 April 2019, 18:58:33 »
Thanks for all the info! Great resource.
So the ISO cases are the same, but the layout differs at every key position. Sounds like there were 2 different PCBs for the AEKs.

Sounds to me like we should 1st make an ANSI PCB, debug it, then if there's enough "demand" for the ISO model some ISO people can push that forward.
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #33 on: Sun, 07 April 2019, 21:39:28 »


Sounds to me like we should 1st make an ANSI PCB, debug it, then if there's enough "demand" for the ISO model some ISO people can push that forward.

This seems like the way to go.

sorry for bad formatting, I'm using Tapatalk on my phone


Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #34 on: Sat, 13 April 2019, 15:37:00 »
Here's a possible way forward on the PCB design.
There's an MIT licensed, full-size keyboard PCB design, part of the "Voyager Series" available here:

     General info:         https://github.com/ai03-2725/Voyager
     The 104 keyboard: https://github.com/ai03-2725/Voyager104

All needed files. Pad patterns.
Supports USB-C, combination Alps/MX pads, looks like 20 columns x 6 rows, etc.
Compatibility with QMK firmware.

Maybe it's easier to start here and "just" push the pieces around so the AEK keys end up in the right places?
(Having never made a keyboard PCB I'm likely hopelessly naive about such things.)

Looks like it's designed around a AT90USB1286-MU. 16MHz, 128kB Flash, 8kB SRAM, 4kB EEPROM, 48 I/O lines, USB 2.0, QFN-64
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #35 on: Sat, 13 April 2019, 15:49:39 »
That's insanely helpful, thank you so much!

sorry for bad formatting, I'm using Tapatalk on my phone


Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #36 on: Sun, 14 April 2019, 02:16:03 »
Findecanor says:
Quote
BTW, I have also had another weird idea for some time that would not work with ATmega32u4:
Have routed channels in-between key sections ... so that section could be broken off. That way, the same PCB could be used for a Alps 60%, ... or a Alps TKL... or whatever.
The matrix would have to be divided into sections, each section for a different part of the PCB, and each section as square as possible to reduce the number of lines that go onto each (breakable) bridge between sections.

There was a GH-122 keyboard run in 2016, with a rev 2.0 started but never shipped in 2017. I was really hoping to get one. Read about it here:
    https://geekhack.org/index.php?topic=88063.50

Basically a TKL + (all optional) 10 keys to the left, num pad to the right, and 28 F keys along the top. (You can see in the OP screenshot of the PCB.)

Yummy if you like large keyboards!
Can we double the row of F keys in the AEK PCB? ;)
Today's quote: '...“but then the customer successfully broke that.”

Offline weaston

  • Posts: 140
  • Location: Florida, USA
Re: Building a modern PCB for the AEK/AEKII
« Reply #37 on: Sun, 14 April 2019, 15:13:50 »
I saw some talk about iso aek and thought I would give some input.

Supporting ansi and iso aek on the same board is _technically_ possible, but it is not as easy just having different modifier positions.  The modifiers on the left push the rest of the caps to a different distance than the ansi left mods do and it makes the positions of the alphas different from ansi by .25U (and of course the right mods are shorter because of this).

Reference below:

ISO - http://www.finestcomputers.co.uk/FinC/Apple/hardware/ExtendedKeyboard-II/No.3/EK2-1.JPG
Ansi - http://i.imgur.com/EPWzDyA.jpg

Technically you could put both positions, but that means every single switch on the board that isn't bottom row will have an extra full cutout .25U off from the ansi standard cutouts.  This isn't impossible, it just will be a lot of pin overlap (2 footprints per key and 8 total holes) and look pretty bad, especially if you're trying to have mx support as well.  The other aek iso pcbs that have been made have been standalone because of the .25U offset and as far as I'm concerned this is a pretty wise choice.  Having so many pins can be overwhelming and also completely unnecessary since iso aek users are a far smaller market than ansi users to begin with.  This would also mean the side mx pcb mount pins would get basically overwritten by the extra middle hole from the mx cutouts, so there would only be on able to be used at once so you can't pcb mount them.

Also mx support is not really a good thing in this use case because having to mix 1.5U and 1.25U on one board requires a larger set with more compat than anything purely standard and 6.5U spacebars don't exist in any good capacity for mx.  There is only one listing I found for one and it's a thin one in pretty bad colors that no one will have sets to really match - http://www.maxkeyboard.com/6.5x-spacebar-cherry-mx-keycap-1x6.5.html.  Besides that, mx caps will sit very low in the case because the case curves a ton to hide the alps stems extending vertically as the rows get higher.  Technically you could do a different bottom row for mx and just use 7U wkl or standard 6.25U or whatever, but the case curve problem should be taken into consideration.

Another thing I don't know if anyone mentioned yet (but forgive me if they did) is that you need 90 degree rotated f-row switches cause for some unknown reason Apple decided to do sideways caps on that row.

My personal feelings about this project are that you need to define a set scope and only follow that.  If you want to make an AEK replacement then only do that.  Having a ton of extra, unnecessary support that also makes the design more difficult makes this no longer an AEK pcb and it becomes a semi-universal pcb that probably only fits AEKs because of the strange shape and size the pcb is.  I would definitely like to see this succeed, but like I said above, I think the scope needs to be limited and the goal should be more clear.
DK Saver | Kingsaver | OTD 360 Corsa | OTD 456GT | OTD Cheat | KMAC 1.3 | KMAC 1.2 | KMAC Happy | KMAC Pad | KMAC Mini (Revo) | Singa | HHKB Pro 1 | GSKT-00 | IBM 5251 | IBM Model F XT | IBM Model M | Dolch PAC | Kinesis Advantage

Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Re: Building a modern PCB for the AEK/AEKII
« Reply #38 on: Sun, 14 April 2019, 22:14:41 »
I just realised another thing: the AEK and AEKII have different plates. On the AEK, the plate extends past the bottom row keys and rests against the front of the case. On the AEKII, there are only small nubs that extend into holes in the front rubber unifoot to fasten it to the case without glue (Apple "thought different" when they designed it ... )

I expect that most people who would want to build a new modern Alps keyboard inside a AEK or AEKII would reuse the original plate anyway. Your keycaps and plate would be both ISO or both ANSI.
Only the PCB would need to be designed to fit the different variations.

I think MX support on the PCB is mostly a "nice to have" thing and not really something that is in demand.
Because of the slope of the AEK/AEKII cases, anything but the original keycaps would look either too raised or too sunken anyway.
Other than for artisan keycaps, if you would populate a keyboard with Cherry MX switches, then ISO keycaps would be standard sizes and positions (mostly like ANSI) and not like on ISO AEKIIs, so only a couple additional Cherry MX footprints would be needed: not double the alphanumeric keys.
But if you just want to put an artisan keycap for Cherry MX on the function key row, then you'd want to raise it anyway (because the case is high there) and then you could very well use a stem-adaptor on an Alps switch.

Maybe the second switch to support should not be Cherry MX (or SMK), but actually one that is found in some rare AEKIIs: "Mechanical Mitsumi switches Type 2".
Very little information seems to be out there about them though. I can find only pictures of ANSI keyboards with them.
But it looks as if they they have square holes in the plate. Do Cherry MX or SMK fit in its plate? I don't know ...

Can we double the row of F keys in the AEK PCB? ;)
You could fit an extra row above the F keys on the AEK, but not in the AEKII.
The top edge of the AEKII's plate (the Alps versions, that I know of) is held in place with snaps.

Sidenote: horizontal spacing between F12 and Print screen and between PgUp and Clear looks slightly smaller than the spacing between F8 and F9 (0.5u). Better measure that!
« Last Edit: Tue, 16 April 2019, 18:27:22 by Findecanor »

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #39 on: Mon, 29 April 2019, 19:55:33 »
An Update!(ish)
I haven't forgot about this, but it's been slow going.  I have a few other projects that I'm working on, and I may have jumped in way over my head with this project, lol.  I've been learning a lot, but also learning that I have a lot more to learn.  The main drawback has been figuring out what usb hub ic to use, and how to use it.  I've been trying to keep price in mind, but not as the deciding factor, because I'm aware pcba is going to be expensive no matter what.  I think I have a pretty much finalized schematic, and going to try to find someone to make sure it would work.  (If anyone has experience and knowledge with circuits, I'd love feedback, you can find the files here.)  I'm just about to start on the pcb layout.  I've decided on the at90usb as the mcu, and for the usb connection, I'll have an onboard mini-b, but also a pin header to use with a breakout board.  There will also be a pin header for the second usb output.  Also, I'm keeping the switch support to Alps and MX for now.  Maybe a future revision will have mitsumi or smk support.

Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Re: Building a modern PCB for the AEK/AEKII
« Reply #40 on: Mon, 29 April 2019, 21:20:12 »
Is there not one column too many on the QWERTY row, and on the numeric row unless there is support for a split space bar?
Other than that, it looks nice. :) What is the speaker for?

Because I had pitched the idea of using special footprints to support both ANSI and ISO, I have been looking more into that. I see no reason to shift Cherry MX in ISO 0.25 to the right like Alps but to support standard Cherry MX keycaps only.
There would be different footprints for:
* Alphanumeric keys: Duplicated 0.25u to the right in ISO.
* Modifiers: ~, Tab, Caps Lock, Right Shift and Backspace are all duplicated 0.125u to the right in ISO.
* Left Shift: -0.375u, so there is some overlap.
And also special footprints for:
* ISO Return key: Rotated Alps. Not rotated Cherry MX. Different sizes.
* Function key: Rotated Alps, not rotated Cherry MX.

You might also want to support ISO that is not shifted, i.e. not using AEK/AEKII keycaps, ... Unfortunately, two varieties of normal-sized ISO Return keys have been spotted, further complicating the ISO Return key footprint, but just a little bit.

However, supporting both Alps and MX in both ANSI and ISO would require that some switches would be upside-down (rotated 180°).
I wonder: Would it make any difference if an Alps switch is upside-down? Is there some minute difference in feel between pins north and pins south when a key pressed near the edge?
« Last Edit: Mon, 29 April 2019, 21:24:53 by Findecanor »

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #41 on: Mon, 29 April 2019, 22:01:58 »
Great to see this progress!

Coming from a guy who's never done this before... I think you may need a pull-up resistor on the RESET pin of the MCU.
(and I think mythosmann's right. 1 too many keys on the QWERTY row.)

edit (add): You may get someone here to review the schematic: https://geekhack.org/index.php?topic=48851.0
« Last Edit: Mon, 29 April 2019, 22:04:29 by ErgoMacros »
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #42 on: Mon, 29 April 2019, 22:35:57 »
Is there not one column too many on the QWERTY row, and on the numeric row unless there is support for a split space bar?
There definitely is, good catch.  I dunno why I added that.
Quote
What is the speaker for?
I think it's just a simple, fun little addition.

Quote
Because I had pitched the idea of using special footprints to support both ANSI and ISO, I have been looking more into that. I see no reason to shift Cherry MX in ISO 0.25 to the right like Alps but to support standard Cherry MX keycaps only.
There would be different footprints for:
* Alphanumeric keys: Duplicated 0.25u to the right in ISO.
* Modifiers: ~, Tab, Caps Lock, Right Shift and Backspace are all duplicated 0.125u to the right in ISO.
* Left Shift: -0.375u, so there is some overlap.
And also special footprints for:
* ISO Return key: Rotated Alps. Not rotated Cherry MX. Different sizes.
* Function key: Rotated Alps, not rotated Cherry MX.
I think it would be doable to only make custom footprints for the alphas and mods.  I don't have an iso board, so I actually don't know what the footprint would look like.  For the function keys, I'm just using two sets of footprints, one that's rotated alps, and a normal MX/alps.


Great to see this progress!

Coming from a guy who's never done this before... I think you may need a pull-up resistor on the RESET pin of the MCU.
(and I think mythosmann's right. 1 too many keys on the QWERTY row.)

edit (add): You may get someone here to review the schematic: https://geekhack.org/index.php?topic=48851.0
I'm glad that I'm making progress, even though it's slow.  I think you're definitely correct about the pull up resistor, I forgot to add it back in after organizing the schema into sheets.  Also, thanks for the link.  I stumbled across that a while ago, but forgot about it.

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #43 on: Tue, 30 April 2019, 00:23:06 »
Oh, please keep the speaker!

And, if you view the 3 "lock" LEDs as more general purpose we can use them for layer indicators. All the more reason to
support an extra couple pins out with pads for resistors that the adventurous could use for supplemental LEDs. (if MCU pins are available)

Uh-oh, more feature creep. Forget I said anything.  :p
Today's quote: '...“but then the customer successfully broke that.”

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #44 on: Tue, 30 April 2019, 01:32:52 »


And, if you view the 3 "lock" LEDs as more general purpose we can use them for layer indicators. All the more reason to
support an extra couple pins out with pads for resistors that the adventurous could use for supplemental LEDs. (if MCU pins are available.

I was actually thinking about having the option to put some addressable rgb leds in place of the traditional leds. That would give it a bit more customizability, and might work better for layer indication.  Although, I don't think I'd really use layers on a board this size.

sorry for bad formatting, I'm using Tapatalk on my phone


Offline 4sStylZ

  • Posts: 127
Re: Building a modern PCB for the AEK/AEKII
« Reply #45 on: Tue, 30 April 2019, 03:19:08 »
Happy to see this thread !

I have an AEKII with Alps Cream ISO Azerty (French layout) that I want to convert in a smaler keyboard. So I will sub at this and follow your work. By the way I we don’t have ANSI keyboards here and I don’t have a keycap set for ANSI.
I hope you can achieve a pcb for a 60%, 70% / 75% (whatever) for ISO alps because I want to use OEM  keycaps and switchs.

Thank you very much :-*
Bépo user here : AEK64 White linear dampened, XD75 Cherry Blue Jailhoused, TypeMatrix2030 black skin, Lenovo 0B47200 w/ trackpoint, G13, G512. Kensington Expert Trackball & Orbit, Magic touchpad 2.

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #46 on: Tue, 30 April 2019, 11:34:01 »


I hope you can achieve a pcb for a 60%, 70% / 75% (whatever) for ISO alps because I want to use OEM  keycaps and switchs.

Thank you very much :-*

Sorry dude, this is only for a full-size pcb.  Maybe when I'm done with this one I could whip together a simple pcb for you, but it'd probably be a while.  I think your best bet would be to handwired a 60%.
Good luck!

sorry for bad formatting, I'm using Tapatalk on my phone


Offline Findecanor

  • Posts: 5035
  • Location: Koriko
Re: Building a modern PCB for the AEK/AEKII
« Reply #47 on: Tue, 30 April 2019, 19:58:31 »
An idea for a full-size PCB with routed channels between break-away parts has come up a few times before, but I have seen only smaller PCBs with a single break-away part being made.

XMIT had this idea too. He posted the picture below in Nov 2016. I don't know if he went with it, but I do know that his hall-effect keyboards were made in sizes that are subsets of this: The full "Sun Type 5" size with all keys, "full size", TKL and 60%.
218324-0

If the AEK/AEKII replacement PCB would have routed channels between sections and headers for ribbon cables to reconnect them, maybe it could not just be useful for making smaller keyboards but also (with a little effort for the modder) be used in other plate-mounted keyboards.
The biggest issue for compatibility is often the horizontal spacing between key groups. It is close to 1/3" on the AEK/AEKII, which is relatively weird whereas most keyboards tend to use a spacing of 1/2u (.375") or 1/4u (.1875u). There are also differences in horizontal spacing to the function key row.
Another big issue does remain though: many keyboards have holes in the PCB for standoffs at different locations.

Below is a weird old sketch of mine that never went anywhere. It is a bit of an extreme case, with every idea I could get at the time... It was intended for breaking up and installing into various existing keyboards (especially split ergonomic ones like the MS 4000) and reconnect the parts with ribbon cables.
By having channels in-betwen every column in the middle, it would have supported many many layouts, from split 60% to TKL with a column of macro keys to "left-handed" full-size.
Anyway... The idea I want to show is that most sub-matrices are intentionally as square as possible within the matrix so as to reduce the number of wires needed to reconnect the sections.
218326-1
« Last Edit: Tue, 30 April 2019, 20:28:53 by Findecanor »

Offline mythosmann

  • Posts: 24
  • Location: Ohio, USA
  • keyboards aren't even useful
    • My GitHub Page
Re: Building a modern PCB for the AEK/AEKII
« Reply #48 on: Tue, 30 April 2019, 21:19:07 »
I think it might be helpful to have breakaway parts on the pcb for compatibility reasons. I know that the original aek is substantially bigger than the aekii, and I assume that the pcb is too.  I'm looking to get my hands on an original aek that I can use for reference.

sorry for bad formatting, I'm using Tapatalk on my phone


Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Building a modern PCB for the AEK/AEKII
« Reply #49 on: Tue, 30 April 2019, 22:41:19 »
Far from perfect, but here are some case comparisons, in case you haven't seen them:
       https://geekhack.org/index.php?topic=92087.msg2506583#msg2506583
Today's quote: '...“but then the customer successfully broke that.”