What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PWM appears on an oscilloscope as a repeating rectangular waveform: the signal switches between low and high, and its duty cycle is the percentage of each period spent high. To see how it works, compare traces at different duty cycles, then measure each trace’s period and high-time. An ESP32 or Arduino can generate the signal, while a resistor-protected LED makes the effect visible.

What PWM looks like on an oscilloscope

Pulse-width modulation (PWM) is a digital signal that repeatedly switches on and off. On a scope, it looks like a train of rectangular pulses. The time between equivalent points on successive pulses is the period; the high portion of that period is the pulse width.

Duty cycle is calculated as high-time ÷ period × 100%. For example, a 20% duty cycle means the signal is high for one-fifth of every cycle. If the period is one second, the high-time is 200 milliseconds, an illustrative example given in Mastering STM32 (2018).

Frequency and duty cycle describe different things. Frequency determines how often cycles repeat; duty cycle determines how much of each cycle is high. At the same frequency, compare 20%, 50%, and 80% duty-cycle traces: their periods remain the same while their high portions grow wider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
FNIRSI DSO152 Handheld Oscilloscope 200kHz Bandwidth, 2.5MS/s Sampling Rate
  • 【Faster Sampling Speed】FNIRSI DSO152 handheld oscilloscope has a real-time sampling rate of 2.5 MS/s and a 200 KHz bandwidth. The 10 x probe can measure up to 800 VPP, which is equivalent to 280 V AC. Voltages up to 400 V can be measured
  • 【Professional Designed 】The DSO152 automotive oscilloscope supports full trigger modes(Auto/Normal/Single). Works perfectly for both periodic analog signals and aperiodic digital signals. 2.8'' HD LCD display screen, a resolution of 320*240, clear to observe
  • 【Portable Oscilloscope】Pocket oscilloscope is an Assembled finished Machine, lightweight and easy to carry, it can be used directly to avoid assembling welding process problems. Applicable to the maintenance industry and R&D education industry
  • 【Easy Measuring】Equipped with efficient one-key AUTO setting of all parameters, the measured waveform can be displayed without cumbersome adjustment. Long press the AUTO button to quickly calibrate the baseline,fast measurement of waveforms
  • 【Longer Battery Life】FNIRSI DSO152 digital oscilloscope has a built-in 1000 mAh high-quality lithium battery, which can be used continuously for about 4 hours after being fully charged. Type-C interface supports data transmission and charging, firmware upgrade

How to measure PWM duty cycle with a scope

  1. Connect the probe safely. Connect the probe tip to the PWM output and its ground lead to circuit ground. Use a probe and scope input suitable for the signal, and avoid shorting adjacent pins with the probe tip.
  2. Calibrate and set up the display. Calibrate the oscilloscope as appropriate for the probe and instrument. Choose a time base that displays several complete periods and trigger on the signal’s rising edge so the waveform remains stable. The Hackster demonstration specifically calls out scope calibration before observing the pulses.
  3. Measure the period and high-time. Use the scope’s automatic period and positive-pulse-width measurements if available; otherwise use the time cursors. Period is the interval between matching edges on successive cycles. High-time is the interval from a rising edge to the next falling edge.
  4. Calculate or read duty cycle. Divide the measured high-time by the measured period and multiply by 100. If the scope offers an automatic duty-cycle measurement, compare it with this calculation.
  5. Repeat at several settings. Record duty cycle, frequency, period, and high-time at low, middle, and high PWM settings. Confirm that changing duty cycle alone widens or narrows the high portion without changing the repetition rate.

Automatic measurements are useful, but the displayed waveform remains important: it can reveal unstable triggering, unexpected edge behavior, or a frequency different from the one intended by the program.

Make the waveform visible with an ESP32 and LED

JeremyCook’s Hackster.io article, “PWM Concepts Illustrated with an Oscilloscope”, presents R. Jordan Kreindler’s demonstration using an ESP32 development board, a red LED, breadboard jumpers, and an oscilloscope. The LED visibly responds as pulse width increases or decreases. The article says other ESP32 boards should work and mentions an Arduino Uno as another possible controller.

Rank #2
Sale
FNIRSI 2C53T 3-in-1 50MHz 2CH Oscilloscope Multimeter DDS Signal Generator
  • 【Newly Version】The 2C53T is an upgraded version of the 2C23T, which improves the measuring range and adds math operation,cursor measurement,persistence mode,XY mode features
  • 【2 Channel Oscilloscope】50 MHz bandwidth, 250 MSa/s sampling rate, 1 Kpts record depth, automatic measurement function, max voltage 400 V, vertical sensitivity 10mV/div-10V/div , support waveform image storage and export
  • 【4.5-Digit 19999 Counts Multimeter】AC Voltage: 0-750 V, DC Voltage: 0-999.9 V, DC/AC Current: 0-9.999 A, Resistance: 0-19.99 MΩ, Capacitance: 0-99.99 mF, Continuity Measurement. Multi-function meter for professionals, schools and hobbyists
  • 【Signal Generator】The maximum waveform output frequency can reach 50 kHz and a step of 1 Hz, and can output 13 waveforms
  • 【Save function】one-click save, screening function. You can upload the saved image by connecting to PC via Type-C. You can easily compare the waveforms by displaying the reference waveform and the measured waveform on the same screen
  1. Gather an ESP32 development board, red LED, breadboard, jumper wires, a suitable current-limiting resistor, and an oscilloscope with probe.
  2. Wire the LED and resistor to a GPIO that supports PWM on the selected board. Follow the board’s pinout and electrical limits; include the resistor rather than connecting the LED directly to a GPIO. Connect scope ground to circuit ground.
  3. Configure PWM in the board’s supported software interface, then increase and decrease duty cycle gradually. Watch the scope trace and the LED together.
  4. Use the measurement procedure above to record the output at several settings. Treat brightness as a visible indication of the load’s response, not as a substitute for waveform measurements.

