adeed manual processing using UVtools
This commit is contained in:
55
Readme.md
55
Readme.md
@@ -6,19 +6,51 @@ KiCad PCB layers need to be converted to `.pm4n` files for direct UV exposure on
|
||||
|
||||
---
|
||||
|
||||
## Setup
|
||||
## Preparation
|
||||
|
||||
### 1. KiCad: Set your design grid
|
||||
### 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. Create the `Dummy.pm4n` file
|
||||
### Create the `Dummy.pm4n` file
|
||||
|
||||
|
||||
Open **CHITUBOX Basic** slicer (or any other slicer that works for your resin printer), select printer **Anycubic Photon Mono 4**, slice any tiny STL (e.g.: 1×1×0.05 mm box), and save as `Dummy.pm4n` in the same directory as `export.sh`.
|
||||
Open **CHITUBOX Basic** slicer (or any other slicer that works for your resin printer), select printer **Anycubic Photon Mono 4**, slice any tiny STL (e.g.: 1×1×0.05 mm box), and save as `Dummy.pm4n`.
|
||||
|
||||
This file is reused for every job — it carries the correct LCD resolution metadata.
|
||||
|
||||
### 3. Install dependencies
|
||||
## Manual processing
|
||||
|
||||
`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`
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y curl
|
||||
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/sn4k3/UVtools/master/Scripts/install-dependencies.sh)"
|
||||
```
|
||||
|
||||
### 2. Run `UVtools`
|
||||
|
||||
```bash
|
||||
cd UVtools
|
||||
./UVtools
|
||||
```
|
||||
|
||||
### 3. Export `.pm4n` file from Gerber
|
||||
|
||||
- You export Gerber from KiCad (not SVG), which natively gives you positive/negative control per layer.
|
||||
- You open the `Dummy.pm4n` file in `UVtools` (a minimal valid `.pm4n` sliced by `Chitubox` or `Photon Workshop` with any tiny model), then use `Tools → PCB Exposure` to inject your Gerber layer e.g.: `Flow_Controller_Panel-Front.gbr`.
|
||||
- You control `inversion`, `invert` and the `exposure time` at the bottom of the `PCB exposure` dialog.
|
||||
- You save it as e.g.: `Flow_Controller_Panel-Front.pm4n` file and print it.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Automated script
|
||||
|
||||
### 1. Install dependencies
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
@@ -28,7 +60,7 @@ pip install pygerber Pillow numpy
|
||||
|
||||
Or activate the `venv` once and put `source .venv/bin/activate` in your shell profile.
|
||||
|
||||
### 4. Export multiple layers (e.g. copper + soldermask + silkscreen)
|
||||
### 2. Export multiple layers (e.g. copper + soldermask + silkscreen)
|
||||
|
||||
```bash
|
||||
./export.sh \
|
||||
@@ -59,19 +91,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
|
||||
```
|
||||
#### 4.1. Check the layer preview
|
||||
#### 2.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
|
||||
|
||||
#### 4.2. Check the printer exposure
|
||||
#### 2.2. Check the printer exposure
|
||||
Open the `.pm4n` in `Chitubox Basic` slicer to visually verify before printing.
|
||||
|
||||
#### 4.3. Adjust exposure
|
||||
#### 2.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.
|
||||
|
||||
|
||||
#### Export single layer (e.g. copper)
|
||||
### 3. Export single layer (e.g. copper)
|
||||
|
||||
Export the front layer as gerber
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user