Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
DigitalJs: Digital circuit simulator in browser (github.com/tilk)
221 points by billconan on June 24, 2019 | hide | past | favorite | 27 comments


Very curious, what is it that makes circuit simulation so interesting to HN readers? I'm certainly biased and have spent years on the problem as one of the developers of CircuitLab (YC W13) -- for example try: https://www.circuitlab.com/editor/53xa3r/ (just click "Simulate" and "Run Time-Domain Simulation") -- but in general I'm surprised at the high level of interest from this audience. Is your interest in electronics more theoretical or practical? What's your existing level of knowledge? What do you want to learn? What do you want these tools to be able to do?


As a software engineer, I get bored by looking at monitors and typing on keyboards. I want to make something physical. I have learned verilog and some drag n drop tool I don't recall its name, but at this point, I don't remember anything.

My interests in electronics come from my interests in robotics. I basically need a tool to draw simply pcb boards, and send them for manufacturing, or at least get an estimate on how much to manufacture. This is what I want to build https://dspace.mit.edu/handle/1721.1/118671


Very nice!

I've been using SimcirJS [1] to teach computer architecture to a group of primary school children. DigitalJS would be a replacement if it were possible to drag and drop components from a menu in addition to instantiating with HDL. I notice that the schematic is editable, so it's very close to being able to do this. Is there a way do drag and drop components from a menu based library, each component in the menu mapping behind the scenes to an HDL module (or a child schematic)?

At first glance I would prefer DigitalJS over SimcirJS, as being HDL based it offers the opportunity of efficiently implementing things such as memory as an array in the HDL. In SimcirJS memory has to be build from raw gates (or the simulator extended), so it's quite slow to simulate an entire CPU with attached memory.

[1] https://kazuhikoarase.github.io/simcirjs/


Perhaps MULTISim


I personally don't have a lot of interest in circuit design, but as a software developer I like finding examples of solid craftsmanship in my domain that are open source, since they give me something to learn from.


I already use and pay for CircuitLab. (although I wish the free educator version applied to high school teachers)

I use it to design and test circuits for use in teaching physics. Simple stuff: ohm's law, series parallel, Kirchoff's laws.


It’s cool! :-)

(I would like to finish my comment but just to prevent excessive downvotes...) It’s cool (at least to me) that a software can simulate the physics world fast & accurately. It makes some interesting ideas pop out of my head, e.g. making some flip/flops and compose them into a basic 8-bit CPU and simulate.

Overall it’s similar to where people get excited with minecraft. I’m pretty sure people who upvoted this article also has some interest in minecraft.


Well, all the computers I've ever programmed are made of circuits, and I've cobbled together a few hundred circuits in my life. I think it's good to understand the fundamentals of what you're doing rather than write it off as magic, and even though in some ways the von-Neumann-machine abstraction is unmoored from the underlying implementation technology, in other ways it is not.

Also, though, I want to bootstrap programmable autotrophic self-reproducing automata, in order to put an end to the scarcity of capital that is such a limitation on human potential. Those automata need control systems, and despite the obvious fabrication difficulties, solid-state electronic circuits have major speed and reliability advantages over the other alternatives.


> Very curious, what is it that makes circuit simulation so interesting to HN readers?

For me, because I'm interested in making electronics but never learned it well (beyond plugging LEDs and servos to Arduino, or soldering together some kits and an ignition system for a model rocket engine). I don't have as much time as I had before to learn everything the slow way of etching my own PCBs and tinkering with the soldering iron - so I'm interested in anything that lets me test out and iterate on circuit designs without having to actually build them out of physical components.


I would love for one of these to accurately simulate various vacuum tubes. The unfortunately life a guitar amp builder is an absolute crap ton of of prototyping high voltage electronics.


If you can find a version of circuit maker/circuit maker 2000 (and an emulator, it runs on windows 8.1 but no idea about Win10), it has some decent models of tubes in the standard SPICE library. UI is kinda dated but it's less unfriendly than LTSpice/PSPICE and way snappier/useful than the Web simulators out there.


For me, it's a way to bridge two interesting topics: electrical engineering & software development. I was lucky enough to spend 4 years at National Instruments building Multisim desktop and then a web version (multisim.com).

A lot of cad and simulation tools are as complex as video games. But the development cycle doesn't have the work-life balance issues that game dev does.


I guess it is because to program on the computer is to drawing blueprints to a generic circuit system.

There are fixed-program computers like calculators (which are static combinations of circuits) and non-fixed-program computers which we simply call them computers.

Similar to a well-designed assembly language, a direct manipulation on circuit systems is also as fun as programming.


Some of us are software developers but come from hardware backgrounds so it’s neat to see hardware simulated in software. I just find simulations interesting, curious how circuit simulations work under the hood.

Also I think people here just like seeing software applied to interesting domains that aren’t just web apps.


Im really into music gear and this is rad! My brother makes his own pedals and I can design the circuits.


I like playing with guitar pedals, and circuit design is kinda like LEGO in that regard. The building part can be lethargic, or so frustrating it forces your brain into reset.


For me it's understanding how a CPU works at the lower levels. Seeing complex functionality arise from such simple things like transistors is quite amazing.


I've long been interested in both software and hardware. My first computer was a Mac Plus, and I had to fix it myself at age 9 before I could start coding on it. That progressed into fixing iPods, and playing around with firmware: modding them with iPodLinux.

I studied Electronic Systems Engineering at university, through to a first-class honours Masters degree. With the trend towards custom chips (Apple's A-series processors, Bitcoin ASICS, etc), I thought it's the future.

However, I've only been able to find jobs in software. Usually for startup companies in IoT. From 2014-2018 I moved to Taiwan to work for a microSD card manufacturing company, but even then I ended up writing control systems software rather than actually designing chips. The designs are all made in America, the silicon at TSMC, so OSE's packaging business wasn't able to use that part of my interest. I'm not trying to move to the US, so I guess I can't be a chip designer.

Hardware still interests me though, and I carry around a lot of gadgets to help me pursue projects when I think of them. Then I usually post them on Hackaday (e.g. KeyMouSerial, SMC Voltmeter).

When I get a stable address (I've been wandering around the world for a year, and now I'm waiting for a visa), I'd like to learn KiCad, and get a PCB manufactured. I've been wanting to build an EspUSB [1] for years, but they're not available to purchase. The problem is I don't know what to write to PCBWay. The design files are online, but PCBWay couldn't understand them. I'd be guessing the BOM from the schematics, and I have only one chance to get it right - I probably can't reorder if I mess it up. So I've lived without it, only using my KeyMouSerial adaptor instead.

Video is another area that's ripe for hardware hacking. HDMI input is expensive for computers. Some projectors have a Freeze button, but others don't. I'd like to build a hardware Freeze button for HDMI or VGA, probably using a CPLD or FPGA.

In some ways, this is a project where circuit simulation is useful: clock timings are important, cost of manufacturing is high, I can't just buy an existing finished product. But I don't need a web app with some virtual transistors and blinking lights (though that's fun for education). I need a professional tool, and I'm not really sure what to use for this next step.

Will I ever build these projects? I don't know. It depends as much on factors from my personal life as the availability of tools and educational materials towards this kind of project. I hope that even if I don't make it though, someone will, and will make their hardware easily available to purchase (not just a half-finished design file that PCBWay can't understand).

[1] https://www.youtube.com/watch?v=FPBzOaLbWhM


https://www.falstad.com/circuit/ i prefer this one for analog circuits (and digital, too) it nicely visualises current and potential and has a lot of components and examples.


Awesome site, thanks for sharing this.


I used the yosys demo found in the readme to learn verilog alongside my computer science machine organization curriculum, and that was a blast! It's a wonderful little simulator and has plenty of examples for commonly taught logic circuits in university.


Since we've got all the true nerds in here I'll go ahead and drop a link to the gate-level bubblesort implementation I made a while back: https://anderspitman.net/apps/hardware-bubblesort/


I know this is pretty unrelated but does anyone know of something similar for Lewis structures in chemistry?


Circuit schematics maybe?


It's refreshing to look at the comments on this post and see discussion surrounding not just the linked item, but also other similar items that people are either personally involved in or prefer over the one linked.


I like the interface, nicely done.


Quite cool!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: