Skip to main content
Built-in Elements

<ammeter />

Overview

<ammeter /> measures current through a circuit branch during SPICE simulation. Insert it between the two nodes of the branch you want to measure, then connect pos and neg to define the positive current direction.

An ammeter is primarily a schematic and simulation component. It emits a current probe for simulation graphs.

Schematic Circuit Preview
export default () => (
<board routingDisabled>
<voltagesource name="V1" voltage="15V" schX={-3} />
<ammeter
name="AM1"
color="#ff0000"
connections={{
pos: ".V1 > .pin1",
neg: ".R1 > .pin1",
}}
/>
<resistor name="R1" resistance="10ohm" schX={3} />

<trace from=".R1 > .pin2" to=".V1 > .pin2" />

<analogsimulation
duration="1ms"
timePerStep="100us"
spiceEngine="ngspice"
/>
</board>
)

Pins

PinAliasesDescription
pin1posPositive side of the current measurement.
pin2negNegative side of the current measurement.

Positive current is measured entering pos and leaving neg. Reverse the connections if the plotted current has the opposite sign from the direction you want.

Properties

PropertyDescriptionExample
nameLabel for the ammeter and its current trace."AM1"
connectionsConnects the ammeter in series. Use either pos/neg or pin1/pin2.{{ pos: ".V1 > .pin1", neg: ".R1 > .pin1" }}
colorColor used for the current trace in simulation graphs."#ff0000"
graphDisplayNameOptional label for oscilloscope-style graph display."I_LOAD"
graphCenterCurrent value shown at the center of the trace display.0.01
graphOffsetDivsVertical offset, in divisions, applied to the trace center.-1
graphUnitsPerDivCurrent scale per division. For ammeters this is amps per division.0.005
footprintOptional footprint. Required if you position the ammeter on the PCB."0402"

Scope-style graph display

Use graphCenter, graphOffsetDivs, and graphUnitsPerDiv when plotting multiple current and voltage signals on the same simulation graph. These props scale the ammeter trace independently from voltage probes, so current can be shown in amps per division while voltage probes use volts per division.

<ammeter
name="ILOAD"
color="#8a35d7"
graphDisplayName="ILOAD"
graphCenter={0.002}
graphOffsetDivs={-2}
graphUnitsPerDiv={0.0005}
connections={{
pos: ".R_LOAD > .pin2",
neg: ".V1 > .pin2",
}}
/>