Simulation
What is Circuit Simulation?
Section titled “What is Circuit Simulation?”Circuit simulation in Elecplanner brings your electrical diagrams to life. Instead of just drawing static plans, you can test your circuits interactively to verify they work correctly before any real-world installation begins. The simulation calculates electrical states throughout your circuit, shows power flow, and lets you interact with components like switches and circuit breakers in real-time.
Think of it as a virtual electrical testing environment where you can:
- Toggle switches and see lights respond
- Turn circuit breakers on and off
- Observe power flow through wires
- Verify all components are wired correctly
- Catch wiring mistakes before construction
- Test complex switching scenarios
Why Use Simulation?
Section titled “Why Use Simulation?”Catch Errors Early
Section titled “Catch Errors Early”- Find wiring mistakes before installation
- Verify circuit logic works as intended
- Test complex scenarios like three-way switching
- Identify disconnected components or incomplete circuits
Save Time and Money
Section titled “Save Time and Money”- Reduce installation errors that require rework
- Validate designs before purchasing materials
- Train installers with accurate circuit behavior
- Document expected behavior for troubleshooting
Build Confidence
Section titled “Build Confidence”- See your circuits work before committing to installation
- Test edge cases and unusual scenarios
- Verify safety with grounding and protection checks
- Learn electrical concepts through interactive experimentation
Starting and Stopping Simulation
Section titled “Starting and Stopping Simulation”How to Start Simulation
Section titled “How to Start Simulation”Method 1: Toolbar Button
- Click the “Start Simulation” button in the top toolbar
- Look for the button with the Play icon (▶)
- The button changes to show “Stop Simulation” when active
Method 2: Keyboard Shortcut (if available)
- Press
Sto toggle simulation on/off
What Happens When Simulation Starts
Section titled “What Happens When Simulation Starts”When you start simulation:
-
Circuit Analysis
- Elecplanner analyzes your entire circuit
- Builds a graph of all components and connections
- Validates the circuit configuration
- Identifies potential issues
-
State Initialization
- All components are initialized to their default states
- Circuit breakers start in “ON” position
- Switches start in “Position 1”
- Electrical panels provide power
-
Simulation Begins
- Electrical states are calculated
- Power flows through wires
- Components respond to their inputs
- Visual feedback appears
-
Interface Changes
- Components become interactive (clickable)
- Wire path editing is disabled
- Simulation button shows “Stop Simulation”
- Visual effects appear on powered components
How to Stop Simulation
Section titled “How to Stop Simulation”To exit simulation mode:
- Click the “Stop Simulation” button in the toolbar
- Or press
Sagain (if keyboard shortcuts are enabled) - The circuit returns to editing mode
- All components return to their default appearance
Understanding Electrical States
Section titled “Understanding Electrical States”During simulation, every terminal in your circuit has an electrical state. These states determine how electricity flows and which components are powered.
The Four Electrical States
Section titled “The Four Electrical States”HIGH (Powered/Live)
Section titled “HIGH (Powered/Live)”- Meaning: Terminal is receiving active power
- Source: Connected to a live circuit breaker output or phase terminal
- Visual: Components connected to HIGH terminals operate (lights glow, etc.)
- Real-world: Like touching a live wire (don’t actually do this!)
- Priority: Highest (overrides all other states)
LOW (Connected but not Powered)
Section titled “LOW (Connected but not Powered)”- Meaning: Terminal is connected to the return path or neutral
- Source: Connected to neutral bus or switched-off output
- Visual: No special indication, just part of circuit path
- Real-world: Like the neutral wire in an outlet
- Priority: Second highest (overrides GROUND and FLOATING)
GROUND (Earth Connection)
Section titled “GROUND (Earth Connection)”- Meaning: Terminal is connected to protective earth/ground
- Source: Connected to ground bus or grounding system
- Visual: No special indication (safety connection)
- Real-world: Green/yellow wire, safety grounding
- Priority: Third highest (overrides FLOATING only)
FLOATING (Unconnected)
Section titled “FLOATING (Unconnected)”- Meaning: Terminal has no electrical connection
- Source: Not wired to anything
- Visual: Components don’t work if critical terminals are floating
- Real-world: Like a disconnected wire
- Priority: Lowest (any other state overrides it)
State Priority and Propagation
Section titled “State Priority and Propagation”When wires connect terminals with different states, the highest priority state propagates to all connected terminals:
Priority Order:
HIGH > LOW > GROUND > FLOATINGExamples:
Example 1: HIGH meets LOW
- Terminal A: HIGH
- Terminal B: LOW
- Wire connects them
- Result: Both become HIGH (highest priority wins)
Example 2: LOW meets GROUND
- Terminal A: LOW
- Terminal B: GROUND
- Wire connects them
- Result: Both become LOW (higher priority)
Example 3: Multiple States in Wago Connector
- T0: HIGH
- T1: LOW
- T2: GROUND
- T3: FLOATING
- Result: All terminals become HIGH (highest priority)
This is how Elecplanner determines what happens when you connect different parts of your circuit!
Interactive Components During Simulation
Section titled “Interactive Components During Simulation”Many components in your circuit become interactive during simulation. You can click them to change their state and observe how the circuit responds.
Circuit Breakers
Section titled “Circuit Breakers”How to Interact:
- Click on the circuit breaker to toggle ON/OFF
- ON (default): Power flows through to connected circuits
- OFF: Power is cut, all downstream devices stop working
Visual Feedback:
- ON: Normal appearance, power flows
- OFF: Visual indication of disabled state
What to Test:
- Turn breaker off, verify downstream circuits lose power
- Turn back on, verify power is restored
- Ensure only intended circuits are affected
Switches (Single and Double)
Section titled “Switches (Single and Double)”How to Interact:
- Click on the switch body to toggle positions
- Position 1 (default): Connects L terminals to 1 terminals
- Position 2: Connects L terminals to 2 terminals
Visual Feedback:
- Position 1: Normal color
- Position 2: Green color indicates switched state
What to Test:
- Toggle switch, observe which circuits receive power
- Test two-way switching (control between two devices)
- Verify lights or outlets respond correctly
Differential Switches (RCD/GFCI)
Section titled “Differential Switches (RCD/GFCI)”How to Interact:
- Click to toggle ON/OFF
- ON (default): Power flows, ground fault protection active
- OFF: Power cut, simulates tripped state
Visual Feedback:
- ON: Normal operation
- OFF: Visual indication of tripped/off state
What to Test:
- Turn off to simulate ground fault trip
- Verify all protected circuits lose power
- Test reset behavior
Lights
Section titled “Lights”Automatic Response:
- Lights automatically turn on when properly powered
- No clicking needed - purely responsive
Visual Feedback:
- ON: Glowing/bright effect when P=HIGH and N=LOW
- OFF: Normal appearance, no glow
What It Shows:
- Proper wiring verification
- Switch control working correctly
- Circuit breaker state
- Complete circuit path
Heaters
Section titled “Heaters”Automatic Response:
- Heaters automatically operate when powered
- No user interaction needed
Visual Feedback:
- ON: Animated heat wave effect from coils
- OFF: Static appearance, no animation
What It Shows:
- L=HIGH and N=LOW (proper power)
- Thermostat or switch control working
- Circuit breaker providing power
Outlets
Section titled “Outlets”Automatic Response:
- Outlets show powered state automatically
- Currently no visual indication (future feature)
What It Shows:
- Whether the outlet is receiving power
- Ground connection status (validated)
- Circuit breaker control
Visual Feedback During Simulation
Section titled “Visual Feedback During Simulation”Simulation mode provides rich visual feedback to help you understand your circuit behavior.
Component States
Section titled “Component States”Active/Powered Components:
- Lights: Glowing effect
- Heaters: Animated heat waves
- Switches in Position 2: Green color
- Circuit breakers: State indication
Inactive/Unpowered Components:
- Standard appearance
- No special effects
- Normal colors
Wire States
Section titled “Wire States”Currently, wires don’t show different colors based on electrical state, but this is a potential future enhancement. For now, you can trace power flow by observing which components are active.
Simulation Insights Panel
Section titled “Simulation Insights Panel”While simulating, Elecplanner may show:
- Warnings about circuit issues
- Errors preventing proper simulation
- Information about circuit behavior
- Safety concerns requiring attention
Circuit Validation and Warnings
Section titled “Circuit Validation and Warnings”When you start simulation, Elecplanner validates your circuit and reports any issues.
Automatic Validation Checks
Section titled “Automatic Validation Checks”Power Source Validation
Section titled “Power Source Validation”What it checks:
- At least one electrical panel exists
- No more than one electrical panel (multiple sources = hazard)
Possible Warnings:
- “No active power source in the circuit”
- “Multiple active power sources detected - potential hazard”
How to Fix:
- Add an Electrical Panel component
- Or remove extra electrical panels
Circuit Breaker Validation
Section titled “Circuit Breaker Validation”What it checks:
- Electrical panel has at least one circuit breaker
- Circuits are protected by breakers
Possible Warnings:
- “Circuit has no circuit breaker - safety hazard”
How to Fix:
- Add circuit breakers to your electrical panel
- Connect circuits through breakers, not directly
Grounding Validation
Section titled “Grounding Validation”What it checks:
- All outlets have ground connections
- Ground terminals are properly wired
Possible Warnings:
- “Outlet [ID] is not properly grounded - safety hazard”
How to Fix:
- Connect outlet PE (ground) terminal to ground bus
- Verify ground wire continuity
Disconnected Components
Section titled “Disconnected Components”What it checks:
- All components have at least one wire connection
- No isolated/floating components
Possible Warnings:
- “Node [ID] ([type]) is disconnected from the circuit”
How to Fix:
- Connect component to circuit with wires
- Or remove component if not needed
Future Validation Checks (Planned)
Section titled “Future Validation Checks (Planned)”The simulation engine will eventually check for:
- Short circuits: HIGH and LOW directly connected
- Overcurrent: Too much current for wire gauge
- Voltage drop: Long wire runs causing voltage loss
- Ground faults: Ground and phase connected
- Reverse polarity: Hot and neutral swapped
- Open circuits: Incomplete circuit paths
How Simulation Works (Technical Overview)
Section titled “How Simulation Works (Technical Overview)”Understanding how simulation works helps you troubleshoot issues and design better circuits.
The Simulation Loop
Section titled “The Simulation Loop”When simulation runs, Elecplanner performs these steps continuously:
Step 1: Build Circuit Graph
- Convert components and wires into a mathematical graph
- Each component becomes a node
- Each wire becomes a connection
- Terminals store their electrical state
Step 2: Initialize States
- Set component states to defaults (breakers ON, switches Position 1)
- Set terminal states to FLOATING initially
- Apply any user changes (clicked switches, toggled breakers)
Step 3: Validate Circuit
- Run all validation checks
- Generate warnings for issues
- Proceed with simulation even if warnings exist
Step 4: Propagate Electrical States
- For each wire connection:
- Compare states of both terminals
- Apply highest priority state to both
- Repeat for all connections
- This spreads electrical states through wires
Step 5: Update Components
- Each component examines its terminal states
- Components calculate their internal state
- Components set their output terminal states
- Example: Light checks if P=HIGH and N=LOW, then turns ON
Step 6: Check Stability
- Compare current states to previous iteration
- If unchanged, circuit is stable (done!)
- If changed, repeat from Step 4
- Maximum 100 iterations to prevent infinite loops
Step 7: Display Results
- Update component visuals
- Show warnings in UI
- Enable interactive controls
Why Iteration Matters
Section titled “Why Iteration Matters”Some circuits need multiple iterations to stabilize:
Example: Series Circuit
Circuit Breaker → Switch → Light → NeutralIteration 1:
- Breaker outputs HIGH
- Switch input sees HIGH
- Switch output still FLOATING
Iteration 2:
- Switch output now HIGH
- Light input sees HIGH
- Light output still FLOATING
Iteration 3:
- Light sees HIGH on P, LOW on N
- Circuit is complete
- States stabilize
Complex circuits with many components may need more iterations!
Testing Your Circuits
Section titled “Testing Your Circuits”Simulation is most useful when you actively test your circuits. Here are scenarios to try:
Basic Functionality Tests
Section titled “Basic Functionality Tests”Test 1: Simple Light Circuit
- Start simulation
- Verify light turns on automatically
- Click circuit breaker OFF
- Verify light turns off
- Click breaker back ON
- Verify light turns back on
Test 2: Switched Light
- Start simulation
- Light should be off (switch Position 2)
- Click switch to Position 1
- Verify light turns on
- Toggle switch again
- Verify light turns off
Test 3: Multiple Lights on One Switch
- Start simulation
- Toggle switch
- Verify all lights respond together
- Check that no lights are left on when switch is off
Advanced Tests
Section titled “Advanced Tests”Test 4: Three-Way Switching
- Start simulation
- Toggle first switch
- Observe light state
- Toggle second switch
- Observe light state changes
- Try all four combinations of switch positions
Test 5: Circuit Breaker Protection
- Multiple circuits from one panel
- Turn off one breaker
- Verify only that circuit loses power
- Verify other circuits still work
Test 6: Outlet Grounding
- Start simulation
- Check for grounding warnings
- Verify all outlets are grounded
- Fix any that aren’t
Test 7: Differential Switch Protection
- Circuit protected by differential switch
- Turn off differential switch
- Verify entire protected circuit loses power
- Turn back on
- Verify power is restored
Stress Tests
Section titled “Stress Tests”Test 8: Maximum Load
- Many devices on one circuit breaker
- Start simulation
- Verify all devices receive power
- Check for overcurrent warnings (when implemented)
Test 9: Complex Switching
- Multiple switches controlling multiple loads
- Test every switch combination
- Verify no unexpected behavior
- Document the switching logic
Troubleshooting Simulation Issues
Section titled “Troubleshooting Simulation Issues”Simulation Won’t Start
Section titled “Simulation Won’t Start”Problem: Clicking “Start Simulation” does nothing or shows error
Possible Causes:
- No electrical panel in circuit
- Multiple electrical panels (not allowed)
- Critical component configuration error
Solutions:
- Add exactly one Electrical Panel component
- Check for duplicate electrical panels
- Verify all components are properly configured
- Check browser console for errors
Component Doesn’t Respond to Clicks
Section titled “Component Doesn’t Respond to Clicks”Problem: Clicking switch/breaker during simulation has no effect
Possible Causes:
- Not clicking directly on component body
- Simulation is processing (brief delay)
- Component is not clickable during simulation (by design)
Solutions:
- Click directly on the component’s main body
- Wait a moment and try again
- Verify component type supports interaction
Light Won’t Turn On
Section titled “Light Won’t Turn On”Problem: Light appears off even when it should be on
Check:
- Is circuit breaker ON?
- Is switch in correct position?
- Is wire actually connected to Phase terminal?
- Is neutral wire connected?
- Is circuit path complete?
Solutions:
- Toggle circuit breaker
- Toggle switch to Position 1
- Verify wire connections at terminals
- Trace complete circuit: Breaker → Switch → Light → Neutral → Panel
Everything Shows As Disconnected
Section titled “Everything Shows As Disconnected”Problem: All components show “disconnected” warning
Cause:
- No electrical panel, or
- Panel not connected to any circuit breakers, or
- Breakers not connected to any devices
Solutions:
- Add Electrical Panel
- Add circuit breakers to panel
- Wire from breakers to devices
- Ensure complete circuit paths
Simulation Shows “Processing…” Forever
Section titled “Simulation Shows “Processing…” Forever”Problem: Simulation gets stuck processing
Cause:
- Circuit configuration causes infinite loop
- Very complex circuit taking long time
- Browser performance issue
Solutions:
- Stop and restart simulation
- Simplify circuit temporarily to isolate issue
- Check for unusual wire configurations
- Reload page if necessary
Warnings Appear But Circuit Works
Section titled “Warnings Appear But Circuit Works”Problem: Simulation shows warnings but everything seems to work
Explanation:
- Warnings are informational, not blocking
- They highlight safety concerns or potential issues
- Circuit can simulate even with warnings
Action:
- Review warnings carefully
- Fix safety issues (especially grounding)
- Understand the warning implications
- In real installation, these must be addressed!
Best Practices for Simulation
Section titled “Best Practices for Simulation”Before Starting Simulation
Section titled “Before Starting Simulation”-
Complete Your Wiring
- Finish basic circuit connections
- Verify all components have necessary wires
- Check that power source is connected
-
Organize Your Layout
- Arrange components logically
- Clean wire routing
- Label important components
-
Review Circuit Logic
- Understand what should happen
- Document expected behavior
- Identify test scenarios
During Simulation
Section titled “During Simulation”-
Test Methodically
- Start with simple tests (breaker on/off)
- Progress to complex scenarios
- Document what you test
-
Observe Carefully
- Watch for visual feedback
- Check unexpected behavior
- Note component responses
-
Fix Issues Immediately
- Stop simulation to fix wiring
- Make changes in edit mode
- Restart simulation to verify fix
After Simulation
Section titled “After Simulation”-
Review Warnings
- Address all safety warnings
- Fix disconnected components
- Verify grounding
-
Document Behavior
- Note how circuits work
- Record switch combinations
- Create usage notes for installers
-
Iterate and Improve
- Refine circuit design
- Optimize wire routing
- Test again
Limitations and Known Issues
Section titled “Limitations and Known Issues”Not Yet Implemented
Section titled “Not Yet Implemented”Advanced Electrical Calculations:
- Voltage drop calculations
- Current/amperage calculations
- Wire gauge vs. load verification
- Short circuit detection
- Overcurrent protection
Visual Enhancements:
- Wire color based on electrical state
- Current flow animation
- Voltage levels displayed
- Power consumption indicators
Complex Scenarios:
- Some multi-phase circuits
- Advanced differential protection behavior
- Detailed ground fault scenarios
- Complex load calculations
Known Issues
Section titled “Known Issues”Performance:
- Very large circuits (100+ components) may be slow
- Complex switching scenarios may take multiple iterations
- Browser performance affects simulation speed
Edge Cases:
- Some unusual wiring configurations may not stabilize
- Complex multi-panel scenarios not fully supported
- Some component interactions may not be realistic
Visual Feedback:
- Not all components show state changes visually
- Wire electrical states not color-coded
- Some states difficult to distinguish
Workarounds
Section titled “Workarounds”If you encounter limitations:
- Simplify complex circuits into testable sections
- Test in stages - add complexity gradually
- Use annotations to document expected behavior
- Report issues to help improve simulation
Future Enhancements
Section titled “Future Enhancements”Planned improvements to simulation:
Coming Soon
Section titled “Coming Soon”- ✅ Better visual feedback for wire states
- ✅ Improved component state indicators
- ✅ More comprehensive warnings
- ✅ Performance optimizations
On the Roadmap
Section titled “On the Roadmap”- 🔄 Voltage and current calculations
- 🔄 Short circuit detection
- 🔄 Load balancing analysis
- 🔄 Wire sizing recommendations
- 🔄 Energy consumption estimates
- 🔄 Multi-phase support
Under Consideration
Section titled “Under Consideration”- 💡 Time-based simulation (day/night cycles)
- 💡 Temperature effects
- 💡 Aging and degradation simulation
- 💡 Cost estimation based on usage
- 💡 Export simulation results
Real-World Considerations
Section titled “Real-World Considerations”Simulation vs. Reality
Section titled “Simulation vs. Reality”What Simulation Does Well:
- ✅ Verify circuit logic and switching
- ✅ Test basic functionality
- ✅ Identify wiring errors
- ✅ Validate component connections
- ✅ Check safety basics (grounding)
What Simulation Doesn’t Replace:
- ❌ Real electrical testing
- ❌ Load calculations by electrician
- ❌ Code compliance verification
- ❌ Professional inspection
- ❌ Safety certification
Using Simulation Results
Section titled “Using Simulation Results”For Planning:
- Use simulation to validate designs
- Test scenarios before installation
- Document expected behavior
- Train installation crews
For Installation:
- Simulation ≠ approval for installation
- Still need permits and inspections
- Still need licensed electrician
- Still need code compliance
For Troubleshooting:
- Simulation helps identify logic errors
- Can’t diagnose physical problems
- Use with real-world testing
- Verify assumptions with measurements
Safety Reminders
Section titled “Safety Reminders”Planning Only
Section titled “Planning Only”- Elecplanner simulation is for planning and visualization
- Not a substitute for proper electrical engineering
- Not approved for permit applications without review
- Not a guarantee of code compliance
Professional Installation Required
Section titled “Professional Installation Required”Always hire licensed professionals:
- ⚡ Licensed electricians for all installations
- ⚡ Proper permits and inspections
- ⚡ Code compliance verification
- ⚡ Safety testing after installation
- ⚡ Ground fault and arc fault protection
Never Attempt DIY Electrical
Section titled “Never Attempt DIY Electrical”- Electricity can kill
- Improper wiring causes fires
- Insurance may not cover DIY work
- Many jurisdictions require licensed electricians by law
Use Elecplanner to plan. Use professionals to install.
Related Topics
Section titled “Related Topics”- Wiring Basics - How to wire your circuits
- Switch Component - Interactive switch behavior
- Circuit Breaker - Power control
- Light Component - Observing light responses
- Electrical Panel - Power source
- Components Overview - All simulated components
💡 Quick Tip: Think of simulation as your virtual electrical tester. Use it early and often during design to catch mistakes when they’re easy to fix - not after installation begins! Test every switch, every circuit, every scenario. Your future self (and your wallet) will thank you!