From 847b0eac11b77afbaab7bf1ee608ac0108262023 Mon Sep 17 00:00:00 2001 From: imrishabh18 Date: Fri, 19 Jun 2026 20:28:58 +0530 Subject: [PATCH 1/4] Add manual trace path without connecting the other end to a port (used for antenna) --- docs/elements/trace.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/elements/trace.mdx b/docs/elements/trace.mdx index 788d291d..10ddc0f2 100644 --- a/docs/elements/trace.mdx +++ b/docs/elements/trace.mdx @@ -87,6 +87,27 @@ Sometimes you may want to manually specify the exact path a trace should take on ) `} /> +You can also create a manual trace path without a `to` endpoint by using `path` +with a single selector. This is useful for RF feeds, antenna traces, and other +open-ended copper paths where the physical PCB geometry is the important part +of the design. + + ( + + + .pin1"]} + pcbPath={[ + { x: -3.5, y: 1.75 }, + { x: -3.5, y: 2.5 }, + { x: -4, y: 2.5 }, + ]} + /> + + ) +`} /> + ## Length Constraints Sometimes you need traces to be exactly a certain length, like for high-speed signals. You can use `maxLength` and `minLength`: From 8f1aece461cd3532945d7b0ab6a2fa9e06c19eb0 Mon Sep 17 00:00:00 2001 From: imrishabh18 Date: Sun, 21 Jun 2026 16:51:18 +0530 Subject: [PATCH 2/4] updt --- docs/elements/trace.mdx | 21 ---------- .../draw-a-wifi-antenna.mdx | 40 +++++++++++++++++++ 2 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx diff --git a/docs/elements/trace.mdx b/docs/elements/trace.mdx index 10ddc0f2..788d291d 100644 --- a/docs/elements/trace.mdx +++ b/docs/elements/trace.mdx @@ -87,27 +87,6 @@ Sometimes you may want to manually specify the exact path a trace should take on ) `} /> -You can also create a manual trace path without a `to` endpoint by using `path` -with a single selector. This is useful for RF feeds, antenna traces, and other -open-ended copper paths where the physical PCB geometry is the important part -of the design. - - ( - - - .pin1"]} - pcbPath={[ - { x: -3.5, y: 1.75 }, - { x: -3.5, y: 2.5 }, - { x: -4, y: 2.5 }, - ]} - /> - - ) -`} /> - ## Length Constraints Sometimes you need traces to be exactly a certain length, like for high-speed signals. You can use `maxLength` and `minLength`: diff --git a/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx new file mode 100644 index 00000000..9f359228 --- /dev/null +++ b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx @@ -0,0 +1,40 @@ +--- +title: Draw a WiFi Antenna +description: >- + Draw an open-ended PCB antenna shape from a chip pin with a manual trace path. +--- + +import CircuitPreview from "@site/src/components/CircuitPreview" + +# Draw a WiFi Antenna + +Use a manual trace path when you want to draw open-ended copper from an RF pin, +such as a simple WiFi antenna or antenna feed. Instead of using `from` and `to`, +provide a `path` with the RF pin selector and define the copper shape with +`pcbPath`. + + ( + + + .pin1"]} + pcbPath={[ + { x: -3.5, y: 1.75 }, + { x: -3.5, y: 2.5 }, + { x: -4, y: 2.5 }, + ]} + /> + + ) +`} /> + +The `pcbPath` points are PCB coordinates in millimeters. Add more points to +draw a longer antenna shape, a board-edge launch, or a meandered RF trace. + +:::caution +This controls the antenna geometry in tscircuit, but it does not calculate RF +performance. For a production WiFi antenna, tune the dimensions, trace width, +clearance, stackup, and ground keepout for your target frequency and PCB +manufacturer. +::: From b4ef9593abad0ae382e5079daf0decf56e04f1c7 Mon Sep 17 00:00:00 2001 From: imrishabh18 Date: Mon, 22 Jun 2026 12:50:32 +0530 Subject: [PATCH 3/4] update --- .../draw-a-wifi-antenna.mdx | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx index 9f359228..2923058b 100644 --- a/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx +++ b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx @@ -15,22 +15,34 @@ provide a `path` with the RF pin selector and define the copper shape with ( - + .pin1"]} + width="0.3mm" pcbPath={[ - { x: -3.5, y: 1.75 }, - { x: -3.5, y: 2.5 }, - { x: -4, y: 2.5 }, + ".U1 > .pin1", + { x: -2.5, y: 4.2 }, + { x: 4.0, y: 4.2 }, + { x: 4.0, y: 6.6 }, + { x: 15.0, y: 6.6 }, + { x: 15.0, y: 5.2 }, + { x: 6.0, y: 5.2 }, + { x: 6.0, y: 3.8 }, + { x: 15.0, y: 3.8 }, + { x: 15.0, y: 2.4 }, + { x: 6.0, y: 2.4 }, + { x: 6.0, y: 1.0 }, + { x: 15.0, y: 1.0 }, ]} /> ) `} /> -The `pcbPath` points are PCB coordinates in millimeters. Add more points to -draw a longer antenna shape, a board-edge launch, or a meandered RF trace. +The `pcbPath` points are PCB coordinates in millimeters. This example draws a +meandered printed antenna near the board edge. Adjust the points to change the +overall length, spacing between runs, and feed location. :::caution This controls the antenna geometry in tscircuit, but it does not calculate RF From 9a4b82d7ce67dbc9f7d07116d5baf8a250a3c2d6 Mon Sep 17 00:00:00 2001 From: imrishabh18 Date: Mon, 22 Jun 2026 12:55:49 +0530 Subject: [PATCH 4/4] fix --- docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx index 2923058b..c3670898 100644 --- a/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx +++ b/docs/guides/tscircuit-essentials/draw-a-wifi-antenna.mdx @@ -10,7 +10,7 @@ import CircuitPreview from "@site/src/components/CircuitPreview" Use a manual trace path when you want to draw open-ended copper from an RF pin, such as a simple WiFi antenna or antenna feed. Instead of using `from` and `to`, -provide a `path` with the RF pin selector and define the copper shape with +provide a `pcbPath` with the RF pin selector and define the copper shape with `pcbPath`.