Oscilloscope Mains AC Sinewave Testing - Page 1
Forum section: electronics / beginners

author: n5yzv
author_rank: Newbie
timestamp: September 11, 2019, 01:50:25 pm
content: I've been googling around for a few days, and I'm seeing mixed answers, so please forgive me is this post seems redundant.What I've got: Rigol DS1054Z with all licenses, 1/10x probe and various outputs of 120v AC (Utility, UPS's, multiple inverters)From what I gathered, I wanted to use a transformer do buck the voltage down to a lower/safer voltage. I picked up a crap halogen 120v->12v transformer on Amazon. (I'll ignore this as when I probe it, it is a nasty sinewave). So, after giving up on it, I cautiously made a isolated pigtail and probed it (two prong, 1 hot, one neutral (verified)) With this I get a sinewave. Great. But, when probing the utility (mains) the top of the curve is flat. A friend, who knows his way around an oscilloscope, but who is also very busy, noted I am "starting to overlaod and limiting the analog to digital converter range and it no longer tracks the input".So, I think, in my words. the voltage or frequency is high enough it is pushing the limits of the probe/scope input and distorts the image on the screen as it is out of range. I think.So why do I want this in the first place? I am a Ham operator and in IT. I regularly run across shitty power. I diagnose this on experience, with no real scientific proof. The scope would allow me to really *know* what is going on. I figure learning the scope with a purpose is a good way to get started.So my goal is to do it right, safe and accurate. I know the method I did is not on the safe side, so I would like improvements there.Attached are two images. One utility one a pure sinewave inverter. The last image is of an APC ups. This is why I don't like entry level ups's.Thanks!Mark

author: Zero999
author_rank: Super Contributor
timestamp: September 11, 2019, 02:01:09 pm
content: The flat top on the mains is probably caused by switched mode power supplies, without power factor correction. They draw most of the current, at the peak voltage, so it's not surprising it's flattened.Don't connect the neutral to the 'scope earth. There's a risk a high current could flow through the oscilloscope or the GFCI could trip. This is because the neutral may have a great enough voltage, with respect to earth, to cause a considerable current.

author: tggzzz
author_rank: Super Contributor
timestamp: September 11, 2019, 02:08:13 pm
content: You should, as a matter of urgency,look at the praxis/safety references athttps://entertaininghacks.wordpress.com/library-2/scope-probe-reference-material/if you are ever tempted to disconnect a protective mains earth, have a look athttps://www.eevblog.com/forum/projects/isolation-transformer-for-scope/msg2259465/#msg2259465Why? To save your equipment and you from loud noises followed bydeathlysilence.BTW, your friend is almost certainly wrong in this case; I see no evidence of overload. Nowadays mains voltage sine waves often have a "flattish" top.If you want to improve power, use a UPS or consider whether a ferroresonant transformer might help in that specific case.

author: n5yzv
author_rank: Newbie
timestamp: September 11, 2019, 05:43:47 pm
content: Yeah, I read allot about earth ground. I've done quite a bit with electrical and grounding, so I am being very cautious of that mistake. Removing ground to a device is normally a very bad idea.Regarding improving the power, I'm learning to do this mostly to prove power issues. I also have customers choose low quality UPS's with no real clue of how poor the output power is when on battery. Most of the UPS's I recommend are higher end, more costly, inverter style ups, which are on DC/Inverter power 100% of the time where as the AC is charging on the back end.So with testing 120v AC and overall safety, should I just get a decent quality Active differential probe??

author: n5yzv
author_rank: Newbie
timestamp: September 11, 2019, 05:45:53 pm
content: Good point on Neutral to Ground. I did a quick test with a voltmeter to check first, nevertheless that current can show up when unexpected. As I just posted before, I think the better route for testing is a Active Differential High(er) voltage Probe.

author: BravoV
author_rank: Super Contributor
timestamp: September 12, 2019, 03:52:49 am
content: Quote from: n5yzv on September 11, 2019, 05:45:53 pmYep, convenient and "relatively" safe is to use HV diff. probe.An example scope that was probing the mains line at 220VAC that was powering it self.

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 05:31:34 am
content: Quote from: n5yzv on September 11, 2019, 01:50:25 pmPlease show the waveform you got through this transformer, a provide a link to the Amazon item so we can see a description of it.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: September 12, 2019, 08:11:31 am
content: Line AC voltages will have generous amount of distortion. So flat tops are possible. Note that there are all kinds of loads connected to the mains it can significantly alter the wave shape. Try different times of the day. May be in times of low loading conditions, the wave shape is much better.

author: n5yzv
author_rank: Newbie
timestamp: September 12, 2019, 02:47:12 pm
content: Here is the transformer:https://www.amazon.com/gp/product/B076KX33JW/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1and please see the attached image:

author: n5yzv
author_rank: Newbie
timestamp: September 12, 2019, 02:49:03 pm
content: A thought I had, as one posted noted that distortions happen over time, is there a way to capture the sinewave over time? Lets say, an hour, 30 min, etc., or would it be better served with a trigger set?

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 03:33:19 pm
content: Quote from: n5yzv on September 12, 2019, 02:47:12 pmI see that the problem is just as I suspected. The giveaway is its description as an "Electronic" transformer with an "operating frequency = 20 kHz". It's really a switching convertor.If you get one of these:https://www.amazon.com/Parts-Express-Power-Transformer-6-3V-0-6-3V/dp/B0002ZPHLA/ref=sxbs_sxwds-stvp?keywords=power+transformer&pd_rd_i=B0002ZPHLA&pd_rd_r=56d27888-dc59-4dc6-9dfc-a9daf612d8d9&pd_rd_w=lVuxx&pd_rd_wg=vyQbP&pf_rd_p=a6d018ad-f20b-46c9-8920-433972c7d9b7&pf_rd_r=5J5M3W18FPPVH8NFYCCX&qid=1568301639or:https://www.amazon.com/Jameco-Valuepro-P-8657-R-Power-Transformer/dp/B00B88632C/ref=sr_1_247?keywords=power+transformer&qid=1568301878&sr=8-247you will see a clean version of the grid waveform, and have the safety of a galvanically isolated connection to the grid.

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 03:45:58 pm
content: Zero999's explanation of the flat-topping is right on. The distortions in grid waveform are various. Here are some waveforms I captured some time ago in the Puget Sound region:

author: n5yzv
author_rank: Newbie
timestamp: September 12, 2019, 04:13:47 pm
content: Thank you! I had no clue which one to get. Is there a way to monitor AC mains over a time period and replay? Again, using Rigol DS1054Z with all licenses.

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 04:31:29 pm
content: Quote from: n5yzv on September 12, 2019, 04:13:47 pmSet your scope to display a full cycle of the waveform, normal triggering, and then set the display to infinite persistence. Any large deviations from the normal waveforms would show up.Otherwise, to capture hours worth of waveform would require a lot of memory.

author: scatterandfocus
author_rank: Regular Contributor
timestamp: September 12, 2019, 04:37:52 pm
content: I'm interested in this topic too. I tend to get some sporadic power noise in my audio recording chain. Should it be ok to drop the voltage down to around 1V using a transformer and voltage divider and capture the output with a soundcard?

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 04:41:37 pm
content: Quote from: scatterandfocus on September 12, 2019, 04:37:52 pmAs long as the peak voltage applied to the sound card doesn't overload the card there should be no problem. 60 Hz is well within the usual audio band.

author: scatterandfocus
author_rank: Regular Contributor
timestamp: September 12, 2019, 04:53:25 pm
content: Thanks. I was planning to pickup a filament transformer anyway for looking at component I-V curves on a scope.

author: rstofer
author_rank: Super Contributor
timestamp: September 12, 2019, 10:40:24 pm
content: Quote from: n5yzv on September 12, 2019, 04:13:47 pmThat's why Dranetz invented the Power Disturbance Analyzer. We used these all the time when checking datacenter power.The newer stuff I have never used:https://www.tequipment.net/dranetz/power-measurement/power-quality-analyzer/The older stuff I have used:https://www.ebay.com/itm/Dranetz-646-3-Disturbance-Analyzer-6463/401621712464A scope is the wrong tool even if it can save a trace.

author: The Electrician
author_rank: Frequent Contributor
timestamp: September 12, 2019, 11:06:03 pm
content: If a scope is the only tool one has to make do.Here's what I get if I display the derivative of the grid waveform along with the waveform. The grid is (obviously) in yellow, the derivative is pink. Remembering what we learned in Trig class, the derivative of the sine function is the cosine function, so the derivative trace should also have a sinusoidal shape, but the scope derivative trace is quite distorted, showing that the grid waveform is not a perfect sine wave.Here is the result of turning on infinite persistence and waiting a couple of hours. The saved pixels are gray, and the derivative trace shows a lot of high frequency action, probably due to switching off things in my neighborhood, producing an arc at the switch when it opens.I'm going to leave this on for 24 hours or so and see what I get.

author: rstofer
author_rank: Super Contributor
timestamp: September 13, 2019, 01:58:32 am
content: The derivative always shows noise. That’s why it isn’t used in analog computing. We keep integrating unti the derivatives disappear. Unimportant...So, there is harmmonic distortion along with some noise. What does it mean? Does it even matter when everything is using switching supplies that are causing the noise in the first place? FCC Part 15 labels come to mind.In the mainframe era we used 400 Hz motor generators to guarantee relatively clean supply while allowing for smaller transformers inside the equipment.I would question every implication of power problems that didn’t also dim the lights. A simple flicker shouldn’t bother anything. Large motors starting might cause a sag but it won’t be subtle. The waveform certainly won’t look like a sine wave with a wee bit of distortion.

author: AndyC_772
author_rank: Super Contributor
timestamp: September 13, 2019, 09:24:27 am
content: What's the frequency range over which you're really interested? Does that range actually pass through a mains step-down transformer? What does the gain-frequency response look like?Personally I'd use an active differential probe with isolation and a known, reasonably flat frequency response.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: September 13, 2019, 10:13:14 am
content: Quote from: The Electrician on September 12, 2019, 04:41:37 pmMany audio codecs used on the sound cards have built in digital filters (notch filters) to filter out 50/60Hz. Most are enabled by default on the sound cards by the drivers. Some may even have ways to bypass the filtering with custom software. So, be aware of this one while capturing using the sound card.

author: richard.cs
author_rank: Super Contributor
timestamp: September 13, 2019, 11:21:18 am
content: If you bought a transformer with a 230 V primary then running at 120 V it would have much lower core flux and be more linear - a good choice to use as an isolation transformer for mains monitoring.

author: scatterandfocus
author_rank: Regular Contributor
timestamp: September 14, 2019, 05:51:25 am
content: Quote from: EEEnthusiast on September 13, 2019, 10:13:14 amI never heard of that, and it may be the case for some onboard audio. It definitely is not the case for standalone audio cards and audio interfaces.