O-scope/power supply noise

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

O-scope/power supply noise

Post by hberg32 »

I have a USB device with a sensitive DSP that has been flaky since its ferrite bead was damaged and I'm trying to figure out what value to use to replace it. I've hooked up a simple bitscope to the output of the device's 3.3v regulator but I can't tell if the results are actually telling me anything useful. Does this output speak to anyone? The y axis is set to 50 mV/Div so I interpret this to mean I'm getting frequent ~12.5mV spikes and infrequent ~50mV spikes. The x axis is set to 20 microseconds / div and it looks like about 15-20 small spikes per div and roughly 1 larger spike per 1.5 divs. So would you say I have something like roughly 1Mhz of ~12.5mV and .03 Mhz of ~50mV noise?

Am I reading this all wrong?
2022-09-04 14_13_42-BitScope DSO 2.8.gif
2022-09-04 14_13_42-BitScope DSO 2.8.gif (45.62 KiB) Viewed 165 times

User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

Re: O-scope/power supply noise

Post by hberg32 »

I should say that I took a wild guess at a ferrite bead value and picked 220 Ohm. That helped some but not much. Was hoping I could figure out how to use an O-scope to actually compute a correct value instead of just ordering a sample and trying them one at a time. However it seems like ferrite beads are for suppressing high frequency noise in the >100Mhz range so I'm unsure if I'm reading this output wrong or if the 20Mhz sampling rate of the BS05U is just not capable of measuring 100Mhz noise.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: O-scope/power supply noise

Post by adafruit_support_mike »

hberg32 wrote: Sun Sep 04, 2022 3:04 pm Was hoping I could figure out how to use an O-scope to actually compute a correct value instead of just ordering a sample and trying them one at a time.
That's possible, but you'd be using it to calculate the impedance of the circuit downstream from the ferrite.

Ferrites in series with a signal work as frequency-sensitive resistors in the upper half of a voltage divider. You want to put them ahead of a node whose impedance is low:

If we assume the node impedance is 5 Ohms at all frequencies, and the ferrite impedance goes from 5 Ohms at DC to 220 Ohms at 100MHz, half the voltage of a DC signal will appear across the ferrite and half the voltage will appear across the lower node. But at 100MHz, 97.8% of the voltage will appear across the ferrite and only 2.2% of the voltage will appear across the lower node.

So the measurement you want is the voltage across the ferrite at DC, and the voltage across it at higher frequencies. That will help you calculate the impedance of the node protected by the ferrite, and from there you can choose a ferrite impedance based on the amount of attenuation you want.
hberg32 wrote: Sun Sep 04, 2022 3:04 pm However it seems like ferrite beads are for suppressing high frequency noise in the >100Mhz range
Yep, that's what they do.

The impedance of all inductors is proportional to the frequency of the current passing through them. Good inductors store the excess energy in their magnetic field when the current changes quickly, then dump energy from the magnetic field back into the current when it slows down.

Real inductors also have a condition called 'saturation', where increasing the current flowing through them no longer increases the strength of the magnetic field, and is burned off as heat.

Ferrites are made from material that saturates easily so the high-frequency energy they capture gets burned off as heat (like in a resistor) and doesn't return to the circuit when the current slows down.
hberg32 wrote: Sun Sep 04, 2022 3:04 pm if the 20Mhz sampling rate of the BS05U is just not capable of measuring 100Mhz noise
You can detect signals faster than an oscilloscope's limiting frequency (strictly speaking, the frequency where the 'scope's input impedance gets high enough to attenuate the input signal by 50%), but you have to know how to interpret the traces.

For signals higher than the limiting frequency, the trace you see is the output from a filter. If you know how the filter behaves, you can reverse-engineer the input from the output.

The input for an oscilloscope is a first-order low pass filter, and it's usually safe to approximate noise as a series of narrow, square pulses. Under those conditions, the oscilloscope's response function is:

V.input * ( 1 - e^-t/C )

where 'C' is a value called the filter's 'time constant': the time it takes the filter's output to reach 2/3 of the input voltage (strictly speaking, 1/(1-e)). That curve is completely predictable, so we can calculate it for a pulse of any voltage and width.

A 20MHz filter's time constant is easy to calculate: 1/2pi*20e6 = 7.9ns

And we can estimate the width of a fast pulse logically: the trace will rise as long as the input voltage is high, and will fall as soon as the input voltage goes low again. So the pulse width is as wide as the part of the 'scope trace that's rising. If you divide that value by 7.9ns, you know the number of time constants during which the input voltage was rising.. the 't/C' part of the equation above.

