+ Here is an example of a boost converter circuit configured for SPICE + simulation. It uses one voltage source (`V2`) with a square wave to drive + a MOSFET, boosting the voltage from a 5V DC source (`V1`) to a higher + level. Voltage probes are placed at the input and output to observe the + results. +
++ 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. +
diff --git a/docs/guides/spice-simulation/introduction.mdx b/docs/guides/spice-simulation/introduction.mdx new file mode 100644 index 0000000..dd49410 --- /dev/null +++ b/docs/guides/spice-simulation/introduction.mdx @@ -0,0 +1,63 @@ +--- +title: SPICE Simulation Introduction +sidebar_label: Introduction +sidebar_position: 1 +description: >- + Run SPICE simulations on your circuits to analyze their analog behavior. +--- +import CircuitPreview from "@site/src/components/CircuitPreview" + +## Overview ++ tscircuit supports SPICE simulation to analyze the analog behavior of your + circuits. You can define voltage sources with various waveforms, place + probes to measure voltages, and configure the simulation parameters. The + results can be visualized to understand how your circuit performs over + time. +
+## Simulation Components +### {"+ This component configures and enables the analog simulation for the board. +
+| Property | Type | Description | +| :--- | :--- | :--- | +| `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. Can be `"spicey"` (default) or `"ngspice"`. | ++ Probes are used to specify which parts of the circuit you want to measure. + These do not have a physical representation on the PCB. +
+#### {"Measures the voltage at a specific point in the circuit.
+| Property | Type | Description | +| :--- | :--- | :--- | +| `connectsTo` | string | A port selector indicating where to place the probe. | +
+ For simulations, {"
+ 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 {"spicey engine. Voltage probes are placed at the
+ input and output to observe the charging behavior.
+
+ 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. +