6 ms·
Show HN: CircuitVerse – Online Digital Circuit Simulator
- asdojasdosadsa 8y agoReminds me of http://everycircuit.com/app/ http://everycircuit.com/app/
- bingoboingo33 8y agoI believe that's quite the unfair comparison. Even if the components model aren't very sophisticated, everycircuit can do full analog simulations. If you use chrome, you can run everycircuit in-browser, then try this example: http://everycircuit.com/circuit/4709435733180416/infinite-noise-random-number-generator-2 http://everycircuit.com/circuit/4709435733180416/infinite-no.... Circuitverse, as far as I can tell is just a logic simulator, which - from reading the comments - doesn't handle feedback loops.
- satu0king 8y agoYep! It was inspired by all these simulators :)
- oplav 8y agoAnother good one is http://www.falstad.com/circuit http://www.falstad.com/circuit. I remember using this quite a bit to double check homework.
- etimberg 8y agoWhen I was at NI I helped build https://www.multisim.com https://www.multisim.com which is powered by a full SPICE simulator.
- mrspeaker 8y agoI love tinkering with circuit simulators - this one seems really cool too, great work! Just wondering, from a programmer perspective: how do you simulate electricity? If you model a circuit in CircuitVerse, how similar would the results be to a real-world version?
- frankietwenty9 8y agoDepends on the quality of your SPICE models. (https://en.wikipedia.org/wiki/SPICE https://en.wikipedia.org/wiki/SPICE) When you model by hand you typically use ideal models. SPICE models can be vastly more complex. A good example is a diode which is harder to model as it's a non-linear device. Simulated "electricity" (voltage and current) is reduced to a set of differential equations, which the program then uses to plot charts.
- userbinator 8y agoThis one doesn't "simulate electricity" per se; it's a digital simulator, which means it evaluates the output of each node based on its inputs, and propagates the changes as necessary. The core principle is a discrete event simulator: https://en.wikipedia.org/wiki/Discrete_event_simulation https://en.wikipedia.org/wiki/Discrete_event_simulation If you model a circuit in CircuitVerse, how similar would the results be to a real-world version? As long as the gate delays and fanin/fanout are considered, the results would be logically valid. For simulation of more analogue effects (e.g. what happens if you connect the outputs of two gates together, and one tries to pull it high and the other low?) something like SPICE is necessary: https://en.wikipedia.org/wiki/SPICE https://en.wikipedia.org/wiki/SPICE ...and since that involves numerical solutions to nonlinear differential equations, is at least an order of magnitude slower.
- satu0king 8y agoYour analysis is correct with respect to circuitverse. This is just to test the logic correctness of your design after abstracting away the analog and real world nature of electricity.
- compumike 8y agoIt's possible to combine event-driven simulation (for digital) and nonlinear differential equation based simulation (for analog) within the same simulator. The simulation engine can be smart enough to mix the two efficiently. As a toy model, consider this 4-bit counter plus DAC (click "Simulate" at the bottom): https://www.circuitlab.com/editor/53xa3r/ https://www.circuitlab.com/editor/53xa3r/ The simulation loop is both event driven (when CLK1 flips state every 0.5 seconds), propagating those changes through combinatorial gates, and analog, simulating the op-amp to create a simple digital-to-analog converter (DAC). Bridging the analog and digital sides within the simulator is tricky, but not impossible. You are correct that if there were not both event-driven and analog simulation intermixed, and we simply simulated all the digital gates with their analog implementations in MOSFETs, that simulation would be at least an order of magnitude slower -- probably far worse! (Disclosure: I built CircuitLab's simulation engine.)
- userbinator 8y agoIt looks nice and easy to use but I can't seem to get something as basic as a two-NOR flip-flop to work: https://i.imgur.com/V6yXpMl.png https://i.imgur.com/V6yXpMl.png The gates themselves in isolation work fine, but connecting them together doesn't. I even tried "bootstrapping" the circuit by breaking the storage loop and setting the two gates' inputs so they're all consistent first before connecting them together, but then when I disconnect the bootstraps it immediately returns to the above arrangement. IMHO having trouble with something like that means the simulation engine is not quite usable yet... Edit: the above circuit works fine in Logisim. Also, as another minor tangent, I think the flip-flop is so much easier to understand when it's drawn to emphasise the storage loop, i.e. the two NORs essentially become inverters when one of their inputs is 0, and they act in positive feedback to hold the bit value; why almost every other diagram insists on crossing the wires is perplexing, since it only serves to confuse and complicate.
- satu0king 8y agoYes, the storage loop doesn't work yet. However you can simply use a d-flipflop to do what you need.
- userbinator 8y agoHowever you can simply use a d-flipflop to do what you need. The point of my exercise was to test a basic functionality. If you cannot simulate that, the feedback loops which arise naturally in more complex circuit designs won't work either. It's like the "fizzbuzz" of logic simulation.
- bjackman 8y agoIf you have a flip-flop atom then you can do some meaningful stuff; IIRC the gate-level circuit simulator that the Nand To Tetris course uses can't handle this stuff, and you can still build a CPU. I guess it just depends at what level you want to think about the circuit. Edit: maybe it should be called a "logic circuit" instead of a "digital circuit".
- Negative1 8y agoCompletely borked on mobile (Safari); views are squished with main circuit view being impossible to make out details.
- satu0king 8y agoIts really meant to be used on a computer. Mobile compatibility coming soon.
- bogomipz 8y agoThis is really slick! Very nice job. I realize that this is primarily a tool for teachers but I would love to see more public tutorials and examples. I realize there are many tutorials on the internet but I haven't seen any with such an interactive design interface like this. Might anyone else have some suggestion(tutorials plus editor) for such resources?
- satu0king 8y agoThank you, yes the team is working on this. Idea is a full documentation for people who don't have much knowledge of individual elements + community blog where community write stuff
- samfisher83 8y agoThis was makes from folks at IIT Bangalore. That is pretty cool.
- satu0king 8y agoThank you! but we are from IIIT Bangalore xD
- k1ns 8y agoMan, this brings me back to the days of experimenting with Redstone in Minecraft. I only ever got as far as a 4-bit ALU, but it really helped set me up for my circuit and logic classes in college. I wouldn't trade those days for anything.
- jungletime 8y agoCouple suggestions, that would make it fun for youtube videos: 1. Let the user change the background, and add letters/text. 2. Ability to add sound effects 3. Rube golberg style components that could be triggered by the circuit. 4. Render/Simulate real leds. 5. Add a gallery ... do you have a gallery of circuits others created? 6. Also, if you could save and output a video file of the circuit. It would make it easier to include for things like youtube videos, and possibly do animated logos and marquees using this simulator.
- satu0king 8y agoThanks for the tips! 1) Feature 4 definitely is a must. 2) Feature 5, not sure what would work well. 3) Feature 6, No idea what is Rube golberg style! 4) Feature 7, not sure what you mean but there are LEDs - analog, digital and RGB LEDs
- exabrial 8y agoMan, I would love to have a circuit simulator that can emulate valves (12AX7, EL84, EL34) correctly and accurately. It's so hard for me to experiment with guitar amp designs because most of the time you literally have to build it to figure out how it sounds.
- geekpoll 8y agoThis is a pretty good. I can see university students using this!