If you plug that value into the function 1 - e^-t/C, you get a fraction of the actual input voltage. If you divide the maximum voltage of the trace by that fraction, you get the voltage of the input pulse.

In practice you'll find that most of the input pulses are about the same width, so all the math for the first pulse gives you a constant multiplier for all the other pulses.. "okay, assume each pulse of noise is about 6x the maximum trace voltage" or something similar.

User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

Re: O-scope/power supply noise

Post by hberg32 »

Wow, lots of great information, thank you. Much of this is new to me but let me try to take it in turn. I should have said that I'm repairing an existing device (a funky multitouch keyboard called a Touchstream TS) rather than creating a new design. I've replaced the damaged CPLDs (and reprogrammed them) as well as the capacitors but not the ferrite bead yet. It works now but only on some USB ports and not others and is heavily reliant on a DAC - which is what has been making me suspect noise from the USB port being the final problem to be solved. The bead is placed between the 5v USB input and the 3.3v voltage regulator. So, if I take the first part of your post it sounds like I should remove the bead and do some tracing to figure out if they set up a voltage divider between the USB power and the regulator, correct?

Here's a funny symptom. No matter what USB port or computer I plug it into the voltage regulator always provides power to the 3.3v bus but if the regulator is warm the keyboard successfully enumerates on USB ports it won't work with when the regulator is cold. Could it be that a regulator has better noise rejection at higher temperatures? I've searched the datasheets and see how temperature affects current but haven't seen any graphs to indicate the temperature to noise ratio.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: O-scope/power supply noise

Post by adafruit_support_mike »

hberg32 wrote: Tue Sep 06, 2022 12:35 am The bead is placed between the 5v USB input and the 3.3v voltage regulator.
Okay, that helps to place the part. The ferrite's job is to trim noise from the 5V USB source to help produce a clean 3.3V rail.

If your device uses high-speed USB, there will be a noise frequency at 480MHz. In addition to that, cables 1m long have a resonant frequency in the 20MHz to 40MHz range.

That being the case, I'd suggest looking for ferrites whose impedance ramps up at 10MHz or 1MHz. From there, start with the highest impedance value and see how things behave.
hberg32 wrote: Tue Sep 06, 2022 12:35 am Could it be that a regulator has better noise rejection at higher temperatures?
I'd expect the opposite.. noise increases as electronics get hotter.

I wouldn't expect voltage regulation to have enough effect on the data signals to make device enumeration fail though. Thermal noise is typically measured in nanovolts per degee, and digital protocols are explicitly designed to be robust against noise.

Try scoping the 3.3V rail when you connect the cable to the computer for both the cold and warm conditions. See if you can detect any difference. Then scope the D+ and D- lines for the same conditions and see if you can spot anything that obviously shouldn't be happening.

User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

Re: O-scope/power supply noise

Post by hberg32 »

Sadly, trying a variety of different ferrite beads did not change the behavior of the device. I'm pondering something else now. I've been assuming that this component was a ferrite bead because it is placed between the 5v USB wire and Vin on the voltage regulator and because a multimeter says the device has no measurable resistance. But there are no markings. One other thing - the original component doesn't quite look like the ferrite beads I've been getting from mouser. The original component is black and there is a distinct "hump" in the top. Does that sound like some other kind of component rather than ferrite? I can't tell if the hump is covering something in the device or if it was just molded to make it easier for the pick and place machine to grab. The original component is the size of an 0805 SMT device.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: O-scope/power supply noise

Post by adafruit_support_mike »

Post a photo of the dead part and we'll see if I recognize it. 800x600 images usually work best.

User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

Re: O-scope/power supply noise

Post by hberg32 »

Thanks, images attached. There are also some good images from when someone named Jan Rychter repaired one years ago. https://jan.rychter.com/fingerworks-touchstream-kbd

The damaged part that I THINK is a ferrite bead is in the upper right corner of the board just to the left of the red wire and is marked L1. Can you tell just by looking whether it is a ferrite or inductor? Component width is 2mm. I got a picture with a microscope and now think that thing I was describing as a hump on top is just a blob of epoxy. The component's package exposes contacts "around the bottom corner", which is to say that the entire ends are not conductive (as most of the ferrite beads I've been getting in the mail are) nor does it have tabs sticking out. The bottom half of the side and part of the bottom edges are conductive.

