Signals: Frequency, Period and Duty Cycle: the short answer
Most signals in electronics repeat: the 50 Hz mains, a 16 MHz crystal, a 1 kHz PWM output, a 38 kHz infrared carrier. The period T is the time for one cycle and the frequency f is how many cycles happen per second, so f = 1 ÷ T.
- Level
- Intermediate
- Time
- About 6 min
- Topic
- Basics
Describe any repeating signal by its frequency, period, amplitude, offset and duty cycle, and convert between them.
Before this: Voltage, Current & Resistance, PWM Timing & Actuator Interfaces
Most signals in electronics repeat: the 50 Hz mains, a 16 MHz crystal, a 1 kHz PWM output, a 38 kHz infrared carrier. The period T is the time for one cycle and the frequency f is how many cycles happen per second, so f = 1 ÷ T. A 1 kHz signal has a period of 1 ms; Indian mains at 50 Hz has a period of 20 ms.
Amplitude is described in several ways, and mixing them up causes most beginner mistakes. Peak voltage is measured from the centre line to the top. Peak-to-peak is from the bottom to the top, twice the peak for a symmetric wave. The offset (or DC level) is where the centre line sits: a microcontroller's 0 to 3.3 V square wave has a peak-to-peak of 3.3 V and an offset of 1.65 V. An oscilloscope shows all of these at once, while a multimeter on DC volts shows only the average.
For square waves the duty cycle is the fraction of each period that the signal is high: a 25 % duty cycle at 1 kHz is high for 250 µs and low for 750 µs. The average of a 0 to V square wave is D × V, which is why PWM can dim an LED or set a motor's speed. Sine waves have one frequency only; square waves contain the base frequency plus odd harmonics (3f, 5f, 7f...), which is why fast edges cause noise far above the switching frequency.
Period, frequency and duty cycle
Frequency is cycles per second and period is the time of one cycle, so each is the inverse of the other. A 50 Hz signal has a period of 20 ms and a 1 kHz signal 1 ms. For a square wave, the duty cycle is the percentage of the period that the signal is high.
A square wave of 5 V at 25 percent duty has an average of 1.25 V, which a multimeter in DC mode would read.
Amplitude, RMS and peak
Peak is the highest value, and peak-to-peak spans from the lowest to the highest. RMS is the DC value that gives the same heating in a resistor. For a sine wave, RMS is the peak divided by 1.41. Mains of 230 V RMS reaches about 325 V at the peak.
A multimeter in AC mode usually assumes a sine wave; a cheap one can read a square or distorted wave wrongly unless it is a true-RMS meter.
Seeing it on instruments
An oscilloscope shows the shape directly. A frequency counter or a microcontroller timer can measure the period. In a sketch, pulseIn measures how long a pin stays high, from which you can find the frequency and duty cycle.
- Mixing up peak, peak-to-peak and RMS values.
- Trusting an average-responding meter on a non-sine wave.
- Confusing frequency with period and using the wrong one in a formula.
- f = 1 ÷ T
- frequency in hertz, period in seconds
- Vavg = D × V
- average of a 0 to V square wave with duty cycle D
Three cycles of your PWM signal
Work it with your own numbers: Frequency and period · PWM timing
Practise this lesson with Maker
The explanation above is free for everyone. The practice for Intermediate lessons in every domain are part of the Maker plan at ₹499 a month, and Pro includes them too.
With Maker you also get: a worked example, a hands-on task, a 3-question check.
