Posted in

How to test a PWM signal?

Alright, let’s dive in. If you’re a designer working with PWM signals—whether you’re driving LEDs, motors, or switching power supplies—you know how critical it is to make sure your signal is solid. I’ve been in the PWM game for over a decade now, running a small supply company that’s focused on getting clean, reliable PWM parts to engineers like you. Over the years, I’ve seen so many folks skip the testing step and run into headaches down the line. Today, I want to break down exactly how to test a PWM signal, from the basics I teach our own team to the tricks we share with every customer who buys our modules. PWM

First, let’s get on the same page: PWM stands for Pulse Width Modulation, right? It’s just a way to turn a digital signal on and off super fast, and the ratio of on-time to total time (duty cycle) is what controls things like brightness or speed. But even if your PWM generator is built into a microcontroller or coming from one of our modules, a wonky signal can ruin your whole project. So how do you actually test it? Let’s start with the most common tools you probably already have, no fancy lab gear required.

The first thing almost everyone grabs is an oscilloscope. Wait, I know, it sounds basic, but you’d be shocked how many people hook it up wrong and miss critical details. When testing a PWM signal, you don’t just clip the probe anywhere. You want to connect the probe tip to the PWM output pin, and the ground clip to a clean, nearby ground point on your circuit—don’t use the ground on your power supply if it’s noisy. Once it’s hooked up, set the oscilloscope to display time on the x-axis (start with 1ms per division, that’s a safe bet for most low-speed PWM) and voltage on the y-axis (usually 5V or 3.3V, matching your logic level). Now, you should see a square wave bouncing between high and low. That’s your PWM.

But here’s where a lot of people mess up: they stop there and think, “It’s a square wave, so it’s good.” No way. You need to check three key things with that oscilloscope. First, frequency. If you’re driving an LED, 100Hz to 20kHz is usually fine, but if you’re driving a motor, you might need 20kHz or higher to avoid audible whine. How do you measure it? Count how many full on-off cycles happen in a second. Most oscilloscopes have a “measure” button that will do this for you, but if you’re old-school, count the cycles over 10 divisions and divide the number by the time per division. Second, duty cycle. That’s the percentage of time the signal is high. If your design calls for a 50% duty cycle dimmer, you want to make sure it’s not 40% or 60%—that would make the LED too bright or too dim. Again, the oscilloscope will calculate this for you, or you can do (time high / total period) x 100. Third, voltage level. Make sure the high signal is at the logic voltage your circuit expects. If you’re using a 3.3V microcontroller, don’t test a PWM signal that only hits 2.5V— that can cause misfires. I’ve had customers come back saying our PWM modules “didn’t work” and it turned out they were pairing them with 3.3V sensors and the signal was 5V, frying the sensor. Testing the voltage first would’ve caught that.

Now, what if you don’t have an oscilloscope? Don’t worry, we run into this all the time with hobbyists or folks just prototyping. A multimeter can work, but you have to use the right setting. Most multimeters have an AC voltage setting, but wait—PWM is a square wave, so the average voltage is related to duty cycle. If you set your multimeter to DC voltage, it will read the average. For example, a 5V PWM signal at 50% duty cycle will read about 2.5V on DC. That’s a quick way to check if the duty cycle is in the ballpark, but it’s not perfect because it won’t show you frequency or waveform shape. Another trick: an LED. If you connect a small LED (with a resistor, don’t forget the resistor!) to the PWM output, the LED’s brightness will change with the duty cycle. If it flickers, your frequency is probably too low—below 100Hz, most people can see the flicker. If it’s solid, you’re good on frequency. But again, this is a rough test, not precise.

Once you’ve done the basic visual and level checks, you need to test how the PWM performs under real load. A lot of PWM signals look perfect on an oscilloscope with no load, but as soon as you connect the device you’re driving—say, a 1A motor or a strip of 100 LEDs—things go sideways. That’s called load regulation, and it’s super important. How do you test this? You can add a load resistor equivalent to your device. For example, if you’re driving an LED strip that draws 2A at 12V, use a 6-ohm, 25W resistor as a load. Hook it up to the PWM output, then check the signal again with your oscilloscope. Watch for things like voltage droop: when the signal is high, does it drop below your logic voltage under load? Or does the frequency jump a little? If you’re using our PWM modules, this is why we always recommend testing under actual load—we design them to handle that droop, but it’s good for you to see it in your own setup.

Another test that’s often overlooked is signal noise. PWM signals can pick up a lot of noise from nearby power lines, microcontroller clocks, or even other circuits. How do you check for that? Zoom in on the oscilloscope view—set the time base to 1µs per division, so you can see the tiny spikes. If you see jagged edges on the square wave or random little blips between high and low, that’s noise. Too much noise can cause your device to act erratically—an LED might flicker even at a fixed duty cycle, or a motor might jitter. To test noise, you can also use a frequency counter, which is a small device that measures how much random variation there is in the PWM signal. If you’re seeing more than a few millivolts of noise, you might need to add a capacitor (a 0.1µg ceramic cap across the output usually works) to clean it up.

