Measuring switching frequency of DC power supply using an oscilloscope - Page 1
Forum section: electronics / beginners

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 15, 2023, 06:41:52 pm
content: I need to measure the switching frequency of a DC power supply (It's a BK precision bench-top 3 channel Power supply) in order to calculate the requirements for a bulk capacitor that I'd like to add to the power input of my circuit to smooth out the power.The problem I have is dialing in my oscilloscope (a TDS5054B) to perform the measurements.I set my timebase to 10uS as a starting point and 1V/div and enabled cursors to measure the time period between two consecutive edges of the waveform, but at this timebase, there are way too many edges and have difficulty placing the two cursors between them as they're too narrow.The 10uS timebase was based on the assumption of a 100KHz signal which should get me enough of the waveform on the screen to perform the measurements.I think my issue here is the current timebase setting and my assumption of the signal frequency which is probably not 100KHz, but how can I measure this? I feel like this is a chicken and egg problem...

author: wasedadoc
author_rank: Super Contributor
timestamp: April 15, 2023, 07:01:55 pm
content: That trace is the equivalent of my wife talking. No signal, just noise (Just joking!)Do you have sufficient competence to open the unit up and safely probe a secondary winding of the transformer?

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 15, 2023, 07:08:13 pm
content: Quote from: wasedadoc on April 15, 2023, 07:01:55 pmIn other words, bad scope?

author: bdunham7
author_rank: Super Contributor
timestamp: April 15, 2023, 07:16:47 pm
content: Quote from: newtekuser on April 15, 2023, 06:41:52 pmWhat model of BK power supply? Are you willing to pull the cover off and have a look? On a high-quality supply you may not be able to easily see the switching frequency on the output. Even on a cheap supply, you'll need to load it. As far as dialing in on the signal, you'll just have to try various timebases, AC coupling, lower voltage setting and normal triggering. Here's a cheapo PSU with a load, without a load and turned off. You can read my scope input parameters from the screen. I think I might know the main switching frequency looking at this, but unless you've seen the insides and you know that there aren't intermediate stages, buck converters or whatever, you can't be sure.

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 15, 2023, 07:23:28 pm
content: The PSU is a BK Precision 9130 and my load is 330mA at 5V. I also tried AC coupling setting and various timebases and while I do see a difference, there's not enough spacing between the edges. Either the signal becomes flatter , or the edges are too close.

author: bdunham7
author_rank: Super Contributor
timestamp: April 15, 2023, 07:29:47 pm
content: Quote from: newtekuser on April 15, 2023, 07:23:28 pmWell...I think the switching frequency on that one is 60Hz! AFAIK, it is a linear power supply, not an SMPS. It has a rated output noise of <1mVrms, so you'd need to use a 1:1 probe and select 1mV/div and AC coupling to even have a chance of seeing any ripple.

author: james_s
author_rank: Super Contributor
timestamp: April 15, 2023, 08:27:43 pm
content: Quote from: newtekuser on April 15, 2023, 07:08:13 pmI see no reason to suspect this, it looks like user error.The BK 9130 looks like a linear power supply to me, according to the datasheet it weighs 20 lbs. Do you have reason to believe it's a SMPS?

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 16, 2023, 12:17:46 am
content: Yes, it is very heavy indeed and of course, user error on my part (I'm a newbie)

author: bdunham7
author_rank: Super Contributor
timestamp: April 16, 2023, 12:27:41 am
content: You can still practice setting up your scope to measure PSU ripple, you'll just have to try timebases all the way from 10ms/div to 100ns/div and the lowest voltage setting possible. That PSU may have ripple below the scopes noise floor, or maybe not. Newbie or not, it looks like you have some nice equipment.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 16, 2023, 12:53:44 am
content: If you want to measure ripple and switching in the PSU, put your scope in AC coupling. (And don't forget you left it there when you can't figure out what is happening a week later.)

author: Jim from Chicago
author_rank: Regular Contributor
timestamp: April 16, 2023, 05:08:46 am
content: You definitely wont see anything useful at 1V/div. You need to be more in the ballpark of 10mV/div or 1mV/div. Easiest thing to do is set the scope to AC coupled and then just play a little with the scale of the timebase and volts/div. Most switch mode power supplies will have a period anywhere from about 1us to 50us. If you can't discern anything sinusoidal in that ballpark, it's either a really clean switcher or it's a linear supply (no switching involved).

author: radiolistener
author_rank: Super Contributor
timestamp: April 16, 2023, 07:15:00 am
content: Quote from: newtekuser on April 15, 2023, 06:41:52 pmThe problem with your photo is that you set not enough gain to see pulses. When gain is not enough, oscilloscope lose sync and what you can see is just a noise. Put your oscilloscope input to AC coupling and increase vertical gain in such way to get signal span which covers almost entire display of the oscilloscope. Then check that a trigger level is set to the center of the signal.The vertical span of the signal needs to be at least one or two grid cells for a good signal synchronization.

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 16, 2023, 04:49:03 pm
content: I set the channel to AC coupling, but I am only able to see something if I set my vertical to 500mV/div and only if I set attenuation to 1 and the vertical cursor all the way down. If I set attenuation to 10, then I only see a signal if I set my vertical to 50v/div.Even at 500mv, the signal is clipped towards the top and disappears from the screen after a while ~20 seconds but I do see what I think it's a good signal.LE: I found the nifty zoom feature and have better view of the signal.

author: james_s
author_rank: Super Contributor
timestamp: April 16, 2023, 05:42:16 pm
content: There's probably negligible ripple there to see. A linear power supply, especially one that is lightly loaded should have virtually zero ripple.

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 16, 2023, 05:47:03 pm
content: Quote from: james_s on April 16, 2023, 05:42:16 pmWith power coming from this PSU I probed one of the 100nF caps I have on the PIC16F887 and measured (using the scope's measure function) 240mV peak to peak. If I add a 1000uF electrolytic cap at the power input of my circuit, the ripple drops to 220mV, but still high, isn't it?

author: james_s
author_rank: Super Contributor
timestamp: April 16, 2023, 06:09:54 pm
content: That does seem high but it sounds like it's ripple generated by the PIC itself. Do you have adequate decoupling located as close as possible to the power pins on the chip?

author: Manul
author_rank: Super Contributor
timestamp: April 16, 2023, 06:27:03 pm
content: Usually I measure SMPS frequency by shorting the scope probe and putting it near transformer or inductor.

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 16, 2023, 06:47:54 pm
content: Quote from: james_s on April 16, 2023, 06:09:54 pmI do have one 100nF cap close to each Vdd pin, both are exactly 3mm away from the pins.

author: bdunham7
author_rank: Super Contributor
timestamp: April 16, 2023, 08:23:32 pm
content: Quote from: newtekuser on April 16, 2023, 05:47:03 pmWhat is the frequency of the ripple measured here and what do the power and ground traces look like from the power inputs to this point?

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 16, 2023, 10:52:37 pm
content: Quote from: bdunham7 on April 16, 2023, 08:23:32 pmAt the 100nF caps I measure 240mV peak to peak at 540kHz. At the input it's 220mV peak to peak at 428kHz. All ground connections go to the bottom ground layer (it's a 2 layer board), but all ground points are routed on the GND layer. I know, in hindsight, I should have just dropped the via to the GND layer without routing them.As for power, some caps and resistors are daisy chained, but everything connects in a hub and spoke topology where each trace connects to the +5V input. I do intend to change that and route a thick bus line and connect each to it.

author: james_s
author_rank: Super Contributor
timestamp: April 17, 2023, 03:21:36 am
content: I'm not sure what that 540kHz noise would be coming from, is there a switching regulator in the circuit? Are you sure it isn't aliasing of some other frequency? What is the clock frequency of the CPU?

author: newtekuser
author_rank: Frequent Contributor
timestamp: April 17, 2023, 03:53:43 am
content: It's a PIC 16F887 running off the internal 8mhz clock. No switching regulator, power comes straight from the linear power supply. The frequency earlier was what I got when using the measure frequency function of my scope although sometimes it would measure even up to 2MHz when triggering on the signal.Maybe I'm using it wrong.

author: bdunham7
author_rank: Super Contributor
timestamp: April 17, 2023, 03:56:45 am
content: Quote from: newtekuser on April 17, 2023, 03:53:43 amLook carefully at the first picture I posted. The scope frequency counter may give you some wacky results when you are looking at noisy signal. Eyeballing it and using the cursors as shown is a better bet.

author: james_s
author_rank: Super Contributor
timestamp: April 17, 2023, 06:33:26 am
content: You're going to need a nice clean stable signal before the frequency the scope tells you is meaningful.

author: bert-bert
author_rank: Contributor
timestamp: April 08, 2025, 04:20:45 am
content: hello board,I just stumbled across this topic while searching for the typical switching power supply switching frequency.I think I know the origin of this noise. This noise is about 100MHz and that is what I also measure all the time here in Linz. This must be the strong FM radio transmitter nearby. We have a strong transmission station and a large transmitter mast nearby.I cannot measure weak signals here.I also measure this when I measure an unconnected or shorted wire.