Course
DSP from Scratch
Digital signal processing from the very first sample: sampling, convolution, filters, the z-transform and the FFT.
6 out now · 116 planned · 9 parts
From signals to silicon
Free lessons that start from school maths. Watch the video, read the lecture, then play with the idea until it clicks.
Choose your path
Each lesson is one idea, and each course goes all the way: nothing is skipped and nothing is rushed.
Course
Digital signal processing from the very first sample: sampling, convolution, filters, the z-transform and the FFT.
6 out now · 116 planned · 9 parts
Course
From one transistor to a working op-amp: how the analog circuits inside every chip are designed.
1 out now · 131 planned · 9 parts
Coming later: digital IC design, data converters and RF.
How a lesson works
One animated video, about twelve minutes, built around a single everyday picture.
The written lecture: the same idea with every equation and a worked example.
Change the numbers yourself and watch what happens. This is where it clicks.
A few questions with full step-by-step answers, so you know it stuck.
Videos and lectures are open to everyone. The labs and checks need a free Google sign-in, and lesson 1 of each course is open in full so you can try everything first.
Today's fact
A phone records sound at 48,000 samples every second. Three minutes is 180 seconds, and 180 × 48,000 = 8,640,000.
That is how many numbers one microphone writes down while you record one short message.
From lesson 1: What Is a Digital Signal? Sampling and Sample RateShare this fact
A camera takes a still picture many times a second, often 30. That is one picture every thirtieth of a second: about 33 milliseconds apart.
Your eyes blend the stills into movement. Each picture is a sample in time, so video has a sample rate too: 30 hertz.
From lesson 1: What Is a Digital Signal? Sampling and Sample RateShare this fact
Pads on the skin pick up the tiny voltage your heart makes with every beat. It is only about a thousandth of a volt: one millivolt.
Many heart recordings write that voltage down 360 times a second, fast enough to follow its sharp peak.
From lesson 1: What Is a Digital Signal? Sampling and Sample RateShare this fact
An ordinary camera takes about 30 pictures a second. A slow-motion camera takes far more, sometimes a thousand or more.
The gaps between pictures become tiny, so even very fast movements are caught.
From lesson 1: What Is a Digital Signal? Sampling and Sample RateShare this fact
A smooth signal has a value at every instant, and between any two instants there is always another one.
That is endlessly many values, and a computer’s memory is finite. So it keeps a list: one value, then the next, then the next.
From lesson 1: What Is a Digital Signal? Sampling and Sample RateShare this fact
A tiny microphone listens to a steady drone, like an aircraft engine. The headphones play a copy with the same height and the same speed, but moved by half a cycle.
Wherever the drone goes up, the copy goes down. Added together in your ear, they cancel at every moment.
From lesson 2: Amplitude, Frequency and Phase: How to Read a Sine WaveShare this fact
When an orchestra tunes up, everyone plays the same note, A. It is a wave at 440 hertz: 440 complete cycles every second.
Each cycle lasts about 2.3 thousandths of a second, which is 1 ÷ 440.
From lesson 2: Amplitude, Frequency and Phase: How to Read a Sine WaveShare this fact
The electricity from a wall socket is a sine wave. In Europe and much of the world it completes 50 cycles every second; in North America, 60.
So one full cycle takes 20 milliseconds in Europe: 1 ÷ 50 of a second.
From lesson 2: Amplitude, Frequency and Phase: How to Read a Sine WaveShare this fact
Stand at the centre of a circle, then walk along its edge a distance equal to the radius. The angle you have turned is one radian, about 57.3°.
Going all the way round takes 2π of those walks: about 6.28. That is why a full cycle of a sine wave is 2π radians.
From lesson 2: Amplitude, Frequency and Phase: How to Read a Sine WaveShare this fact
A camera takes separate pictures, about 30 a second. If a wheel turns ¾ of a turn between two pictures, it lands where a ¼ turn backwards would have put it.
Your eye picks the shorter move, so the wheel seems to roll backwards while the car drives forwards. Computers measuring signals get fooled the same way: it is called aliasing.
From lesson 3: Why Wheels Spin Backwards on Video: Spectrum, Aliasing and NyquistShare this fact
To capture a wave you need more than two measurements in every cycle. Hearing goes up to about 20,000 Hz, so a recording needs more than 40,000 measurements a second.
A CD uses 44,100. Half of that, 22,050 Hz, sits just above our hearing, and the gap gives the filter in front room to work.
From lesson 3: Why Wheels Spin Backwards on Video: Spectrum, Aliasing and NyquistShare this fact
Speech is clear enough with sounds up to about 3,400 Hz. Traditional phone systems measure 8,000 times a second, so the highest frequency they can capture is half of that: 4,000 Hz.
The gap between 3,400 and 4,000 Hz leaves room for the filter that removes anything faster before the measuring.
From lesson 3: Why Wheels Spin Backwards on Video: Spectrum, Aliasing and NyquistShare this fact
A spectrum lists a signal’s ingredients: which sine waves are inside, and how big each one is. The bars in a music app are a live spectrum of the song.
Bars on the left are low sounds, like a bass drum. Bars on the right are high sounds, like cymbals.
From lesson 3: Why Wheels Spin Backwards on Video: Spectrum, Aliasing and NyquistShare this fact
Your body clears caffeine slowly: for a typical adult, about half is gone after five hours. From 7 pm to midnight is five hours.
So a coffee at 7 pm leaves about half a cup’s worth in you at bedtime. Add coffees at 9 am and 2 pm and the total at midnight is ⅞ of a cup.
From lesson 4: How Much Coffee Is Still in You at Midnight? The Impulse ResponseShare this fact
Railway workers once tapped every train wheel with a hammer and listened. A healthy wheel rings clearly. A cracked wheel sounds dull.
What comes out after a single tap is called the impulse response. A crack changes the wheel, so it changes the response. Engineers still tap aircraft panels and bridges for the same reason.
From lesson 4: How Much Coffee Is Still in You at Midnight? The Impulse ResponseShare this fact
A single click is the simplest possible sound: one tap. Play it through a new speaker and record what comes out, and you have the speaker’s impulse response.
Because every song is a row of taps of different sizes, that one recording tells engineers how the speaker will sound with any music at all.
From lesson 4: How Much Coffee Is Still in You at Midnight? The Impulse ResponseShare this fact
Half the caffeine is gone every five hours, so a cup counts 1 when you drink it, then ½, ¼, ⅛ as it gets older.
With a coffee every five hours, the newest four cups add up to 1 + ½ + ¼ + ⅛ = 1⅞. Older cups add tinier and tinier pieces, each covering half of the gap that is left, so the total creeps towards two cups but never passes it.
From lesson 5: Convolution Explained Simply: Flip, Slide, Multiply, AddShare this fact
Engineers pop a balloon inside a cathedral and record what comes back: thousands of echoes, slowly fading. That recording is the cathedral’s impulse response.
Convolve a song recorded in a room with no echo with that impulse response, and the song sounds as if it were sung in the cathedral. Music apps call this convolution reverb.
From lesson 5: Convolution Explained Simply: Flip, Slide, Multiply, AddShare this fact
The smooth line drawn over a jumpy daily chart is a strip of seven weights, each 1/7, sliding along the days: multiply each day by the weight under it, then add.
Blurring a photo is the same recipe in two directions: a strip like ¼, ½, ¼ slides along each row of pixels, then down each column.
From lesson 5: Convolution Explained Simply: Flip, Slide, Multiply, AddShare this fact
A slow push has time to move a heavy wall. A quick push turns into a pull before the wall gets going, so the two cancel.
So a wall passes low frequencies far better than high ones. From a party next door you hear the deep beat, never the words. A note never changes on the way through: it only gets quieter and a little later.
From lesson 6: Frequency Response Explained Simply: Gain, Phase and FiltersShare this fact
An equaliser splits sound into slices of frequency, from deep bass on the left to treble on the right. Each slider sets the gain of one slice: how tall that part comes out compared with how tall it went in.
Line the sliders up and you have drawn a frequency response. Headphone reviews print the same curve: “bass-heavy” means the gain is higher on the left.
From lesson 6: Frequency Response Explained Simply: Gain, Phase and FiltersShare this fact
On a slow wave, neighbouring numbers agree: the average of 1 and 1 is 1, so it comes through untouched.
On the fastest wave a list of numbers can hold, 1, −1, 1, −1, neighbours always disagree: the average of 1 and −1 is 0, every time. That simple average is a low-pass filter.
From lesson 6: Frequency Response Explained Simply: Gain, Phase and FiltersShare this fact
A microphone turns sound into a voltage that wiggles in the same pattern. Speak close to a phone and that wiggle is about 10 millivolts tall: a hundredth of a volt.
That is smaller than the gap between two marks on the converter’s ruler, so an analog amplifier has to make it bigger before the chip can read it.
From lesson 1: Analog vs Digital: Why Every Chip Still Needs Analog CircuitsShare this fact
A converter measures voltage like a ruler with a fixed length. Everything above the top reads as the top, and everything below the bottom reads as the bottom.
Shout straight into a microphone and the wiggle runs off both ends. Its peaks are sliced flat, and that flattening is the crunchy, broken sound.
From lesson 1: Analog vs Digital: Why Every Chip Still Needs Analog CircuitsShare this fact
A converter rounds every reading to the nearest mark on its ruler. Each extra bit doubles the number of marks: 10 bits give 1,024, and 16 bits give 65,536.
More marks means a finer ruler, so a small wiggle crosses more of them. But even a fine ruler cannot see what falls between its marks.
From lesson 1: Analog vs Digital: Why Every Chip Still Needs Analog CircuitsShare this fact
Your voice enters as a tiny voltage, is made bigger by an amplifier and turned into numbers. The numbers cross the network.
At the other phone, a converter turns them back into a voltage and another amplifier gives it the strength to move a speaker. Any chip that listens to the real world needs analog circuits at its edges.
From lesson 1: Analog vs Digital: Why Every Chip Still Needs Analog CircuitsShare this fact
The whole road
Out now
15 minWhy only the bass gets through the wall.
Lecture and lab
11 minYour phone cannot hear you without it.
Fully open
14 minThirty coffees, and still never two cups.
Lecture and lab
13 minTap a system once and watch how it answers.
Lecture and lab
12 minSample too slowly and a fast signal dresses up as a slow one.
Lecture and lab
10 minThe three numbers that describe any sine wave.
Lecture and lab
Free weekly email
The week's new lessons, the daily facts in one place, one thing to try in the lab and one puzzle. Free.
No spam. One click to leave.