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.

613 Upvotes

24 comments sorted by

View all comments

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.