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
Here's a question to hold in your head before you build anything: if you connect an empty capacitor to 3.3 V through a resistor, what does its voltage do? Does it snap straight to 3.3 V, or does it take a moment to get there?
A capacitor is a small part that stores electric charge, a bit like a tiny bucket for electricity. A resistor limits how fast charge can flow. Put them together and the bucket can't fill instantly, it has to fill through the narrow neck the resistor allows. Make your prediction now, then build the circuit and measure what actually happens.
You'll drive the circuit from a GPIO pin, let the capacitor charge through the resistor, and read the voltage on the capacitor with an analog pin.
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: An electrolytic capacitor is polarised, it has a positive and a negative leg, and it must go in the right way round. The negative leg is usually marked with a stripe and is the shorter leg. The negative leg connects to ground here. Reversing it can damage the part.
The measured node charges from 3.3 V through the resistor, so its voltage always stays between 0 V and 3.3 V. That keeps it inside the safe range for the ADC pin, which must never see more than 3.3 V.
This program drives the circuit high to charge the capacitor, then low to discharge it, reading the voltage many times a second and printing it for the plotter. Type it into the editor 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)
PHASE_TIME = 5 # seconds to watch each of charging and discharging (~5 tau)
def read_volts():
# read_u16() gives 0-65535; scale it to the 0-3.3 V the ADC measures
return adc.read_u16() * 3.3 / 65535
def sample_for(seconds):
start = time.ticks_ms()
while time.ticks_diff(time.ticks_ms(), start) < seconds * 1000:
t_ms = time.ticks_diff(time.ticks_ms(), start) # milliseconds since phase start
print("{},{:.3f}".format(t_ms, read_volts())) # CSV: t_ms,volts
time.sleep(SAMPLE_STEP)
# Charge: drive GP15 high so the capacitor fills up through the resistor.
drive.value(1)
sample_for(PHASE_TIME)
# Discharge: drive GP15 low so the capacitor empties back through the resistor.
drive.value(0)
sample_for(PHASE_TIME)Each line prints two numbers: the milliseconds since the phase started, then the measured voltage. Turn on the plotter's timestamp toggle so it uses that first column as the time axis. The voltage climbs toward 3.3 V during the charge phase, then falls back toward 0 V during the discharge phase. New to the plotter? See Using the Plotter.
Pin(15, Pin.OUT) sets up GP15 as an output you can drive high or low, and ADC(26) sets up GP26 to read voltage. read_volts turns the raw ADC reading (a whole number from 0 to 65535) into an actual voltage between 0 and 3.3 V, so the plot is in units you can read.
sample_for loops for a set number of seconds, printing the elapsed time and the voltage on each pass, with a short time.sleep between readings to set the sample rate. First the code drives GP15 high to charge the capacitor, then low to discharge it.
Look at the shape of the plot. When you drive the pin high, the voltage doesn't jump to 3.3 V, it rises quickly at first and then eases off, curving toward 3.3 V. When you drive the pin low, it drops quickly at first and then eases toward 0 V. The capacitor's voltage can't change all at once because charge has to flow in or out through the resistor, and the resistor only lets it flow so fast. Every RC circuit has a characteristic timescale set by the size of the resistor and the capacitor: bigger values mean a slower, more stretched-out curve. With the 10 kΩ resistor and 100 µF capacitor here, that timescale is about one second, which is why the curve takes a few seconds to flatten out.
Run the program and watch the plot fill in.
Notice that both curves are steepest at the start and flatten as they go, and that both take roughly the same amount of time to settle. That shared timescale is the fingerprint of your particular resistor and capacitor.
Predict first, then check if you can. If you swapped the 10 kΩ resistor for a larger one, say 22 kΩ, what would happen to the curve? Would the capacitor fill faster or slower, and would the curve get steeper or more stretched out? Write down your guess, then try the larger resistor and compare the two plots.