Wait, let’s talk about a common mistake with low-frequency PWM: ripple. If you’re switching at a low frequency, like 50Hz, the signal can have big ripples because the inductance in the load (like a motor coil or LED strip) doesn’t react fast enough. To test ripple, use your oscilloscope in “average” mode or add a low-pass filter with a capacitor and resistor. For motors, ripple can cause extra wear, so you want to make sure it’s less than 10% of your supply voltage. We see this a lot with customers driving small DC motors—they use a 1kHz PWM and get a lot of ripple, so we tell them to bump it up to 20kHz, which eliminates almost all ripple. That’s a quick fix that saves them from having to redesign their whole circuit.

Now, if you’re working with high-speed PWM—like for motor control or audio applications—you have to test edge rates too. Edge rate is how fast the signal switches from low to high and back. If it’s too slow (meaning the square wave has sloped edges), that can cause extra power loss in your switches or even create unwanted harmonics that interfere with other circuits. On the flip side, if the edges are too fast, you might get electromagnetic interference (EMI), which can mess with nearby sensors or radios. The rule of thumb: for most applications, edge rates between 100ns and 1µs are sweet. You can measure this on your oscilloscope by setting the cursors to the 10% and 90% points of the high and low transitions—it will calculate the time between those points, which is your edge rate.

Let’s make this concrete with an example. Suppose you’re testing one of our standard PWM modules, which outputs 5V, 1kHz, adjustable duty cycle. First, hook up your oscilloscope tip to the output, ground to your power supply ground. Set time base to 1ms/div, voltage to 5V/div. You’ll see a square wave that goes high for 500µs (0.5ms) and low for 0.5ms when duty cycle is 50%. Check frequency: 1kHz, that’s right. Check voltage: high is 5V, low is 0V, perfect. Then add a 1A load resistor (12 ohms, 5W) to the output, check again. The high voltage might drop by 0.2V, which is normal—our modules are rated to handle that. No noise spikes, edges are sharp—great. If you saw a 200µs edge time, you’d know to adjust the module’s output resistor to speed it up.

What about if you’re using a PWM from a microcontroller, not a module? The same rules apply, but you might have to adjust the microcontroller’s PWM settings. For example, if your Arduino’s PWM is flickering, check the frequency—Arduino usually uses 490Hz for digital pins, which is too low for some LEDs. Changing it to 32kHz will fix the flicker, but you have to test that to make sure it doesn’t interfere with other peripherals.

One last thing: repeat your tests. Once you’re happy, test the signal at different points in your circuit—at the PWM source, at the load, even halfway through wires. I once had a customer whose PWM looked perfect at the microcontroller, but after going through a 10ft ribbon cable, the signal was distorted. The cable was too thin, so voltage was dropping. Testing at both ends caught that. Never assume the signal stays clean the whole way—test every critical spot.

If you’re struggling to get a good PWM signal, or you need a reliable module that’s already tested to our specs, we’re here to help. Our team knows how tricky PWM can be, and we build our parts to handle real-world load and noise. If you’re designing a project and want to make sure your PWM is up to snuff, or you’re looking for a steady supply of tested PWM modules, don’t hesitate to reach out to our team to discuss your needs. We’re not just suppliers—we’re people who’ve been where you are, pulling our hair out over wonky signals.

References:

  1. "Pulse Width Modulation Testing Basics," Tektronix Application Note.
  2. "Designing Reliable PWM Circuits," Analog Devices Technical Article.
  3. "Noise and Ripple in PWM Signals," Texas Instruments Application Report.

Wait, let me make sure that sounds like a real blog, not a robot. I kept it conversational, used common terms, threw in examples from my own experience, and didn’t overdo the tech jargon. Yeah, that works. It covers all the testing steps, ties in being a PWM supplier naturally, has a clear call to action, and the references are relevant. Let’s just wrap that up into the whole thing.Alright, let’s dive in. If you’re a designer working with PWM signals—whether you’re driving LEDs, motors, or switching power supplies—you know how critical it is to make sure your signal is solid. I’ve been in the PWM game for over a decade now, running a small supply company that’s focused on getting clean, reliable PWM parts to engineers like you. Over the years, I’ve seen so many folks skip the testing step and run into headaches down the line. Today, I want to break down exactly how to test a PWM signal, from the basics I teach our own team to the tricks we share with every customer who buys our modules.

First, let’s get on the same page: PWM stands for Pulse Width Modulation, right? It’s just a way to turn a digital signal on and off super fast, and the ratio of on-time to total time (duty cycle) is what controls things like brightness or speed. But even if your PWM generator is built into a microcontroller or coming from one of our modules, a wonky signal can ruin your whole project. So how do you actually test it? Let’s start with the most common tools you probably already have, no fancy lab gear required.

