Shop by category
Shop all componentsTiming, filters & signals
The filter has a high output resistance (R). Feed it into an op-amp follower such as an LM358 before driving anything that draws current, or the voltage will drop.
V out = D × V highf c = 1 ÷ (2π × R × C)Ripple ≈ V high × D × (1 − D) ÷ (f × R × C)50% duty at 490 Hz on a 5 V pin through 10 kΩ and 10 µF: 2.5 V out, cutoff 1.6 Hz, ripple about 25 mV, and 0.46 s to settle after a change.
A PWM pin is only ever fully on or fully off, but a resistor and capacitor average the pulses into a steady voltage equal to the duty cycle times the high voltage. It is the cheapest way to get a variable analogue voltage from an Arduino, which has no DAC on most boards.
There is a trade-off. A bigger R × C gives less ripple but responds more slowly; a higher PWM frequency improves both. Two RC stages in a row cut ripple much more than one large stage.
Connect a resistor from the PWM pin to a capacitor going to ground and take the voltage across the capacitor. 10 kΩ and 10 µF work for slow signals at 490 Hz.
Raise the PWM frequency, use a larger capacitor or resistor, or add a second RC stage. Each change makes the output slower to follow the duty cycle.
No. The resistor limits the current to a few hundred microamps. Buffer it with an op-amp or use the PWM signal directly with a transistor or MOSFET.
V out = D × V high; f c = 1 ÷ (2π × R × C); Ripple ≈ V high × D × (1 − D) ÷ (f × R × C).
50% duty at 490 Hz on a 5 V pin through 10 kΩ and 10 µF: 2.5 V out, cutoff 1.6 Hz, ripple about 25 mV, and 0.46 s to settle after a change.
Geekobot builds that use it include 555 timer LED flasher, Two-transistor LED flasher (astable multivibrator), Dust sensor air monitor and Dust level colour ring. Each has the full parts list, wiring and code.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators