Velxio 2.5
Arduino meets SPICE in your browser
Real-time analog circuit simulation via ngspice-WASM, wired to Arduino, ESP32, and Raspberry Pi Pico. Resistors, capacitors, op-amps, transistors, live ammeters and voltmeters — co-simulated with your firmware. Free, open-source, no install.
From digital-only to full circuit emulation
Velxio 2.0 simulated your firmware perfectly. Velxio 2.5 simulates the circuit around it — with the same ngspice engine used by professional EDA tools, running entirely in your browser tab.
Not a linear approximation
Velxio solves the full Modified Nodal Analysis every tick. Non-linear devices — diodes, BJTs, MOSFETs, op-amps with saturation — behave like the real thing, not like textbook idealisations.
Real firmware. Real circuit. Same canvas.
GPIO pins drive SPICE nets as voltage sources. ADC inputs read solved node voltages. analogRead() returns what the circuit actually produces — not a simulated shortcut.
100% browser, 100% offline
ngspice compiled to WebAssembly via the open-source eecircuit-engine. No server, no cloud, no account. Works offline after the first load. Your circuits never leave your machine.
100+ SPICE-accurate components
A complete electronics catalogue — passives, semiconductors, logic, instruments — every one of them modelled with real ngspice device cards, not behavioural stand-ins.
ngspice-WASM Engine
- ngspice compiled to WebAssembly via eecircuit-engine (lazy-loaded)
- Real-time transient analysis at ~60 Hz solve rate
- Full Modified Nodal Analysis — not a linear approximation
- Always-on mode: every circuit is SPICE-solved, no toggle needed
- Browser-native — no server, no install, no account
- Works offline after first load
Passive Components
- Resistor — custom value + common presets (220Ω, 1k, 10k, 100k)
- Capacitor — electrolytic, ceramic, polarity-aware (10nF–1mF)
- Inductor — custom value + presets (100µH–10mH)
- Potentiometer — live slider updates SPICE resistance
- Photoresistor (LDR) and Photodiode — lux-driven
- NTC thermistor — temperature-driven resistance
Active Semiconductors
- 5 BJTs: 2N2222, 2N3055, 2N3906, BC547, BC557
- 4 MOSFETs: 2N7000, IRF540, IRF9540, FQP27P06 (P/N-channel)
- 5 op-amps: LM358, LM741, TL072, LM324, ideal — with saturation rails
- 4 linear regulators: 7805, 7812, 7905, LM317 with dropout
- Diodes: 1N4148, 1N4007, 1N5817, 1N5819, Zener 1N4733
- Optocouplers 4N25 and PC817 with CTR modelling
Logic & Integrated Circuits
- 7 basic logic gates: AND, OR, NAND, NOR, XOR, XNOR, NOT
- 8 multi-input gates (3 and 4 inputs)
- 7 74HC-series ICs as DIP-14 packages
- 3 flip-flops: D, T, JK (edge-triggered digital)
- Relay (SPDT) with coil inductance, hysteresis, flyback diode
- L293D dual H-bridge motor driver
Live Instruments
- Ammeter — live current reading wired between any two nodes
- Voltmeter — live node voltage with probe leads
- Oscilloscope with multi-channel capture
- Signal generator — sine, square, DC (configurable frequency, amplitude, offset)
- Batteries: 9V, AA, coin-cell with realistic ESR
- LED brightness scales with actual current
Board Co-Simulation
- Digital GPIO pins drive SPICE nets as voltage sources in real time
- ADC inputs read solved analog node voltages back into firmware
- analogRead() returns real SPICE-solved node values
- Arduino + transistor + motor — wired and solved together
- ESP32 + op-amp + sensor — co-simulated end-to-end
- Board-less circuits — pure analog workbenches are now a first-class mode
Sensor Sliders
- Photodiode illumination slider (0–1000 lux)
- Photoresistor illumination slider with LDR curve
- NTC temperature slider (-40–125 °C)
- Gas sensor, flame sensor, tilt switch — live panels
- Property changes invalidate the netlist memo → next tick re-solves
- Live sliders while running, number inputs while stopped
Examples & Testing
- 40 new analog/hybrid circuit examples added
- Voltage dividers, RC filters, op-amp amplifiers, rectifiers
- Transistor switches, relay drivers, H-bridge circuits
- Full-wave rectifier, Wheatstone bridge, Schmitt trigger
- End-to-end SPICE behaviour tests (capacitor charging, rectification)
- 164+ sandbox tests passing against ngspice reference results
Docs & DX
- New circuit-emulation.md — implementation deep-dive
- Electrical simulation user guide in the docs site
- ngspice gotchas documented (unicode in titles, MOSFET Level=3)
- Separated useElectricalStore for clean state boundaries
- Reference sandbox in test/test_circuit/ for fast iteration
- VITE_ELECTRICAL_SIM build flag to disable if needed
Hybrid digital + analog co-simulation
Most browser simulators run either your firmware OR a circuit — never both together. Velxio 2.5 solves them on the same clock.
Drive a motor from an Arduino pin
Pin HIGH → MOSFET gate → drain current through a real inductive load → back-EMF through a flyback diode. All SPICE-solved. Scope the gate and drain voltages side by side.
Read a sensor through a real op-amp
Photodiode → transimpedance op-amp → ADC. Adjust the lux slider and watch analogRead() respond through the actual amplifier stage — saturation, slew rate, and all.
Debug with live instruments
Drop an ammeter between any two nodes, a voltmeter on any net. The oscilloscope captures digital pins and analog nodes together. No "what if" — just measurements.
40 new analog & hybrid examples
Pre-wired circuits you can open in one click — from textbook fundamentals to realistic Arduino+analog systems.
Fundamentals
Voltage divider, RC low-pass filter, RC high-pass filter, LR circuit, capacitor charging, RLC resonance, Wheatstone bridge.
Diodes & rectifiers
Half-wave rectifier, full-wave bridge rectifier, Zener regulator, clamper, clipper, voltage doubler.
Op-amp circuits
Inverting amplifier, non-inverting amplifier, summing amp, differential amp, integrator, differentiator, Schmitt trigger, comparator.
Transistor circuits
Common-emitter amplifier, transistor switch, Darlington pair, MOSFET driver, H-bridge, current mirror.
Arduino + analog
PWM-driven LED with RC smoothing, Arduino-controlled MOSFET motor driver, opto-isolated relay, photodiode + op-amp + ADC pipeline.
Sensors
NTC thermistor bridge, photoresistor light meter, photodiode transimpedance, potentiometer dimmer, flame detector.
The outcome
Velxio 2.5 closes the loop between firmware and hardware: the same tool that runs your sketch now solves the circuit around it.
Teach & learn electronics
A free, browser-based SPICE playground for students — with the added benefit of driving real microcontroller firmware. No license, no install, no lab booking.
Prototype before soldering
Validate analog front-ends, power stages, and sensor pipelines end-to-end before you order a single part. The scope and DMM are already on the bench.
Still 100% open source
AGPL-3.0 on GitHub. Built on ngspice, eecircuit-engine, avr8js, rp2040js, QEMU, and wokwi-elements. Fork it, host it, extend it.
Built on open-source
Velxio 2.5 stands on the shoulders of decades of electronics tooling. Huge thanks to the maintainers of every project below.
ngspice
The open-source SPICE circuit simulator — powers every analog solve in Velxio 2.5
eecircuit-engine
ngspice compiled to WebAssembly — the bridge that makes browser SPICE possible
avr8js
AVR8 CPU emulator in JavaScript — Arduino Uno, Nano, Mega, ATtiny85
rp2040js
RP2040 emulator — Raspberry Pi Pico and Pico W
wokwi-elements
Web Components for electronic parts — LEDs, buttons, sensors, displays
Velxio
This project — free, open-source Arduino + SPICE co-simulator
Try Velxio 2.5 now
Open the editor and start simulating — firmware and analog circuit, same canvas, zero setup.
Launch Simulator