11 ms·
Brandon's Semiconductor Simulator
- em3rgent0rdr 1y agoWhen spice simulation isn't deep enough... Very educational to show how circuit elements work "under the hood"...for example the LC example doesn't use an L element and a C element as building blocks, but rather it is the two metal plates in close contact which form the bulk of the circuit's capacitance and it is the loop of metal itself which form the inductance.
- amelius 1y agoI wonder how they simulate EM in only 2 dimensions. I also wonder why the simulator only allows to show E and D fields, and not H and B.
- Steuard 1y agoI don't pretend to know what this simulation is doing, but for the record, electromagnetism works just fine in 2D. You might be thinking "but magnetic fields are intimately tied to cross products, which only work in three dimensions." But you can set up the equations of electromagnetism just fine either using differential forms or bivector magnetism (https://arxiv.org/abs/2309.02548 https://arxiv.org/abs/2309.02548), and it works in any dimension you'd like. (The cross product version is really a narrow and sometimes misleading special case.) Possibly related: there are options to "View B" and "View H" in the scalar dropdown, not in the vector one. That may be closely related to the fact that in two dimensions, the magnetic field has just a single component. Whether you describe is as a 2-form or a bivector, the magnetic field is an antisymmetric rank-2 tensor: an antisymmetric matrix. In 3D, that means 3 independent components, and there's a one-to-one mapping to vectors (more or less). But in 2D, an antisymmetric matrix has just one independent component. (And in 4D, it's got six: this is precisely the relativistic electromagnetic field tensor, that in 3D splits into an electric part and a magnetic part. My paper has more details.)
- amelius 1y agoThanks but I was thinking more about how fields drop off in 2D space versus 3D space. Simple electrostatic example: consider a 1D string of identical resistors. Voltage drops linearly as you go along this string. Now consider a 2D grid of resistors: voltage does not change linearly anymore if you move between two points (current will move in a more complicated spread-out pattern). So the dimensionality changes how fields behave.
- ajb 1y agoThat's true, but it's actually a property of the circuit. Any circuit that fits into a 2d space will work the same if simulated in 3d: voltage will still drop off linearly along a 1d resistor. This is because it's actually an emergent property already in 2d space. Consider a resistor shaped like a capital letter Z in 2d space, with ground at one end and 1V the other. (Assume also that the Z has a square aspect ratio). The potential along the bar in the middle will initially be equal, because all points on the bar are equidistant from our voltage sources (AKA charges) . But the potential will drop along the arms of the Z. So charge will move along the arms and accumulate at the corners, until there is also a voltage drop along the bar, and ohms law holds.
- Steuard 1y agoAh, I see what you're getting at. My instinct here is that (exactly as you've pointed out) fields like E and B will fall off like 1/r instead of 1/r^2, but that all of the qualitative behavior will be basically the same. So I wouldn't trust this simulation to predict the precise behavior of a real circuit (even one whose shape was basically planar), but I suspect that it will behave more or less right. Looking at the examples, it seems like you can make 1D and 2D strings/grids of resistors here in much the same way you would in a 3D model; you just can't make a 3D grid (or non-planar circuits). My general experience working with and teaching basic circuits is that it's rare that we consider current flow in a genuinely 3D medium: the vast majority of problem-solving examples approximate wires as simple 1D paths for charge to follow, and more careful treatments that talk about where charges accumulate to guide current flow around corners, etc. still almost always illustrate their points in 2D diagrams/examples. So my impression is that this simulation is likely to give a pretty solid qualitative sense of how these systems work, despite its 2D framing.
- gfody 1y agoSebastian Lague has been making one of these and youtubing it, the videos are great here's the latest one https://www.youtube.com/watch?v=HGkuRp5HfH8 https://www.youtube.com/watch?v=HGkuRp5HfH8
- gblargg 1y agoNote that these are at very different levels of detail. Lague's is at the digital logic level, while Brandon's is some level around atoms/electrons.
- petermcneeley 1y agoAmazing work feels very similar to Paul Falstad page https://www.falstad.com/emstatic/index.html https://www.falstad.com/emstatic/index.html. This really needs a WebGPU port. Multigrid on a GPU is moderately easy.
- 1d22a 1y agoThe similarity is likely not a coincidence! > (c) Brandon Li, 2025. Ported to Javascript with the help of Paul Falstad.
- stunningllama 1y agoBrandon here. I was very much inspired by Falstad's applets. I had him take a look at my simulation and he generously offered to make a JS port.
- kragen 1y agoIt looks awesome, and I want to express my special appreciation that you used red and blue instead of red and green.
- mhh__ 1y agoReally sexy
- paulgerhardt 1y agoFun. I am reminded of the long forgotten Zachtronics semiconductor game “KOHCTPYKTOP: Engineer of the People” [1] [1] https://www.zachtronics.com/kohctpyktop-engineer-of-the-people/ https://www.zachtronics.com/kohctpyktop-engineer-of-the-peop...
- djmips 1y agoDid you know that archive supports old Flash games like this via the Ruffle Flash emulator? https://web.archive.org/web/20160305205215/http://www.zachtronics.com/kohctpyktop-engineer-of-the-people/ https://web.archive.org/web/20160305205215/http://www.zachtr...
- hteaf 1y agocefFlashbrowser can do it better
- ryani 1y agoThis is also available (with an included Flash emulator, so playable on modern machines) in Zach's free retrospective "Zach-like" [1] [1] https://store.steampowered.com/app/1098840/ZACHLIKE/ https://store.steampowered.com/app/1098840/ZACHLIKE/
- HKH2 1y agoChipWizard is the updated version and it's in Last Call BBS (from Zachtronics).
- spicybright 1y agoThe UI is rough but this is very impressive!
- bdbenton5255 1y agoVery clean, educational and informative. Well done, from one Brandon to another!
- deleted 1y ago[deleted]
- cyberspacein 1y ago[dead]
- gitroom 1y agoim super into stuff like this, takes me back to messing with circuit sims for hours
- kragen 1y agoThis looks exciting, but the images make it look like maybe it's two-dimensional?
- showmexyz 1y agoSo how accurate are the results?
- westurner 1y agoWhich other simulators show electron charge density and heat dissipation? Can this simulate this?: "Synaptic and neural behaviours in a standard silicon transistor" (2025) https://www.nature.com/articles/s41586-025-08742-4 https://www.nature.com/articles/s41586-025-08742-4 .. https://news.ycombinator.com/item?id=43506198 https://news.ycombinator.com/item?id=43506198 What about (graphene) superconductors though?
- stunningllama 1y agoOn my info page (https://brandonli.net/semisim/info https://brandonli.net/semisim/info) there's a list of things my simulation can and can't do. After taking a look at the paper you mentioned, I think simulating it may very well be possible, however it might take a bit of effort. As for graphene, its band structure is different enough that I don't think it would work. Note that my simulation is intended for educational purposes only, not scientific research. - Brandon
- westurner 1y agoThanks, quite the useful simulator; I hadn't found that page yet. Additional considerations for circuit simulators: What does the simulator say about signal delay and/or propagation in electronic circuits and their fields? How long does it take for a lightbulb to turn on after a switch is thrown, given the length of the circuit and the real distance between points in it? (I learned this gap in our understanding of electron behavior from this experiment, which had never been done FWIU: "How Electricity Actually Works" (2022) https://www.youtube.com/watch?v=oI_X2cMHNe0 https://www.youtube.com/watch?v=oI_X2cMHNe0 ) FWIW, additionally: Hall Effect and Quantum Anomalous Hall Effect; "Tunable superconductivity and Hall effect in a transition metal dichalcogenide" (2025) https://news.ycombinator.com/item?id=43347319 https://news.ycombinator.com/item?id=43347319 ScholarlyArticle: "Moiré-driven topological electronic crystals in twisted graphene" (2025) https://www.nature.com/articles/s41586-024-08239-6 https://www.nature.com/articles/s41586-024-08239-6 NewsArticle: "Anomalous Hall crystal made from twisted graphene" (2025) https://physicsworld.com/a/anomalous-hall-crystal-made-from-twisted-graphene/ https://physicsworld.com/a/anomalous-hall-crystal-made-from-... From "Single-chip photonic deep neural network with forward-only training" https://news.ycombinator.com/item?id=42314581 https://news.ycombinator.com/item?id=42314581 : "Fractional quantum anomalous Hall effect in multilayer graphene" (2024) https://www.nature.com/articles/s41586-023-07010-7 https://www.nature.com/articles/s41586-023-07010-7 "Coherent interaction of a-few-electron quantum dot with a terahertz optical resonator" (2023) https://arxiv.org/abs/2204.10522 https://arxiv.org/abs/2204.10522 .. https://news.ycombinator.com/item?id=39365579 https://news.ycombinator.com/item?id=39365579 > "Room-temperature quantum coherence of entangled multiexcitons in a metal-organic framework" (2024) https://www.science.org/doi/10.1126/sciadv.adi3147 https://www.science.org/doi/10.1126/sciadv.adi3147 Electrons (and photons and phonons and other fields of particles) are more complex than that though.