Post

Layer 0 - Electrodynamics ⚡

Before I proceed, these posts are essentially meant to be a stream-of-consciousness. They may not be the most eloquent or sharp but will act more like logs of my progress through each layer, with brief explanations of concepts I’ve covered and where I am heading next. This post for instance is all about the physics of electricity - the next one should be about transistors and other circuit-devices. Big concepts are covered in one-go, otherwise I’d be spending an eternity writing rather than mastering computer science (which is the main objective).

Physics? Isn’t this meant to be computer science?

Honestly, its a personal preference. I don’t think it is necessary to begin with physics and I can see its could be overkill as a checkpoint to get through whilst learning computer science, even looking at it from a first principles perspective. Practically, the first principles of computer science would be boolean logic with 1’s and 0’s and understanding that transistors do the 1’s and 0’s thing by hooking up together in different ways.

That is a perfectly valid starting point.

But what you’ll find to be a consistent them in these posts is that I don’t like things hidden behind layers of abstraction. Its just complexity that you’ve shoved under the rug, like a snake under your bed. I guess you could forget about the snake because maybe its a little itty bitty one, like learning electrodynamics, but that snake could bite you in the future, probably in the form of a weird problem you’ve never encountered and which co-pilot can’t fix either.

But, the point is I get to start right ground 0 - it doesn’t really go any layers lower than the physical reality of our universe - so lets get to it!

The basics

Ok, so I already have a bit of a background in physics and chemistry and I’ve actually already learnt about atoms, and orbitals and even a little bit about electricity, but I didn’t really listen enough in physics class to recall any of the information well (sorry Mr Gange). Anyways, no better time than the present. I started by just watching some videos on atoms, and electrons, and how electrons are actually not the thing that carries energy, but its the electric fields. It took a while to wrap my head around a lot concepts in electrodynamics, but the most annoying concept by far is the distinction between electron flow and conventional flow.

It really, really annoys me. I understand the history and why its probably easier to stick with conventional flow, but honestly, it makes interpreting circuit diagrams really hard. Don’t even get me started on pMOS and nMOS transistors and understanding flow, like, what is moving from source to drain? Is it the positive holes or the electrons now?

Anyways, electrons carry charge, they’re pushed by the electric fields, and thats called current. Current is just the movement of charge, and charge is a property of electrons, so current is the movement of electrons. Sweet.

Electric fields carry energy, in this case, electrical energy. When energy is performed over a distance, we call that work. When work is performed over a period of time, we call that power. Cool. We also get a bunch of units like joules, watts, coulombs and amps.

Coulombs law just tells us the strength of an electric field acting on a pair of charges given that we know the distance between them and some constant. It’s pretty cool because it resembles Newton’s law of gravitional motion where the inverse square law applies - i.e. when the distance doubles, the strength of the field becomes a quarter of its original.

Voltage and Capacitance

Yep this one deserves a section on its own. It probably took me 5 days to really understand what voltage is. Actually, I’m not sure if I really truly understand it yet even, but I understand it well enough. I’ve gone through countless videos and analogies. I found some really cool videos demonstrating the hydraulic analogy with water flowing through pipes and even the spintronics analogy. This idea of pressure and strength made sense, until you realised its not the electrons moving that causes the pressure, because the electrons are moving incredibly slowly. Its actually the electric fields and the force, or work, they are applying to move the electrons. The idea of potential difference didn’t make sense either, until I realised what it was really saying: its the potential to do work, the difference relates to how if the number of negative charges at one point are really large compared to another, there’s a big difference and thus there is a big potential to perform work. It’s like if you freeze frame a small wave and a large wave - the large wave has a big potential difference, when considering water levels in this instance, and so it has a greater potential for energy release. A very similar idea applies for voltage and electricity. Some batteries can create a bigger potential difference, or in the case of the wave analogy, they can generate really big waves at the start, but unlike in the wave analogy, there is also a part of the system that is pulling electricity away, making the difference even large. The electricity has a desire to move in that direction, and the bigger the potential difference, the bigger the desire.

Other than voltage, I didn’t dive too deep into Ohm’s law, it seems cool and a nifty little formula and I understand how resistance plays into all of this and why current and voltage would be related - it all makes sense once you understand voltage, and the hydraulic analogy helps heaps too.

Capacitance was a weird one, and I’m at a stage now where I’m learning about MOSFET transistors where capacitance is a big deal. It seems to be to be a build up of charge that becomes locked into place because of opposingly charged conductors creating an electromagnetic field. Its like they’ve been charged up and charging them up causes a depletion of one side and a surplus on the other. I guess I understand the science, but its application in MOSFET transistors still confuses me.


Besides capacitance and voltage which I continue to watch videos about to keep my understanding fresh, I am watching a playlist on electric circuits and electrodynamics to learn some other ideas in my spare time - I am super interested in all this, and I would probably be an electrical engineer in another life, but alas, I know that I can’t spend too much time down here in layer 0, especially when my goals are to achieve mastery in computer science and have the ability to build incredible things with my programming skills. But, electrodynamics is super cool, and I’ve learnt heaps so far.

This post is licensed under CC BY 4.0 by the author.