Filco tenkeyless custom ATmega32u4 controller
Posted: 28 Aug 2012, 14:43
Update: 2012-09-11CET
PCB files have been sent for final DRC (design rule checking) at pcbwing.com.
Deadline: 2012-09-09 23:59 CET
Anyone registering their interest before the deadline will be guaranteed their units when they are done and tested.
When the deadline has passed, I think I will set some system up to do the final ordering by email to keep track of everything.
What is this all about?
Ever wanted your Filco tenkeyless to have a programmable controller? Thought it sounded a bit insane to build a Phantom only for this reason? What if you could just simply replace the stock controller daughter board in your keyboard with a programmable one? Why not I say.
With this replacement daughter board you will basically have a Teensy that plugs conveniently into your Filco tenkeyless. There are a number of different keyboard project with code running on the Teensy that should be easily adopted to work with this controller.
The ATmega32u4 chip
This is the same chip as on the Teensy2.0. It is a 16MHz 8-bit AVR from Atmel.
It has 32kB of flash to hold the bootloader, firmware code and key matrix information. The flash memory is read only during normal operation, so it can only be altered when loading code onto it through the bootloader. Both the stock bootloader from Atmel and the open source bootloader from LUFA take 4kB of the flash memory. The very basic code for the Phantom with one single layer key matrix takes almost 9kB. This leaves more than 18kB for custom layers and macros or whatever.
There is 2.5kB of SRAM memory, this is used to run the program and store variables during runtime. It is like normal RAM memory erased when the power is cut.
There is also 1kB of EEPROM memory available, this can be used to store data when the power is off. So any recorded macro or on the fly remappings should be stored here.
Flashing the firmware
Almost all code for AVRs you will find is written in c and compiled to hex files. It is these hex files that are flashed to the chip. The flashing is done through a program running on your computer, talking to the chip via the bootloader. I haven't tried this in Windows but there are applications to do this that should be easily maneuvered. I will look into this and make sure there are no problems. In Linux I've got everything under control.
The TeensyLoader that the Teensys use will unfortunately not be available since that is PJRC proprietary. This is only a slight drawback. It may be more user friendly, and their bootloader is much smaller, but all in all this doesn't make a big difference.
Compatibility
I have based this design on my "gen2" Filco tenkeyless. I believe there are no differences compared to the "gen1" keyboard except the higher quality PCB. Electrically everything is the same. I cannot guarantee that it will work for everyone though since there may be differences I don't know about. If your keyboard turns out to be incompatible this would of course be handled somehow. Passing it on to someone else for example, or in the worst case returning it for a refund.
The Filco main PCB that I have reverse engineered is a "gen2" marked "CST-F87/88/89/91-MB V1.1" 2010-11-09, and the controller is marked "Tenkeyless PCBA Rev 2.1-ESD" 2010-08-24.
There are pictures of the stock controller in this thread http://geekhack.org/index.php?topic=6557
Roadmap to HID liberation
At a quantity of 10 a total production cost of ~$20 a piece (not including shipping from me) could probably be expected.
Shown interest:
GeekHack
PCB files have been sent for final DRC (design rule checking) at pcbwing.com.
Deadline: 2012-09-09 23:59 CET
Anyone registering their interest before the deadline will be guaranteed their units when they are done and tested.
When the deadline has passed, I think I will set some system up to do the final ordering by email to keep track of everything.
What is this all about?
Ever wanted your Filco tenkeyless to have a programmable controller? Thought it sounded a bit insane to build a Phantom only for this reason? What if you could just simply replace the stock controller daughter board in your keyboard with a programmable one? Why not I say.
With this replacement daughter board you will basically have a Teensy that plugs conveniently into your Filco tenkeyless. There are a number of different keyboard project with code running on the Teensy that should be easily adopted to work with this controller.
The ATmega32u4 chip
This is the same chip as on the Teensy2.0. It is a 16MHz 8-bit AVR from Atmel.
It has 32kB of flash to hold the bootloader, firmware code and key matrix information. The flash memory is read only during normal operation, so it can only be altered when loading code onto it through the bootloader. Both the stock bootloader from Atmel and the open source bootloader from LUFA take 4kB of the flash memory. The very basic code for the Phantom with one single layer key matrix takes almost 9kB. This leaves more than 18kB for custom layers and macros or whatever.
There is 2.5kB of SRAM memory, this is used to run the program and store variables during runtime. It is like normal RAM memory erased when the power is cut.
There is also 1kB of EEPROM memory available, this can be used to store data when the power is off. So any recorded macro or on the fly remappings should be stored here.
Flashing the firmware
Almost all code for AVRs you will find is written in c and compiled to hex files. It is these hex files that are flashed to the chip. The flashing is done through a program running on your computer, talking to the chip via the bootloader. I haven't tried this in Windows but there are applications to do this that should be easily maneuvered. I will look into this and make sure there are no problems. In Linux I've got everything under control.
The TeensyLoader that the Teensys use will unfortunately not be available since that is PJRC proprietary. This is only a slight drawback. It may be more user friendly, and their bootloader is much smaller, but all in all this doesn't make a big difference.
Compatibility
I have based this design on my "gen2" Filco tenkeyless. I believe there are no differences compared to the "gen1" keyboard except the higher quality PCB. Electrically everything is the same. I cannot guarantee that it will work for everyone though since there may be differences I don't know about. If your keyboard turns out to be incompatible this would of course be handled somehow. Passing it on to someone else for example, or in the worst case returning it for a refund.
The Filco main PCB that I have reverse engineered is a "gen2" marked "CST-F87/88/89/91-MB V1.1" 2010-11-09, and the controller is marked "Tenkeyless PCBA Rev 2.1-ESD" 2010-08-24.
There are pictures of the stock controller in this thread http://geekhack.org/index.php?topic=6557
Roadmap to HID liberation
- 2012-09-06 (Probably) Receive first batch of components.
- 2012-09-07 (Hopefully) Receive new Filco tenkeyless for final testing of breadboard setup.
- 2012-09-09 Interest check deadline.
- 2012-09-11 Ordering PCBs.
the more expensive components. The cheap ones I already have ordered in large numbers. Delivery time to me is very fast. - 2012-09-24 (Earliest) Delivery of PCBs.
- 2012-09-25 Testing.
- 2012-09-26 Building.
- 2012-09-27 Asking people for money. I am probably going to order components for 25 at a time. That is a good cutoff for
- 2012-09-28 First shipments. I will start off with a few completely subjectively selected orders, and after that asking in random order.
- 2012-10-04 21 days with tons of spare time.
At a quantity of 10 a total production cost of ~$20 a piece (not including shipping from me) could probably be expected.
Shown interest:
GeekHack
- 3-4 jdcarpe
- 1 reaper
- 2 alaricljs
- 1-2 boost
- 1 inlikeflynn
- 2 Saviant
- 1 damorgue
- 1 longweight
- 2 The_Beast
- 2 tipo33
- 2 WhiteFireDragon
- 2 WRXChris
- 1 alixinhzai
- 1 hashbaz
- 2 skriefal
- 4 litster
- 2 mickd
- 2 tjweir
- 1 Appeac
- 1 nolliepoper
- 2 Glissant
- 1 priyadi
- 2 Tenkey
- 1 modulor
- 1-2 harrison
- 2 Nunez
- 2 Autolyze
- 1 metalliqaz
- 1 strider_ani
- 3 BossBorot
- 2 jcrouse
- 1 Djuzuh
- 1 4LI4Z
- 1 Surreal Killa
- 1 fruktstund
- 2 bnp70kr
- 1-2 Game Theory
- 1 DarkShot
- 1 daerid
- 1 nebo
- 1 oneproduct
- 1 Feints
- 3 TheProfosist
- 1 Icarium
- 2 ChaoticKinesis
- 1 Sifo
- 1 anthropornis
- 1 gizzard
- 4 RiffRaff
- 1 bisl
- 1 fl0w3n
- 1 esoomenona
- 1 HzFaq
- 1 maoiste
- 1 kvad
- 2 webwit
- 1 csimi
- 1 hamza_tm
- 1 yeeeargh
- 2 pasph
- 1 graboy
- 1 lapin00b
- 1 hoggy
- 1 blighty
- 1 zoidbergslo
- 1 Kurrk
- 1 stevedreams
- 1 dfxdx
- 1 Daemon Raccoon
- 1 mrdk
- 0-2 korne
- 2 chronos
- 1 bone
- 2 fossala