Author Topic: Need help selecting controller and firmware  (Read 2856 times)

0 Members and 1 Guest are viewing this topic.

Offline geekgarage

  • Thread Starter
  • Posts: 4
Need help selecting controller and firmware
« on: Wed, 08 November 2017, 18:58:09 »
Hi all,

Great forum you all got here, been reading for the last week or so trying to figure out what the best controller and firmware would be for my project.
So I've never actually worked with custom keyboard before but i do have some experience in 3D design, micro controllers, soldering for 25 years and programming (not a pro, but also not a newb and i'm ready to get hands dirty). That said i just started doing actual proper schematics for this project in KiCAD, really nice program :)

So a few details about what i would like to implement, i will do the programming needed but i don't know the best platform to start from, TMK, QMK, Easy AVR and what have we.
I thought of the ATMEGA32U4 as controller but for the 100% layout it's a problem, since there isn't enough pins for a matrix of 10*13 (23 pins) for 130 keys which is the absolute lowest pin number i can get and for 7 status diodes. The AT90USB1286 used on the teensy++ 2.0 will accommodate for this but since the halfkay bootloader used on teensy is closed source that is a no-go, so I'm wondering if this is a viable option? Would like to support NKRO.

I would love if was plug and play, no driver install like i understand the teensy++ 2.0 is. (was looking for the AT90USB1286 with halfkay bootloader that i could buy and use without the rest of the board, but seems like that is a no-go. There is one must and that is i want the controller on the keyboard PCB as I'm implementing USB Type C connector.

OS Button have no function other than telling controller to switch layout. Must be saved to EEPROM, Not part of matrix
Game Mode button have no other function than to toggle if controller should react to WIN key when in WINDOW / LINUX layout. Don't know if it should be part of matrix
Macro Button will allow for on-board recording of macro for each F-key

OS Button:
On the fly switching between OSX layout and Windows / Linux layout
Last selected state / layout saved to EEPROM (internal or external SPI EEPROM)

Macro Recording (pseudo code for explaining):
1 push enables macro selection mode
if macro key is pushed once within 2 sec, keyboard exit macro mode
else if macro key is pushed twice within 2 sec it enable or disable recording of time between keystrokes
else if F1-24 key is pushed then it is selected
    If macro key is held in for 3+ sec F-key clears and goes back to default F1-24 function and macro mode exit
    else if macro key is pushed once within 2 sec it cancel the operation and leaves the key as is and exits macro mode
    else if any other key is pressed, within the keyboard matrix, it is recorded as that key
    else exits macro mode after 15 sec if no button is pushed
else exits macro mode after 15 sec if no button is pushed

Gaming Mode:
Disable Alt+Tab
Disable Windows Key + Tab
Disable Left Windows Key
Disable Right Windows Key


Layers / layouts:
Default would be Windows + Linus or Apple
then there would be a shift layer for all secondary options
then there is a Fn layer with all Fn functions (orange boxed)


100% Layout Total physical keys 129. 128 of them on keyboard matrix last key is OS key or 127 keys on matrix and OS + Macro directly connected)


70% Layout Total physical keys 89. 88 of them on keyboard matrix last key is OS key or 87 keys on matrix and OS + Macro directly connected)


60% Layout Total physical keys 76. 75 of them on keyboard matrix last key is OS key or 74keys on matrix and OS + Macro directly connected)


Would love any pointers where to go from and any feedback is welcome.
Please refrain from commenting if you simply just don't like it and think I should know, I really should not, thank you :)
« Last Edit: Wed, 08 November 2017, 19:16:39 by geekgarage »

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Need help selecting controller and firmware
« Reply #1 on: Fri, 10 November 2017, 15:19:58 »
Teensy++ 2.0 will support NKRO, provided you diode isolate every key.  Also, the GH-122 PCB is pretty close to your 129 key layout.
  Quoting me causes a posting error that you need to ignore.

Offline geekgarage

  • Thread Starter
  • Posts: 4
