User Guide
Complete guide to using CircuitJS1
Getting Started
CircuitJS1 is a browser-based electronic circuit simulator that allows you to design, build, and analyze circuits in real-time. This guide covers everything you need to know to get started.
Interface Overview
Main Areas
- Circuit Canvas: The main area where you build and view your circuit
- Component Menu: Right-click to access all available components
- Properties Panel: Right-click components to edit their properties
- Scope Display: Built-in oscilloscope for viewing signals
- Control Buttons: Play/pause, reset, and other simulation controls
Building Circuits
Adding Components
- Right-click on empty space to open the component menu
- Navigate through categories (Passive, Active, Logic, etc.)
- Click on the component you want to add
- Position the component by moving your mouse
- Click to place the component
Connecting Components
- Click on a component terminal (the small dots)
- Drag to another component terminal
- Release to create the connection
- Double-click on wires to add junction dots
Editing Components
- Right-click on any component
- Select “Edit” from the context menu
- Modify parameters in the dialog box
- Click “OK” to apply changes
Component Categories
Mathematical & Economics Components
CircuitJS1 includes specialized components for mathematical operations and economic modeling (system dynamics). These are particularly useful for simulation modeling, control systems, and stock-flow analysis.
Arithmetic Operations
Adder - Adds multiple input voltages: Vout = V1 + V2 + V3 + … - Configurable number of inputs (default: 2) - Linear element using VCVS (no iteration needed) - Symbol: + (summation symbol)
Subtracter - Subtracts input voltages: Vout = V1 - V2 - V3 - … - Configurable number of inputs (default: 2) - Linear element using VCVS (no iteration needed) - Symbol: − (minus symbol)
Multiply by Constant - Multiplies input voltage by a fixed gain: Vout = K × Vin - Configurable gain constant - Can show multiplier or percentage - Linear element (VCVS with fixed gain) - Symbol: ×
Multiplier - Multiplies multiple input voltages: Vout = V1 × V2 × V3 × … - Configurable number of inputs (default: 2) - Nonlinear operation requiring iteration - Useful for power calculations and modulation - Symbol: × (multiplication symbol)
Divider - Divides voltages: Vout = V1 / V2 / V3 / … - Includes division-by-zero protection (epsilon = 1e-9) - Implemented as multiplication by reciprocal - Symbol: ÷
Differentiator - Computes rate of change: Vout = dVin/dt - Calculates time derivative of input voltage - Essential for dynamic system modeling - Uses numerical differentiation - Symbol: d/dt
Integrator - Computes integral: Vout = ∫Vin dt - Integrates input voltage over time - Configurable initial value - Essential for accumulation and control systems - Symbol: ∫ (integral symbol)
ODE (Ordinary Differential Equation) - Solves differential equations: dV/dt = expression - Supports complex mathematical expressions - Multiple integration methods (Euler, RK4) - Variables: input voltages, time (t), constants - Ideal for dynamic system modeling - Shows equation on component
Equation - Evaluates algebraic equations: Vout = expression - Supports arithmetic operations (+, -, ×, ÷) - Functions: sin, cos, tan, exp, log, sqrt, abs - Variables: input voltages (v1, v2, …), time (t) - Constants: pi, e - Shows equation on component
Display & Measurement
Percent/Ratio Meter - Display-only element (doesn’t affect circuit) - Computes ratio: V1/V2 - Two display modes: - Ratio mode: Shows raw division result - Percentage mode: Shows ratio × 100 with % symbol - Configurable scaling (Auto, m, 1, K, M) - Division-by-zero protection
Pie Chart - Visual display of proportional values - Multiple input values shown as pie slices - Automatic percentage calculation - Color-coded segments - Labels with values and percentages - Useful for visualizing resource distribution - Display-only element (doesn’t affect circuit)
Key Properties: - First terminal: numerator (V1) - Second terminal: denominator (V2) - Fixed decimal precision option - Ideal for efficiency calculations and feedback monitoring
Data Management
Table Element - Spreadsheet-like component for equation-based calculations - Multiple columns with configurable types (Asset/Liability/Equity/Computed) - Each cell contains equations using labeled node names or variables (a-i) - Output pins provide voltage outputs for each column - Supports time-based functions: sin(t), cos(t), t - Column synchronization with shared stocks - Visual highlighting of shared columns (yellow)
Key Features: - Configurable rows and columns - Initial values row (optional) - Row descriptions/labels - Cell equations with full expression support - Decimal places control - Collapsed mode for compact display - Table title and units
Godley Table Element - Extended table with integration capabilities - Integrates column sums over time - Integration equation: output = lastOutput + timeStep × gain × columnSum - Outputs current proportional to column sums - Ideal for stock-flow modeling - Shows initial values by default
Contains the following parts
Flows on each row
- Orchestrates flow elements in system dynamics models
- Manages flow calculations and updates
- Coordinates with stock elements
- Visual representation of flow network
- Central control for flow-based simulations
Stock Column Elements
- Central controller for stock-flow systems
- Manages stock accumulation and depletion
- Integrates flows over time
- Tracks multiple stock variables
- Coordinates with flow master and table elements
- Essential for system dynamics modeling
Current Transactions Matrix - Displays transaction flows between accounts - Matrix visualization of stock changes - Row and column labels for clarity - Real-time updates during simulation - Useful for economic flow analysis - Shows net flows between system components
Simulation Control
Stop Time Element - Automatically pauses simulation at specified time - Visual stop sign indicator (octagon) - Configurable stop time in seconds - No electrical connections (control element only) - Resets when simulation is reset - Useful for automated testing and time-limited simulations
Key Properties: - Stop time (default: 1.0 seconds) - Visual feedback when stopped (highlighted red octagon) - “STOP” text display with time value
Action Time Element - Triggers actions at specific simulation times - Schedules events during simulation - Multiple action points supported - Useful for automated testing and timed events - No electrical connections (control element only) - Can trigger parameter changes or state transitions
Key Properties: - Action time points (configurable) - Action type and parameters - Visual indicator of scheduled actions
Example Applications
Economic Modeling Use Tables and Godly Tables to model stock-flow systems: - Stocks: Bank accounts, inventory levels, population - Flows: Transactions, production rates, birth/death rates - Auxiliaries: Computed values, ratios, indicators
Control Systems Combine mathematical elements for control algorithms: - Adder: Summing junctions for error signals - Multiply by Constant: Gain stages (P, I, D coefficients) - Differentiator: Derivative control action
Signal Processing Build signal processing chains: - Multiplier: Amplitude modulation, mixing - Divider: Automatic gain control - Percent Meter: Distortion measurement
For traditional electronics components (resistors, capacitors, transistors, logic gates, etc.), see the Electronics Components guide.
Measurement and Analysis
Built-in Oscilloscope
The scope displays voltage and current waveforms in real-time:
- Right-click on any wire or component terminal
- Select “View in Scope” to add the signal
- Adjust time base and voltage scale using controls
- Remove signals by right-clicking scope traces
Meters and Probes
- Voltmeter: Measures voltage across components
- Ammeter: Measures current through branches
- Probe: Shows voltage values as text labels
Analysis Features
- DC Operating Point: Steady-state analysis
- AC Analysis: Frequency response (when available)
- Transient Analysis: Time-domain simulation
Simulation Controls
Time Controls
- Play/Pause (Space): Start/stop the simulation
- Reset (R): Return circuit to initial conditions
- Speed Control: Adjust simulation speed
Solver Settings
Access advanced settings through the Options menu:
- Time Step: Simulation accuracy vs. speed
- Solver Method: Numerical integration method
- Convergence: Iteration limits for nonlinear circuits
File Operations
Saving Circuits
- File Menu > Export as : Save circuit to clipboard
- File Menu > Export As Text - Text representation to clipboard
- File Menu > Export As Link - Shareable link
Loading Circuits
- File Menu > Open File: open from local directory
- File Menu > Import From Dropbox: Load from Dropbox URL
- File Menu > Import From Text.: paste from clipboard
Tips and Best Practices
Circuit Design
- Start Simple: Build and test basic blocks first
- Use Ground: Connect reference points to ground
- Label Nodes: Add text labels for clarity
- Group Related Components: Organize logically
Debugging
- Check Connections: Ensure all nodes are properly connected
- Verify Values: Double-check component parameters
- Use Scope: Monitor key signals during simulation
Performance
- Minimize Scope Traces: Only monitor necessary signals
- Adjust Time Step: Balance accuracy with speed
- Simplify When Possible: Use ideal components for initial analysis
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Delete | Remove selected |
| Ctrl+A | Select all |
| Ctrl+C/V | Copy/Paste |
Troubleshooting
Common Issues
Circuit Won’t Simulate - Check for disconnected nodes - Ensure there’s a ground connection - Verify component values are reasonable
Simulation Runs Slowly - Reduce scope traces - Increase time step size - Simplify the circuit
Oscilloscope Shows Nothing - Check signal connections - Adjust voltage/time scales - Verify simulation is running
Components Behave Unexpectedly - Review component parameters - Check for proper connections - Consider real-world limitations
Getting Help
- Check the Examples for similar circuits
- Review Electronic Tutorials for guided learning
- Visit the GitHub Issues for bug reports
This guide covers the essential features of CircuitJS1. For advanced topics and development information, see the Building Guide and Contributing Guidelines.