Dealing with high noise levels with DIY injection transformer and Picoscope - Page 1
Forum section: electronics / projects

author: TimNJ
author_rank: Super Contributor
timestamp: February 09, 2021, 06:42:52 pm
content: Hi everyone,I wanted to try doing loop response measurements "the right way", so I built an injection transformer based on input from these threads:1.https://www.eevblog.com/forum/blog/eevblog-1104-omicron-labs-bode-100-teardown/2.https://www.eevblog.com/forum/projects/diy-injection-transformer-for-power-supply-control-loop-response-measurements/I'm getting non-sense loop gain and phase measurements. Not even close, just jibberish. I think it's a matter of SNR.The frequency response of the transformer by itself seems fine. Signal 'A' and 'B' are AC coupled to the BNCs with 47nF NP0 caps, series 100R resistor into 0.7V diode limiter, just in case I wind up using it on something with a sensitive front end. I'm trying to measure the loop response of a AC-DC quasi-resonant flyback power adapter. The controller is NXP TEA18362T. It has two operating modes: Burst mode and normal mode.I'm using a Picoscope 2204A, which is a bottom of the barrel PC oscilloscope, with an FRA utility available here:https://bitbucket.org/hexamer/fra4picoscope/wiki/HomeWith too high of an injection amplitude, the controller seems to want to bounce between operating modes, so its not usable like that. (I have yet to try with a more traditional controller like UC384x. No way to jump modes on these older chips, can probably use higher injection amplitude.) With a low amplitude injection signal, the sine envelope on each signal is visible with a normal bench oscilloscope, but very low signal to noise ratio...Even with a trained eye, I have a hard time making accurate amplitude and phase measurements.The output ripple of this power supply is actually not that high, only about 50mV max, but there is quite a bit of MHz switching edge noise, which I thought the FRA software would maybe deal with in its "noise reject mode". I tried a few Fair Rite 43 ferrites on the leads to the injection transformer box. Some improvement, but overall still quite noisy in the MHz range, and still lots of noise at fsw (~50KHz) and harmonics.Maybe the low-end Picoscope just can't deal with it. IIRC, Bode 100 has tracking filters, as do the HP network analyzers. Maybe that's needed here. On the other hand, people have reported good success with the FRA software, but mainly they've tested on low voltage DC/DC buck converters. To be honest, I'm not sure why that would make a difference, other than maybe the noise environment is better? Maybe?Anyone have any ideas on how to improve?Thanks.Tim

author: souldevelop
author_rank: Regular Contributor
timestamp: January 14, 2022, 05:19:44 am
content: This looks great, I also bought a similar magnetic ring to build a loop injection, but the test is not as good as I thought. What type of magnetic ring do you have here and can you provide circuit device parameters?

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2022, 08:38:57 am
content: Measuring the frequency response should not be very sensitive to a poor SNR. Good software should be able to suppress noise at other frequenceis quite well. There is one possible problem with the picoscope with a limited data transfer rate to the PC and thus possibly skipping samples. Otherwise much is about the software side. AFAIK the picoscope hardware side is quite low noise and should not be a real problem.A switched mode regulator can produce quite some noise in the response due to the limited working frequency and possible aliasing / intermodulation with the excitation. Chances are the noise is more from the regulator and not from the scope. If in doubt a slower scan can help to reduce the noise.

author: jonpaul
author_rank: Super Contributor
timestamp: January 14, 2022, 12:07:27 pm
content: Details of toroid core and winding ?Jon

author: TimNJ
author_rank: Super Contributor
timestamp: January 14, 2022, 03:45:25 pm
content: Whoops, it seems I never followed up on this. Sorry about that.Take a look at the following thread I started on the Picoscope forums. Excuse my dumbass-ery.https://www.picotech.com/support/topic41113.html?&p=145755#p145755I ended up buying a Picoscope 2206B. This allowed me to make more sensible measurements, The attached image is an example measurement taken on a AC-DC flyback power supply. It's still a little finicky to set the right acquisition parameter, i.e. oversampling, "noise reject bandwidth", stimulus amplitude etc. Changing these parameters can affect the measured loop response. I never got the chance to try to measure against a "known" loop response, to figure out how to select a generic set of settings which will work most of the time.Below is a copy of Gerry@Pico who describes the hardware (buffer memory) requirements of a scope used to make this kind of measurement.Quote

