Building a Potentiometer Dimmer Circuit
Swap one of the divider's fixed resistors for a knob, and you get a dial that smoothly adjusts brightness, volume, or any other analog setting.
You'll need: a potentiometer (commonly 1k–10kΩ for this kind of build), your LED-and-resistor circuit from Lesson cb-02, and a breadboard.
A potentiometer is really a single resistor with a sliding contact (the wiper) that taps a variable point along its length — mechanically, it's the two-resistor voltage divider from the last lesson built into one adjustable component. Turning the knob moves the wiper, which changes the effective resistance between the wiper and each end terminal.
For a simple LED dimmer, wire the potentiometer's two outer terminals across your supply, exactly like the two fixed resistors in a divider, then take your LED-and-resistor combination from the wiper terminal to ground. As you turn the knob, the voltage reaching your LED branch rises and falls smoothly, dimming and brightening it.
Keep the fixed series resistor from Lesson cb-02 in place even with a pot in the circuit — the LED still needs current limiting no matter what voltage the wiper is providing. Turning the pot fully to one extreme should never remove that resistor from the path.