KNOWLEDGE NETWORK ← Index
Physics · Circuits · Microcontrollers

Electronics

A circuit is a small number of ideas reused constantly: something pushes charge, something resists or stores or blocks it, and — eventually — something switches, amplifying a tiny signal into a decision. This page walks from Ohm's law up through every basic passive component, into transistors and logic gates, through a real integrated circuit, and out the other side into how a microcontroller turns code into voltage — with six working demos along the way, and a last chapter on what's physically happening inside the silicon.

01 — The Three Numbers

Voltage, current, resistance

Voltage is electrical pressure — the push, measured in volts, that exists between two points because one has more electrons crowded onto it than the other. Current is the actual flow of charge past a point, in amperes, coulombs per second. Resistance, in ohms, is whatever opposes that flow. Georg Ohm's 1827 relationship between them is the single most-used equation in electronics: push harder or resist less, and more current flows.

The water analogy is standard for a reason — voltage is like pressure in a pipe, current is like flow rate, resistance is like the pipe's narrowness — but it breaks down fast past this first idea, so treat it as a way in, not a model to keep leaning on once capacitors and inductors show up later on this page.

V = I × R
02 — Fixed Values, Printed in Color

Resistors

A resistor's whole job is to oppose current predictably — limiting how much flows to protect an LED, dividing a voltage down to a fraction of its source, or pulling a digital input to a known level when nothing else is driving it. Fixed resistors are too small to print a number on, so instead they're printed in color: four bands encode two significant digits, a multiplier, and a tolerance, standardized so the same code means the same value on any resistor from any manufacturer.

Power matters too — a resistor dissipates P = I²R watts as heat, which is why the same resistance value comes in physically different sizes: a tiny 1/8-watt surface-mount part for a signal line, a chunky 5-watt wirewound part for something carrying real current.

03 — Storing Charge

Capacitors

Two conductive plates, separated by an insulator, store charge on one side and an equal opposite charge on the other — the closer the plates and the larger their area, the more charge a given voltage can push onto them. That storage capacity is capacitance, in farads (almost always microfarads or picofarads in practice), and it's what lets a capacitor smooth a bumpy DC supply, block DC entirely while passing AC, or set the timing in a clock circuit.

Ceramic capacitors are cheap and small for bypassing noise near a chip's power pins; electrolytic and tantalum capacitors trade size for much larger capacitance, at the cost of being polarized — wired backwards, they can fail badly; film capacitors sit between the two, prized for precision and stability rather than raw capacity.

10 kΩ
100 µF
V(t) = Vmax·(1 − e^(−t/τ)), τ = R×C — the time to reach ~63% of the way there
04 — The Rest of the Passive Family

Inductors, transformers, and the other basics

A coil of wire resists a change in current rather than the current itself — current flowing through it builds a magnetic field, and that field fights back against any change to the flow, the exact opposite temperament from a capacitor, which resists a change in voltage. Wind two coils around the same core and a changing current in one induces a voltage in the other with no wire connecting them at all — a transformer, and the reason power can travel at high voltage over long lines and then get stepped down safely near a wall socket.

PotentiometerA resistor with a wiper that slides along it — a variable voltage divider, the part behind every knob on this site's own synths.
ThermistorResistance that changes sharply with temperature — the sensing element in a huge share of consumer temperature circuits.
Photoresistor (LDR)Resistance that drops as light increases — cheap, slow, and still everywhere in night-light circuits.
Crystal oscillatorA quartz sliver that resonates at an exact frequency under voltage (piezoelectricity) — the clock nearly every microcontroller times itself against.
RelayAn electromagnet pulling a mechanical switch — lets a small, safe control voltage switch something large and dangerous.
FuseA deliberately weak link that melts open above a current threshold — the one component whose entire job is destroying itself correctly.
05 — The One-Way Valve

Diodes

A diode is a p-n junction — two differently-doped regions of silicon fused together, covered properly in the deep dive at the end of this page — that conducts current freely in one direction and, up to a point, blocks it in the other. That one asymmetry is enough to build a rectifier that turns AC into DC, an LED that emits a photon of a specific color when current crosses the junction (the photon's energy set by the semiconductor's band gap, which is why different LED colors are, chemically, different materials), and a zener diode, deliberately run backwards into a sharp, repeatable breakdown voltage used to hold a reference voltage steady.

Forward biased

Positive lead higher than negative by more than the diode's forward-voltage drop (~0.6–0.7V for silicon, ~0.2V for germanium, ~1.8–3.3V for an LED depending on color) — current flows.

Reverse biased

Positive lead lower than negative — the depletion region widens, current stays near zero, until the reverse voltage gets high enough to force a breakdown (the useful, controlled case in a zener).

06 — The Component That Changed Everything

Transistors

A transistor is a valve controlled by electricity instead of a hand: a small signal at one terminal controls a much larger current between the other two. Bipolar junction transistors (BJTs) do this with a small base current; MOSFETs do it with a gate voltage that draws essentially no current at all once it's set, which is why almost every modern digital chip is built from MOSFETs rather than BJTs. Either way, a transistor can be run two ways: as an amplifier, where the output signal is a scaled-up copy of the input, or as a switch, fully on or fully off — and the switch mode is the one that built the entire digital world, because a switch that another switch can control is all a computer ultimately is.