I have an idea on why whatever-is-going-on is impacting USB enumeration. The device consists of a one-time programmable USB hub/controller (cy7c66013) which is talking to two CPLDs (xc9572xl), a flash chip, two SRAM chips, and a really big DSP (tms320vc33). There does seem to be some kind of POST going on when the device is plugged in. I read in the USB spec that a full speed device signals the host by placing a 15k resistor from VCC to the D+ line. R1 all the way on the right side of the board is 15k and Q1 looks like a transistor to me connected to the 3.3v output of the voltage regulator and one of the GPIO pins on the cy7c66013. My guess is that a program on the cy7c66013 is talking to the downstream chips and raising that GPIO if everything passes. Given that the cy7c66013 has 3.3v GPIO I would have thought it a mistake to be connecting Q1 to the voltage regulator output rather than to the USB +5 VCC line but I guess it's good enough as other instances of this device work.

With a little more testing I've found that the board starts enumerating and working properly if I warm up just about any component in the power supply area (voltage regulator, decoupling caps, ferrite bead, etc). This makes it sound like an intermittent break in a trace but I've done 4 things while the board is cold that I think rule that out (would love to hear if there are other things I should try).
  1. I see 3.3v all over the board whether it is enumerated or not.
  2. I have good conductivity according to the multimeter on all 3.3, ground, and data lines.
  3. I see 0 resistance according to the multimeter on the 3.3, ground, and data lines (there should be some resistance if a damaged trace was only holding on by a hair, right).
  4. Reflowed all the chips I've swapped numerous times to be absolutely super-duper sure they're not dry or bridged (inspected with jeweler's loupe)
So this has me thinking about the noise issue again. Presumably heating up the components as well as the board is going to change all their resistance + capacitance values which I suppose would change noise propagation. I think this PCB is 2 layers on each side with the inside layers being reserved for VCC and ground, I suppose that much copper particularly could have varying resistance/capacitance. I don't know much about DSP's but I would imagine that chip needs a millisecond or two to define what constitutes a "quiet state" - maybe the USB host doesn't trigger Q1 until the DSP reaches a stable state and maybe it's not doing it because of too much noise.

Can you advise me on what sort of device I would need to buy to truly measure what kind of noise does or doesn't exist in this device to rule it out once and for all? As a mere programmer rather than an EE I find the wide array of options when it comes to scopes a bit overwhelming. It a tool I almost never need, am not keen on storing, and not keen on spending a lot of money on, but I think by using a BS05U for this project that I can't tell if 1. There's no noise in the circuit, 2. There's noise but the tool can't measure it, or 3. There is noise, the tool could measure it, but I don't know what I'm doing and the user base for the bitscope is too small for there to be HOWTO guides out there.
Attachments
lightly toasted ferrite.jpg
lightly toasted ferrite.jpg (213.6 KiB) Viewed 101 times
IMG_0367.JPG
IMG_0367.JPG (795.53 KiB) Viewed 101 times

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: O-scope/power supply noise

Post by adafruit_support_mike »

hberg32 wrote: Tue Sep 20, 2022 11:16 am Can you tell just by looking whether it is a ferrite or inductor? Component width is 2mm. I got a picture with a microscope and now think that thing I was describing as a hump on top is just a blob of epoxy. The component's package exposes contacts "around the bottom corner", which is to say that the entire ends are not conductive (as most of the ferrite beads I've been getting in the mail are) nor does it have tabs sticking out. The bottom half of the side and part of the bottom edges are conductive.
Yeah, that's an inductor: most likely an SMT wirewound. By its size, I'd guess its value is in the 10uH to 47uH range. The fact that it's right next to the power input combined with it probably being wirewound means it was probably chosen for relatively high current and low DC resistance.

I'd hoped that the cluster of parts was all part of the same circuit, but one of you photos shows a clear marking for U9: a Linear/Analog LT11293 micropower voltage regulator:

https://www.analog.com/media/en/technic ... 2935ff.pdf

An excellent device, but one that doesn't use any kind of inductor.

Can you get a photo of the other side of the board? I don't see any traces that connect to the inductor on this side, and having some idea what's connected would help.
hberg32 wrote: Tue Sep 20, 2022 11:16 am R1 all the way on the right side of the board is 15k and Q1 looks like a transistor to me connected to the 3.3v output of the voltage regulator and one of the GPIO pins on the cy7c66013. My guess is that a program on the cy7c66013 is talking to the downstream chips and raising that GPIO if everything passes.
Sounds reasonable, and Q is the standard label for transistors.
hberg32 wrote: Tue Sep 20, 2022 11:16 am I see 0 resistance according to the multimeter on the 3.3, ground, and data lines (there should be some resistance if a damaged trace was only holding on by a hair, right).
Nope.. that's one of the things that makes trace fractures so hard to find. Even a few square microns of metal-to-metal contact will have near-zero resistance at low current.

