Shop by category
Shop all componentsTiming, filters & signals
Vavg = D × V hight on = D ÷ f, t off = (1 − D) ÷ fValue = D × (2^bits − 1)25% duty on a 5 V Arduino pin: average 1.25 V, analogWrite(64). At 490 Hz the pin is on for 0.51 ms and off for 1.53 ms each cycle.
Pulse-width modulation switches a pin fully on and off very fast. The motor, LED or filter connected to it only “sees” the average, so changing the duty cycle controls speed or brightness without wasting power as heat.
Arduino Uno PWM runs at about 490 Hz (980 Hz on pins 5 and 6); ESP32 lets you choose frequency and resolution. Use 20 kHz or more for motors to avoid audible whine, and an RC low-pass filter if you need a true analogue voltage.
The share of each cycle the signal is high. 25 % duty at 5 V averages 1.25 V.
analogWrite uses 8 bits (0 to 255), so 50 % is about 127 or 128.
Yes. LEDs need a few hundred Hz to avoid flicker, while motors often run quieter above 20 kHz.
Vavg = D × V high; t on = D ÷ f, t off = (1 − D) ÷ f; Value = D × (2^bits − 1).
25% duty on a 5 V Arduino pin: average 1.25 V, analogWrite(64). At 490 Hz the pin is on for 0.51 ms and off for 1.53 ms each cycle.
Geekobot builds that use it include Shoe cabinet odour fan, Wi-Fi bathroom humidity fan, One big button for the light and fan and Presence fan controller. 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