author: TimNJ
author_rank: Super Contributor
timestamp: January 14, 2022, 03:47:10 pm
content: Quote from: souldevelop on January 14, 2022, 05:19:44 amIt is Vacuumschmelze T60004L2030W911 (VITROPERM 500 F material).I will attach the KiCad design later, when I am home.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 14, 2022, 05:18:33 pm
content: Weird, so a software limitation of some sort. I'd have thought, if they have limited memory or processing, just autorange and do a series of it or something. I guess they aren't doing that either.Regarding the noise, is that a common mode thing, is EUT GND noisy? It would tend to be, probing right off of circuit GND after all, inside of the usual CMCs filtering it. If that's the mechanism, then it may help to add a CM choke to the transformer itself; any old data line type choke (bifilar or twisted pair) should improve things notably. Select a CMC such that it will not tend to resonate against the transformer's equivalent interwinding capacitance; if this isn't possible, then small R+Cs can be placed across the transformer, C ~ Cintw and R ~ sqrt(Lcmc / Cintw). This will increasing loading on the loop, of course (these should all be in the 10s to 100s pF, not a huge deal but may be important).Tim

author: mawyatt
author_rank: Super Contributor
timestamp: January 14, 2022, 05:23:46 pm
content: Very interesting design. Nice workMaybe one could create a "Low Frequency" and "High Frequency" version. Do you think if you used more "turns" or a larger core the lower response could be extended, and a smaller core or less turns to extend the upper response?Best,

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2022, 05:50:49 pm
content: More turn could likely improve the low frequency performance a little and a larger core could also help. The low frequency part is already quite good.The high frequency part can be a bit more tricky. The Nanoperm material is not the best choices for high frequencies as the material is conductive. It is more a good one for the low frequency end (very high permeabilty and high saturation). So for a higher frequency version one may want a different core material, more like a true ferrite and not something so conductive. A combined core may also work, but would need testing.For the noise I would expect the switched mode converter to be a the main "noise" source. After all a SMP is usually not made for lowerst noise, but with other priorites. The fine ripples / details seen in the curve may not be all noise. Some parts could also be details of the DUT, like parasitic resonances and ringing. A SMPS can have more fine details that can cause fine details. To tell it it really is noise one would have to repeat the curve and look at the difference between curves, not just the one curve. The curve does no look that bad and for tuing the regualtor this should still be good enough.The answer from pico looks surprisingly detailed. This looks like a combination of HW limit and the used SW. The way they do the analysis seems to need quite some memory and that scope version is one that is limited in that respect. There may be an alternative way with less memory needs, but more processing needs (unclear if sufficient) - so maybe just the SW more made for other scopes.

author: TimNJ
author_rank: Super Contributor
timestamp: January 14, 2022, 06:12:25 pm
content: Quote from: T3sl4co1l on January 14, 2022, 05:18:33 pmI did put all the wires through some Fair Rite 43 material cores (as seen in the photo), in an attempt to quell any noise. For the problem I was having (totally nonsense results), this did nothing (IIRC). I don't think it hurts to keep them in at the bandwidths we're interested in, but generally did not seem like the main problem.

author: TimNJ
author_rank: Super Contributor
timestamp: January 14, 2022, 06:28:00 pm
content: Quote from: mawyatt on January 14, 2022, 05:23:46 pmYou could also try playing the the injection resistor parallel to the transformer . I selected 22ohms, first based off of Christophe Basso's book, and finally because the frequency response seemed about right. I think the parallel resistance + the leakage inductance of the transformer is what gives the HF roll off. It's a trade off.For a given transformer, lower R means lower HF roll off, but if you want to maintain a constant pk-to-pk injection voltage (across the resistor), you need to drive more current through it, thus the flux density in the transformer is higher. So, at low frequencies, you can push the transformer into saturation more easily with lower "load" resistor.Depending on how the analysis software works, it may or may not handle distorted stimulus waveform correctly.Well, that's all from memory, and it's been a while, so someone correct me if I'm wrong, please.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2022, 07:54:31 pm
content: Loading a transformer does not cause it to go into saturation faster. The fields from the secondary and primary side compensate. The magnetization and thus the saturation limit is determined by the integral voltage over time. So saturation is not critical at higher frequency. It sets the low frequency limit. The low frequency from saturation also depends on the amplitude, less amplitude allows lower frequency, when it comes to saturation.

author: TimNJ
author_rank: Super Contributor
timestamp: January 14, 2022, 08:24:01 pm
content: Quote from: Kleinstein on January 14, 2022, 07:54:31 pmMmm right. Thanks. I think my head is stuck in switch-mode inductor design. So, for a power transformer, which honestly I've never done, I guess the sizing of the total transformer is really based on winding losses (big enough wire), core losses, and perhaps a target magnetizing inductance...but not saturation.Actually, yes, now I remember. I tested a bunch of common-mode chokes as injection transformers. The issue with the smaller varieties was that I could not get sufficient amplitude on the secondary at low frequency because the stimulus voltage had to be kept quite low at low frequency, to avoid saturation. As you remind me, nothing to do with current.So then, what is the benefit of different values of "RL"?

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2022, 08:32:20 pm
content: A real transformer will have some additional capacitance and parasitic series inductance and can resonate in a few modes. The resistor at the secondary side does provide additinal damping to some of the resonances. It also makes the ouput side lower impedance.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 14, 2022, 10:01:03 pm
content: Mains power transformers are typically designed near or at saturation, as the losses are acceptable, and that maximizes power density.The load resistance acts in series with leakage, so that a lower value lowers the HF cutoff, but also acts in parallel with magnetizing inductance, lowering the lower cutoff. Bandwidth is lower overall (they go down by about the same ratio, but the difference shrinks), but when you have HF cutoff to spare and need the low end, it's a worthwhile tradeoff.It also needs to be low enough not to affect the loop it's inserted into, of course. But that's usually fine below some hundreds of ohms (compared with 10s-100s kohm feedback resistors), so this is likely the primary benefit.Regarding CMCs, yeah the beads will help, but only at similar frequencies (10s-100s MHz); you need a lot of beads or turns to get useful series impedance at signal frequencies (in particular, near or below the HF cutoff frequency, where CMRR is also worst and thus the CMC most beneficial). For injection purposes I suppose it really shouldn't matter too much anyway, but there's still the matter of whether controller is sensitive to high frequencies. Maybe a bigger priority on old bipolar chips, UC384x for example, or if the error amp has high enough GBW that its output will transmit that noise into the modulator?Tim

author: TimNJ
author_rank: Super Contributor
timestamp: January 15, 2022, 12:13:43 am
content: Quote from: T3sl4co1l on January 14, 2022, 10:01:03 pmThanks. I should play with that a little more. For my particular needs, there is no reason to maintain flatness up to 1MHz. 100KHz is fine. And, the response is still a little squirrely down at 10Hz or so (per my plot), so would probably benefit from dropping the resistor value a little.Quote from: T3sl4co1l on January 14, 2022, 10:01:03 pmWell, I thought we were talking about power supply noise being detected by the oscilloscope (Picoscope) and screwing up the measurement. Is that what you were talking about? Or, were you talking about the injection transformer injecting some other crap into the power supply that might make it behave in a way which would not match the "real" frequency response at some frequency?Actually I guess those concepts are kind of the same in the end, just two different ways to get a nonsense measurement.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 15, 2022, 01:36:37 am
content: I was actually thinking the other way around at first (transformer to scope). Which isn't how you use an injection transformer. So that may explain the unusual concern.But yeah, the same noise / mechanism into the scope probes, will disturb the measurement all the same. Then it depends how it's sensing it; if taking Vrms for example, obviously it'll never go below whatever the noise baseline is; if taking a narrow bandpass at the driven frequency and sweeping that (or, apparently, doing an FFT and selecting bins, to the same end), it'll do much better, though will still be susceptible to noise within that passband (which, since this is well below switching frequency, that would mainly leave mains ripple and harmonics?).The bottom end is also prone to error just because there are fewer bins there; if you can tell it to do more acquisitions or averaging or even finer bins or something, that should do the job.Tim

