Jump to content

eLiXiVy: a 65% mechanical keyboard build log, PCB anatomy and how I open-sourced this project

minibois

While this topic is relatively image heavy, all pictures together are just over 3MB in size.

Table of contents (be sure to use Ctrl+F to navigate through the thread):

Spoiler

[0] Introduction to this project and topic

     [0.1] Why the name ‘mini eLiXiVy’?
[1] The premise and description of this project

     [1.1] Hardware/software
[2.0] Anatomy of a PCB

     [2.1] The layers of a PCB
          [2.1.1] Copper sheet
          [2.1.2] Soldermask
          [2.1.3] Silkscreen
     [2.2] PCB anatomy extras
          [2.2.1] Via
          [2.2.2] Through hole
          [2.2.3] Exposed copper
     [2.3] Steps when creating the PCB
[3] Designing the PCB
     [3.1] The most crowded area
     [3.2] Designing a logo
          [3.2.1] The trouble with exporting
          [3.2.2] Svg2Shenzhen
[4] Assembling the project
     [4.1] Prior experience
     [4.2] Differences
     [4.3] Stabilizers
[5] Open sourcing a project
     [5.1] Choosing a license for your project
          [5.1.1] CERN-OHL versions
     [5.2] Licenses for other documents
     [5.3] The files and documents for an open source project
          [5.3.1] PCB and schematic
          [5.3.2] BOM (Bill of materials)
          [5.3.3] Layout, firmware and assembly guide
          [5.3.4] Assembly Guide
[6] Final Product and Pictures
     [6.1] (Rough) Pricing
     [6.2] Availability of parts
[7] Things I would do differently in the future
     [7.1] Work with hardware limitations, instead of around them
     [7.2] Finishing projects
     [7.3] Importance of revisions
[8] What I learned and a Conclusion
[9] Credits and thank you’s!
[10] (Re)sources / Further reading / Links
[11] Frequently Used Terms
[12] Frequently Asked Questions
[13] License

[14] Changelog

[0] Introduction to this project and topic
Last year I worked on a small 4-key keypad, which I made a thread about a couple months ago. The mini_cardboard project has always been as intended as a prototype and a step towards something larger.

The mini eLiXiVy is the next step. A 65% size mechanical keyboard PCB with the option of using a rotary encoder, built around an existing case and plate design.

605661941_1FullBoard3.thumb.jpeg.4df5654fb0e5cf136c4062598782a3ec.jpeg

This project is open source hardware, licensed under the CERN-OHL-S v2 license and this thread will serve as a build log, a bit of a story behind its development and also as an informative piece on the anatomy of a PCB and some information on open-source hardware (licenses) and what that means in this project.
The source files, full assembly guide and additional information can be found in the repository page: https://github.com/minibois/eLiXiVy

[0.1] Why the name ‘mini eLiXiVy’?
Any project you work on deserves a name!

Similarly to the last project, this name uses 'mini' (the name I generally use online) and a compound name as the second part. While this project started out as ‘mini-65’ (65% being the rough size of the keyboard, relatively to a full size keyboard), later a more creative name was desired.

 

You may have noticed the three capital letters in ‘eLiXiVy’, being LXV. If you know Roman numerals, you know where this is going already. These letters translate to 50, 10 and 5 respectively and because of their order (being highest to lowest), you count them all up to 65, the keyboard size.

After brainstorming for some different words to tie these three letters together, I came up with ‘eLiXiVy’, which is mainly inspired by ‘elixir’. That describes a concoction with magical effects and this project has definitely had a grasp over me and my imagination around it. It’s also somewhat inspired by ‘electrify’/'intensify', partially because it goes with the theme of this being an electric project which intensified my motivation and knowledge in the subject, but more so because I wanted a “Y”/”i” sound at the end of the name.


[1] The premise and description of this project

The mini_cardboard project was done just before this project, as a proof of concept of the chosen hardware while the eLiXiVy takes this concept and made it into a 65% keyboard.

To make this a project achievable by myself, this PCB would be compatible with the KBDFans 65% case and plate. At a late stage in the project, I also decided to implement a rotary encoder, which serves as a volume knob.

 

The eLiXiVy supports the ANSI and ISO standards, in a 65% size. The 65% percentage is relative to a full-size 104-key (100%) keyboard, while the ANSI and ISO refer to the general layout supported by the keyboard. That layout has to do with the type of left Shift and Enter that is supported, which should be well-explained by the image below:

461528842_2layout.thumb.jpeg.7ed96204396f2c0c4ba641aafebd50eb.jpeg

Made using https://kle-render.herokuapp.com/

This project can be described as a 65% open-source mechanical keyboard, with an option for a rotary encoder and it's QMK-compatible. That sounds like a complicated description, but throughout this thread it should become a lot clearer what it's all about.
If anything is unclear, feel free to post with your question(s), but it might be worthwhile to check out [11] Frequently Used Terms and [12] Frequently Asked Questions, which may hold your answer(s) already!


[2.0] Anatomy of a PCB

While in the mini_cardboard thread I talked about the various components that make the keyboard work (such as switches, microcontroller, etc.), in this thread a deeper dive will be taken into the anatomy of the PCB and the order of assembly. The printed circuit board (PCB) is the piece of equipment that holds you the components in place, and connects them in the right way together, through its traces.

Before giving more information on the PCB, it's important to discuss the general anatomy of a PCB first.
[2.1] The layers of a PCB
The word ‘layer’ has two meanings in the context of a PCB. A PCB is made off multiple materials stacked on each other, so 'layer' could mean these individual sheets of material stacked together, but more often the word layer is used to describe the amount of copper layers a board has, because the circuit is made on that copper. Care will be taken to refer to the individual sheets of material as sheets and the amount of copper sheets will be layers.

 

A PCB starts as a sheet of fiberglass (typically FR4), which a sheet of copper is adhered to it. If the copper adhered to one side you have a single-layer PCB and if copper on both sides of the FR4 it’s a double layer board. From there it’s possible to have multiple stacks of FR4 and copper stacked together to create a 4-layer board, 6 layer board, etc.

