Skip to main content
SPICE Simulation

RC Charging Circuit Example

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 <analogsimulation />, it uses the default spicey engine. Voltage probes are placed at the input and output to observe the charging behavior.

export default () => (
<board width={16} height={16} schMaxTraceDistance={5}>
<voltagesource
name="V1"
voltage="5V"
schX={-4}
schY={1}
schRotation={270}
/>
<resistor
name="R1"
resistance="1k"
footprint="0402"
schX={-1}
schY={4}
pcbX={4}
pcbY={4}
/>
<resistor
name="R2"
resistance="2k"
footprint="0402"
schX={3}
schY={3}
schRotation={270}
pcbX={-4}
pcbY={-4}
/>
<capacitor
name="C1"
capacitance="10uF"
footprint="0402"
schX={2}
schY={1.5}
pcbX={0}
pcbY={-2}
/>

<trace from={".V1 > .pin1"} to={".R1 > .pin1"} />
<trace from={".R1 > .pin2"} to={".R2 > .pin1"} />
<trace from={".R1 > .pin2"} to={".C1 > .pin1"} />
<trace from={".V1 > .pin2"} to={"net.GND"} />
<trace from={".R2 > .pin2"} to={"net.GND"} />
<trace from={".C1 > .pin2"} to={"net.GND"} />

<voltageprobe connectsTo={".R1 > .pin1"} />
<voltageprobe connectsTo={".R1 > .pin2"} />

<analogsimulation duration={100} timePerStep={1} />
</board>
)
Schematic Circuit Preview

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.