Diode – Build, program, and simulate hardware
withdiode.com318 points by rossant 4 days ago
318 points by rossant 4 days ago
I appreciated that smoke comes out of the battery if you short it :)
Edit: I am ex EE. I will note that it's horrible using this view. It is marginally more horrible than using breadboards in reality. Schematics exist because reality tends to suck or have inconsistencies. For example TO-99 packages come in different pin orders, so 2N3904 has the opposite order to a BC547. Also breadboards tend not to have full length bus bars depending on vendors. At least though in this form it's an ideal representation though which doesn't have parasitic capacitors, inductors, dodgy contacts and no ground plane all over it.
It is good fun though :)
Ah this reminds me of my first big mistake with PCBs. I have recently started down the hardware track, and my first PCB has a number of BC547 and BC558 transistors on it.
Once I had a functioning prototype, the next step was to convert it into a schematic. After that, you have to convert the schematic into a PCB. Now we are at two layers of translation, and at this step I made a mistake: I wanted to use SMD components to save money, and I found that the BC8xx transistors are the SMD equivalent of the BC5xx ones, so I used the footprint of the BC8xx transistors in my PCB, with no errors from KiCad.
As it turns out, the BC8xx footprint is not compatible with a BC5xx schematic! The pinout is different: the base is pin 1 instead of pin 2, so the components in my PCB that use transistors (crucially, the voltage controlled amplifier) didn't work. Unlike a bug, that mistake cost me $200 and weeks of development time, but after 10+ years of writing software I'm still happy to be making things that people can touch.
Schematics also help explain your circuit because the idioms of drawing them communicate intent. Which is one of the things the Shenzhen/Ladyada/Sparkfun/SeedStudio crowd don't get with their "schematic as data entry for layout" style. Some of them should know better.
Breadboards make me wince a little especially in a professional setting but I've made my peace with dev boards that come with DIP-style pins for them. Decent breadboards are so cheap now that every dev board get to live on its own permanent breadboard.
> Schematics also help explain your circuit because the idioms of drawing them communicate intent.
I think this is a key point. One could imagine three layers:
(1) NETLIST: a list of text-only descriptions, like "R1 1 0 1k", or even a sentence description "connect a 1k resistor between node 1 and node 0"
(2) SCHEMATIC: a 2D drawing with canonical symbols, straight lines for wires, and labels/notes
(3) LAYOUT: a 3D (or multi-layer 2D) physical representation for PCB, or in this case breadboarding
All three layers are useful. (Obviously you need layout to make a PCB, and you need a netlist for simulation.)
But for most humans, where we have 2D visual representations baked in, if you're trying to understand or communicate what's going on:
- It's really really hard to keep track of a bunch of text sentences like a netlist and node numbers/names for all but the simplest circuits -- maybe 3-5 elements?
- It's really really hard to follow a 3D layout of PCB tracks that leads to pads, and then having to remember pin orders etc.
- It's easiest to follow a schematic diagram. It's browsable. It contains "idioms", as you say, about signal flow, logical block groupings, etc.: purpose and intent and functionality, in a way that netlists and physical layouts don't.
FYI, for medium-large digital circuits, I don't think this is true: probably just reading VHDL/Verilog, like reading source code, makes more sense. This is closer to the "netlist" level. I think that's because you'd name modules and inputs/outputs in a way similar to how you'd name functions and arguments in software, which doesn't really apply to "Resistor" or "Capacitor" as primitives.
But for a pretty big practical range of mixed-mode and analog things, I'd argue that schematics really are the easiest level for our brains.
(Disclosure: I'm one of the founders of CircuitLab https://www.circuitlab.com/ (YC W13) where we've been building an online circuit simulator & schematic editor for a long time. Although I'm mostly on the simulation engine / netlist side. My cofounder and other teammates have done most of the schematic GUI work.)
IMHO solderless breadboards still have their place for prototyping some slow circuits, ballpark maybe < 1 MHz signals, if you're aware of the extra capacitance and limitations. :)
"…schematic as data entry for layout style…"
Maybe you can explain.
Are you saying in these cases often the physical PCB layout follows the geometry of the schematic?
I mean when they put parts down on the schematic and just attach net names to them. You know, the pull-up resistors in the corner with named nets on them, not shown attached to particular pins or buses. Usually with a dotted box drawn around them. Frequently horizontal.
Also usually totally implicit power routing. And no one that draws schematics that way has ever learned the value of drawing IC symbols to fit the circuit as opposed to the physical pinning of the device.
I remember following this at the time! FYI it was "shut down" (kept online but no further development) two years ago (https://x.com/KennethCassel/status/1620500575183073280)
> Decided to shutdown Diode. (For now the site is live, I'll likely open-source the code in case anyone wants to take the baton and run)
Kenneth is now working on RMFG (https://www.rmfg.com/)
I'm working on a similar project, it's called schematik.io and you can use it to generate hardware projects (schematics, components lists, code, everything). Love the 3d viewer they've done here.
Damn the 3D graphics look great
This would be useful for opensource hardware projects (aimed at beginners) to literally see how things are wired together. I'm still not at the schematic phase myself. But I use MS Paint wiring diagrams.
OMG the wires flex, damn
A more mature version of this is "CRUMB" found on steam, it costs money but it's got a lot of great features.
Steam: 78% positive reviews out of 675. $8.99. Windows-only, though the website says “CRUMB is available for iOS and Android along side its desktop counterparts on Windows and MacOS.”
https://store.steampowered.com/app/2198800/CRUMB_Circuit_Sim...
No affiliation.
Looks great, but pretty difficult to work with. Would be nice to be able to switch to top view to see more clearly where you're plugging things.
Looks great, but pretty difficult to work with. Would be nice to be able to switch to top view to see more clearly where you're plugging things.
Edit: Clicking the background and dragging it actually gave me the top view I was looking for. Thank you goodcanadian. That said, I still think this application is a better skillset demo than a practical tool to use.
You can click the background and drag to rotate the view
It's still clunky though. It's a great, cool thing that OP built but just not very practical.
Not a fan. The standard schematic abstraction is great and actually helps us parse circuits.
Don't add unnecessary complexity just because AIs are good at vibecoding threejs demos (edit: even if this particular demo seems to predate vibecoding and was likely used for training instead of being the product of inference).
So we're just using "vibe coded" as a generic insult now for project we don't like?
Well, it somehow gives off vibecoded vibes, even though it's not. Make of that what you want, but that's expressed in quite a few comments here.
Maybe it's just the extremely clean and generic presentation on the website without any links to the author / team / twitter.
For me there seems to be a listing of configurable settings or something but it only pops up for a single frame after I right-click-drag a component - this seems like a broken mouse interaction.
On the contrary, when I was in high school we had one class dedicated to digital electronics and it revolved around breadboard circuitry. You only had 30 minutes/day to tinker with the physical hardware then it had to be disassembled for the next class. Simulations like this are more approachable then schematics and would have been great for tinkering outside of class.
When I was a small child it was cool to play with circuitry (dad did some electronics) but as soon as I encountered components of different shape (a capacitor that looks like a resistor) it stopped making sense to me. thinking in schematics early is key
This is actually very cool and predates vibe coding, please stop gatekeeping.
I'll grant you the vibecoding comment. That was uncalled for and unjustified.
From an EE perspective I still see limited value in having a 3D breadboard. Having a standardized schematic language is really nice. Everybody knows how resistors, capacitors and transistors look like in a schematic, whereas they are all just little cuboids with varying number of pads in their smd packages. I recommend multisim blue for learning btw.
Nevertheless, a cool project and I should be more positive when commenting.
Is there a good free circuit simulator (that use a schematic as interface, I assume)?
I somewhat agree with you in general though—if the web UX is a breadboard… maybe just get a breadboard? At the same time, while physical parts are generally cheap enough, power supplies, multimeters, an oscilloscope… that part of the hobby can add up.
Sometimes too I am waiting a week or two for a part to arrive from Mouser, it is nice to be able to mock up a circuit online.
There are many. What's your (computing) platform and what are you trying to simulate? The more professional tools (beginning with freebies like LTspice) are oriented around letting you probe waveforms from simulated inputs and are not as oriented towards interactive probing "does this LED light when I press that button?" as a hobbyist might want.
There are tons of free sim tools. 'Spice' (Simulation Program with Integrated Circuit Emphasis) was a very early commercial sim. So many of the free ones use some variant of spice in their name. LTSpice, Qspice, etc.
Kicad is an excellent free schematic capture and simulation software.
I don't think the vibecoding jab is warranted, but I agree this is a pretty terrible UI for electronic circuits. Schematic capture exists for a reason! It's not even difficult for beginners to understand if you have a decent UX (which for some reason seems to elude 90% of PCB software).
Got to agree. This is kind of pointless. Breadboards exist to make it easier to build physical circuits. I would also argue there is paedagogical value in actually playing with a physical breadboard. Having to physically orient things in 3D space is a small price you pay for building a physical prototype. This is all the downsides with none of the upsides.
I feel like the fade-in animation when starting/stopping the simulation takes too long. Also, I think it would be helpful if the currently connected row was highlighted when dragging a pin.
I could not sign up, because "email rate limit exceeded" but i was wondering if it had a feature to probe the voltage at a certain node.
Are there similar solutions without 3d view? I want to get a simulator that can show me what is going in the circuit, ideally slowed down a lot. For example I was making a dongle with resistor and capacitor which was delivering a pulse-short (i.e. removing power for a short period of time instead of delivering an impulse) and while I was able to confirm overall idea with some online simulator, dialing in capacitance and resistance required physically switching components. Ideally I want to be able simulate such transient effects and arrive at specific numbers ready to be soldered.
And I want it to be free/open-sourse ideally :)
Sounds like you are looking for a SPICE like simulator, there are quite a few free/open:
https://en.wikipedia.org/wiki/List_of_free_electronics_circu...
orcad is the commercial classic for doing schematics with a spice backend. (spice is an oss engine out of berkeley for simulating circuits on computers. for dc it just solves the classic nodal analysis and for ac you can feed in things from a fantasy signal generator and capture things at various nodes in the circuit) there's also some pretty cool looking commercial web thing now that also will maintain netlists with real-time prices and will let you swap parts out and set minimum quantities etc.
kicad is the oss orcad, but i never got good at it. (to be fair, orcad was weird to learn as well)
I think altium has taken over as the top tier commercial offering in this space.
I always disliked Orcad. Especially because cadence had excellent software that predated OrCAD, and for reasons that I cannot fathom chose to promote OrCAD after they acquired it instead of the better software.
Here's a specific example in the interface. If you wanted to draw a wire, the keyboard shortcut of the old software was 'w' but orcad required you to type 'ctrl + w'. Why are you forcing me to use control when w doesn't do anything on its own? It was filled with similar tiny annoyances that just slowed things down. (Admittedly, it's been years since that was my primary work, and free stuff is good enough for what I do now.) I sincerely hope that orcad has continued to improve over the years.
This was done before, years ago, but in 2D. I forget what it was called. It was like an LT Spice clone with better UX.
That’s it, but I was also thinking about https://www.falstad.com/circuit/circuitjs.html
This was my first thought: this seems like a web + 3d port of Fritzing. Perhaps they even reuse some of the code?
Nice! You can play Electroboom without actually getting shocked. If you do want the real world experience you can get bags full of components on Amazon for pretty cheap
The simulation needs an "Amazon factor" slider, which randomly makes:
* All breadboard wires have some resistance
* Some breadboard wires have very high resistance
* Some breadboard wires have intermittent contact, recalculated every time components are added/removed from the breadboard
* Some fraction of polarized capacitors are backwards
* All capacitors are overrated for voltage and explode at 70-99% of their rating
* Some LEDs smoke at 10% of their rated forward current
* Brightness variation between LEDs that should be identical
* Semiconductors may randomly be another semiconductor in the same class (e.g. a "2n2222" may in fact be any other NPN BJT in the simulation, or the parameters may be entirely random)
* Inductors have 80% variation in core saturation specs, but other parameters are spot-on
* Any component with writable flash (eg USB vid/pid strings) may randomly not actually have writable flash but instead fixed strings and the writes fake success but the values do not change
Better simulators can do parameter sweeps and monte carlo simulations so you can explore tolerance stackup issues. But most of the failure modes you've listed there are just why you shouldn't build your circuits for one on breadboards and for another with dodgy parts sourced outside of distribution channels.
the 3D look is cool but makes it harder to put stuff together
Interesting if there could be automated circuit designs through it
This is really terrific!!!
Super cool. Wonder if we can input the circuit as code.
As others have mentioned, SPICE is the traditional answer to that question. But SPICE feels more like a macro-assembler for circuits.
One project that comes to mind for high-level programming style circuits-as-code:
https://github.com/atopile/atopile
Show HN: https://news.ycombinator.com/item?id=39263854 More recent HN thread: https://news.ycombinator.com/item?id=44548449
> Wonder if we can input the circuit as code.
SPICE. You're describing SPICE. :)
No one realistically speak SVG. Human consciousness isn't a software built on language. Speech center is just a part of a human brain.
There used to be some really good web-based SPICE interpreters but I can't find them now. This was before javascript ate everything, so you would enter the netlist, click a button, and get a GIF or the current at a specified terminal or whatever
Well, SPICE is still around in its zillion forks and dialects…
AIUI the best frontend is kicad, though I never really tried that, I just wrote the text files by hand.
OK the smoke was really funny
Black screen with "Application error: a client-side exception has occurred (see the browser console for more information)."
lacks exception catching for when webgl is disabled
wow. looks amazing
Lol, it simulates magic smoke as well.
Holy requests, batman.
... Why so many requests for a static asset?
[flagged]
Hey man, I've seen you posting salty comments a lot recently. Are you sure you're getting a positive experience out of this forum? I spend a lot of time online and when I start posting the way you do, I find that a day or two of minimizing screen time does wonders.
It's very positive don't worry about me, if you need a safe space echo chamber feel free to ignore me!
dude this thing is older than vibecoding. https://news.ycombinator.com/from?site=withdiode.com