For the purposes of this explanation, I’ll talk about 2 layer PCB’s. The eLiXiVy is also a 2 layer PCB, so it makes most sense to focus on that.

128284819_3PCBCrossSectionPart.thumb.png.3a734521d615b5efad2c872ef1e5d572.png

A basic cross-section of a 2 layer PCB would look like this. A sheet of FR4, with a sheet of copper on either side.

[2.1.1] Copper sheet
This copper sheet (shown in a gold/yellow color above) is applied to the entire sheet of FR4. By milling away some of this copper, traces are created on the board. Components are soldered to the copper (pads) and are connected to others through a circuit of these traces, according to the PCB design.
[2.1.2] Soldermask
The soldermask sheet goes over the copper. This material is used to shield the different copper nets from each other and it is also repels soldertin, to make sure that soldertin flows only to the pads and doesn’t stick to other parts of the board. You will most often see the soldermask on PCB's in green, both in programs and real life. This is done because:

  • Human eyesight has the largest colorspectrum towards green, making it easier to design and inspect boards in green
  • Soldermask is from a glass basis, which naturally has a green hue (meaning other colors take more effort to create)
  • As a result of the two reasons above, green is the most ordered color, meaning the economy of scale takes place in making it the universal default choice

Other than green, popular choices for soldermask include black, white, blue, yellow and red.

[2.1.3] Silkscreen

Silkscreen is an ink that applied overtop the soldermask* which allows the PCB designer to provide graphics or text on the board for various reasons. Typically this is done to:

  • Show component names
  • Logos
  • Various markings (i.e. diode orientation or ICSP header pins’ purpose)

Typically silkscreen is white, unless a white soldermask is chosen in which case black silkscreen is used.

 

*Many PCB design programs allow you to export the PCB with the soldermask removed where silkscreen is applied. This is done to avoid a 'stack up' of materials.

[2.2] PCB anatomy extras

With a PCB you can only go so far with just traces on one side of the board. A lot of boards are 2 layers of copper or more, which means they have to connect somehow. You might also want screwholes, or expose the copper for a nice look. Let's talkabout those aspect of a PCB. First a diagram of these PCB parts:

766314317_4PCBCrossSection.thumb.jpeg.6217d6b21b026c56ff3a01234c75aaaa.jpeg

Cross section of a PCB, with special elements added

[2.2.1] Via
The purpose of a via is to allow you to connect the top and bottom layers of a PCB together. This is one of the most used elements used in a PCB, as it’s often a necessity to use a via to cross over/under certain traces, or the component you want to connect may be on the other side of the PCB.

Typically you want to avoid having too many vias, as it can give a messy appearance to the board and it may be more difficult to follow the circuit. Certain components - like the crystal oscillator - don't recommend using vias for its connection, but for most components have a via or even multiple will be just fine.

1861722332_5PCBVIAUSE.jpeg.76bb234267ad34cb94384601f60a75c2.jpeg

Example of the use of a via, used to cross these two traces under another trace.

[2.2.2] Through hole
The anatomy of a through hole is similar to a via, though its purpose will be different.
As can be seen in the graphic above, the soldermask extends over the copper of the via, while with a through hole the copper is still exposed.
The purpose of a via is merely to connect one side of the board to the other, the purpose of a through hole will be a screwhole or a place a through hole component can be soldered to. Because this through hole may be soldered to, it’s important to expose the copper so there is something to actually solder to.


When using the through hole as a screwhole or THT mounting point, it may be additionally plated too, to protect the inside of the board and the copper layers. The copper of the through hole may be isolated from the rest of the copper of the board, or deliberately connected to it. When using multiple screwholes, often one will be connected to the copper around it to provide a grounding point. Which is a place electricity can flow through as a type of ‘escape route’ away from the PCB.
[2.2.3] Exposed copper
It’s also possible to not apply this soldermask in some spaces, which is known as “exposed copper”. This is often done to make graphics on the PCB, but may have more practical uses too (such as to give an easy to access place to probe with a multimeter). In this project exposed copper is used on part of the logo:

1818271534_6eLiXiVyLogo.thumb.jpeg.a1a1c54ce48019e6cef336c4751f09f6.jpeg

While the white text is on the silkscreen layer, the gold/yellow color is actually a hole in the soldermask, exposing the copper layer underneath.

[2.3] Steps when creating the PCB

A basic step by step for PCB creation (2 layer, seen from one side) would look like this:

422247703_7PCBCreationSteps.thumb.jpeg.42f4c32ecefd85e091261b0498ce2e8d.jpeg

 

This is what is typically done with 'DIY' or 'at home' solutions. Larger facilities employ a different way of working. They still start with a sheet of FR4 and a layer off copper (or two for a 2-layer board) and then the holes (vias, mounting holes, etc.) are drilled in the board.

The next step is where it really differs from the DIY approach as above. This process is called 'etching' and involves a resistive mask which is printed out and laid over each copper layer. This layer follows the PCB as it has been designed and thus is a resistive layer which goes over top the circuit (what has to remain copper). This will make sure the traces and ground fill(s) will remain, while everything around it can be removed.