author: Kleinstein
author_rank: Super Contributor
timestamp: January 15, 2022, 08:12:18 am
content: The bottom end can be more noisy for a few reasons: mains hum can enter, the scope may be more noisy due to 1/f noise (depends on the input stage), the DUT may also show 1/f noise, the amplitude may be reduced because of the limitations of the injection transformer, inclomplete settling at the DUT after frequency steps.

author: jonpaul
author_rank: Super Contributor
timestamp: January 15, 2022, 08:43:10 am
content: Bonjour, has such a system in 1980s, on an ancient DOS machine I recall.The injection-transformer must be wideband, such as this one:https://www.omicron-lab.com/products/vector-network-analysis/accessories/injection-transformer#Your posts on cores, saturation and winding design need a lot of comment.May fine textbooks are available on transformer design.Finally we used Magnetics Designer SW for many years.Intuisofthttp://www.intusoft.com/mag.htmKind Regards,Jon

author: 2N3055
author_rank: Super Contributor
timestamp: January 15, 2022, 08:48:15 am
content: It is not clear to me if it was understood that OP doesn't have problems anymore because of switching to a different scope that has more memory and sampling rate. 2204A has only 8k of sample memory and 2206 has 32 MPts.Software takes big chunk of data including the data for averaging and needs a bit more than 8kpts. That was the original problem.Tim is right, software uses Goertzel algorithm for narrowband bandpass. It does good job and I tried it compared to Keysight 3000T and Siglent FRA. Only difference is that on all 3 Picoscopes I have, generators are not 50 but 600 Ohm, and have limited amplitude. Keysight 3000T internal gen is 50 Ohm but also limited amplitude. I use Siglent with external generator that can go to 10VP-P, so that is most versatile.But despite that, all 3 can give comparable results for active devices because you cannot go crazy with an amplitude anyways, with this method.One interesting thing, is that Fra4Picoscope also works with 4262 16bit scope. It's a shame it's generator only goes to 20 kHz. But up to 20 kHz, you get crazy dynamic range...Software in question:https://bitbucket.org/hexamer/fra4picoscope/src/master/As for transformers, there were few topics here where transformer design was discussed in detail and few good examples were demonstrated.

author: TimNJ
author_rank: Super Contributor
timestamp: January 15, 2022, 02:56:01 pm
content: Right. To be clear, this thread was originally started almost a year ago (by me). Only yesterday did it receive a reply from 'souldevelop', looking for transformer construction guidance. The sole purpose of the thread was to debug why I was getting nonsense results with a (seemingly) adequate injection transformer. "My" design is not novel by any stretch, and is simply a re-hashing of many other people's work.There are many other EEVBlog threads which cover the design aspects of this type of transformer:1.https://www.eevblog.com/forum/blog/eevblog-1104-omicron-labs-bode-100-teardown/2.https://www.eevblog.com/forum/projects/diy-injection-transformer-for-power-supply-control-loop-response-measurements/3.https://www.eevblog.com/forum/testgear/injection-transformers-bode-plots-application/As is evident from my ignorant comments about magnetics design above, I didn't really put a lot of thought into the actual design. I just made something roughly similar to those in the above threads and tested the frequency response.As far as the solution, indeed, that was solved separately, many months ago. The TL;DR is just to avoid the low-end Picoscope 2204A and 2205A. If you compare the different models within the 2000 series, it's evident that the 2204A and 2205A almost belong in their own '1000' series.https://www.picotech.com/oscilloscope/2000/picoscope-2000-specificationsAnd to your point about Picoscope 4000 series, I also figured that this would be an excellent match for low-amplitude measurements like this. The 4224A has a 1MHz function generator, much better SF dynamic range performance, 12-bit ADC natively, and so on. I considered it, but with only 20MHz bandwidth and 80MS/s sampling rate, I thought it might fall short as a general purpose scope, if I ever needed a PC based scope for something else.

