Take the RC low-pass filter and pin down its cutoff frequency, the speed where the output amplitude falls to about 70.7% of the input. Predict fc = 1/(2πRC) for a 10 kΩ and 0.1 µF filter (about 160 Hz), then drive it at different speeds and watch the output swing shrink to confirm the trend and the −3 dB idea.
Turn an RC circuit into a low-pass filter on the Pico W: drive it with a square wave from a GPIO, read the output with the ADC, and plot the commanded input beside the measured output. See intuitively why slow changes pass through while fast ones get smoothed away.
Keep the Pico W RC circuit and swap in different resistors and capacitors to see how each changes the charging time. Predict faster or slower with τ = R × C, measure the crossing at 2.09 V, and build a table confirming that more R or more C means a longer charge.
Reuse the Pico W resistor–capacitor circuit to measure the time constant τ = RC: find when the capacitor reaches ~63.2% of the supply, then compare your measured τ against the calculated one.
Build a resistor–capacitor circuit on the Pico W, measure the capacitor's voltage with the ADC, and plot the charging and discharging curves over time.
test

How to use the Plotter to view data in a line graph as it is printed from a device
how to make the built in led blink
τ = RC and its units (ohms × farads = seconds).In Measuring Capacitor Charge and Discharge you watched a capacitor fill through a resistor and saw the voltage rise fast at first, then ease off as it crept toward 3.3 V. Every RC circuit has its own timescale for that curve. This lesson gives that timescale a name and pins it down with a measurement.
Here's the prediction to make before you build anything. Your circuit charges the capacitor from a 3.3 V supply. Somewhere on the way up, the voltage passes 63.2% of the way to 3.3 V, which is about 2.09 V. With a 10 kΩ resistor and a 100 µF capacitor, how long do you think it takes to reach that 2.09 V mark, starting from empty? Write down a guess in seconds. You'll measure the real answer and see how close you were.
This is the same RC circuit you built in Measuring Capacitor Charge and Discharge: a resistor from a driving pin to the capacitor, with an analog pin reading the capacitor's voltage. If it's still on your breadboard, you can reuse it as-is. If not, wire it up again:
f24 and the other in f23.GP15 to the resistor leg in row 24. This end drives the circuit.GP26 to the capacitor's positive leg. GP26 is analog input ADC0.Warning: The electrolytic capacitor is polarised. Its negative leg (usually the shorter one, marked with a stripe) goes to ground. Putting it in backwards can damage it.
The measured node only ever charges from 3.3 V through the resistor, so its voltage stays between 0 V and 3.3 V — safely inside the ADC's limit, which must never see more than 3.3 V.
This program starts with the capacitor empty, then drives GP15 high to charge it through the resistor. While it charges, it prints the voltage many times a second for the plotter, and it also watches for the moment the voltage first crosses 63.2% of 3.3 V (about 2.09 V). That crossing time is your measured time constant. At the end it prints a short summary comparing the measured τ with the calculated τ = R × C = 1.0 s. Type it in and run it.
Python
from machine import Pin, ADC
import time
drive = Pin(15, Pin.OUT) # GP15 drives the RC network through the 10 kOhm resistor
adc = ADC(26) # GP26 / ADC0 reads the voltage on the RC node
SAMPLE_STEP = 0.02 # seconds between readings (~50 samples per second)
CHARGE_TIME = 5 # seconds to watch the capacitor charge (~5 tau)
SUPPLY = 3.3 # volts driven onto the network
TARGET_FRACTION = 0.632 # one time constant reaches ~63.2% of the final voltage
TARGET_VOLTS = SUPPLY * TARGET_FRACTION # ~2.09 V at a 3.3 V supply
CALCULATED_TAU = 10_000 * 100e-6 # R * C = 10 kOhm * 100 uF = 1.0 second
def read_volts():
# read_u16() gives 0-65535; scale it to the 0-3.3 V the ADC measures
return adc.read_u16() * SUPPLY / 65535
# Start from empty: drive GP15 low for a few seconds so the capacitor discharges fully.
drive.value(0)
time.sleep(CHARGE_TIME)
# Charge: drive GP15 high so the capacitor fills up through the resistor.
drive.value(1)
start = time.ticks_ms()
measured_tau = None # filled in the first time we cross TARGET_VOLTS
while time.ticks_diff(time.ticks_ms(), start) < CHARGE_TIME * 1000:
t_ms = time.ticks_diff(time.ticks_ms(), start) # milliseconds since charging began
volts = read_volts()
print("{},{:.3f}".format(t_ms, volts)) # CSV: t_ms,volts
# The first sample at or above 2.09 V marks one time constant.
if measured_tau is None and volts >= TARGET_VOLTS:
measured_tau = t_ms / 1000 # convert milliseconds to seconds
time.sleep(SAMPLE_STEP)
# Compare what we measured against the value we calculated from R and C.
if measured_tau is not None:
print("# measured tau = {:.2f} s, calculated tau = {:.2f} s".format(
measured_tau, CALCULATED_TAU))
else:
print("# never reached {:.2f} V - charge longer or check the wiring".format(
TARGET_VOLTS))Each data line prints two numbers: the milliseconds since charging began, then the measured voltage. Turn on the plotter's timestamp toggle so it uses that first column as the time axis, and watch the line sweep up toward 3.3 V. The final line, the one starting with #, is a note for you rather than the plotter: it shows the time the voltage first reached 2.09 V (your measured τ) next to the calculated τ = R × C = 1.0 s. They should land close to each other. New to the plotter? See Using the Plotter.
The code sets up GP15 as an output that drives the network and GP26 as the analog pin that reads the capacitor's voltage. It first holds GP15 low to empty the capacitor, then drives it high and starts a clock. On every pass through the loop it prints the elapsed time and the voltage, and the first time the voltage reaches 2.09 V it records that instant as the measured time constant.
Now that you have the plotted curve in front of you, here's the idea that describes it. The speed of that curve is set by a single number called the time constant, written with the Greek letter τ (tau). For a resistor and capacitor it is simply the two values multiplied together:
τ = R × C
The units work out cleanly: an ohm times a farad is a second. So you don't need to convert anything exotic — multiply resistance in ohms by capacitance in farads and you get a time in seconds. For this circuit:
τ = 10 kΩ × 100 µF = 10,000 Ω × 0.000100 F = 1 second
τ is the natural yardstick for the curve. After one time constant, the capacitor has charged to about 63.2% of the supply — that's the ~2.09 V mark your code watches for. It's not a special property of this circuit; every charging RC circuit reaches ~63.2% of its final voltage after exactly one τ. That's why the crossing time you measured should land close to the 1 second you calculated from R × C.
The curve keeps climbing after that, but ever more slowly. Each additional time constant closes most of the remaining gap: about 86% charged after 2τ, 95% after 3τ, and by roughly 5τ the capacitor is at about 99% of the supply — close enough that we call it fully charged. That's why the code watches for about 5 seconds: five time constants of 1 second each is enough to see the curve flatten right out.
Run the program and watch the plot sweep upward toward 3.3 V, steep at first and flattening as it goes — the same shape you saw before, but now you're timing it.
If your measured τ came out much larger or smaller than 1 second, check that you're using a 10 kΩ resistor and a 100 µF capacitor and that the capacitor is the right way round.
Predict, then measure. Pick a different resistor or capacitor — say a 22 kΩ resistor instead of the 10 kΩ, or a larger capacitor if you have one. Before you change anything, calculate the new τ = R × C and write down the time you expect the voltage to reach 2.09 V. Then swap the part, run the program again, and compare your measured τ to your prediction. Did a bigger R or C stretch the curve out the way you expected?