Close
0%
0%

Flatreus Keyboard

Atreus, just flat.

Similar projects worth following

Atreus is a very nice design for a single-piece, portable split-layout keyboard, but I need it to be low-profile. So instead of waiting for someone to do it, I guess I will have to do it myself.

flatreus-v2.fzz

Fritzing design

x-fritzing-fzz - 402.39 kB - 10/23/2020 at 20:20

Download

flatreus-v2.zip

Gerbers

Zip Archive - 958.25 kB - 10/23/2020 at 20:20

Download

  • 1 × ATSAMD21E18A-MU
  • 1 × AP2112K-3.3TRG1
  • 2 × 1µF 0604 capacitor
  • 44 × Diode
  • 44 × Kailh Choc Switch

View all 11 components

  • Original Layout

    deʃhipu5 days ago 0 comments

    Now that I have the project tested and working, I added the gerbers and Fritzing design to the files, so that other can also build it. It uses the bootloader and CircuitPython firmware for #Fluff M0, and I added an example with the original Atreus layout to the ukeeb library: https://github.com/deshipu/ukeeb/blob/main/examples/flatreus.py

    Here's that layout, taken from the Atreus kickstarter page. Of course you can easily modify it for your own tastes.

  • Done

    deʃhipu6 days ago 0 comments

    The first batch of switches just arrived, and this is the smallest of the keyboards I'm making, so it goes first. There were no surprises, I guess practice makes a master. The keyboards works just as expected:

    I had to put some plastic caps on the tact switches for the mouse buttons, to make them the same height as the keys, so they can be pressed easily. Sadly, the tact switches I used have pretty large actuation force, so they don't feel that great.

    I'm still experimenting with different layouts for this keyboard. I didn't like the original one, so I came up with something more plancky:

    I will probably get rid of the arrows on the default layer at some point. Still getting used to the thumb keys.

  • Mouse Emulation

    deʃhipu10/21/2020 at 18:22 0 comments

    I've got the boards, I have them assembled, all I am still waiting for are the switches, which are already in customs. With the board assembled, I have the joystick working, so I can as well write the code for that.

    For now, just for testing, I wrote this short program just to see how well it would work:

    import board
    import analogio
    import digitalio
    import usb_hid
    
    mx = analogio.AnalogIn(board.A6)
    my = analogio.AnalogIn(board.A2)
    lmb = digitalio.DigitalInOut(board.A1)
    lmb.switch_to_input(pull = digitalio.Pull.UP)
    rmb = digitalio.DigitalInOut(board.A5)
    rmb.switch_to_input(pull = digitalio.Pull.UP)
    
    for device in usb_hid.devices:
        if device.usage == 0x02 and device.usage_page == 0x01:
            break
    else:
        raise RuntimeError("no HID mouse device")
    
    report = bytearray(4)
    last_empty = False
    while True:
        x = mx.value - 0x7fff + 2500
        y = 0x7fff - my.value - 500
        report[0] = ((not lmb.value) << 0) | ((not rmb.value) << 1)
        if abs(x) + abs(y) > 4500:
            report[1] = min(max(-127, x >> 11), 127) & 0xff
            report[2] = min(max(-127, y >> 11), 127) & 0xff
        else:
            report[2] = 0
            report[1] = 0
        if report[0] or report[1] or report[2]:
            last_empty = False
            device.send_report(report)
        elif not last_empty:
            last_empty = True
            device.send_report(report)

    It's very simple, almost self-explanatory. The only thing that complicates it is the addition of a "dead zone" — an area around the center where the mouse doesn't move at all. Without it the cursor would be always slowly drifting one way or another, which would be pretty annoying.

    Unfortunately, the way I implemented the dead zone here is not very good, because it forces you to move the mouse cursor with a certain minimal speed — below that speed the cursor won't move at all. A better solution would be to count the speed starting from the edge of the dead zone, but that is more math than I am ready for at the moment, as it would involve proportions. The horror.

     In any case, it seems to be working reasonably well, despite flooding USB with mouse events. I might also need to deal with that at some point — there is a lot of opportunity for tweaks here, including fancy stuff like logarithmic sensitivity.

  • DPI, How Does It Work?

    deʃhipu10/01/2020 at 19:44 0 comments

    After looking at the PCBs for #Turbot Keyboard a little bit closer, taking some measurements, and then checking the gerbers and the design I realized that I have made a horrible mistake. That keyboard is almost 10% larger than intended! And then I checked the designs for Flatreus, and they have the same problem. No wonder there seemed to be so much room.

    Turns out that I have recently upgraded Inkscape and it has changed the default DPI it uses to calculate units. Fritzing assumes the old DPI, so all PCB outlines I imported were bigger than designed. And then I placed all components within the outline, proportionally spaced. Of course for something like a keyboard this won't work. So I had to basically re-do the Atreus PCB from scratch.

    It's more tightly packed now, of course. Also, the chip is no longer at a 45° angle, as there is no room for that. On the other hand, I re-arranged the pins a bit and added two more LEDs, for debugging and status. There is still a joystick and two tact buttons for mouse emulation.

    I think this is good enough for now, so I have ordered that PCB.

  • Joystick

    deʃhipu09/30/2020 at 22:00 0 comments

    There is a conveniently large empty area smack in the middle of this PCB, and it makes me have ideas. The most obvious one is to put a display there — then not only I can see any messages or exceptions from the CircuitPython code running on it, but I can also display things. Or, like, have menus and settings. A library of Unicode characters and emoticons. Fancy animations. Sky is the limit. But then I would probably also want an external flash storage and a SAMD51 microcontroller with more memory, so I guess I will not do that.

    Another thing I could put there is something that would let me not have to take my hand off the keyboard to move the mouse. A trackball, for example. Or a touchpad. Or, you know, one of those cheap tiny joysticks they use in handheld consoles. That seems like a reasonable idea, and I can always simply not populate those footprints if I change my mind.

    I also added a pair of tact switches on both sides, for the mouse buttons. Still tempted to add an encoder wheel with a third button, but I only have the kind that is mounted flat on the edge of the PCB, and that doesn't work with this design.

    I'm still considering adding a few LEDs on the free pins, for things like CapsLock or layer switching indicators.

    I'm also closer to actually ordering the board and the switches, especially with the utter failure of the #Turbot Keyboard project, since that means I actually *need* this keyboard.

  • Down the Rabbit Hole

    deʃhipu09/27/2020 at 14:35 0 comments

    I usually get an urge to buy or make a new keyboard around this time of the year, but it usually ends in disappointment, as I have very specific requirements for my keyboards: they have to be low-profile, no wobbly keys, ins in del in proper places, preferably tenkeyless, etc. Making them is easier than finding ready ones, but my last attempt with #Flounder Keyboard didn't work that well due to too much experimenting on my side, and I went back to my current best hv-kb390l.

    But this year I decided to experiment with sub-40% keyboards, just because they are cheaper to make than full-size ones, due to small number of keys, and after making #Dorsch 40k Keyboard I was surprised how comfortable they are! That was a bit too small, though, so I upgraded it to #Dorsch 48k Keyboard and that's what I'm using right now. For the first time in my life I'm properly typing with all fingers on on the home row, and I enjoy it a lot! Thinking about how it could be improved further, I decided that splitting it, to put the hands further apart is a good idea, however, I want to keep it in one piece.

    I did experiment a bit with a minimal keyboard back when I assembled the #5plit Keyboard Clone, but the default layout that this keyboard had didn't resonate with me, and also having the two halves separate doesn't work so well for me, as they tend to wander all over my desk, and then I have problems finding the right hand one after moving my mouse.

    So the next steps on my keyboard journey are in two directions: first, I decided to scavenge the failed #Flounder Keyboard for switches and re-build it as an ergonomic #Turbot Keyboard — that project is already ongoing, and I'm waiting for the PCB for it. I'm not sure it will be usable, as I'm not a big fan of those switches, and being that flat doesn't necessarily work for such a large keyboard. We will see. So, at the same time, I'm also designing a flat Atreus, which is basically what I'm using right now with the Dorsch 48k, but ergonomic and with more keys for the thumbs.

    This project will probably take a little bit longer, since I don't have the switches for it, and I don't want to make another order just yet. I might scavenge the #Dorsch 40k Keyboard for it in the end, but I would rather not. So I will design the PCB and let it sit for a bit — this way there is also a chance that the design can be improved with what I learned from the Turbot.

    A quick take on the PCB looks like this:

    I posted it on Mastodon, but then the original author of Atreus chimed in, and told me they improved the design by adding two more thumb keys. So I followed their advice and updated the design:

    I'm mostly happy with it (found a couple of mistakes since making this render, but it's mostly the same), and I think I will go with it in the end, but I will give it some more time to sit there and ripen.

    And yes, it does look a little bit like a bat, so maybe it fits the Halloween theme.

View all 6 project logs

Enjoy this project?

Share

Discussions

danjovic wrote 10/01/2020 at 19:07 point

Cool! It looks like a Space Invader character!

  Are you sure? yes | no

deʃhipu wrote 10/01/2020 at 19:31 point

Or a batarang.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates