CVS — Trình mô phỏng mạch & Arduino | SPICE · ESP32 · RP2040 · ATtiny85 · Custom Chips

Editor Examples CVS 2.5 (SPICE) Circuit Simulator SPICE Simulator Custom Chip Simulator Arduino Simulator Arduino Emulator ATmega328P Simulator ATtiny85 Simulator Arduino Mega Simulator ESP32 Simulator ESP32-C3 Simulator Raspberry Pi Pico Simulator Raspberry Pi 3 Simulator About

Trình mô phỏng mạch và vi điều khiển — SPICE-accurate analog kết nối với Arduino, ESP32, RP2040, ATtiny85 & hơn thế nữa

CVS là trình mô phỏng mạch online với co-simulation digital + analog. Phân tích SPICE thời gian thực (ngspice-WASM) kết nối với 19 board trên 5 kiến trúc CPU. Hỗ trợ custom chip bằng C, Rust hoặc AssemblyScript, 100+ component tương tác, oscilloscope, voltmeter, ammeter, Monaco Editor, Serial Monitor, arduino-cli compiler và Library Manager.

What's new in CVS 2.5

  • Real-time SPICE analog simulation in your browser via ngspice-WASM (eecircuit-engine) — Modified Nodal Analysis at ~60 Hz, not a linear approximation
  • Hybrid digital + analog co-simulation — GPIO pins drive SPICE nets as voltage sources; analogRead() reads solved node voltages back into firmware
  • 100+ SPICE-accurate parts: resistors, capacitors, inductors, BJTs, MOSFETs, op-amps (LM358/741/TL072), regulators (7805/7812/LM317), Zener/Schottky diodes, optocouplers, relays
  • Live instruments: oscilloscope (multi-channel), voltmeter, ammeter, signal generator (sine/square/DC)
  • 40+ new analog & hybrid examples: voltage divider, RC filter, full-wave rectifier, Schmitt trigger, op-amp amplifier, Wheatstone bridge, H-bridge motor driver

Supported Boards

  • Arduino Uno (ATmega328P) — full AVR8 emulation at 16 MHz
  • Arduino Nano (ATmega328P) — full AVR8 emulation at 16 MHz
  • Arduino Mega 2560 (ATmega2560) — 256 KB flash, 54 digital pins, 4 serial ports
  • ATtiny85 — AVR, 8 KB flash, DIP-8, all 6 I/O pins emulated
  • Arduino Leonardo (ATmega32u4) — USB HID capable AVR
  • Arduino Pro Mini (ATmega328P) — 3.3 V / 5 V variants
  • Raspberry Pi Pico (RP2040) — ARM Cortex-M0+ at 133 MHz
  • Raspberry Pi Pico W (RP2040) — ARM Cortex-M0+ + WiFi
  • ESP32-C3 DevKit (RISC-V RV32IMC) — 160 MHz, QEMU libqemu-riscv32
  • Seeed XIAO ESP32-C3 (RISC-V RV32IMC) — compact, QEMU libqemu-riscv32
  • ESP32-C3 SuperMini (RISC-V RV32IMC) — mini form factor
  • CH32V003 (RISC-V RV32EC) — 48 MHz, ultra-compact DIP-8
  • ESP32 DevKit V1 / C V4 (Xtensa LX6) — 240 MHz, WiFi, QEMU
  • ESP32-S3 (Xtensa LX7) — 240 MHz, dual-core, QEMU
  • ESP32-CAM (Xtensa LX6) — camera module, QEMU
  • Seeed XIAO ESP32-S3 (Xtensa LX7) — compact, QEMU
  • Arduino Nano ESP32 (Xtensa LX6) — Arduino form factor, QEMU
  • Raspberry Pi 3B (ARM Cortex-A53) — full Linux OS via QEMU raspi3b, runs Python

Get Started

Open the Editor — no installation needed.
Self-host with Docker: docker run -d -p 3080:80 ghcr.io/davidmonterocrespo24/velxio:master

Frequently Asked Questions

CVS hỗ trợ mô phỏng analog như SPICE không?
Có. CVS 2.5 có mô phỏng analog SPICE thời gian thực bằng ngspice biên dịch sang WebAssembly. Mỗi tick chạy Modified Nodal Analysis đầy đủ để các linh kiện phi tuyến hoạt động gần với silicon thật hơn.
Can CVS simulate analog circuits like SPICE?
Yes. CVS 2.5 includes real-time SPICE analog simulation via ngspice compiled to WebAssembly. It runs full Modified Nodal Analysis on every tick — non-linear devices (diodes, BJTs, MOSFETs, op-amps with saturation) behave like real silicon, not idealised models.
Can I co-simulate Arduino code with an analog circuit?
Yes. GPIO pins drive SPICE nets as voltage sources, and ADC pins read solved analog node voltages back into firmware. analogRead() returns the actual SPICE-solved value at that net — so you can build PWM-driven RC filters, transistor switches, op-amp signal chains, and motor drivers end-to-end on the same canvas.
Can I create my own custom chips?
Yes. CVS implements the Wokwi Custom Chips API. Write your chip logic in C, Rust, or AssemblyScript — CVS compiles it to WebAssembly and exposes pin I/O, attribute reads, timers, and I²C/SPI hooks. Save chips to your account and reuse them across projects.
CVS có phải lựa chọn thay thế Wokwi không?
Có. CVS hỗ trợ workflow mô phỏng vi điều khiển tương tự Wokwi và bổ sung co-simulation analog bằng SPICE trên cùng canvas.
Is CVS a Falstad / Tinkercad / CircuitLab alternative?
Với mạch analog, có. CVS chạy ngspice để giải mạch và đồng thời chạy firmware trên vi điều khiển điều khiển mạch.
What boards are supported?
19 boards: Arduino Uno (ATmega328p / AVR8), Arduino Nano, Arduino Mega 2560 (ATmega2560), ATtiny85, Arduino Leonardo (ATmega32u4), Arduino Pro Mini, Raspberry Pi Pico & Pico W (RP2040), ESP32 / ESP32-S3 / ESP32-CAM / Nano ESP32 (Xtensa via QEMU), ESP32-C3 / XIAO ESP32-C3 / ESP32-C3 SuperMini / CH32V003 (RISC-V), and Raspberry Pi 3B (Linux ARM Cortex-A53 via QEMU).

Free Online Circuit Simulator with SPICE

CVS is a free online circuit simulator with real-time SPICE analog simulation in your browser. Drop resistors, capacitors, op-amps, transistors, diodes, and voltage regulators on the canvas — every component is modelled with real ngspice device cards, not behavioural stand-ins. Open Circuit Simulator →

  • ngspice-WASM engine — full Modified Nodal Analysis at ~60 Hz solve rate
  • Non-linear devices behave like real silicon: BJT cutoff/saturation, op-amp rails, diode forward drop
  • Live oscilloscope, voltmeter, ammeter, signal generator
  • 100+ SPICE-accurate parts: passives, semiconductors, logic ICs, regulators, optocouplers, relays
  • Always-on — no toggle, every circuit is SPICE-solved

SPICE Simulator Online — ngspice in Your Browser

CVS runs ngspice compiled to WebAssembly via eecircuit-engine. Full transient analysis and real device models run in your browser tab. Open SPICE Simulator →

  • Real ngspice — same engine, browser-native via WASM
  • 5 BJTs (2N2222, 2N3055, 2N3906, BC547, BC557)
  • 4 MOSFETs (2N7000, IRF540, IRF9540, FQP27P06)
  • 5 op-amps (LM358, LM741, TL072, LM324, ideal) with saturation rails
  • 4 linear regulators (7805, 7812, 7905, LM317)
  • Diodes: 1N4148, 1N4007, 1N5817, 1N5819, Zener 1N4733

Custom Chip Simulator — Define Your Own ICs in C / Rust

CVS implements the Wokwi Custom Chips API: write your chip logic in C, Rust, or AssemblyScript, compile to WebAssembly, and the simulator drives its pins like any other component. Build a sensor model, a digital protocol bridge, or a behavioural IC stand-in — and reuse it across projects. Open Custom Chip Simulator →

  • Wokwi-compatible Custom Chips API with WASI shim
  • Pin reads/writes, attribute reads, timers
  • I²C and SPI bus integration
  • Save chips to your account and reuse across projects
  • Library of starter examples (sensors, decoders, bridges)

ATtiny85 Simulator — Real AVR Emulation in Your Browser

CVS simulates the ATtiny85 with cycle-accurate AVR8 emulation. Full DIP-8 pinout, 8 KB flash, 6 GPIOs, USI peripheral, 10-bit ADC, Timer0/Timer1 with PWM, and watchdog. Wire it to LEDs, sensors, or analog circuits and run real ATtiny code without a programmer. Open ATtiny85 Simulator →

  • Cycle-accurate ATtiny85 emulation via avr8js
  • All 6 I/O pins (PB0–PB5) with proper port behaviour
  • Timer0 (8-bit), Timer1 (8-bit), watchdog timer
  • 10-bit ADC with 4 input channels
  • USI peripheral for I²C / SPI bit-banging
  • Wire to SPICE analog parts for full circuit testing

Free Online Arduino Simulator

CVS is a free online Arduino simulator with real AVR8 emulation at 16 MHz. Simulate Arduino code with 48+ interactive electronic components directly in your browser — no install, no account required. Open Arduino Simulator →

  • Arduino Uno (ATmega328P) simulation at 16 MHz
  • 48+ visual components: LEDs, sensors, displays, servos
  • Serial Monitor with auto baud-rate detection
  • Multi-file sketch support (.ino, .h, .cpp)
  • Free browser-based simulation

Arduino Emulator — Real AVR8 & RP2040 Emulation

CVS is a cycle-accurate Arduino emulator built on avr8js and rp2040js. Every AVR opcode is faithfully emulated at 16 MHz — the same silicon behavior as real hardware. Open Arduino Emulator →

  • All 135 AVR8 instructions emulated
  • Hardware timers (Timer0/1/2) with PWM, CTC, and overflow interrupts
  • 10-bit ADC, full USART0 (TX/RX), SPI, I2C
  • RP2040 dual-core ARM Cortex-M0+ via rp2040js
  • RISC-V RV32IMC (ESP32-C3) emulation via QEMU lcgamboa

ATmega328P Simulator

Simulate ATmega328P firmware exactly as it runs on Arduino Uno and Nano. Full AVR8 emulation: PORTB, PORTC, PORTD, Timer0/1/2, ADC, USART0, and all interrupt vectors. Open ATmega328P Simulator →

  • ATmega328P: 32 KB flash, 2 KB SRAM, 16 MHz
  • GPIO: PORTB (pins 8–13), PORTC (A0–A5), PORTD (0–7)
  • Timer0 (8-bit), Timer1 (16-bit), Timer2 (8-bit) — all PWM modes
  • 10-bit ADC, 6 analog channels (A0–A5)
  • USART0 with configurable baud rate

Arduino Mega 2560 Simulator

Simulate Arduino Mega 2560 (ATmega2560) code for free. 256 KB flash, 54 digital pins, 16 analog inputs, 4 hardware serial ports (Serial, Serial1, Serial2, Serial3), and 6 hardware timers. Open Mega 2560 Simulator →

  • ATmega2560: 256 KB flash, 8 KB SRAM, 16 MHz
  • 54 digital I/O pins (PORTA through PORTL)
  • 16 analog input channels (A0–A15), 10-bit ADC
  • 4 hardware USART channels: Serial0–3
  • 6 hardware timers: Timer0–5 (including three 16-bit)
  • 15 PWM output pins