starter kit/Making light/09. Dim with a potentiometer
Making light · 09 of 16

Dim with a potentiometer

A potentiometer is a resistor with a third leg that slides along it. Wired in series with an LED and a fixed resistor, it is a brightness knob. Of the four in the box, the 1 kΩ is the one that uses the whole turn; the others give almost no change or all of it in the first tenth.

You need the first circuit, a 1 kΩ potentiometer and a screwdriver small enough for its screw. Everything else is the same.

Three legs

A potentiometer is a strip of resistive material with a leg at each end, and a third leg connected to a contact that slides along the strip. That contact is the wiper, and the middle leg is the wiper's.

The three legs of a potentiometer
Potentiometer
Turn the screw40 % of the way round
A to wiper
400 Ω
Wiper to B
600 Ω
A to B, always
1 kΩ
The two outer legs always read 1 kΩ, whatever the screw does, because the track does not move. The wiper slides along it, so the middle leg reads 400 Ω from A and 600 Ω from B, and the two add up to 1 kΩ. Using just the wiper and one end gives a resistor you can set anywhere from 0 to 1 kΩ. The listed values are nominal: expect up to about 20 % either way on a part this size.

The potentiometers in the box are small trimmers that you turn with a screwdriver. The value is on the body as three digits: two digits and the number of zeros, so 201 is 200 Ω, 102 is 1 kΩ, 103 is 10 kΩ and 105 is 1 MΩ. Confirm it with the meter: with the power off, the two outer legs read the full value, within about 20 %, and that reading does not change when you turn the screw.

A resistor you set by hand

Use the wiper and one end, and leave the other end alone. The resistance between them is the part of the track on that side, from nothing to the full value. In series with the LED and the 220 Ω resistor, the total is the fixed 220 Ω plus whatever the knob gives, and the current is the same arithmetic as in the last article.

Which one

There are four values in the box. All four work, and only one is useful here.

Which potentiometer, and why
LED colour
Highlight
With the 1 kΩ potentiometer the LED goes from 12.7 mA at one end of the turn to 2.30 mA at the other: the far end is 18 % of the near end. 100 % of the turn gives at least 2 mA, the least that looks lit. This is the one that uses the whole turn: bright at one end, dim at the other, and a change you can see all the way between.

The 200 Ω one adds so little that the LED stays bright all the way round. The 10 kΩ one adds so much that only the first tenth of the turn lights it: the rest is dark, and all the control is crammed into a few degrees. The 1 MΩ one does it in the first hundredth. The 1 kΩ one changes the current from about 12.7 mA to about 2.3 mA, and does it smoothly over the whole turn, which is what a dimmer is.

Build it

The dimmer, hole by hole
Build it one part at a time
5 Jumper wire
from row 8, column a
to the − rail
The shaded row is joined underneath.
The wire from the wiper's row to the − rail closes the loop. Current now has to pass through the part of the track between the end and the wiper: the further the wiper is from that end, the more track, and the dimmer the LED.

The potentiometer's legs are in three neighbouring rows, one per leg. On the trimmers drawn here the three legs sit in a line. If yours has them in a triangle, put each leg in its own row anyway and keep track of which is the middle one.

Why the fixed resistor stays

You might think the 220 Ω resistor is redundant now that there is a potentiometer. It is not. At one end of the turn the potentiometer is 0 Ω, and without the fixed resistor nothing is left in the loop to limit the current.

Turn the knob, watch the current
Potentiometer
Fixed resistor in series
Turn the knob0 %: 0 Ω
Knob resistance
0 Ω
Total
220 Ω
Current
12.7 mA
A comfortable brightness: 12.7 mA through a total of 220 Ω. The knob does not set the brightness directly; it sets the total resistance, and Ohm's law does the rest.

Try it: set the fixed resistor to none and turn the knob to 0 %. The potentiometer is a variable resistor that can reach zero, so it must never be the only one.

Measure it

Do the first measurements with the power off and the potentiometer out of the board, so nothing else is in parallel with it. Set the meter to ohms, the symbol Ω, and touch the probes to the legs.

Probes onExpect
The two outer legsThe printed value, about 1 kΩ, within about 20 %
The middle leg and one outer leg, screw at one endNear 0 Ω
The middle leg and the same outer leg, screw at the other endThe full value
The middle leg and each outer leg, any positionThe two add up to the outer reading

Then switch on and set the meter to DC volts. Put the probes across the fixed 220 Ω resistor, and turn the knob through the whole range, for a red LED on the 5 V side.

KnobAcross the 220 ΩCurrent
One end, 0 Ωabout 2.8 Vabout 12.7 mA
Halfway, 500 Ωabout 0.9 Vabout 3.9 mA
Other end, 1 kΩabout 0.5 Vabout 2.3 mA

The reading across the LED hardly moves, about 2 V falling a little at the dim end, while the resistor's reading falls to a fifth. That is the control: the potentiometer is taking voltage, and the resistor and LED are left with less.

On the 3.3 V side

On 3.3 V the same circuit goes from about 5.9 mA to about 1.1 mA with a red LED, so the dim end is nearly dark. A blue or white LED goes from dim to dark: with the LED taking about 3 V, the module leaves only 0.3 V across the resistors, and the knob moves the current from about 1.4 mA to about 0.25 mA. For a dimmer, use the 5 V side.

When it does not work

Turning the screw changes nothing.

The two outer legs were used and the middle one was not. Between the outer legs the resistance is always the full value, whatever the screw does. Move one wire to the middle leg, the wiper, and keep the other on one end. If it still does nothing and the potentiometer is the multi-turn type, it may have a clutch that clicks once you reach the end of its travel: turn it the other way.

The LED gets brighter when I expect it to get dimmer.

That is a matter of which end you wired, not a fault. Moving the wire from one outer leg to the other swaps which direction of turn is brighter. The potentiometer has no direction of its own: the wiper is closer to one end or the other, and you chose the end that counts.

The LED flickers or cuts out as I turn.

The wiper is skipping on the track, or one of the three legs is only half in its hole. Push the legs in and turn it slowly. On a worn or dirty trimmer the wiper can lose contact for a moment, and with only the wiper and one end wired that opens the circuit. A new trimmer from the box usually cures it.

It is bright at one end of the turn and never really dim.

The 200 Ω potentiometer was used. Its whole range adds only 200 Ω to the fixed 220 Ω, so the current moves from 12.7 to 6.7 mA and the LED stays bright. Swap it for the 1 kΩ one, which takes the same circuit from 12.7 mA down to 2.3 mA.

Where this goes next

Replacing your hand on the wire with a button, and what a wire that goes nowhere really does.

A button and a pull-down →

Edit this page — content/books/estkit/dim-with-a-potentiometer.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Electronics Starter Kit, Breadboard, Power Module and Components

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →