1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Scratch Build – In Progress Open Source Keyboard: ErgoDox GG

Discussion in 'Project Logs' started by ifohancroft, 30 Jan 2020.

  1. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    Hi everyone! It's finally time for my first project log. I hope you find it interesting.

    I have started with mechanical keyboards couple of years ago, moving from keyboard to keyboard, layout to layout until I started wanting an ErgoDox.

    Example ErgoDox:
    [​IMG]
    Picture from https://ergodox-ez.com/products/ergodox-ez-original-standalone?variant=40172496259

    I looked at what's available but I didn't like any of the existing options, so the solution was only one - make my own from scratch.

    I started by writing down what I wanted from an ErgoDox.
    - The switches must be soldered to the PCB as opposed to being hot-swapable.
    - The PCB must support only Cherry MX compatible switches and only the regular ErgoDox layout as I don't like PCBs that support multiple layouts and switch types (I can see how they can be useful in the mass market but I am making a custom keyboard for myself and I know what I like)
    - It must use QMK as its firmware as it gives you tons of options and it's the most popular and widely used open source keyboard firmware.
    - There must be per key RGB backlight for all the keys, not just under some
    - The switch plate mount style must be sandwitch mount, top mount, bottom mount, gasket mount or integrated plate, but I am definitely not going plateless or using a tray mount (You can find out more about that, here: https://thomasbaart.nl/2019/04/07/cheat-sheet-custom-keyboard-mounting-styles/)

    With that knowledge in mind, I had to choose the electronics components. I knew I wanted to use an ARM microcontroller for the higher clock speeds and generally more space available as I wanted to be able to enable all QMK features I want without having to worry about filling up all the space.

    I had to also take into consideration what features QMK supports on which architecture and which components, so I went to QMK's website (https://qmk.fm/) and started digging.

    Ok, so now I knew what my limitations were and my chosen components were as follows:
    - STM32F303xC for the microcontroller
    - IS31FL3737 for the LED driver
    - SMD5050 for the LEDs (might change them later) I decided to go for a package that has separate pins for the red, green and blue as to be able to easily connect them according to the LED driver datasheet example schematic (although I am not sure if I can in-fact connect LEDs in a different package to this LED Driver)
    - the switches didn't really matter as all Cherry MX compatible switches use the same pinout and relatively the same footprint.
    - I knew I definitely wanted USB Type C for both connecting the keyboard to the PC and for connecting the two halves together

    I will post full parts list/bill of materials when the schematic is finish enough and I am about to order it to get printed.

    So I fired up KiCAD and started designing the PCB. Being unable to find all the schematic symbols I needed in a single place, with the schematic symbols not being designed the way I want them and being a bit of a control freak, I started by designing the important things myself, while consulting their datasheets:

    [​IMG] [​IMG]

    The simple symbols such as a 5V or a capacitor, I have reused from the libraries that come with KiCAD.

    So, I started slowly designing the schematic.

    First, I started with the switch matrix:

    [​IMG]

    Then the LED matrix:

    [​IMG]

    Then I slowly, (because I have no idea what I am doing :D and while I went to school for electronics, I am pretty much reteaching myself now and we never did work with microcontrollers and datasheets in school :D) started building the rest of the schematic:

    [​IMG]

    It isn't fully finished yet. I still have to connect the I2C on the microcontroller for the two halves to communicate with one another and also connect the USB receptacle, also fix the wiring of the BOOT0 pin.

    While getting frustrated with the schematic and wanting a break from it, I still wanted to work on the keyboard but I needed a distraction, so I fired up FreeCAD and started working on the case, which unfortunately, I will have to show you, next time.

    Everything was created with Free & Open Source Software:
    - Created on Linux
    - Schematic done in KiCAD
    - Notes taken in the Termite terminal with VIM
    - Screenshots taken with scrot
    - Images cropped with GIMP
    - Case done in FreeCAD
    - Project log written and posted from Firefox.

    I hope you enjoy it.
    Let me know what you think!
     
    Last edited: 7 Mar 2020
  2. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    Starting with the case, I used the ErgoDox preset on http://www.keyboard-layout-editor.com/ as a reference and my notes on switches sizes and spacing calculations.
    I had to go through a couple of revisions of the design process to figure out the best way to do this, but at the end, this is what I ended up doing:

    I started with a rough sketch of the outline of the switch plate and then padded it out to 1.5mm thickness.
    Then I started making the outlines of the holes for the switches, that will later be cutout from the plate, making each switch column on a different sketch, so to not end up with a sketch with too much geometry and constraints that will later takes ages to load, then reusing some columns' geometry in others, to constraints the switch columns' relative position to one another.
    Now, the stabilized keys were a bit of a difficulty at first.
    I know the sizes the regular switch holes need to be, but for the stabilized keys, I went the route of getting the json from http://www.keyboard-layout-editor.com and pasting it into http://builder.swillkb.com/ and using the chosen parameters for my switch type and stabilizer, I generated an SVG that I later started measuring in InkScape. I have then recreated the stabilized keys switch cutouts and made them into a macro so I can easily reproduce them. The problem then was what exactly is their position and how to translate it from http://www.keyboard-layout-editor.com to my CAD design. Playing around I figured that the stabilized keys closer to the middle of the keyboard is sitting right below the right most column when not rotated, and rotated 30 degrees from the corner of the next column going inwards, and I use this information to calculate the distance and angle to constraints my stabilized keys.
    Then the holes were cut from the plate and using the switch columns, the plate was adjusted to match them and leave X extra millimeters to the side for mounting it later to the case:

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
    Jean R built and TerHorstCustoms like this.
  3. Cheapskate

    Cheapskate Insane? or just stupid?

    Joined:
    13 May 2007
    Posts:
    10,778
    Likes Received:
    847
    Awesome. I'm at the point in my life that I shouldn't even look at making a circuit board. I could make a keyboard that bursts into flames.
     
    ifohancroft likes this.
  4. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    Thanks! Haha! That shouldn't stop you. I clearly have no idea what I'm doing and I'm still making one. Mine will probably burst into flames too, in-fact I am taking bets not on whether it will burst into flames but what color will the flames be :D
    Hopefully with help and a couple of revisions, I will have a working one that ideally also doesn't introduce interference and stuff.
     
  5. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    I finally got the time to create an update.

    After a lot of fiddling around and debating different case and plate mounting types I think I finally came up with a case that I like.
    I decided to go with a brushed aluminum in gunmetal with the plate using bottom mount. (The prototype will first be made in plastic).

    I fired up FreeCAD and started going at it.
    Made a separate body and used a shape binder to be able to linked to the plate.
    Created the general shape of the case using the shape of the plate, making it 1mm larger so I can have a lip around it.

    [​IMG]
    [​IMG]
    [​IMG]

    Cut a hole in the case for the plate.

    [​IMG]

    Hollowed it out.

    [​IMG]

    Chamfered the top.

    [​IMG]

    Added a fillet at the bottom.

    [​IMG]

    And the whole thing is pretty much done.

    [​IMG]

    Now I need to finish the PCB, then I will know where the USB ports will be so I can add holes in the case and screw holes as well and I can order the PCBs to be printed, the case to be cut and I can start building.
    There are some surprises/some things I've left out but you will find out about them in either a future update or when the keyboard is done and I am building it.

    Next update would be finishing the PCB schematic and layout.
     
    Jean R built and Cheapskate like this.
  6. DÈF¥âÑt¸.·´¯`¤

    DÈF¥âÑt¸.·´¯`¤ Well-Known Member

    Joined:
    14 Sep 2004
    Posts:
    942
    Likes Received:
    288
    WoW! just wow this is freaking amazing :thumb: the schematic work is really impressive :rock: It's nice to pop back in and see a project like this :grin:
     
    ifohancroft likes this.
  7. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    Thanks so much!
    I am learning as I go to be honest and finding and filling some holes in my electronics knowledge. I have recently learned more things that by my calculations will help me have the schematic finished in the next couple of days. I have a couple more ideas, but they may get implemented in a future revision.

    Btw even though only two people have commented on here, besides me, to have those two people be you and @Cheapskate is seriously motivating and encouraging. I am seriously fan-girling right now :D
    It was about time I started working on something and posted a project of mine on here after getting so much help in the form of information, tips and what not from you two.

    P.S. Welcome back!
     
  8. Jangalit

    Jangalit Member

    Joined:
    28 Feb 2020
    Posts:
    47
    Likes Received:
    12
    nice! I'd like to be able to create these things!
     
    ifohancroft likes this.
  9. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    Thank you! Why not start and learn along the way? It will be frustrating at first but at a certain point everything will just click.
     
  10. Dot_Kappa

    Dot_Kappa 100% Puppet

    Joined:
    23 Mar 2006
    Posts:
    253
    Likes Received:
    27
    Scratchbuild keyboard is quite like to see an Unicorn over here :grin: !

    Thanks for sharing :clap:
     
    ifohancroft likes this.
  11. ifohancroft

    ifohancroft Member

    Joined:
    11 Jul 2018
    Posts:
    43
    Likes Received:
    23
    I am very happy to be that unicorn!
    Thank you! :clap:
     
    Last edited: 8 Mar 2020

Share This Page