This sheet will now be dipped in an alkaline solution, which removes the layer not protected by this resistive film, leaving you only with the copper traces and ground fill(s). Afterwards a layer of soldermask in your desired color (green is a very popular choice for PCB's) is applied to the entire board, to protect it from the outside.

 

While there of course are a lot more steps involved in the creation of a PCB, this explanation should serve as an overview and a step towards possibly learning more about the manufacturing of PCB's, should you be interested.


[3] Designing the PCB
The way I’d describe making a PCB, or more specifically routing all the traces, is that it’s like solving a puzzle that you’re not sure has a solution yet. First you start by placing down everything you can't move around freely (i.e. the different keyswitch locations, screwholes, etc.) and from there the puzzle starts.

The puzzle involves placing the freely movable components around and running the necessary traces between all components. There are dozens of way to place the components, hundreds of ways to route everything together and practically millions of combinations of both. This makes this process like a puzzle with no pre-defined solution, but this is also what makes it my favorite part of the process!

 

Because of the plethora of ways to place/route everything, you can express creativity and a level of organization through your PCB design. Of course it’s possible to just let an ‘auto-router’ do all the dirty work for you, letting it automatically do the routing, but that will often give a messy design and show in your final result.

This part of the process of working on a PCB can take quite a long time, plus the "80/20"-rule certainly applies here too. 80% of the time will be spent on 20% of the actual outcome. How this applies to the routing has to do with basic connections and making it look neat. It's easy to connect everything together, but making it look nice and having the components in the exact right position is what will take the most time to perfect.

 

That part of making it look neat is optional of course, you can just run the traces (or do an auto-route) and that's it. In my opinion, in an open-source project you hold a level of responsibility as a PCB designer to make your design easy to follow and open for adaptations/changes. You could look at your PCB as a one-time design which will never be used again, but another way too look at it is as a design yourself or others may take inspiration from in the future.

Just like when you're cable managing a PC's wires, you are not only making it look better, you're also making it more accessible in the future. While for cable management that means avoiding crossovers between wires and having the wires run in bundles where similar in destination, the same holds true for PCB design.

If you have traces that go towards a similar end-point (i.e. from the microcontroller to the USB connector, or the different rows/columns) you run them together, of course keeping in mind the general guidelines for the different standards (i.e. not running +5V right next do the data-lines).
[3.1] The most crowded area
A keyboard has traces running all over the place. Each keyswitch and diodes need a trace of their own, as well as the different connections on the USB port, etc. Yet undoubtedly the most crowded area on the entire PCB is the area around the microcontroller. The microcontroller becomes the converging point of the PCB, as all rows and columns from the matrix and nearly all USB connections have to meet this component. At the same time, the microcontroller requires a plethora of supporting components, such as capacitors, resistors, etc. which have to be positioned around it.

Needless to say, that area of the PCB will always require the most effort to first route efficiently and also keep neat. While it is always possible to keep tweaking the design bit-by-bit, at some point it’s time to call it a day with a working design.

1159087793_8MCUArea.thumb.jpeg.0ae0889b611fc313104acd9206b1a36e.jpeg

Set to green for easier viewing

Most traces visible here go to the different rows and columns in the keyboard matrix. These are run together, at the same angles to give it a neater look and making it easier to follow where they're going. With an open-source project, I think it’s personally quite important to make sure the traces are run neatly, with no seemingly random angles or vias. This makes the traces easier to follow, making them suitable for adaptations, changes or just generally inspiration, which would be the main points for an open-source project.

 

I am glossing over a lot of detail here, as it took hours upon hours to route everything in the way visible here. Becoming proficient at routing is a level I am not at yet, but this board has given me a lot of practice towards any future PCB project.

Hours of work later this was my final result (well, actually this is rev.1 instead of rev.1a, with minimal changes applied)

PCBView.thumb.jpeg.5596a3a999ce0a80cb611156225f0d6a.jpeg

Low quality output of the PCB, higher quality in the Github repository

 

PCB design is definitely something I can recommend to anyone even somewhat interested in creating things, whether that be mechanical keyboards or something else electronic.
[3.2] Designing a logo
The project has a purpose and a name, but I feel like it deserves a logo of some kind too. At the time of making the mini_cardboard, I made a whole bunch of sketches for a platypus (the best animal) logo and landed on this head-on logo used in that project:

829988585_9cardboard.jpeg.c688ffe995c0800b480c492f9c013a89.jpeg

The logo used on the mini_cardboard

I wasn’t totally happy with that logo, so I went back to the drawing board. After looking at my previous sketches and doing a few more, I landed on an idea I wanted to develop further. After measuring the room I had for the entire logo, I started to work on a design.
[3.2.1] The trouble with exporting
Pictures come in (mainly) two formats, rasterized or vector based. The former is made from pixels with the more pixels the more detail. Vector images are made from mathematical calculations to decide the shapes. While that may sound complicated, it just means that vector images can be scaled indefinitely without losing any quality and can be exported to any pixel size.
This is great for logos where you don’t know what size they will appear at (small on a PCB, large on a webpage, etc.).

 

The issue with images and KiCAD is that KiCAD only supports the import of raster images, which meant I had to export from Inkscape and import to KiCAD. Through these actions, the image usually ended up being too large or too small. Luckily that is when I found the Inkscape extension Svg2Shenzhen.
[3.2.2] Svg2Shenzhen
Svg2Shenzhen is an open-source extension for the vector-based drawing program Inkscape, that allows you to create something in Inkscape and directly export it to a KiCAD file: https://github.com/badgeek/svg2shenzhen. As explained in section [2.1] this PCB consists of two layers, both with different sheets of material.

 

With my mini_cardboard project, the logo was only on the silkscreen section. With this project I wanted to have exposed copper too. Svg2Shenzhen made this extremely easy. I just had to set the right size (in mm*mm) and tell it what layers had to be influenced. In the case of this logo, I wanted to work on the front silkscreen layer and the front soldermask sections (to ‘cut’ part of the soldermask out). That left me with this picture:

1263444809_10eLiXiVyLogo.thumb.png.d8f6d79c7cf7b1a41e5dd8eeca1e058e.png

The exposed copper/open soldermask is shown in orange to visualize the different parts, in actuality it had to be set to black to properly export

With this image, I could export this to KiCAD and have a ready made silkscreen + exposed copper logo:

359056787_11Screenshot2021-08-10141252.thumb.png.8b64463080864c4e6634663cc3129e93.png

How it looked exported to KiCAD, with the white being silkscreen and the gold/copper color being exposed copper.


[4] Assembling the project

PCBBack.thumb.jpeg.3b200df8cdea9e5ae437bb33d4a8262d.jpeg

It was great to receive the boards in the mail! It meant I could hold something in my hand, that I had worked on for the past months.

Assembly of this PCB was very similar to the mini_cardboard, as the eLiXiVy used mostly the same components. The assembly is explained in a lot more detail in the dedicated assembly guide on the Github page, but in short it involved:

  • Soldering the main components to the board, so it’s ready for basic operation
  • Testing between each component
  • Flashing the bootloader and firmware to it, to test it out on my PC
  • Placing the stabilizers in place
  • Soldering in the other components (switches, rotary encoder, etc.)
  • Placing it all in the case

[4.1] Prior experience
Because I’ve already put together two mini_cardboard boards I had some experience with most steps. The first mini_cardboard I assembled was unfortunately not properly tested, meaning the microcontroller got burned out. During the second mini_cardboard assembly I paid much more attention to testing, which I once again did during this assembly.
[4.2] Differences
Most elements in assembly were the same between what I’ve done already and this build, with the main differences being:

  • More components to solder in place (i.e. more switches and diodes)
  • Different components compared to last time (i.e. USB Type C, instead of mini USB)

USB Type C was probably the component to get the most used to. While on paper it’s the same as mini USB, except with some more pins, that brings with it some difficulty in assembly. The pins are recessed more, leaving less space to reach them with the iron and soldertin.

 

Another issue with USB Type C is that the through-hole pins are not as tall as the board is thick, meaning they don’t stick out through like the mini USB port does. Soldering the USB Type C through hole pins only from the bottom is not enough for a port that needs some good endurance. After adding soldertin from the other side of the board too, it had enough stability though.

[4.3] Stabilizers

As I hadn't put together a full mechanical keyboard in the past, stabilizers were something I wasn't very familiar with.

As the name implies, stabilizers stabilize the travel of larger keys - such as Space, Enter and Backspace - as without stabilizers the feel on one part of the keycap would feel different than pressing it in the middle.

A stabilizer consists of a couple parts, namely a wire and a pair of stems and housing. When put together, there is a lot of plastic to plastic and plastic to metal contact which can create a rattle sound and an inconsistent feel. This is why people use lubricants on their stabilizers.

2015266383_11bSTABS.thumb.jpeg.7c2c528feceef849f02557085ae57342.jpeg

Keycap for scale

You will want to apply lubricant to the inside of the housing and the wire, but which type and what amount is very much up to personal preference. As I had not done this before, it definitely took quite a bit of time (and trial and error, of applying lubricant, trying out the stabilizer and adjusting when needed).

 

Assembly took a little over a workday and a half, but I believe it can be done quicker without taking as many pictures as I did and with the knowledge I have now.
I’ll definitely assemble another board and update the time requirement based on that!

More pictures can be found in [6]!


[5] Open sourcing a project
When you make your project open source, you give people the ability to look at and learn from your experiences. There are multiple reasons to do this, such as to further the knowledge in the subject, get criticism on your design(s) or in an attempt to have someone else manufacture your designs should you be unable to do so.

Before you open source your project, you should ask yourself some questions first though.

  • What do you want people to do with your designs? Can they monetize and/or change them?
  • How should the credits be handled? Can people just take your design, or do you require them to credit you?
  • Can people take your designs, adapt them and not make their design open-source?

These are questions you should think about before making your project open-source, but probably the most important question to ask yourself is if you’re okay with people copying your project?

One of the bullet points on the Open Source Hardware Checklist has a perfect way of describing this: 

“Are you emotionally prepared to allow your project to be copied?”
https://www.oshwa.org/wp-content/uploads/2014/08/Open-Source-Hardware-Checklist-1.pdf

After answering the above question - and all further questions in the checklist - it’s possible to apply the Open Source Hardware logo to your project, but also time to consider what sort of license you want to apply to your project.
[5.1] Choosing a license for your project
A license describes the rights and obligations someone has with the source files in your project. There are dozens of different types of licenses, allowing you to choose a license perfect for your project. While it’s possible to write up your own license, it is generally recommended to use an already existing license.

Most of the larger/existing licenses have contributions from dozens if not hundreds of people, meaning there are years of experience with different situations applied in the writing of the license.

 

Another reason it’s recommended to use an existing license is because it ensures someone can easily and quickly get an idea of the type of rights/obligations applicable to your project.

There are websites that help you choose a license best for your project, such as https://choosealicense.com/. This website helps you choose a license, through a couple simple to follow characteristics of the license.


Not all licenses are listed on that website though. One license not mentioned on their website is CERN’s Open Hardware License (CERN-OHL for short): https://ohwr.org/cernohl.

CERN-OHL is specifically targeted towards hardware projects, with its inclusion of hardware specific points, such as warranty (or lack thereof), complete source (including PCB and schematic files) and mentions about providing a complete source to anyone buying a product manufactured based on a CERN-OHL licensed design.

[5.1.1] CERN-OHL v2 versions
CERN-OHL version 2 has three distinct versions, making it suitable for a wide range of projects: https://ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2

Other than CERN-OHL-S - which was chosen for this project, there is also CERN-OHL-W and CERN-OHL-P. The differences between these licenses lies in the way others may use your designs.

  • CERN-OHL-S may be described as the most strict version. It requires anyone who adapts your design to distribute the full source files and requires them to also apply this license to their project.
  • CERN-OHL-W is less strict, not requiring them to fully redistribute the original source files.
  • CERN-OHL-P however is quite open, leaving it open to the person taking the design whether they want to open-source their project or not (and under whatever license they want).

This is a very general overview of the licenses, for much more information you should check out the link above.

For the eLiXiVy project, the CERN-OHL-S v2  license was chosen, as I wanted to allow anyone to make whatever changes they wanted, but also wanted to make sure any adaptations were equally open-source. While rev.1a doesn't have this, rev.1 of the board (the 'full release') has a mention on the board to make people aware of the license used for the board. This is per the guidelines of the license itself.
[5.2] Licenses for other documents
While the PCB and schematic files have the CERN-OHL-S v2 license, this license may not be suitable to all types of files in the project.
This ‘build log’ document and the assembly guide document have been licensed under the Creative Commons Attribution-ShareAlike 4.0 International license (CC BY-SA 4.0 for short).

 

This license allows anyone to share, copy, redistribute, adapt, remix or transform this document, as long as any adaptations are properly crediting the original document and so long as the same CC BY-SA 4.0 license is applied to any adaptations: https://creativecommons.org/licenses/by-sa/4.0/ 

While it may seem tacky or weird to use specific licenses on a project, document or especially a forum post, it does make sure people are aware of what they can and cannot do with the files provided. This removes any ambiguity in sharing, downloading and adapting the given, which is especially important for an open source project.
[5.3] The files and documents for an open source project
When releasing a project to the public it’s important to have the right files and documentation available.
For this project, the files and documentation included were:

  • PCB (source files, image and .PDF)
  • Schematic (source file, image and .PDF)
  • License (project’s license info and full license)
  • BOM (Bill of materials, in website-link, .txt and .xlsx formats)
  • Assembly Guide (.PDF and .docx, the former for reading and the latter for any adaptations)
  • Layout files (.PNG and .JSON)
  • Keyboard’s keymap / Firmware files (.hex and full source)
  • Images (to show the PCB, schematic and final project, to include in the information/README file)

[5.3.1] PCB and schematic
Including these is a given, as they are the main part of the project. These are included in their full source version, so people can view, adapt, change and learn from them. A .PDF is also included, so people can more easily and quickly view the files. The schematic was - after first getting it in a working state - made to properly fit an A4 sheet of paper, for easier viewing and optional printing.

[5.3.2] BOM (Bill of materials)
The BOM describes the components required to build the project, so people know what components are needed to put the project together.
This project includes an online BOM through Octoparts (which shows the pricing and availability at various vendors), as well as a local file in the .txt and .xlxs (Microsoft Excel) formats.

Optional components should be marked on the file, preferably with a mention to a chapter in the assembly guide, so it is clear what is required, what is optional and why it is optional.
Tools can be mentioned on the BOM too, but it was chosen to include these in the assembly guide.
[5.3.3] Layout, firmware and assembly guide

There are a lot of choices that can be made when building a keyboard, which is why it's important to clearly show what the PCB is capable of. To make clear what the PCB is capable of the project should include layout files (in .PNG and .JSON file types) to describe what type layout of switches and other peripherals the PCB can be used with.

In the case of a mechanical keyboard PCB, it describes (with this project's description in parenthesis):

  • The type of switches that can be used (Cherry MX-like)
  • The type of stabilizers that can be used (PCB mount)
  • Whether a plate is required/compatible (Yes)
  • What keyswitch layouts can be used (ISO/ANSI and what type of bottom row configurations)
  • Any other peripherals (a rotary encoder in the top right)

This layout file is accompanied by a firmware file, suitable for the board. In the case where multiple layouts are supported (i.e. ISO and ANSI) multiple files should be included. This layout file can be edited should the default layout not be suitable. This can be done through the QMK Configurator website, as described in the assembly guide.

[5.3.4] Assembly Guide
Of course a PCB and a pile of components don’t make a keyboard. These components have to be installed on the board in the correct way to make it a full project.

The assembly guide not only describes the needed tools and supplies, but also takes care to explain how they are installed on the board. The eLiXiVy project includes a 34 page assembly guide, to explain how it can be installed. Depending on the expected audience, the assembly guide can have different levels of detail. This assembly guide was written with someone in mind who maybe assembled one or two project(s) already and has some familiarity with different soldering techniques (I wouldn't recommend this project for a first-time solder project).

 

A checklist of what components have to be installed in what order is helpful too, so people can take care to make sure everything is installed (including with the right value). Including a warning is helpful too, since it’s never known what level of skill of knowledge the person following the guide is. Soldering brings some inherent risks - especially when using the easier to use leaded solder - which people should be made aware of.

Soldering is essentially melting metal to adhere the component to the PCB, so the iron itself and the solder should be handled with care. The soldertin includes flux too, which helps the soldertin flow to the parts and PCB, but the fumes are not good for your health. When someone takes on the project, they assume all risks for themselves and have to handle it with the level of care they deem appropriate.

 

This included assembly guide has also been licensed under CC BY-SA 4.0, to make it suitable to be adapted by other PCB creators (provided the same license is applied and credit is given to the original).


[6] Final Product and Pictures
Here I will show some pictures of the PCB and final result, which didn't fit anywhere else in the thread.

Spoiler

FullBoard4.thumb.jpeg.b2ebd29ee1801485d9921550c4a66c46.jpeg

Full board

 

PCB.thumb.jpeg.55b18f32168c3095efa1984d75fa0134.jpeg

PCB Front

 

PCBBack.thumb.jpeg.3b200df8cdea9e5ae437bb33d4a8262d.jpeg

PCB Back

[6.1] (Rough) Pricing
The bill of materials can serve to show a rough estimation of the price of the project: https://octopart.com/bom-tool/allQRgda.
It only serves as a rough estimation though, because of a couple reasons:

  • Not all prices included: while many components are fully on Octoparts, some components are not on the website or don't have a price listed
  • Pricing changes: the BOM is not fully comparable in price to what I paid, because some components (especially the microcontroller) have gone up a lot in price
  • Economy of scale: some components are only available in larger quantities, or are cheaper that way. The BOM only includes the price for a singular component. 
  • Variety in options: especially for things like the keyswitches and keycaps the pricing can vary a lot. While I probably spend about €30,- on switches and €30 on keycaps, you can spend double, triple or even more on either.
  • Tools and supplies: there are quite a few tools and supplies required (such as an iron, multimeter, soldertin, flux, etc.) which are not included on the BOM, because there are so many options available. What you have already can greatly influence the price of this project (I personally probably spent about the same on tools and supplies as I did on all the other stuff)

So while the BOM mentions €~134, it’s probably closer to €200,- not including the tools and supplies (which were probably around €250,-). If you were looking to do a project like this to save money over buying a pre-built keyboard, this is definitely not the project for you.

My motivation for this project comes in multiple parts. The most important one was probably my motivation to learn more about what goes into a keyboard and my interest in learning how to solder. Another part of my motivation came from what I can only describe as an enjoyment in designing the keyboard in the PCB software, especially placing the components and even more routing it all together.
[6.2] Availability of parts
Most of you are probably aware of the chip shortage, mostly notable seen in the graphics card market. This has led to extreme pricing and delivery times for these devices.
The chip shortage has had an effect on the components in this project too. This project uses the atmega32u4 microcontroller, which has had difficulty staying in stock the last year. With stock levels at or near zero and lead times of a year or more, that is probably the most difficult component to get your hands on. Fortunately I had already stocked up on this component, meaning my build could go through.

 

A certain morning I made up my cart with my vendor of choice and when I was going to make the order that afternoon one of the components on that list - the ESD chip - was unfortunately not available anymore. I was able to find an equal component, which required no changes to the PCB as a replacement.

Not sure which Reddit community had this as sticky post, but it basically said “Purchase the components before designing the PCB”. That very much holds true now, seeing the lack of availability for certain component ranges.


[7] Things I would do differently in the future
Whenever you’re at the end of a project, there will always be things you wish you had done differently.

Starting a project with the knowledge you have at the end would be the best, but the only way to get the knowledge is through experience in your projects. To me, it’s impossible to finish up a project and not have any regrets about not doing things another way.

Things like a "must have, should have, could have" list for example, detailing what this project absolutely has to have and things I could implement in the future, to not overwhelm myself with feature-creep.
[7.1] Work with hardware limitations, instead of around them
The main thing I’d do differently in the future is work with the physical limitations opposed on the project. At the very start of the project I knew I wanted to use a pre-existing case and plate. It would've been wise to determine the PCB size and location of the screwholes, before doing anything else. Instead, that was a task left towards the end of the project, meaning some pieces of the circuit had to be reworked to make room for these screwholes. These physical limitations make sense to implement right at the start.
[7.2] Finishing projects
One of the most important things to keep in mind when working with a project, is knowing when to say it’s good enough to go forward with it. It is often said “80% of the time is spent on 20% of the project” and that is something I can definitely say is true. The last week or two of this project were just spent on changing the location of some of the traces, while I should’ve called it a day before that. It’s one thing to spend time polishing the design, but it’s another thing to postpone and procrastinate out of nervousness on just calling it a day.
There is also time for a second revision to polish the design, at some point it’s time to make something your first revision and see what to improve later.
[7.3] Importance of revisions
That is where rev.1a of this project came in. The name means it's the first alpha revision of the PCB (alpha as in not a beta/full release yet). This rev.1a is the PCB I assembled and typed this thread on. As said above, you’ll always find things to improve or change later, but you’ll never find these things to change if you don’t get a hands-on experience with the PCB (and/or share it with others). Things generally went pretty smooth during assembly. The only things I found out to not work well was the location of the diode for the spacebar and backspace for equal reasons.
The diode (when installed on the front of the board) was interfering with the stabilizer’s wire. The fix in this case was installing the (through-hole) diode on the back and cutting its legs as short as possible.

 

rev.1 tackled this oversight by moving the backspace diode down and the spacebar diode to the side of the spacebar keyswitch:

1856988816_12BA_Diodes.thumb.jpeg.ef9344f34cbadad42a022a617b15c1a7.jpeg
Another change made was to the ICSP header, which is the header that allows you to burn a bootloader to the atmega32u4 chip. In rev.1 it has been flipped horizontally, meaning it now follows the default pinout:

962333251_13BA_ICSP.thumb.jpeg.b40099b587db949a201e93e04639b2fe.jpeg

Notice the silkscreen markings are mirrored


Off-topic: the common abbreviations for ‘version’ and ‘revision’ and ‘ver’ and ‘rev’ respectively. Abbreviations that are opposite in writing, yet equal in meaning.


[8] What I learned and a Conclusion
This project has taught me a lot of things. While the previous project was me getting to know KiCAD, basic keyboard concepts and doubts about the circuitry, this project has given me a lot more confidence and knowledge about KiCAD and given me a better grasp on the different components that go into a keyboard (and other electronics).

 

The change from mini USB to USB Type C was a tough one. Mini USB only has 5 SMD pins (1 of which goes unused), while USB Type C has 12 (2 of which go unused). It still deals with the same +5V, GND, D+ and D- concept, yet with double the pins for all of these (to allow a USB Type C cable to be plugged in both ways). Plus, there are also the CC pins that have to be accounted for, so the device is fully compatible with the USB IF’s specification of USB Type C.

 

While working on the mini_cardboard, a 65% keyboard was the end-goal I had in mind, but after working on both projects it definitely has given me a lot more ideas, motivation and aspirations for more. 

This is my second custom PCB project, but definitely not my last project, by far not!


[9] Credits and thank you’s!
ai03’s PCB guide served as an invaluable source of information for the mini_cardboard and still served as the basis for the eLiXiVy: https://wiki.ai03.com/books/pcb-design/page/pcb-guide-part-1---preparations
Just like with my previous thread, I want to thank Eschew’s Introduction to Custom Mechanical Keyboards for the inspiration for the chapter codes: https://linustechtips.com/topic/1214368-an-introduction-to-custom-mechanical-keyboards/

Thanks 🍑 for answering even the silliest of my questions and for all the support along the way

Thanks to all the contributors and volunteers over at qmk_firmware and qmk_configurator for helping me along with getting this board in the qmk project/configurator!

Thank you for reading this topic 🙂 Any (constructive) criticism on the project or this topic is highly appreciated
[10] (Re)sources / Further reading / Links

Spoiler

Guides:

My previous thread on my 4-key keypad, mini_cardboard: https://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/ 

Keyboard Matrix: 

http://blog.komar.be/how-to-make-a-keyboard-the-matrix/

https://beta.docs.qmk.fm/developing-qmk/for-a-deeper-understanding/how_a_matrix_works

https://www.dribin.org/dave/keyboard/one_html/ (this was the one that finally made me understand it)

 

Software used:
KiCAD (the recommend 5.1.4 version): https://kicad-downloads.s3.cern.ch/index.html?prefix=windows/stable/ (Windows) / https://kicad-downloads.s3.cern.ch/index.html?prefix=osx/stable/ (MacOS)
Inkscape: https://inkscape.org/ (for most graphics you saw in this topic)
Svg2Shenzhen: https://github.com/badgeek/svg2shenzhen (extension for Inkscape, to make the PCB graphic)

Sublime text: https://www.sublimetext.com/ (to make the various text files, i.e. the .txt, .json and .md files)
Gimp: https://www.gimp.org/ (to edit the photos)
*Insert a link to your favorite Git client here*: I used GitHub, but everyone has their own preference.

 

Misc. links:
Keyboard layout editor: http://www.keyboard-layout-editor.com/
KLE-Render: https://kle-render.herokuapp.com/
KLE Blender Render: https://github.com/Kirpal/Keyboard-Layout-Editor-for-Blender
Arduino ISP guide: https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP

[11] Frequently Used Terms

Spoiler

Microcontroller:
MCU: Microcontroller Unit. See it as a microprocessor, with a few more components (such as memory) to make it a full computer. In this project it will refer to the ATmega32U4.
Arduino: The company behind the ATmega MCU powered microcontroller boards, such as the Arduino UNO.
Bootloader: A small piece of the MCU’s memory, which allows the user to load firmware via USB. See this as the BIOS of the MCU.
Firmware: A program on the MCU that allows it to function as a device.
Flashing [the firmware/bootloader]: The process of installing either to the MCU.
ICSP: In-Circuit Serial Programmer (header). A way to program an MCU that is soldered onto a PCB.
I/O: The Input/Output lines of an MCU
 

Mechanical keyboard components/concepts:
Keyswitch: a component that can be pressed down to connect two pieces of metal together, which in turn can be used to detect a keypress
Cherry MX: The largest/most well-known manufacturer within mechanical keyswitches. 
Cherry MX-like: Keyswitches with a design based on Cherry MX switches, because of Cherry’s expired patent on keyswitches. Includes companies like Kailh, Gateron and much more. PCB’s and keycaps typically advertise compatibility with “MX-Like” switches, so indicate it works with all of those.
Stabilizer: Larger keys (Backspace, Left Shift, Enter and Spacebar) have a stabilizing wire attached, so pressing anywhere on the key feels the same
Matrix: A process of efficiently using the I/O lines of an MCU, by using rows/columns to detect keypresses. See “The Keyboard Matrix” for more info.
QMK: One of the most well-known open-source keyboard firmwares.
ANSI/ISO: general keyboard layouts. ISO layout has an upside-down L Enter key, ANSI layout has a horizontal Enter. See section [1.1].
 

Electronics:
PCB: Printed Circuit Board. A board made from fiberglass, with its purpose in a keyboard being to hold the components in place and connecting them together with traces (wires on a PCB)
Ground: The ‘return’ part of electricity, such as Anti-static discharges.
Diodes: An electrical component that allows power to flow one way, but not another. Used in the keyboard matrix, see “The Matrix Addition: The Diode” in my mini_cardboard thread for more info.
THT: Through Hole Technology components have long legs that stick through a PCB and get soldered to a plate through hole to the board. These components include the switches, header pins and diodes.
SMT: Surface Mount Technology uses pads on the board to solder SMD (Surface Mount Device) components in place. SMD components can be smaller than THT components and because they don’t stick through the board, it’s possible to design a PCB with SMD components on both sides.
 

Soldering:
Soldering: The process of joining two components together (like the PCB and component) with soldering tin
Soldering iron: A tool to heat up the two components, to make the soldering tin flow between them
Soldering station: A device that includes a soldering iron, but also has a base station which allows you to change the temperature of the iron.
Solder(tin): a metal (combination) used to melt between the components you want to solder together. Typically consists of Sn (tin) and Pb (lead) in a 60/40 ratio. Lead free options typically include - other than tin - metal like Ag (silver), Cu (copper), etc. 
Lead-free/leaded solder: Leaded solder is easier to work with, because of its lower melting temperature, but additional safety precautions need to be taken and it may be more difficult to get.
Flux: A substance used to make soldertin flow better to the pads and flow away from the rest of the PCB.
Desoldering braid/wick: A braid from copper strands with flux in it, used to wick away soldertin. Used in drag-soldering too.
Drag soldering: A popular method to install a chip with a lot of pins, like the MCU. Place a lot of tin over the legs/pads and wick it away.
IPA: Isopropyl alcohol, a cleaning agent to clean off the flux from the board.

[12] Frequently Asked Questions
Feel free to ask questions, but consider checking if your question has been covered in this section already.

Spoiler

Q: Why didn’t you just use an Arduino Pro Micro/Teensy/whatever other Microcontroller board?
A: Through the mini_cardboard project I determined using a bare atmega microcontroller was viable, plus I preferred the challenge. It also proved to provide a neater design in my opinion. Nothing against a Pro Micro/Teensy/etc. design though!

 

Q: Why didn't you just buy a (hotswap) keyboard?

A: While this is of course my current new keyboard, it also represented a hobby project to create this PCB. See the last part of section [6.1] for more info.

 

Q: I can’t make this project because I don’t have a <soldering iron / have the skills to use an iron / know how to design a PCB / etc.>
A: Me neither, before my previous project. That's the beauty with skills, you can hone them through (the right type of) practice. Equipment is just something you have to see as an investment. Plus, it's also possible to order a PCB with assembly included or using a Pro Micro (or similar) microcontroller, which drastically lowers the assembly and design difficulty.

 

Q: Why the name “eLiXiVy”?
A: Please see section [0.1]

 

Q: What program(s) did you use?
A: Please see "Software used:" in section [10]

 

Q: What is QMK?

A: A popular open source firmware for keyboards. The firmware is sort of like the operating system of your keyboard, as handles the press of your keyboard and sends the right commands to your PC as a letter pressed.

[13] License
While it may look tacky or silly to have a license on a forum topic, I’ve decided to apply a license to each part of this project, to provide clarity on how each part may be used, adapted or shared.

 

This thread - much like the assembly guide - is licensed under the Creative Commons Attribution-ShareAlike 4.0 license (CC BY-SA 4.0).

The short explanation of this license can be found here: https://creativecommons.org/licenses/by-sa/4.0/ 

and the full license can be found here: https://creativecommons.org/licenses/by-sa/4.0/legalcode

Under this license, you are permitted to share and adapt this content how you see fit, provided you credit this guide and use the same license (CC BY-SA 4.0).

 

[14] Changelog

Spoiler

Dates are in ISO 8601 format.

 

2021-08-19: Thread was created.

2021-10-13: Updated [2.3] to better reflect reality.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Love the volume wheel, great work!

Big nerd. 

 

 PCPartPicker List Link

Spoiler

Ryzen 5 1400, Deepcool Gammaxx 400 V2 Blue, Biostar B450MH, Timetec 2x8GB 3200MHz CL16, Adata SU650 240GB, WD Blue 250GB 7200RPM, Seagate Barracuda 320GB 7200RPM, MSI Aero GTX 1060 3GB, Cougar MG130G, Segotep 750W Fully Modular 80+ Gold, HP 22EB, Samsung S22E450D, Sceptre E205-W, Gamakay LK67 with Gat Reds and HK Gaming Chalk keycaps, Logitech G305 Lightspeed, Shure MV7, Gertisan Mic Arm, OneOdio Headphones, CM SickleFlow Blue Fan, Iceberg Thermal IceGALE 140MM Teal x2, Cougar case fan

Rack Project (Build log link)

Spoiler

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, davemc said:

Love the volume wheel, great work!

Thank you!

Someone mentioned a volume wheel when I was at the very end of making the PCB and I was like "yea.. I should totally add that" and just did!

Later I talked with a friend about this project and he casually mentioned "you don't know you need a volume wheel until you've used one" and after about three weeks of using this board I can definitely agree!

46 minutes ago, James Evens said:

First of all love it. 

 

If you ever make an rev. 2 move R2 and R3 as close as possible to the µC pins. Also be careful with long distance USB traces on 2 layer PCBs as the impedance is totally out of spec. Often it is good enough but there are also some reports diy of keyboards which went for this trap.

Thanks for the kind words an information!

The location of R2 and R3 - whether they should be closer to the USB port or MCU - was something I just couldn't find any info on, good to know it is suppose to be closer to the MCU for the future.

As for the length of the traces, I understand it's not preferable, but thus far it has worked for me. What sort of reports have you heard from regarding the effects of USB traces like this? I could look out for such event possibly.

 

I'll probably go for a rev.1.1 in the near future, but might consider a rev.2 as well where I change the location of the MCU, we'll see what the future holds ^^

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

Hi @minibois  I'm thinking into building this keyboard to code developing and call of duty gaming at night 😄. Do you think Is it worth it?

 

My requirements are:

- qmk

- opensource hardware

 

Thank you

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, frikizeta said:

Hi @minibois  I'm thinking into building this keyboard to code developing and call of duty gaming at night 😄. Do you think Is it worth it?

My requirements are:

- qmk

- opensource hardware

 

Thank you

As the designer of this board, my opinion will of course be biased, but on the other hand I have used it for a good couple months now, so I think I can still consider it from an objective perspective.

It fits the requirements you have set, as it's compatible with QMK (https://config.qmk.fm/#/mini_elixivy/LAYOUT_65_ansi) and definitely is open source too 🙂 (under CERN-OHL-S v2, more info on that in [5.1] and [5.1.1])

 

Furthmore it's a 65% board, with support for ISO and ANSI, plus an option to install a rotary encoder, all layouts are described in the image in [1]. That makes it quite a feature rich board. The many three things missing would be: LEDs of any kind (whether it be underglow or per key LEDs), wireless functionality and hotswap functionality. Those are things you can care about, or not. Just depends on your personal preference.

For me it has definitely been a great board to use, as the transition from TKL to 65% has gone rather well. The rotary encoder is also another great function to have. I previously had it mapped to volume up/down, which I think most people would have too. Although since making this board, I've gotten a new mouse with an additional scrollwheel on the side. I now use that scrollwheel for volume up/down and remapped my keyboard's rotary encoder to Ctrl+(Shift+)Tab, which switches tabs in Google Chrome (without Shift it goes left to right, with Shift vice versa).

 

Of course it's not all rose colored though, as assembly can be quite difficult if you're not accustomed to tiny TQFP soldering, the assembly guide on the Github goes in much more detail about assembly.

Speaking off assembly though, some of the parts in this build are difficult to get your hands on at the moment, specifically the microcontroller (atmega32u4). You may be aware of the global chip shortage, which has very much affected the microcontroller market too. The atmega32u4 seems to be out of stock at basically every store and PCB assembly service.

 

Something like a Pro Micro/Elite C based keyboard - microcontroller boards which also use the atmega32u4 microcontroller - may be a lot easier to get your hands on at the moment.

 

So in short, I have definitely enjoyed using this keyboard and can certainly recommend it, but do consider the assembly and getting the parts too (plus, most PCB manufacturers sell the PCB's per five pieces).

 

If you have any additional questions, I'd be happy to help out!

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×