Re: Need help selecting controller and firmware
« Reply #2 on: Fri, 10 November 2017, 18:00:54 »
Teensy++ 2.0 will support NKRO, provided you diode isolate every key.  Also, the GH-122 PCB is pretty close to your 129 key layout.

Very interesting thread thank you :D and yes i'm going with the teensy++ 2.0 for now, but i'm wondering if a non teensy AT90USB1286 would be fine with LUFA and something like QMK firmware to be PnP with Windows and OSX. Linux would be fine without having to install a driver but not a must. Reason i'm asking is I don't have much experience with HID devices except from a DIY bluetooth mouse

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Need help selecting controller and firmware
« Reply #3 on: Sat, 11 November 2017, 14:01:25 »
Hi,

The GH-122 may be quite close to what you want, especially for the larger keyboard layouts.
[IC] here: https://geekhack.org/index.php?topic=88063.0;topicseen

Th GH-122 can actually support up to about 149 keys, if you are so inclined.
Note you can slice off parts of it almost at will getting a board the size you like.
Also, it looks to me like PA0-PA7 may be brought out but not used. You could probably cut a couple keys out of the matrix and run a couple wires to there for your special functions.

The biggest down-side with the GH-122 is that samwisekoi hasn't been around for a while (though he did say he'd return) so production schedule is unknown.

Still, I am waiting patiently, with high hopes.
Today's quote: '...“but then the customer successfully broke that.”

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Need help selecting controller and firmware
« Reply #4 on: Sat, 11 November 2017, 14:34:37 »
The AT90USB1286 used on the teensy++ 2.0 will accommodate for this but since the halfkay bootloader used on teensy is closed source that is a no-go
If the halfkay bothers you, you can flash the bootloader from Atmel's site; look for megaAVR DFU USB Bootloaders, at90usb128-bl-usb-1_0_1.hex is your bootloader.

There is one must and that is i want the controller on the keyboard PCB as I'm implementing USB Type C connector.
Have you considered using a m32u4 with shift registers?
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline geekgarage

  • Thread Starter
  • Posts: 4
Re: Need help selecting controller and firmware
« Reply #5 on: Sun, 12 November 2017, 16:10:48 »
Hi,

The GH-122 may be quite close to what you want, especially for the larger keyboard layouts.
[IC] here: https://geekhack.org/index.php?topic=88063.0;topicseen

Th GH-122 can actually support up to about 149 keys, if you are so inclined.
Note you can slice off parts of it almost at will getting a board the size you like.
Also, it looks to me like PA0-PA7 may be brought out but not used. You could probably cut a couple keys out of the matrix and run a couple wires to there for your special functions.

The biggest down-side with the GH-122 is that samwisekoi hasn't been around for a while (though he did say he'd return) so production schedule is unknown.

Still, I am waiting patiently, with high hopes.

Well I'm doing the schematics and PCB myself and get a company like easyeda to produce the PCB so it's matching exactly what i want :) but thanks for the hint. All my doubt is more around the actual controller and firmware combo and what will support the functions i'm looking to implement

Offline geekgarage

  • Thread Starter
  • Posts: 4
Re: Need help selecting controller and firmware
« Reply #6 on: Sun, 12 November 2017, 16:19:46 »
The AT90USB1286 used on the teensy++ 2.0 will accommodate for this but since the halfkay bootloader used on teensy is closed source that is a no-go
If the halfkay bothers you, you can flash the bootloader from Atmel's site; look for megaAVR DFU USB Bootloaders, at90usb128-bl-usb-1_0_1.hex is your bootloader.

There is one must and that is i want the controller on the keyboard PCB as I'm implementing USB Type C connector.
Have you considered using a m32u4 with shift registers?

I've read a bit more about what the actual bootloader does (always just used the default on my atmega chips) so that isn't an issue anymore and regarding m32u4, yes i thought of it and dismissed it as the AT90USB have the number of pins i needed plus some. I didn't think of shift registers as i've never needed it in any of my simple projects and to be honest why mess with those when you can just pay to get at larger chip :)