author: TimNJ
author_rank: Super Contributor
timestamp: January 15, 2022, 04:28:50 pm
content: If you want to build the assembly in the photos above, the KiCAD files are attached.The mounting hardware is uhh...a little exotic? If I had a 3D printer, I'd probably just print a holder instead of purchasing 6 different pieces of hardware below.. There is an STL file available for the plastic holder shown in the this blog post.https://electronicprojectsforfun.wordpress.com/injection-transformers/Even if you don't have a 3D printer, you could probably order it from Xometry (or some other service) for less than the cost of all the hardware I list below, just because you have to buy 10 or 25pcs of each from McMaster. Home Depot carries a few of the parts, but is similarly expensive.Nonetheless, if you want a reasonably robust solution with no 3D printing here's what you need. (McMaster Carr part numbers listed.) Obviously feel free to substitute whatever is available to you, metric sizes, etc.Brass pan head Phillips screw (1/4"-20 Thread Size, 1-1/4" Long) / McMC:94070A544Brass extra-wide thin hex nut (1/4"-20 Thread Size) / McMC:92683A029Bronze external-tooth lock washer (for 1/4" Screw Size 0.51" OD) / McMC:92164A029Nylon unthreaded spacer (5/8" OD, 9/16" Long, for 1/4" Screw) / McMC: 94639A753Brass washer (Oversized, 1/4" Screw Size, 0.75" OD) / McMC: 92916A380Rubber cushioning washer (for 1/4" Screw Size, 0.25" ID, 1" OD) / McMC: 90131A305For the winding wire, I used regular enamel wire for the primary and TIW for the secondary, just because it was available to me. TIW is pretty much unnecessary as you really just need functional isolation. Nonetheless, I like the contrast between the two windings. It's easier to keep track of when twisting beforehand.For the AC coupling / DC blocking caps, I used pretty overkill 47nF/450V NP0 caps (TDK CKG45KC0G2W473J290JH). Since I sometimes work with PFC circuits, I selected 450Vdc just in case, by some stroke of luck, the injector became connected to the HV DC rail. In this case, the caps should prevent obliteration of the scope and/or PC by connection of 400V to the front-end. They do not, of course, prevent other issues related to probing the primary side of an offline power supply. (i.e. power the DUT through an isolation transformer.) If you do not plan to work on such applications, you can use smaller caps with sufficiently high voltage rating to block the nominal DC output voltage of the converter you are working on.Generally speaking, NP0 is probably not strictly necessary. The distortion introduced by X7R is probably not that much at low voltages, but nonetheless, I used NP0 for good measure.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 19, 2022, 04:22:29 am
content: Hi group,Let me try and explain why the Bode plot is noisy at the low frequency end.Consider this diagram:The 1:1 transformer is illustrated by the two perfectly coupled inductors. I have chosen the load resistor to be 50to perfectly match the 50source.Only part of the power supply is shown, the output divider and the error amplifier. The error amplifier will try and keep the voltage on the non-inverting input constant and equal to the reference voltage. By extension, the controller will try and hold the voltage at the top of the divider constant.The voltage between node A and node B is always proportional to the value of signal being injected. In this case it is equal to V2/2.So if the voltage between nodes A and B is constant, how can we measure the loop gain?If we measure the ratio of the AC voltages on nodes A and Bwith respect to ground, then we can measure the loop gain.At the 0dB point the amplitudes of the voltages on node A and B is the same, but they are normally 90 to 130 degrees apart. As the injection frequency is reduced, the loop gain increases and the amplitude of the AC signal on node B reduces and the amplitude of the signal on node A increases.In TimNJ's example plot, the loop gain at low frequencies is at least 30dB. This means that most of the injected signal appears on node A. The signal on node B is 30dB or 31.6 times smaller.Typically the signal being injected is small, 1% or less of the power supply output voltage. Because of the loop gain, the amplitude of the signal on node A at low frequencies is 40dB or 100x smaller or 0.01% of the Power Supply output voltage.This is why the Bode plots are noisy at low frequencies.This shouldn't present too much of a problem, because we are interested in the area around the 0dB point.Jay_Diddy_B