# Braindump

Here lies a braindump of everything useful I've picked up over the years. Will add more as I think of stuff

### The REALLY good stuff:
- Most DIY Keyboards are at least partially open source. You can go to their repositories onq github and copy their tolerances

- Use [The Keyboard Atelier's discord](https://kbatelier.org/). Insanely useful resource to work with.

- You can export your KiCad PCB designs as a PDF and print them on paper to get a sense of scale.

### The good stuff
- Most keyboards are wired in a matrix instead of directly to the microcontroller to be more efficient with pins. [This QMK page](https://docs.qmk.fm/how_a_matrix_works) has a really good explanation.
    - If you have < 5 switches, avoid the matrix and just wire directly to the microcontroller

- Use heatset inserts for your case. Way easier.
    - use a 4.7mm hole for the insert
    - use a 3.4mm hole for the screw length
    - I use [these](https://www.aliexpress.us/item/2255800046543591.html) ones made for 3D printed parts, picked it up from the VORONDesign sourcing guide.

### Useful links
#### General info
- For designing your case, read this page on [keyboard mount styles](https://www.keyboard.university/200-courses/keyboard-mounting-styles-4lpp7)
- Generate your plates with [KLE (Keyboard layout editor)](https://www.keyboard-layout-editor.com/) and [ai03's plate generator](https://kbplate.ai03.com/)

#### 3D Models
- Keycaps: https://github.com/hineybush/CherryMX
- Keyswitches: https://grabcad.com/library/cherry-mx-switches-mx-1
- Stabilizers: https://grabcad.com/library/cherry-mx-stabilizer-mx-1

#### KiCad Footprints:
- General: https://github.com/ai03-2725/MX_V2
- Rotary Encoder (EC11) https://kicad.github.io/footprints/Rotary_Encoder


### Personal tips for adding parts

**Custom Designs**
- Adding graphics in KiCad is really annoying. Instead, you can use Figma to design an overlay, and then simply put that on your PCB at the end.

**Rotary Encoders**:
- Use the Rotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm footprint in KiCad. These are clickable EC11's, which is what you'll find 90% of the time.
- [This](https://europe1.discourse-cdn.com/arduino/original/4X/d/4/6/d4660aa66768f23a3dece96d1ba2be53300ff1e4.png) image shows you how to wire it. The order of A and B does not matter, you can define it in firmware. [QMK ref](https://docs.qmk.fm/features/encoders)

**Screens**:
- Use generic i2c OLEDs
- For footprints, just use a 4-pin header

**Other**: \
Ask me on slack @alexren!

### Misc stuff

- Software I use // recommend:
    - CAD: Fusion360, Onshape
    - PCB Design: KiCad. Hands down.
    - Firmware: VSCode, but really doesn't matter
- Sketch out your design before making it. Helps a ton with being clear on what to do

- Instead of using Kailh hotswap sockets, you can use millmax ones instead. They fit directly into regular Cherry MX switch footprints, and they actually work pretty well! I can do them for you. Example https://mech.land/products/mill-max-sockets