[HN Gopher] Show HN: Threeboard - a full-size mechanical USB key...
       ___________________________________________________________________
        
       Show HN: Threeboard - a full-size mechanical USB keyboard with only
       three keys
        
       Author : taylorconor
       Score  : 76 points
       Date   : 2022-01-11 15:43 UTC (7 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | 1MachineElf wrote:
       | I love small keyboards, but with only 3 keys, you may as well
       | just send ASCII codes. Nitpick aside, this does appear to be a
       | quality project. :) A design document, user manual, and graphical
       | simulator are lacking in many other niche keyboard projects.
        
         | taylorconor wrote:
         | It does just send ASCII codes (well, USB keycodes)! It's not
         | supposed to be practical, just to be technically interesting
         | and useful to learn from!
        
       | oneoff786 wrote:
       | You know people who use the DSA layout type 30% faster than the
       | standard ASD.
        
       | empressplay wrote:
       | How about a two-key version that uses morse code? one key for
       | dash, the other for dot. Or maybe the third key on the threeboard
       | could be space / stop? (one press for space, two presses for
       | stop?) Could be neat for kids to learn morse code
        
       | axiosgunnar wrote:
       | Now use that to code Brainfuck
        
       | xcambar wrote:
       | Well executed, usable strictly speaking but practically useless.
       | Perfect!
        
       | sxv wrote:
       | I did some back of the envelope calculations for fun. A 5-key
       | setup would allow one-hit triggers of:
       | 
       | abcdefghijklmnopqrstuvwxyz and space, period, apostrophe, enter.
       | 
       | Then add a "shift" key and you add one-hit triggers of A-Z,
       | backspace, question mark, tab, esc.
       | 
       | Then you could get 60 additional output values with double-tap
       | shift and hold + key (30) and double-tap shift and release + key
       | (30).
        
       | csdvrx wrote:
       | Alternatively, get a 4-key board off amazon, popular for playing
       | OSU
       | 
       | Example: https://www.amazon.com/4-Key-Programmable-Mechanical-
       | Keyboar...
        
         | taylorconor wrote:
         | These kinds of things are distinctly different, assigning
         | macros or keycodes to specific keys. The threeboard is not a
         | macropad, it's a fully-functional keyboard that can type
         | anything, it just requires specifying the keycode to type or
         | programming in macros to type words/sentences.
        
           | csdvrx wrote:
           | That's wrong. The 4 key OSU keyboard is a 4 key keyboard
           | emitting keycodes. I know because I have one (!!)
           | 
           | Some of them even use QMK so you can assign anything you
           | want.
        
             | taylorconor wrote:
             | My point is that they're macro pads where you can assign
             | keycodes or keycode combinations to specific keys. The
             | threeboard is itself capable of determining which keycodes
             | to send and is not limited by what it's been programmed to
             | do. So it's fully-functional in the sense that you can use
             | it to type anything, it'd just take a really long time and
             | make you very unhappy!
        
               | csdvrx wrote:
               | Fair enough!
        
       | _benj wrote:
       | But, is it clicky enough? ;)
        
         | taylorconor wrote:
         | Put whatever switches you want on it and it can be!
        
           | _benj wrote:
           | On a more serious note, that's a really cool project!
           | 
           | As it happens, I spent quite a bit of time last night
           | learning about the qmk firmware and was looking around for a
           | "keyboard development board"...
           | 
           | Do you think that you'd aim to grow the firmware to support
           | bigger boards?
        
             | taylorconor wrote:
             | For me personally, no. But I think the threeboard firmware
             | is small enough right now that it's very readable and
             | understandable, so it could make a good starting point to
             | fork and adapt to different boards!
        
       | sc__ wrote:
       | Cool! Can you recommend any reading resources for getting into
       | hardware design?
        
         | taylorconor wrote:
         | SparkFun have some pretty good tutorials and resources for
         | learning, e.g. this tutorial which guides you through using
         | KiCad, a tool for designing schematics and PCBs:
         | https://learn.sparkfun.com/tutorials/beginners-guide-to-
         | kica....
        
       | MikeTheGreat wrote:
       | I saw your answer to 'how to get into hardware design'. If you're
       | willing to answer noobie questions I've got another one for you
       | :)
       | 
       | I put together an ErgoDox by following the directions (and by
       | soldering. Lots of soldering :) ) but I don't really understand
       | how the circuits work.
       | 
       | In particular I'd like to put together a keyboard that connects
       | the switches using wires instead of a PCB, but I don't know why
       | there's all the ICs here and there, or what they're doing, or
       | even where to find a circuit diagram of the ErgoDox, nor how to
       | analyze those circuits.
       | 
       | Could you recommend a good 'next step' for getting more familiar
       | with the various parts that go into something like an ErgoDox?
       | 
       | I'm enough of a noob that I'm not going to be surprised if you
       | just link me back to your repo here (in which case I apologize in
       | advance) :)
        
         | gigaflop wrote:
         | Here's a keyboard PCB I designed a while ago:
         | https://imgur.com/gallery/lZglox7
         | 
         | I followed the ai03 tutorials (https://wiki.ai03.com/books/pcb-
         | design/page/pcb-guide-part-1...) to design the MCU area of this
         | (The 32u4 and supporting hardware), but if you look at the
         | traces, you can see that the switch matrix is dumb-as-bricks
         | and can easily be replaced with some kind of handwiring.
         | 
         | Don't try to replicate the diode banks if you want sane wiring.
         | The linked tutorial assumes someone is designing for function
         | instead of form.
        
         | taylorconor wrote:
         | I tried to give a bit of an overview of this in the 'hardware
         | design' section of the documentation [0]. It has some external
         | links to further documentation and tutorials in it too. But the
         | learning curve is very steep.
         | 
         | I'd maybe suggest looking for an electrical engineering intro
         | book or course at a level you feel comfortable with, just to
         | get an idea of the basics.
         | 
         | For the ErgoDox keyboard, the schematic is actually available
         | on their own repo [1], but it's going to look quite
         | intimidating initially. But I found a pretty great looking
         | article explaining the electrical design of the ErgoDox that
         | you might find useful [2]. The ErgoDox actually looks very
         | similar electrically to the threeboard, it uses the same MCU
         | (atmega32u4), but of course has the extra complexity of
         | communicating with the other half of the keyboard over the
         | 3.5mm connector.
         | 
         | [0]:
         | https://github.com/taylorconor/threeboard/blob/master/docume...
         | [1]:
         | https://github.com/zsa/docs/blob/master/ErgoDox%20EZ%20Schem...
         | [2]: https://kandepet.com/dissecting-the-ergodox-the-ergonomic-
         | pr...
        
           | MikeTheGreat wrote:
           | Thank you for sharing the [2] link - I think that's what I'm
           | looking for. I read through the 'big' ideas (like how the
           | keypress matrix works, etc) but I wasn't clear on why there's
           | like 3-6 other ICs / components in the ErgoDox too - stuff
           | like "Why is this resistor here?".
           | 
           | I was thinking of trying to make a keyboard that used a much
           | cheaper CPU (like one of those $1-2 ones from China, or the
           | Pico Pi) and realized that if I swap out that out that I'd
           | have no idea where to put resistors, or why :)
           | 
           | I'm definitely going to look through your stuff too - a 3 key
           | keyboard might be a much easier way to start, actually :)
        
         | cellularmitosis wrote:
         | Search for a 6-key handwired tutorial, like this one:
         | https://medium.com/cracked-the-code/a-complete-guide-to-buil...
         | 
         | The only parts you need are switches, wires, diodes, and a Pro
         | Micro clone from eBay.
         | 
         | I recommend 6-key because they are supported out of the box by
         | QMK and there are plenty of tutorials.
         | 
         | It looks like the tutorial I linked to above doesn't actually
         | explain how the matrix / diodes work, so you'll want to google
         | for an explainer.
         | 
         | Happy hacking!
        
         | arnado wrote:
         | I actually built my first mechanical keyboard hand wired, it
         | helped understand the basics of how it all worked.
         | 
         | I don't remember if it was this exact guide, but I'm pretty
         | sure I was following Matt3o's guide when I did it:
         | https://matt3o.com/hand-wiring-a-custom-keyboard/
         | 
         | edit: it may have actually been this one:
         | https://deskthority.net/viewtopic.php?f=7&t=6050&start=
        
         | jrockway wrote:
         | You don't need a PCB. The Ergodox uses two ICs. One is the
         | microcontroller; it is a mini computer that reads the state of
         | the keys (which ones are pressed right now) and emits the
         | relevant USB messages so your computer interprets those as
         | keystrokes. The other is an i2c i/o expander that reads the
         | keys for the other hand exactly like the microcontroller does.
         | (The microcontroller periodically asks it to scan the matrix on
         | its behalf.) It exists so that only four wires need to span the
         | gap between the two hands, instead of one wire for each row and
         | column. You could, of course, just treat both halves as one
         | keyboard and run the matrix wires between the two sides, and
         | omit the i/o expander. It's basically an optimization for split
         | keyboards. (I have built ergonomic keyboards before, and just
         | make it one big thing instead of two halves. Simpler. But takes
         | up more desk space and is less flexible.)
         | 
         | Each key also has a diode which might look like an IC. This is
         | to prevent "ghosting", where pressing a certain combination of
         | keys looks identical to pressing another combination of keys.
         | The lowest of low-cost keyboards don't include this, because if
         | you only press one key at a time, ghosting can't happen. (Most
         | people don't press more than one key at once, except for
         | modifiers like Shift + letter. They work around this by
         | handling modifiers specifically, often not including them as
         | part of the matrix.) Here's an explanation:
         | https://deskthority.net/wiki/Rollover,_blocking_and_ghosting
         | 
         | The search term you want for building a keyboard without a PCB
         | is "handwiring". Here are some guides:
         | https://geekhack.org/index.php?topic=87689.0
         | https://matt3o.com/hand-wiring-a-custom-keyboard/
         | 
         | I thought I had some better resources in my bookmarks, but I
         | don't.
        
       | couchand wrote:
       | Very interested to see that the simulator is built with simavr, a
       | project I've been hacking around with a lot recently. As I
       | understand it, enabling this kind of application is exactly the
       | vision simavr was built with.
       | 
       | Good work!
        
         | taylorconor wrote:
         | Simavr was fantastic to work with, it's a very impressive
         | project!
        
       | friendlydog wrote:
       | It seems the A key takes the brunt of the typing, did that factor
       | into your design?
        
         | taylorconor wrote:
         | Yes the A key is the most frequently used, as it increments the
         | USB keycode in all layers. An alternative would be a mode that
         | allows setting individual bits in the keycode byte, but that's
         | still quite arduous.
        
       | ljm wrote:
       | I wonder if I can program my novelty Stack Overflow ctrl-v/ctrl-c
       | threeboard to work this way.
        
         | xeromal wrote:
         | haha, I have one too!
        
       | stavros wrote:
       | Here's my 5-key equivalent
       | https://www.stavros.io/posts/keyyyyyyyys/
        
         | gigaflop wrote:
         | Haven't I seen you in ai03's Discord channel? I would have gone
         | by a different name in there (this was from before the name
         | change of the server, I think), but your handle is very
         | familiar.
        
           | stavros wrote:
           | Hmm no, I don't know what that is.
        
       ___________________________________________________________________
       (page generated 2022-01-11 23:01 UTC)