From 7680ad4c9981eab093c763d69f65aaa540b4fb58 Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Wed, 12 Nov 2025 16:59:57 +0200 Subject: [PATCH 1/2] feat(docs): Add RC circuit example for SPICE simulation --- docs/advanced/spice-simulation.mdx | 65 +++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/docs/advanced/spice-simulation.mdx b/docs/advanced/spice-simulation.mdx index 79a9a70..25dd9c5 100644 --- a/docs/advanced/spice-simulation.mdx +++ b/docs/advanced/spice-simulation.mdx @@ -21,7 +21,7 @@ This component configures and enables the analog simulation for the board. | ------------- | ------ | ----------------------------------------------------- | | `duration` | number | The total duration of the simulation (e.g., in seconds). | | `timePerStep` | number | The time interval between simulation steps (e.g., in seconds). | -| `spiceEngine` | string | The SPICE engine to use (e.g., `"ngspice"`). | +| `spiceEngine` | string | The SPICE engine to use. Can be `"spicey"` (default) or `"ngspice"`. | Example: @@ -153,3 +153,66 @@ export default () => ( `} /> The simulation results would show the output voltage across `R1` successfully "boosted" compared to the 5V input from `V1`. The specific output voltage depends on the duty cycle of the MOSFET driver `V2` and the component values. + +## Example: RC Charging Circuit + +Here's an example of an RC circuit that forms a voltage divider with a capacitor. This also functions as a low-pass filter. Since no `spiceEngine` is specified in ``, it uses the default `spicey` engine. Voltage probes are placed at the input and output to observe the charging behavior. + + ( + + + + + + + .pin1"} to={".R1 > .pin1"} /> + .pin2"} to={".R2 > .pin1"} /> + .pin2"} to={".C1 > .pin1"} /> + .pin2"} to={"net.GND"} /> + .pin2"} to={"net.GND"} /> + .pin2"} to={"net.GND"} /> + + .pin1"} /> + .pin2"} /> + + + +) +`} /> + +The simulation results will show the voltage at the junction of `R1`, `R2`, and `C1` charging towards the Thevenin equivalent voltage of the R1-R2 divider. From 84094de6e06410a40f44dd02feb21091bb699895 Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Wed, 12 Nov 2025 17:06:52 +0200 Subject: [PATCH 2/2] layout --- docs/advanced/spice-simulation.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/advanced/spice-simulation.mdx b/docs/advanced/spice-simulation.mdx index 25dd9c5..67e42cd 100644 --- a/docs/advanced/spice-simulation.mdx +++ b/docs/advanced/spice-simulation.mdx @@ -176,7 +176,7 @@ export default () => ( resistance="1k" footprint="0402" schX={-1} - schY={0} + schY={4} pcbX={4} pcbY={4} /> @@ -184,8 +184,8 @@ export default () => ( name="R2" resistance="2k" footprint="0402" - schX={2} - schY={1} + schX={3} + schY={3} schRotation={270} pcbX={-4} pcbY={-4} @@ -195,7 +195,7 @@ export default () => ( capacitance="10uF" footprint="0402" schX={2} - schY={1} + schY={1.5} pcbX={0} pcbY={-2} />