|
| 1 | +--- |
| 2 | +title: Biscuit Board Laser Ablation |
| 3 | +description: Learn how to route PCBs against a prefabricated via template using the laser_prefab autorouter and the netIsAssignable via property. |
| 4 | +--- |
| 5 | + |
| 6 | +import CircuitPreview from "@site/src/components/CircuitPreview" |
| 7 | + |
| 8 | +# Biscuit Board Laser Ablation |
| 9 | + |
| 10 | +The **laser_prefab** autorouter pairs tscircuit with a fabrication process that |
| 11 | +combines laser ablation and a "biscuit" carrier board. Fabricators pre-drill a |
| 12 | +matrix of vias into an inexpensive substrate—the biscuit—then laminate thin |
| 13 | +copper to the top and bottom. A UV or IR laser ablates the copper, defining the |
| 14 | +traces while leaving the via barrels intact. Because the vias are prefabricated, |
| 15 | +you route against a known template instead of drilling new holes for every |
| 16 | +board. |
| 17 | + |
| 18 | +This guide walks through designing for that workflow. You'll learn how to: |
| 19 | + |
| 20 | +1. Prepare a via template that can be reused across designs. |
| 21 | +2. Configure your board to route with `autorouter="laser_prefab"`. |
| 22 | +3. Mark vias as assignable so the autorouter can claim them dynamically. |
| 23 | +4. Validate that the generated routing honors the biscuit's geometry. |
| 24 | + |
| 25 | +## 1. Build a reusable via template |
| 26 | + |
| 27 | +Create a library subcircuit that contains every via location available on the |
| 28 | +biscuit board. Mark each via with `netIsAssignable` so it becomes an assignable |
| 29 | +obstacle when the router runs. The vias can optionally include default net names |
| 30 | +to serve as documentation for repeated layouts. |
| 31 | + |
| 32 | +```tsx title="src/biscuit-template.tsx" |
| 33 | +import { Fragment } from "react" |
| 34 | + |
| 35 | +export const BiscuitTemplate = () => ( |
| 36 | + <Fragment> |
| 37 | + <via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 38 | + <via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 39 | + <via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 40 | + <via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 41 | + <via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 42 | + <via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 43 | + </Fragment> |
| 44 | +) |
| 45 | +``` |
| 46 | + |
| 47 | +Keep the template focused on the vias themselves. Copper features such as fiducials or |
| 48 | +alignment marks should live in their own subcircuits so you can swap templates |
| 49 | +without affecting the mechanical stackup. |
| 50 | + |
| 51 | +## 2. Place the biscuit template on your board |
| 52 | + |
| 53 | +Include the template inside your `<board />` before adding components. Because |
| 54 | +the vias are already drilled in the physical biscuit, avoid translating or |
| 55 | +rotating the template in a way that misaligns the coordinates. |
| 56 | + |
| 57 | +<CircuitPreview |
| 58 | + defaultView="pcb" |
| 59 | + code={`export default () => ( |
| 60 | + <board width="20mm" height="20mm" autorouter="laser_prefab"> |
| 61 | + <group name="biscuit" pcbX={0} pcbY={0}> |
| 62 | + <via name="B1" pcbX={-4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 63 | + <via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 64 | + <via name="B3" pcbX={4} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 65 | + <via name="B4" pcbX={-4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 66 | + <via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 67 | + <via name="B6" pcbX={4} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 68 | + </group> |
| 69 | +
|
| 70 | + <testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" /> |
| 71 | + <testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" /> |
| 72 | + </board> |
| 73 | +)`} |
| 74 | +/> |
| 75 | + |
| 76 | +If your biscuit provides fiducials or tooling holes, align them with your CAD |
| 77 | +origin so the panelization step can easily merge your routed copper with the |
| 78 | +prefabricated template. Keep the board outline slightly inside the biscuit's |
| 79 | +usable area so the laser can clear debris without hitting the rails. |
| 80 | + |
| 81 | +## 3. Route with `autorouter="laser_prefab"` |
| 82 | + |
| 83 | +Once the template is in place, add traces exactly as you would for a conventional |
| 84 | +board. The router treats assignable vias as neutral territory: any net can claim |
| 85 | +them provided both layers are available and no design rules are violated. |
| 86 | + |
| 87 | +```tsx title="src/laser-prefab-example.tsx" |
| 88 | +<board width="20mm" height="20mm" autorouter="laser_prefab"> |
| 89 | + <BiscuitTemplate /> |
| 90 | + |
| 91 | + <chip |
| 92 | + name="U1" |
| 93 | + footprint="soic8" |
| 94 | + pcbX={-6} |
| 95 | + pcbY={0} |
| 96 | + connections={{ pin1: "R1.pin1", pin8: "B6.top" }} |
| 97 | + /> |
| 98 | + <resistor name="R1" resistance="1k" footprint="0402" pcbX={6} pcbY={0} /> |
| 99 | + |
| 100 | + <trace from="TP_TOP.pin1" to="B2.top" /> |
| 101 | + <trace from="B2.bottom" to="TP_BOTTOM.pin1" /> |
| 102 | +</board> |
| 103 | +``` |
| 104 | + |
| 105 | +During routing, tscircuit emits a **simple route JSON** that marks each |
| 106 | +`netIsAssignable` via as an obstacle with the `netIsAssignable` flag. The |
| 107 | +`laser_prefab` preset looks for that flag, allowing it to reserve a via for any |
| 108 | +trace that needs to change layers. The [integration test in the core |
| 109 | +library](https://github.com/tscircuit/core/blob/main/tests/autorouting/laser-prefab.test.tsx) |
| 110 | +verifies the behavior end to end. |
| 111 | + |
| 112 | +### Reserving specific vias |
| 113 | + |
| 114 | +Sometimes you know that certain vias must stay tied to a particular net—perhaps |
| 115 | +they connect to ground pour or stitching features. In that case, omit the |
| 116 | +`netIsAssignable` flag on those vias and route them manually. The router will |
| 117 | +leave them untouched while still consuming the rest of the biscuit template as |
| 118 | +needed. |
| 119 | + |
| 120 | +## 4. Validate the routed output |
| 121 | + |
| 122 | +After calling `circuit.renderUntilSettled()`, inspect the PCB view or export the |
| 123 | +Gerber/ODB++ data to confirm that: |
| 124 | + |
| 125 | +- Every claimed via matches a real location on the biscuit template. |
| 126 | +- Unused vias remain isolated and keep their original net names. |
| 127 | +- Trace clearances respect your fabrication limits. |
| 128 | + |
| 129 | +<CircuitPreview |
| 130 | + defaultView="pcb" |
| 131 | + code={`export default () => ( |
| 132 | + <board width="20mm" height="20mm" autorouter="laser_prefab"> |
| 133 | + <group name="biscuit"> |
| 134 | + <via name="B2" pcbX={0} pcbY={6} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 135 | + <via name="B5" pcbX={0} pcbY={0} fromLayer="top" toLayer="bottom" netIsAssignable /> |
| 136 | + </group> |
| 137 | +
|
| 138 | + <testpoint name="TP_TOP" footprintVariant="pad" pcbX={0} pcbY={9} layer="top" /> |
| 139 | + <testpoint name="TP_BOTTOM" footprintVariant="pad" pcbX={0} pcbY={-9} layer="bottom" /> |
| 140 | +
|
| 141 | + <trace from="TP_TOP.pin1" to="B2.top" /> |
| 142 | + <trace from="B2.bottom" to="B5.top" /> |
| 143 | + <trace from="B5.bottom" to="TP_BOTTOM.pin1" /> |
| 144 | + </board> |
| 145 | +)`} |
| 146 | +/> |
| 147 | + |
| 148 | +If you need to adjust routing priorities, you can provide a custom autorouter |
| 149 | +object instead of the preset. Just make sure the implementation understands the |
| 150 | +`netIsAssignable` obstacles that tscircuit produces. |
| 151 | + |
| 152 | +## Additional tips |
| 153 | + |
| 154 | +- **Version your templates.** Include a `templateVersion` prop or layer marker so |
| 155 | + your fabrication team can confirm they are loading the correct biscuit. |
| 156 | +- **Simulate thermal load.** Prefabricated vias sometimes have smaller annular |
| 157 | + rings. Run a design-rule check (DRC) to ensure high-current nets can handle the |
| 158 | + reduced copper area. |
| 159 | +- **Document drill tolerances.** Share the biscuit's drill chart with your team so |
| 160 | + component footprints can account for any off-center holes. |
| 161 | + |
| 162 | +With these practices, you can create a repeatable laser ablation workflow that |
| 163 | +leverages tscircuit's autorouting while taking full advantage of prefabricated |
| 164 | +via templates. |
0 commit comments