From f5eca9efa41d18774ec1ec8643838c1c70edc630 Mon Sep 17 00:00:00 2001 From: cpu Date: Fri, 12 Jun 2026 17:11:27 +0200 Subject: [PATCH] clean up --- Readme.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Readme.md b/Readme.md index 9f98c25..55e2ef3 100644 --- a/Readme.md +++ b/Readme.md @@ -25,11 +25,13 @@ sudo apt update sudo apt install kicad ``` -### 2. KiCad: Set your design grid -In KiCad's PCB editor, go to `Preferences → Preferences → PCB Editor → Grids` and add a custom grid of 0.017 mm. This ensures trace edges land on pixel boundaries and avoids the sub-pixel rounding that causes the ±1px size error people see with arbitrary grids. +### 2. KiCad: Set your design grid (Optional) +In KiCad's PCB editor, go to `Preferences → Preferences → PCB Editor → Grids` and add a custom grid of 0.017 mm (your MSLA printer's pixel size). This ensures trace edges land on pixel boundaries and avoids the sub-pixel rounding that causes the ±1px size error people see with arbitrary grids. ### 3. Export gerbers from KiCad +*If you want to automate the conversion of gerber to printing files, you can jump to the section [Appendix: Automated script](#appendix-automated-script).* + - Open your PCB project in the KiCad PCB Editor. - Go to **File -> Plot** and select `Plot format` as `SVG` and set the `Output directory`. - In the `Include Layers` section select layers `F.Cu`, `B.Cu`, `B.Mask` and `F.Silkscreen`. Each layer will be ploted as a separate SVG file. @@ -49,8 +51,6 @@ This file is reused for every job — it carries the correct LCD resolution meta ## MSLA PCB Exposure -*If you want to automate the conversion of gerber to printing files, you can jump to the section [Appendix: Automated script](#appendix-automated-script).* - `UVtools` has a dedicated `PCB Exposure` tool that converts a Gerber file to a pixel-perfect image given your printer's LCD resolution, specifically for exposing copper traces. ### 1. Install `UVtools` @@ -120,7 +120,11 @@ Use the project [kicad2gcode](https://gitea.virtonline.eu/2HoursProject/kicad2gc Automate the conversion from KiCAD to print files using a script. -### 1. Install dependencies +### 1. The `Dummy.pm4n` file + +Make sure you have the `Dummy.pm4n` file specific to your printer. See the section [5. Create the `Dummy.pm4n` file](#5-create-the-dummypm4n-file) above. + +### 2. Install dependencies ```bash python3 -m venv .venv @@ -130,7 +134,7 @@ pip install pygerber Pillow numpy Or activate the `venv` once and put `source .venv/bin/activate` in your shell profile. -### 2. Export multiple layers (e.g. copper + soldermask + silkscreen) +### 3. Export multiple layers (e.g. copper + soldermask + silkscreen) ```bash ./export.sh \ @@ -161,18 +165,18 @@ output/pm4n/Flow_Controller_Panel-F_Silkscreen.preview.png output/pm4n/Flow_Controller_Panel-B_Silkscreen.pm4n output/pm4n/Flow_Controller_Panel-B_Silkscreen.preview.png ``` -#### 2.1. Check the layer preview +#### 3.1. Check the layer preview Check the `output/pm4n/Flow_Controller_Panel-*.preview.png` images — traces should appear black on white background. - background = UV exposed = resist removed = etched away - traces = dark = resist kept = copper stays -#### 2.2. Check the printer exposure +#### 3.2. Check the printer exposure Open the `.pm4n` in `Chitubox Basic` slicer to visually verify before printing. -#### 2.3. Adjust exposure +#### 3.3. Adjust exposure Start with `--exposure 60` and bracket from there — Bungard presensitized at 405nm typically lands between 30–120s depending on board vintage and storage. -### 3. Export single layer (e.g. copper) +### 4. Export single layer (e.g. copper) Export the front layer as gerber ```bash @@ -194,6 +198,8 @@ output/pm4n/Flow_Controller_Panel-Front.pm4n output/pm4n/Flow_Controller_Panel-Front.preview.png ``` +### 5. Verify + Open the preview image ```bash xdg-open output/pm4n/Flow_Controller_Panel-Front.preview.png