Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/elements/board.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ Usually you'll want to use an autorouter preset:
- `autorouter="auto"` - Uses the [platform configuration](../guides/running-tscircuit/platform-configuration.md). For tscircuit.com this defaults to `sequential-trace`.
- `autorouter="sequential-trace"` - Iterate over each trace and use tscircuit's fast built-in autorouter. This method is fast and deterministic but often fails with over 50 traces.
- `autorouter="auto-local"` - Use the platform configuration, but only route locally (do not make API calls)
- `autorouter="auto-cloud"` - Use the platform configuration for
- `autorouter="auto-cloud"` - Use the platform configuration for
- `autorouter="laser_prefab"` - Reserve prefabricated vias that can be reassigned during routing. Ideal for rapid-turn PCBs produced with laser ablation and mechanical drilling templates. See the [Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx) for a complete walkthrough.

For complex boards with over 50 traces, you should use `autorouter="auto-cloud"`
to take advantage of tscircuit's cloud autorouters, which internally use the popular
Expand Down
1 change: 1 addition & 0 deletions docs/elements/via.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ import CircuitPreview from "@site/src/components/CircuitPreview"
| outerDiameter | number \| string | "0.8mm" | Outer diameter of the copper annular ring |
| pcbX | number | 0 | PCB X position of the via |
| pcbY | number | 0 | PCB Y position of the via |
| netIsAssignable | boolean | `false` | Marks the via as prefabricated so autorouters like `laser_prefab` can claim it for any compatible net. For a full workflow, see the [Biscuit Board Laser Ablation guide](../guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx). |
123 changes: 123 additions & 0 deletions docs/guides/tscircuit-essentials/biscuit-board-laser-ablation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: Biscuit Board Laser Ablation
description: Learn how to route PCBs against a prefabricated via template using the laser_prefab autorouter and the netIsAssignable via property.
---

import CircuitPreview from "@site/src/components/CircuitPreview"

# Biscuit Board Laser Ablation

The **laser_prefab** autorouter pairs tscircuit with a fabrication process that
combines laser ablation and a "biscuit" carrier board. Fabricators pre-drill a
matrix of vias into an inexpensive substrate—the biscuit—then laminate thin
copper to the top and bottom. A UV or IR laser ablates the copper, defining the
traces while leaving the via barrels intact. Because the vias are prefabricated,
you route against a known template instead of drilling new holes for every
board.

This guide walks through designing for that workflow. You'll learn how to:

1. Build a reusable via template (the biscuit board).
2. Place that template, route with `autorouter="laser_prefab"`, and confirm the results match the prefabricated geometry.

## 1. Build a reusable via template (a biscuit board)

Create a component for your biscuit template that contains every via location
available on the board. Mark each via with `netIsAssignable` so it is treated as
an assignable via when the router runs. The vias can optionally include default
net names to serve as documentation for repeated layouts.

```tsx title="src/biscuit-template.tsx"
import { Fragment } from "react"

export const BiscuitTemplate = () => (
<Fragment>
<via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
</Fragment>
)
```

Keep the template focused on the vias themselves. Copper features such as
fiducials or alignment marks should live in their own components so you can swap
templates without affecting the mechanical stackup.

## 2. Place the biscuit template, route, and validate

Include the template inside your `<board />` before adding components. Because
the vias are already drilled in the physical biscuit, avoid translating or
rotating the template in a way that misaligns the coordinates.

<CircuitPreview
defaultView="pcb"
code={`export default () => (
<board width="20mm" height="20mm" autorouter="laser_prefab">
<group name="biscuit" pcbX={0} pcbY={0}>
<via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
</group>

<testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" />
<testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" />
</board>
)`}
/>

Keep the board outline slightly inside the biscuit's usable area so the laser
can clear debris without hitting the rails.

Once the template is in place, add traces exactly as you would for a conventional
board. The router treats assignable vias as neutral territory: any net can claim
them provided both layers are available and no design rules are violated.

```tsx title="src/laser-prefab-example.tsx"
<board width="20mm" height="20mm" autorouter="laser_prefab">
<BiscuitTemplate />

<chip
name="U1"
footprint="soic8"
pcbX={-6}
pcbY={0}
connections={{ pin1: "R1.pin1", pin8: "B6.top" }}
/>
<resistor name="R1" resistance="1k" footprint="0402" pcbX={6} pcbY={0} />

<trace from="TP_TOP.pin1" to="B2.top" />
<trace from="B2.bottom" to="TP_BOTTOM.pin1" />
</board>
```

After generating manufacturing data (Gerber or ODB++ exports) or reviewing the
PCB preview, confirm that:

- Every claimed via matches a real location on the biscuit template.
- Unused vias remain isolated and keep their original net names.
- Trace clearances respect your fabrication limits.

<CircuitPreview
defaultView="pcb"
code={`export default () => (
<board width="20mm" height="20mm" autorouter="laser_prefab">
<group name="biscuit">
<via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable />
<via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable />
</group>

<testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" />
<testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" />

<trace from="TP_TOP.pin1" to="B2.top" />
<trace from="B2.bottom" to="B5.top" />
<trace from="B5.bottom" to="TP_BOTTOM.pin1" />
</board>
)`}
/>