Collector current: off · LED: off
A few microamps at the base switches milliamps at the collector — current gain (β), typically 100–300× on a small-signal BJT, is the whole reason this circuit does useful work rather than just wasting the base current directly.
07 — From Switches to Boolean Algebra

Logic gates

Wire a handful of transistor switches together the right way and you get a circuit whose output depends only on the true/false state of its inputs — a logic gate. George Boole worked out the algebra these circuits obey a century before anyone built one out of transistors; every gate below is a physical implementation of one row of Boolean algebra, and every CPU on earth is these seven gates, wired together by the billions.

→
0
Click A and B to toggle them. NOT ignores B and only reads A.
08 — Many Transistors, One Package

Integrated circuits and the 555 timer

An integrated circuit is dozens, thousands, or billions of transistors fabricated together on one piece of silicon instead of wired by hand from discrete parts. The clearest small example is the 555 timer — designed in 1971 by Hans Camenzind for Signetics and, by some estimates, the single most-produced integrated circuit in history[1] — about two dozen transistors that turn two resistors and a capacitor into a stable oscillator. In its astable mode, the capacitor charges through R1+R2 and discharges through R2 alone, and the chip's internal comparators flip its output every time the capacitor crosses one of two reference thresholds — the same RC charging curve from Chapter 03, now driving a square wave instead of just being watched.

10 kΩ
10 kΩ
10 µF
f = 1.44 / ((R1 + 2·R2) × C)
09 — Where Software Meets Voltage

Microcontrollers

A microcontroller folds a whole computer — a CPU core, a bit of memory, and a set of peripherals — onto one chip, and connects it to the outside world through a handful of general-purpose pins. Each pin can typically be told, in software, to be a digital input (read as high or low), a digital output (drive high or low), or in many cases an analog input through a built-in ADC that converts a continuous voltage into a number the CPU can read. A blinking LED is nothing more than GPIO_write(pin, HIGH); delay(500); GPIO_write(pin, LOW); delay(500); in a loop — the same digital switch from Chapter 06, just toggled by code instead of a hand.

Real dimming or "analog" output almost never comes from an actual analog voltage, though — it comes from PWMGate effect on Pulse Train — Stage II, just used to fake an analog voltage instead of to chop a synth.

50%
perceived
The pin is only ever fully on or fully off — the "brightness" you see on the right is your own eye integrating a fast switch over time, not a real in-between voltage anywhere in the circuit.
Hands-on For actually wiring one of these up — real boards, real pins, real code — see CASCADE: Physical Computing on the Aerospace field guide. For which real chips do which job in a browser-built instrument, see the Node Database.
10 — Deep Dive

What's actually happening inside the silicon

Pure silicon is a poor conductor — every atom's outer electrons are locked into bonds with its four neighbors, leaving almost nothing free to carry current. Doping deliberately contaminates it: add a trace of phosphorus, which has five outer electrons instead of silicon's four, and each phosphorus atom contributes one electron with nowhere to bond — free to move. That's n-type silicon, current carried by surplus electrons. Add boron instead, with only three outer electrons, and each boron atom leaves a bond short one electron — a hole, which behaves for circuit purposes like a mobile positive charge. That's p-type.

Fuse a block of each together and you get a p-n junction. Electrons near the boundary diffuse into the p-side and fill holes there; holes diffuse into the n-side and get filled by electrons — and that migration leaves a thin region right at the junction with no free carriers left at all, the depletion region, along with a small built-in electric field that opposes any further diffusion.

P-TYPE
excess holes
(boron-doped)
DEPLETION REGION
N-TYPE
excess electrons
(phosphorus-doped)

Push the p-side positive relative to the n-side (forward bias) and that external field pushes back against the junction's own field, narrowing the depletion region until, past roughly 0.6–0.7V for silicon, carriers flood across and current flows freely — a diode. Push the other way (reverse bias) and the depletion region only widens, blocking current almost completely.

A bipolar transistor is two junctions back to back — n-p-n or p-n-p — with the middle region, the base, made deliberately thin. Forward-bias the base-emitter junction and electrons flood in from the emitter, as a diode would predict; but because the base is so thin and lightly doped, almost all of those electrons don't stop there — they get swept across the base and pulled into the collector by the reverse-biased base-collector junction's own field, instead of exiting through the base terminal as base current. A small base current therefore "unlocks" a proportionally much larger emitter-to-collector current — the physical origin of current gain, and of every amplifier and every digital switch built from a BJT. The very first transistor, Bardeen and Brattain's point-contact device at Bell Labs on December 16, 1947[2], worked differently; the junction structure described here was William Shockley's, proposed in 1948 and first built in 1951.

Same idea, different scale A MOSFET gets the same controllable-conduction-channel result electrostatically instead — a voltage on an insulated gate attracts carriers to form a conducting channel underneath it, no base current involved at all — which is why MOSFETs draw essentially zero steady-state control current and dominate modern digital logic.
References
  1. 555 timer IC. Design history, Hans Camenzind, Signetics, 1971–72.
  2. Invention of the First Transistor at Bell Telephone Laboratories, Inc., 1947. IEEE Milestones, Engineering and Technology History Wiki.
  3. 1947: Invention of the Point-Contact Transistor. The Silicon Engine, Computer History Museum.