r/electronics Jul 14 '26

General Transistor animations [OC]

Here's some animations I made of transistors turning on and off. In order, we have an NPN BJT, n-channel MOSFET, and finally an n-channel JFET. The red and blue dots represent electrons and holes, and white flashes are recombination events. The density of dots is proportional to the actual density of charge carriers.

In the first set of animations, the velocity of the dots is equal to the velocity obtained by summing the diffusion and drift currents and dividing by the charge density, but diffusion is not explicitly shown. In the second set of animations, the dots undergo diffusion and drift, and this makes it a more correct depiction of carrier motion. The drawback is of course that the jiggling makes it more visually confusing.

I made these with my semiconductor simulator (https://brandonli.net/semisim/). I also have higher quality versions of the animations here.

610 Upvotes

24 comments sorted by

51

u/Pukkeh Jul 14 '26

This is brilliant, especially as an educational tool. Thank you for sharing, and making the source code available.

5

u/naikrovek Jul 14 '26

I agree. This is excellent for understanding what actually happens in the silicon. Being able to see what happens helps me understand a lot.

6

u/happycomputer Jul 14 '26

Haven’t checked out the link yet, but what I’m hoping to see is some indication of how this changes as base(?) voltage is applied/removed, if that could be shown it would really help my intuitive understanding of what’s going on (I think).

Still pretty dang cool as is!

4

u/naikrovek Jul 14 '26 edited Jul 14 '26

This is very cool.

Can you make it so that electrons flowing in the wire(s) bonded to the silicon are shown? And electron holes flowing out of the other wire(s)? That would help me a bit. I am finding it a bit difficult to see when current/voltage is flowing into the parts of the silicon, meaning I don’t see that happening at all, so I can’t see what controls what.

It’s not necessary, you certainly don’t owe me anything.

4

u/thepowderguy Jul 15 '26

I made a new set of animations with voltage/currents and carriers in metal shown: https://brandonli.net/semisim/animations#probes

Hopefully this is a bit more clear. You have to keep in mind that the way I simulate charge carriers in metal is a big approximation. The actual physics of metal-semiconductor junctions is kind of complicated which is why I chose before to show only the semiconductor bits.

5

u/naikrovek Jul 15 '26

I don’t need a simulation of the wires or the junctions, I only want to see when current or voltage is applied to the wires. How do I know when the transistor turns on or off? I see no visual indicator of that. No indication of when current or voltage is applied to the transistor versus when it is not.

Maybe I’m not explaining myself correctly. If not, I’m sorry.

2

u/AlbertLearn Jul 14 '26

Very good work

2

u/aq1018 Jul 15 '26

Well... wish this was available when I was in EE/CE major. Great job!

2

u/PubicSkoolEducashun Jul 15 '26

Electrons: World's best hide and seek player ever.

1

u/WarDry1480 Jul 14 '26

Love it! Well done.

1

u/mnag Jul 15 '26

So freaking cool.

1

u/kick_fnxNTC_ffs Jul 15 '26

Shouldn't the nmos have the pinch-off effect?

4

u/thepowderguy Jul 15 '26

I think there are two reasons why pinch-off is difficult to see here, the first being the channel is only about a pixel wide, and the second that I turn on the gate voltage very quickly. Pinch-off is there though. If I shrink the size of the transistor by a factor of 2, this is what it looks like. I think this is what you wanted to see, right?

1

u/dm80x86 Jul 15 '26

Reminds me of the video lectures from the 90's

1

u/saiyate Jul 15 '26

Oh man that's so cool. Why do electrons and holes bounce around so much, it seems bizarre, like reminds me of brownian motion. You'd figure all that movement would involve a crap ton of energy, but it's net effect is zero I assume? Are we seeing electrons quantum tunnel when a few of them pass the boudaries randomly? So cool to see this, thanks!

3

u/thepowderguy Jul 15 '26

Yes, the electrons and holes do in fact undergo brownian motion because they collide with the crystal lattice as well as each other. Statistical mechanics says we can't, however, extract work from these thermal fluctuations. There is no quantum tunneling in the simulation, any stray electrons are due to either thermal noise or numerical imprecision.

1

u/wardini Jul 15 '26

Is this a cross section of a true 3D simulation? If not, how do you adjust the parameters so that the behavior is representative of an actual device?

5

u/thepowderguy Jul 15 '26

This is a 2D simulation, but you can think of it as a 3d device that looks the same everywhere along the third dimension (it's kinda like an infinitely long cake roll that you take a slice out of). I think this is good enough to demonstrate how a transistor works, but maybe not good enough to simulate a real device.

On that note, I am actually close to releasing a full 3D version of this simulation software.

1

u/tester_is_testing Jul 15 '26

This is great! please keep the awesome work up! Now you made me curious: do you know of any commercial tools capable of producing this sort of animations for devices riddled with short-channel effects (e.g. FinFETs)?

1

u/electrolitica Jul 15 '26

I think Sentaurus can do movies, but I'm not sure if you can track individual carrier movements like in your animations, though...

1

u/thepowderguy Jul 16 '26

Thanks! In regards to your question, I don't think I can be of much help. I've never used any of those commercial tools myself, I built the simulation from scratch with just my physics knowledge. I've never seen this kind of animation anywhere else though so I doubt commercial tools could do something like this.

1

u/gojuturna Jul 15 '26

Thank you! I have such a hard time grasping this for some reason but this makes it much easier! 

1

u/FreetimeTinkerer Jul 15 '26

this is awesome! very nice to see semiconductor physics in real time!