Crack-hunting takes a combination of mechanical and thermal flexing. Mechanically, you want to place a small fulcrum under the board so you can flex it at a specific point. I've found kneaded erasers fit the purpose well. They're solid enough to make the board flex, soft enough they won't damage anything, and you can form them to whatever size and shape you need.

Thermally, the normal tools are a can of cooling spray and a hot air gun. You use them to expand or contract specific areas of the board to see what happens.
hberg32 wrote: Tue Sep 20, 2022 11:16 am Presumably heating up the components as well as the board is going to change all their resistance + capacitance values which I suppose would change noise propagation.
Slightly, but not much. Nothing-special resistors typically change 300ppm-ish per degree C. A capacitor's thermal behavior is part of the naming standard (well, standards.. there are about five different ones):

https://forum.digikey.com/t/understandi ... cients/727

It's normal to use X7R, C0G, or NP0 for capacitors whose value matters. X7R varies +/-15% over its thermal range, while NP0 and C0G vary by +/-30ppm/C.

Neither amount of change is enough to change a noise filter in any serious way. That takes order-of-magnitude changes in the component values.
hberg32 wrote: Tue Sep 20, 2022 11:16 am Can you advise me on what sort of device I would need to buy to truly measure what kind of noise does or doesn't exist in this device to rule it out once and for all?
A LiPo battery, a few resistors, and a 10uF capacitor.

Noise meters exist, but they're specialized and expensive pieces of gear. And honestly, they work a few orders of magnitude below a BitScope's range. Noise figures are usually measured in nanovolts per degree C over a given range of frequencies.

The equation for thermal noise is:

<Vt>^2 = 4RkTdf

where:

<Vt> is the noise voltage integrated over a given range of frequencies
R is the DC resistance of the item in question
k is Boltzmann's constant of thermal energy: 1.38e-23 Joules per atom per degree Kelvin
T is the temperature in degrees Kelvin
df is the range of frequencies where the noise will be measured

The basic idea is that thermal noise kicks electrons in random directions. in a perfect conductor any imbalance in the distribution of electrons gets corrected instantly (a higher electron density in one place pushes electrons away), but resistance makes it harder for the electrons to move. Thermal noise basically measures how long it takes an imbalance to cancel itself out through a given resistance.

The average noise across a 1k resistor at room temperature (300K) over a 1k frequency band is about 110nV. For a 1M oscilloscope probe at 300K over the full bandwidth of a 50MHz scope, the average noise is about 910uV.. call it 1mV.

For shop applications a battery is about as close as you'll get to a noise-free voltage. LiPos have low internal resistance, which makes them closer to an ideal conductor.

Measuring the LiPo's voltage will give you an input whose noise is below what the BitScope can measure. Comparing that to a measurement with the probe tip shorted to GND will show you how much noise carries over from one condition to another. You can assume the noise present in both measurements is noise generated inside the BitScope.

To get a profile over different frequency ranges, connect one end of the 10uF capacitor to GND and the other end to the LiPo's positive terminal with 15, 150, 1.5k, 15k, and 150k resistors. 150k-10uF makes a 1Hz filter. 15k-10uF filters at 10Hz, and so on.

Measure the voltage across the capacitor for each frequency range and see if there's any difference in the noise level. That will give you a profile of the frequency-dependent noise response.

User avatar
hberg32
 
Posts: 52
Joined: Mon Apr 07, 2014 2:38 pm

Re: O-scope/power supply noise

Post by hberg32 »

Thank you for your patience and all the detailed information, you are a fount of wisdom! After hours, to boot!