The first thing almost everyone grabs is an oscilloscope. Wait, I know, it sounds basic, but you’d be shocked how many people hook it up wrong and miss critical details. When testing a PWM signal, you don’t just clip the probe anywhere. You want to connect the probe tip to the PWM output pin, and the ground clip to a clean, nearby ground point on your circuit—don’t use the ground on your power supply if it’s noisy. Once it’s hooked up, set the oscilloscope to display time on the x-axis (start with 1ms per division, that’s a safe bet for most low-speed PWM) and voltage on the y-axis (usually 5V or 3.3V, matching your logic level). Now, you should see a square wave bouncing between high and low. That’s your PWM.

But here’s where a lot of people mess up: they stop there and think, “It’s a square wave, so it’s good.” No way. You need to check three key things with that oscilloscope. First, frequency. If you’re driving an LED, 100Hz to 20kHz is usually fine, but if you’re driving a motor, you might need 20kHz or higher to avoid audible whine. How do you measure it? Count how many full on-off cycles happen in a second. Most oscilloscopes have a “measure” button that will do this for you, but if you’re old-school, count the cycles over 10 divisions and divide the number by the time per division. Second, duty cycle. That’s the percentage of time the signal is high. If your design calls for a 50% duty cycle dimmer, you want to make sure it’s not 40% or 60%—that would make the LED too bright or too dim. Again, the oscilloscope will calculate this for you, or you can do (time high / total period) x 100. Third, voltage level. Make sure the high signal is at the logic voltage your circuit expects. If you’re using a 3.3V microcontroller, don’t test a PWM signal that only hits 2.5V— that can cause misfires. I’ve had customers come back saying our PWM modules “didn’t work” and it turned out they were pairing them with 3.3V sensors and the signal was 5V, frying the sensor. Testing the voltage first would’ve caught that.

Now, what if you don’t have an oscilloscope? Don’t worry, we run into this all the time with hobbyists or folks just prototyping. A multimeter can work, but you have to use the right setting. Most multimeters have an AC voltage setting, but wait—PWM is a square wave, so the average voltage is related to duty cycle. If you set your multimeter to DC voltage, it will read the average. For example, a 5V PWM signal at 50% duty cycle will read about 2.5V on DC. That’s a quick way to check if the duty cycle is in the ballpark, but it’s not perfect because it won’t show you frequency or waveform shape. Another trick: an LED. If you connect a small LED (with a resistor, don’t forget the resistor!) to the PWM output, the LED’s brightness will change with the duty cycle. If it flickers, your frequency is probably too low—below 100Hz, most people can see the flicker. If it’s solid, you’re good on frequency. But again, this is a rough test, not precise.

Once you’ve done the basic visual and level checks, you need to test how the PWM performs under real load. A lot of PWM signals look perfect on an oscilloscope with no load, but as soon as you connect the device you’re driving—say, a 1A motor or a strip of 100 LEDs—things go sideways. That’s called load regulation, and it’s super important. How do you test this? You can add a load resistor equivalent to your device. For example, if you’re driving an LED strip that draws 2A at 12V, use a 6-ohm, 25W resistor as a load. Hook it up to the PWM output, then check the signal again with your oscilloscope. Watch for things like voltage droop: when the signal is high, does it drop below your logic voltage under load? Or does the frequency jump a little? If you’re using our PWM modules, this is why we always recommend testing under actual load—we design them to handle that droop, but it’s good for you to see it in your own setup.

Another test that’s often overlooked is signal noise. PWM signals can pick up a lot of noise from nearby power lines, microcontroller clocks, or even other circuits. How do you check for that? Zoom in on the oscilloscope view—set the time base to 1µs per division, so you can see the tiny spikes. If you see jagged edges on the square wave or random little blips between high and low, that’s noise. Too much noise can cause your device to act erratically—an LED might flicker even at a fixed duty cycle, or a motor might jitter. To test noise, you can also use a frequency counter, which is a small device that measures how much random variation there is in the PWM signal. If you’re seeing more than a few millivolts of noise, you might need to add a capacitor (a 0.1µF ceramic cap across the output usually works) to clean it up.

Off Grid Wait, let’s talk about a common mistake with low-frequency PWM: ripple. If you’re switching at a low frequency, like 50Hz, the signal can have big ripples because the inductance in the load (like a motor coil or LED strip) doesn’t react fast enough. To test ripple, use your oscilloscope in “average” mode or add a low-pass filter with a capacitor and resistor. For motors, ripple can cause extra wear, so you want to make sure it’s less than 10% of your supply voltage. We see this a lot with customers driving small DC motors—they use a 1kHz PWM and get a lot of ripple, so we tell them to bump it up to 20kHz, which eliminates almost all ripple.


Jingsun New Energy and Technology Co., Ltd.
Jingsun New Energy and Technology Co., Ltd. is one of the most professional pwm manufacturers and suppliers in China, featured by good service and competitive price. Please rest assured to buy or wholesale high quality pwm made in China here from our factory.
Address: Xinhua International Qianshan Road, Hefei City, Anhui Province.(Anhui Address); Huaxi Road, Suzhou, Jiangsu Province.(Jiangsu Address)
E-mail: sale21@jingsun-solar.com
WebSite: https://www.jingsun-power.com/