From e914d68c2da5c42fd256f8ed39fcf5d0711256c3 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Wed, 21 Jun 2023 00:59:04 +0200 Subject: [PATCH] start writing build guide --- .editorconfig | 21 ++++ Makefile | 2 +- guide.html | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++ js/main.js | 32 +++++ 4 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 guide.html diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..dd4f36d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[{*.js,package.json}] +charset = utf-8 +indent_style = space +indent_size = 2 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + diff --git a/Makefile b/Makefile index c57ed58..cea3b83 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ build: clean deps cp -r ./css ./public/ cp -r ./js ./public/ cp -r ./img ./public/ - cp ./index.html ./public/ + cp ./guide.html ./index.html ./public/ clean: rm -rf ./public diff --git a/guide.html b/guide.html new file mode 100644 index 0000000..95242bc --- /dev/null +++ b/guide.html @@ -0,0 +1,330 @@ + + + + + + + + mkbd65 - by XenGi + + + + + + + + + + + + +
+
+
+
+ +
+

WIP: mkbd65 build guide v1.0 alpha

+

This is the official build guide for the mkbd65 mobile keyboard addon for modern smartphones.

+
+
+
+ +
+
+

1. Prerequisites

+
+

Before you begin, here is a list of all things you will need during the build process. There is also a list + of optional components that will make your life easier but are not absolutely neccessary.

+

What you need:

+
    +
  • + 3D printer: A 0.25mm nozzle is strongly suggested for best results
    • If you don't have a 3D printer + and also no friend with a 3D printer and there also no hackspace + nearby, you can order the prints online
    +
  • +
  • Soldering iron: Any decent iron will do
  • +
  • OpenSCAD: A powerful CAD software which will be used to create the + 3D files for the case and key mat
  • +
+

Optional requirements

+
    +
  • Reflow oven (works better then soldering by hand)
  • +
  • KiCAD: A PCB CAD software which you can use to order the PCB and + flex cable. Gerber files from GitLab should be enough for most PCB fabs.
  • +
+
+
+
+ +
+
+

2. Buy all the things

+ +
+

This section lists all things you need to buy before you can put together a mkbd65.

+ +

Main PCB

+

The main PCB is the same for all phones. The only thing that changes is the case and the flex cable that + connects the PCB to your phone. To order the PCB you can either use the Gerber files from GitLab releases or + open the project in KiCAD and upload from there.

+ +

Order with Gerber files from JLCPCB (China)

+

+
    +
  1. Download the gerber.zip file from the latest release from GitLab
  2. +
  3. Go to JLCPCB and upload the gerber.zip file
  4. +
  5. Set the PCB Thickness to 1.6mm
  6. +
  7. You can choose whatever color you like
  8. +
  9. As Surface Finish you can choose ENIG if you like, it's more expensive but easier to solder and lead free
  10. +
  11. You can use the PCB assembly service from JLCPCB if you don't want to assemble the PCB yourself
  12. +
  13. If you want to assemble the PCB yourself with a reflow oven, don't forget to buy a stencil!
  14. +
+

5 PCBs (which is the minimum order size) with HASL finish and a stencil will cost you around 15€. If you choose ENIG finish the price go be + around 30€. Assembly without compoents factored in will be around 35€.

+ +

Order from directly with KiCAD from Aisler (Europe)

+

+
    +
  1. Clone the git repo from GitLab +
  2. Open the project with KiCAD
  3. +
  4. If not already done open the Plugin and Content Manager
  5. +
  6. Install the AISLER Push for KiCad plugin from the Plugins tab and click Apply Pending Changes
  7. +
  8. Open the PCB Editor and click the Push layout to AISLER button in the top right
  9. +
  10. On the website that should open, you can go to the BOM tab and assign the components, if you want Aisler + to assemble the PCBs for you
  11. +
  12. On the checkout tab, choose "Beautiful Boards HD" if you want to assemble the boards yourself or "Amazing Assembly" if you want Aisler to do the assembly
  13. +
  14. If you want to assemble the PCB yourself with a reflow oven, don't forget to order a "Stellar Stencil"
  15. +
+

3 PCBs (which is the minimum order size) with ENIG finish and a stencil will cost you around 60€. Assembly + will cost you more then 100€, so I wouldn't recommend it. It is far too expensive. Better source the + components at Mouser or Digikey and + assemble the PCB yourself. Don't forget the stencil if you want to use a reflow oven!

+ +

Flex cable

+

Similar to the main PCB, the flex cable need to be bought at a PCB fab. The lenght of the cable depends on + the size of you phone.

+ +

JS that calculates hwat flex cable you need here

+ +
+
+
+ +
+
+
+
+

+ +

+

+ mm +

+
+

Long side of the phone

+
+
+
+ +
+
+ +
+
+
+
+

+ +

+

+ mm +

+
+

Short side of the phone

+
+
+
+ +
+ +
+
+ +
+
+
+
+

+ +

+

+ mm +

+
+
+
+
+ +
+
+
+ +
+
+
+ +

Case

+

The case is 3D printed and consists of multiple parts. You can choose whatever color you like. As material + PLA is the recommended choice but others like ABS or PETG would work aswell. Feel free to experiment and share + you're results in the community chat.

+ +
+
+
+ +
+
+

3. Printing components

+ +
+

Bottom case

+

+ +

Top case

+

+ +

Key mat

+

The keyboard has a 3D printed layer which sits on top of the PCB. This 3D print is a bit more tricky + becasue it involves a material change. Near the stop the print will stop and you have to replace the filamaent + with a different color. This is done so the labels on the keys have a different color then the rest and are + visible. If you din't need visible labels you can skip this step and print the key mat in one go.

+ +
    +
  1. Clone the git repo with the files for the case: gitlab.com/mkbd65/cad
  2. +
  3. Design your key mat or use an existing one
  4. +
  5. slicer
  6. +
  7. print
  8. +
+
+
+
+ +
+
+

4. Assembling the electronics

+ +
+ tba +
+
+
+ +
+
+

5. Building the case

+ +
+ tba +
+
+
+ +
+
+

6. Put everything together

+ +
+ tba +
+
+
+ + + + + + diff --git a/js/main.js b/js/main.js index cdd8fc7..de7d2ce 100644 --- a/js/main.js +++ b/js/main.js @@ -28,3 +28,35 @@ document.addEventListener('DOMContentLoaded', function() { }); } }); + +function flex_pcb_calc() { + const phone_length = parseFloat(document.getElementById("phone_length").value); + const phone_width = parseFloat(document.getElementById("phone_width").value); + document.getElementById("flex_pcb_length").value = phone_length + phone_width; +} + +/* +document.getElementById("flex_pcb_calc").onsubmit = function(e) { + const phone_length = document.getElementById("phone_length").value + const phone_width = document.getElementById("phone_width").value; + + document.getElementById("flex_pcb_length").value = phone_length + phone_width; + e.preventDefault(); +}; +*/ + +/* +const flex_pcb_calc = document.getElementById("flex_pcb_calc"); +if (flex_pcb_calc.addEventListener) { + flex_pcb_calc.addEventListener("submit", function(event) { + event.preventDefault(); + window.history.back(); + }, true); +} else { + flex_pcb_calc.attachEvent('onsubmit', function(event){ + event.preventDefault(); + window.history.back(); + }); +} +*/ +