New pics uploaded. The trace from the 5v wire to the inductor is clear but the trace from the inductor to the voltage regulator appears to be on a lower layer. I've also added a picture with a backlight that I *think* is (poorly) showing that trace. Other small details: the yellow capacitor C1 is across the voltage regulator output and ground and is 68 uF. The smaller capacitor (the vertically oriented one) between U1 and C1 is 2.2uf and is across the USB 5v and gnd. There are no visible surface traces to this 2.2uF cap so it must be connecting to the same underlying layer that the VR side of the inductor connects to (as well as the ground layer). I prophylactically replaced this cap and don't actually remember if I checked to ensure the one I removed was 2.2uF or if I assumed it was because all the other ceramic caps sprinkled about the board are 2.2. I tried supplementing this cap with a large electrolytic as an experiment to no effect. Speaking of that post-inductor 5v layer: I'm not sure how far down the board it goes. The IC just south of the power supply circuit (the cy7c66013a) takes 5v VCC but nothing else does. Come to think of it, that IC is also responsible for initiating enumeration. I've been assuming it was talking to the downstream chips to do a POST but it would be quite a kick in the head if his BANNED was simply dissatisfied with the state of his VCC current while the voltage regulator and everyone on the 3.3v bus just got on with it.
Nope.. that's one of the things that makes trace fractures so hard to find. Even a few square microns of metal-to-metal contact will have near-zero resistance at low current.
Good to know! Ok, this won't help on the noise front but I'll try using jumper wire to bypass traces and see if that has an effect. That should tell me if I need to go crack-hunting.
Yeah, that's an inductor: most likely an SMT wirewound. By its size, I'd guess its value is in the 10uH to 47uH range. The fact that it's right next to the power input combined with it probably being wirewound means it was probably chosen for relatively high current and low DC resistance.
I won't ask how you can tell just by looking, it probably involves a lifetime of reading enough data sheets to produce a measurable loss of near-distance vision. I'll order up a couple and see if it helps. I have high hopes - I mean, the original component sent out blue smoke when I accidentally shorted the 3.3v bus to ground. I guess that also means the original inductor was rated for less than the voltage regulator's 700 mA output.

Are the frequency response curves for inductors important to consider the way they are for ferrite beads?
Attachments
IMG_0537.jpeg
IMG_0537.jpeg (152.78 KiB) Viewed 91 times
DSC_4281.jpeg
DSC_4281.jpeg (162.07 KiB) Viewed 91 times

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: O-scope/power supply noise

Post by adafruit_support_mike »

hberg32 wrote: Wed Sep 21, 2022 2:44 pm After hours, to boot!
Nah, I'm the night geek. ;-) Adafruit had flex hours a decade before the idea hit the business press.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm The trace from the 5v wire to the inductor is clear but the trace from the inductor to the voltage regulator appears to be on a lower layer. I've also added a picture with a backlight that I *think* is (poorly) showing that trace.
Yeah, it looks like there's a 4-connection star on the right end. That's typical for a connection to a plane, which supports your idea of a 5V plane as one of the middle layers.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm the yellow capacitor C1 is across the voltage regulator output and ground and is 68 uF.
That's a tantalum capacitor.. I think they all use that same yellow/brown package. Tantalum caps combine high capacitance with small size and good high-frequency behavior. Tantalum oxide forms a very thin insulating layer on the surface of the metal, and is a good dielectric. Tanalum capacitors are made from powdered metal sintered together (high surface area), then dipped in BANNED nitrate, which turns into BANNED dioxide (conductive) when heated.

Tantalum is what's known as a 'conflict metal' though: it comes from places mostly under control of warlords who aren't concerned with things like human rights. There's a lot of research to find replacements with better ethics.

The inductor and that capacitor might be a low-pass filter for the 5V input power. For inductance in the 10uH to 100uH range, that would block frequencies higher than a few kilohertz.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm The smaller capacitor (the vertically oriented one) between U1 and C1 is 2.2uf and is across the USB 5v and gnd.
That's a typical value for a linear voltage regulator.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm Speaking of that post-inductor 5v layer: I'm not sure how far down the board it goes.
Its job is probably to minimize voltage spikes upstream from the voltage regulator.

All voltage regulators have a property called Power Supply Rejection Ratio (PSRR), which specifies how well they maintain output voltage when their input voltage changes. The LT112933 datasheet calls it 'Ripple Rejection', and specs a minimum value of 54db (about 4uV out per 1V in). Fast spikes are harder to handle than slow changes though, so it makes sense to slow the rising and falling edges down as much as possible, making life easier for the regulator.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm I won't ask how you can tell just by looking, it probably involves a lifetime of reading enough data sheets to produce a measurable loss of near-distance vision.
*laugh* It's the result of having seen the parts, but not quite that drastic. Non-wirewound inductors don't need a housing or contacts. Wirewound usually have values higher than 1uH, and most 100uH wirewound inductors are bigger than an 0805 resistor.
hberg32 wrote: Wed Sep 21, 2022 2:44 pm Are the frequency response curves for inductors important to consider the way they are for ferrite beads?
They're worth knowing, but not as critical. You select inductors to operate well below their self-resonant frequency.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”