PWM changes the average energy delivered to a load by changing how long the output is active in each cycle; it does not make the GPIO pin produce a continuously varying analog voltage. The LED’s apparent brightness reflects its response to the repeated pulses.

Arduino and ESP32 PWM are not interchangeable

The PWM behavior depends on the board and software core. Check the documentation for the exact board, pin, frequency, resolution, and channel behavior rather than assuming one Arduino example applies everywhere.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
RIGOL DHO804 Portable Digital Oscilloscope, 70MHz, 4CH, 12-Bit Resolution
  • 【Key Specs】70 MHz digital oscilloscope with 4 analog channels, 1.25 GSa/s sampling, 12-bit vertical resolution and up to 25 Mpts memory depth—helps correlate multiple rails and timing signals with fine vertical detail.
  • 【UltraAcquire & Search】UltraAcquire up to 1,000,000 wfms/s; 256-level intensity grading plus waveform search/navigation helps find intermittent glitches and review anomalies quickly using event/time/frame navigation.
  • 【FFT & Decode】Peak detect captures glitches down to 1.6 ns; math includes FFT up to 1 Mpts, filters, and 41 automatic measurements. Standard serial trigger/decode supports CAN, RS232/UART, I2C, SPI and 4-bit parallel decode using analog channels.
  • 【Connectivity & SCPI】LAN supports LXI‑C, browser Web Control and standard SCPI commands. USB Host/Device and HDMI improve documentation, data export and external display for lab or teaching use.
  • 【Applications】Digital oscilloscope for switching power ripple/noise checks, embedded bring-up, sensor interface validation and protocol troubleshooting; 7" 1024×600 touch screen and Flex Knob support fast daily measurements.

Arduino Uno and analogWrite()

Arduino’s classic analogWrite() interface accepts values from 0 (always off) to 255 (always on). Its reference says the pin generates a steady rectangular wave at the specified duty cycle until another call changes the output, or digitalRead() or digitalWrite() is called on that same pin. The Arduino reference lists common Uno PWM frequencies as 490 Hz, with 980 Hz on pins 5 and 6; rates differ on other boards. It also warns that Uno pins 5 and 6 may behave unexpectedly at low duty-cycle values because they share a timer with millis() and delay(). See the Arduino analogWrite() reference.

ESP32 LEDC

Espressif’s LEDC peripheral is intended primarily for LED intensity control and can generate PWM for other uses. Current documentation lists 16 LEDC channels on ESP32, eight on ESP32-S2 and ESP32-S3, and six on ESP32-C3, C5, C6, and H2. Frequency, duty, and resolution are configurable through the API; the specific usable combination depends on the chip and configuration. Consult Espressif’s LEDC documentation for the target chip and software environment.

Rank #4
Hantek DSO2C10 Digital Storage Oscilloscope 100MHz Bandwidth 2CH
  • Cost-effective economy oscilloscope.
  • Support arbitrary waveform output, 14 kinds of trigger modes, standard with 5 kinds of serial protocol triggers and decodes.
  • Useful commissioning instrument for various fields such as communication, aerospace, national defense, embedded systems, computers, research and education.
  • Package weight of the Product: 5.95 Pounds
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to compare in your measurements

For a useful experiment, keep the controller, PWM frequency, probe setup, and load consistent while changing duty cycle. A record like this makes the distinction between the programmed setting and observed output clear:

Setting Duty-cycle target Measured period Measured high-time LED observation
Low 20% Record from scope Record from scope Record observation
Middle 50% Record from scope Record from scope Record observation
High 80% Record from scope Record from scope Record observation

The target percentages are example test settings, not guaranteed measured results. For each row, calculate duty cycle from the scope’s high-time and period; if the observed frequency or pulse width differs from expectation, check the board-specific PWM configuration, selected pin, timer or channel allocation, and scope trigger and time-base settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
FNIRSI DPOS350P 4-in-1 350MHz Digital Oscilloscope 2 Channel, 1 GSa/s
  • 【4-in-1】FNIRSI DPOS350P handheld oscilloscope 350 MHz bandwidth, 1 GSa/s, 47 Kpts depth, 8-16-bit resolution, 50,000 wfms/s refresh. 2 channel oscilloscope, 7" touchscreen, digital phosphor, X-Y mode, 2 mV/div ultra-sensitive, ZOOM, 12 auto measurements, cursor
  • 【Spectrum Analyzer】FFT-based analysis from 200KHz–350MHz with 4K–32K FFT length. Includes harmonic markers, cursor readouts, real-time 2D/3D waterfall view for EMI checks and signal integrity analysis
  • 【Frequency Response Analyzer】10Hz–50 MHz frequency range, 0–5Vpp amplitude, +2.5 V to -2.5 V offset, 20–500 frequency Count. Measures gain/phase/frequency—ideal for Bode plots, loop stability tests, and analog filter tuning
  • 【DDS Signal Generator】Outputs 14 standard waveforms and clipped waveforms. 0–50 MHz frequency range, 1 Hz resolution. 0–5 Vpp amplitude, -2.5 V to +2.5 V offset. Adjustable duty cycle from 0.1% to 99.9%. Supports 500 custom clipping waveforms
  • 【Smart Features & Portability】Stores 500 waveforms + 90 screenshots. Supports FFT display, 150M/20M hardware bandwidth limiter, auto power-off. 8000 mAh battery, USB-C charging. Engineered for lab and field use

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.