Diode – Build, program, and simulate hardware (withdiode.com)

428 points by rossant 4 days ago

dgxyz 12 hours 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 :)

jhedwards 7 hours ago

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.

dgxyz 6 hours ago

We've all done that sort of stuff!

Mine was assuming that the stripe on tantalum SMD capacitors was the negative side. First prototype board came back from the fab and pick and place department (we had it in house). Immediately caught fire when I powered it up :)

Second lesson, start with current limit on your bench supply, not throw 10A into it :)

estimator7292 5 hours ago

I've been an EE for a decade and I made this exact mistake last week. It's inevitable lol

buescher 5 hours ago

quinnjh 5 hours ago

neuralRiot 29 minutes ago

I’be been reading schematics for over 30 years, sometimes i need to draw one just to understand an idea that I have. These “real” drawings (like fritzing) hurt my head. They might be useful for the casual tinkerer but anyone who finds electronics interesting should learn the basic symbols.

buescher 9 hours ago

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.

compumike 7 hours ago

> 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. :)

buescher 6 hours ago

JKCalhoun 7 hours ago

"…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?

buescher 7 hours ago

paulgb 8 hours ago

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/)

seanthemon 12 hours ago

A more mature version of this is "CRUMB" found on steam, it costs money but it's got a lot of great features.

WalterGR 11 hours ago

https://www.crumbsim.com/

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.

superxpro12 3 hours ago

interesting. how does this compare with more "industrial" sims like "proteus" https://www.labcenter.com/simulation/ ?

No affiliation with any. I'm a Comp.E in consumer electronics who likes to keep a pulse on these things.

svennidal 13 hours ago

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.

svennidal 11 hours ago

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.

goodcanadian 13 hours ago

You can click the background and drag to rotate the view

lnenad 13 hours ago

It's still clunky though. It's a great, cool thing that OP built but just not very practical.

KeplerBoy 11 hours ago

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).

asystole 9 hours ago

So we're just using "vibe coded" as a generic insult now for project we don't like?

KeplerBoy 9 hours ago

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.

dwringer 8 hours ago

icedrift 10 hours ago

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.

throwaway290 8 hours ago

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

colesantiago 10 hours ago

This is actually very cool and predates vibe coding, please stop gatekeeping.

KeplerBoy 9 hours ago

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.

JKCalhoun 7 hours ago

IshKebab 9 hours ago

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).

globular-toast 10 hours ago

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.

JKCalhoun 7 hours ago

The upsides are the measurement tools built in.

KeplerBoy 7 hours ago

Groxx an hour ago

- click simulate in the default "push button to turn on LED" demo

- clock advances

- voltage around the LED slowly rises to infinity for some reason

er.

1e1a 10 hours ago

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.

agcat 5 hours ago

This is so damn cool. I remember 10-12 years ago i used to teach kids to do these things manually. This is a great product for kids to experiment and then run it real life on their kits.

samuelbeek 7 hours ago

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.

hippich 9 hours ago

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 :)

pedro_caetano 9 hours ago

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...

a-dub 8 hours ago

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)

asynchronous13 7 hours ago

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.

buescher 6 hours ago

buescher 9 hours ago

Some people like Everycircuit and Falstad for that.

Helcal_pup 6 hours ago

Not foss but tinkercad circuits (https://www.tinkercad.com/circuits) comes to mind.

hulitu 2 hours ago

Ltspice. Ng-spice

lasgawe 4 hours ago

Years ago, around 10-12 years back, our Windows XP PC had software similar to this. Dont remember the name. I used to spend hours experimenting with it. haha Nostalgia.

antimony51 8 hours ago

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.

ge96 7 hours ago

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

MeteorMarc 6 hours ago

Give KiCad a try for drawing schematics. It is FOSS.

ge96 3 hours ago

Yeah that is still on my list to learn eg. designing my own circuit board. My stuff is still basic eg. wiring together an Arduino/RPi to break out sensor boards.

wasmainiac 10 hours ago

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.

unglaublich 10 hours ago

wasmainiac 8 hours ago

That’s it, but I was also thinking about https://www.falstad.com/circuit/circuitjs.html

fra 8 hours ago

This was my first thought: this seems like a web + 3d port of Fritzing. Perhaps they even reuse some of the code?

PunchyHamster 13 hours ago

the 3D look is cool but makes it harder to put stuff together

krupan 9 hours ago

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

myself248 8 hours ago

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

buescher 8 hours ago

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.

fileyfood500 10 hours ago

Interesting if there could be automated circuit designs through it

fercircularbuf 13 hours ago

This is really terrific!!!

zkmon 13 hours ago

Super cool. Wonder if we can input the circuit as code.

eqvinox 12 hours ago

> Wonder if we can input the circuit as code.

SPICE. You're describing SPICE. :)

d-us-vb 8 hours ago

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

bandrami 12 hours ago

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

eqvinox 12 hours ago

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.

numpad0 8 hours ago

No one realistically speak SVG. Human consciousness isn't a software built on language. Speech center is just a part of a human brain.

bandrami 12 hours ago

OK the smoke was really funny

tamimio 3 hours ago

I want an AI that I throw the simulation and it design the PCB and all verification.

hulitu 2 hours ago

ROTFL.

00zer00 9 hours ago

Nice, reminds me of https://wokwi.com/ .

thinking_cactus 9 hours ago

throwaway290 8 hours ago

Black screen with "Application error: a client-side exception has occurred (see the browser console for more information)."

NooneAtAll3 13 hours ago

lacks exception catching for when webgl is disabled

dorongrinstein 4 days ago

wow. looks amazing

luispa 5 hours ago

this is dope

sschueller 10 hours ago

Lol, it simulates magic smoke as well.

shakna 12 hours ago

Holy requests, batman.

... Why so many requests for a static asset?

lm28469 11 hours ago

Because it's yet another slopware of course

folli 10 hours ago

Please don't. The project is around since at least 2022.