When is a sine wave not a sine wave? - Page 1
Forum section: electronics / general

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2011, 07:01:25 am
content: OK, so I'm playing with my new Rigol oscilloscope and I need a nice example waveform to look at with known properties. What better place to start than the mains, eh? Known frequency, known shape, all should be good. So I attach the probes to the secondary of a small 12 V transformer and see what I can discover. Surprise, the wave form looks like this:It's all wonky! I could draw a better sine wave free hand.What can I learn from this? I set the scope up at x10 on the probes with AC coupling. Am I seeing distortion introduced by the transformer, or am I losing something in the measurement? I presume with such a low frequency that the voltage from the transformer really is that shape, and I am seeing some kind of magnetic effect in the transformer core?

author: Lightages
author_rank: Unknown
timestamp: December 18, 2011, 07:25:31 am
content: You are seeing distortion from the transformer. Could be hysteresis from the core, the waveform might look a little better when the transformer has a bit of a load....

author: amspire
author_rank: Super Contributor
timestamp: December 18, 2011, 07:35:30 am
content: It is hard to say for sure without seeing the mains waveform. Some nearby ugly load could be distorting it.In general though, small mains transformers are not great. They are usually pretty lossy which is why they can get warm with no load.In this case it looks like there a combination of the primary winding resistance, a high leakage inductance, and a barely adequate amount of primary inductance. An ideal transformer has a primary inductance so high that the inductive current is negligible compared to the transformer current.For this small transformer, the primary current due to the inductance alone is high to the extent the core is actually starting to saturate. If you could look at the primary current, it would probably tell the story. If you have another mains transformer, use it as a current transformer. Put the secondary in series with the primary of this transformer, and put a 10K resistor across the primary of the second current transformer. Look at the waveform on the primary of the current transformer and compare it to the secondary voltage of the transformer you are testing. The current transformer primary should look like a sinewave, but I suspect it will look nothing like that in this case.So I would say it is a badly designed transformer, but the designers may have been happy to trade inefficiency for lower costs.Richard.

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2011, 07:47:36 am
content: Quote from: Lightages on December 18, 2011, 07:25:31 amHere's the result of putting a bit of load on the transformer (about 50% of its rating):For reference, it is a tiny 6-0-6 V 450 mA transformer from Radio Shack. The quality might not be up to much.

author: IanB
author_rank: Super Contributor
timestamp: December 18, 2011, 07:50:08 am
content: @Richard:I don't have a second transformer to use as a current transformer in the way you describe, unfortunately.Your comments are illuminating. It's amazing what you can discover about seemingly ordinary objects when you examine them closely.

author: Zero999
author_rank: Super Contributor
timestamp: December 18, 2011, 11:09:32 am
content: It's no surprise it gets worse when it's loaded. I would expect the waveform would look at its best when the transformer is unloaded.I don't see how using another equally bad current transformer would give an accurate current measurement. You could use a hall effect sensor but that wouldn't prove whether the mains voltage is distorted or the transformer's hysteresis is distorting the current.

author: amspire
author_rank: Super Contributor
timestamp: December 18, 2011, 11:32:02 am
content: Quote from: Hero999 on December 18, 2011, 11:09:32 amIt would work fine. The use of a transformer as a current transformer as I described means operating at around 1% of any possible core saturation point. The waveform should be pretty good. Not perfect, but if the current waveform is as distorted in the original transformer as I suspect, it is easily good enough to see the problem.Richard.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: December 18, 2011, 03:13:00 pm
content: Well your mains is unlikely to be as clean as you think. Your 50 or 60 hz is generated as a nice sine wave but you will be very lucky to see it. The main culprit in recent years are smps and other hv sources injecting odd harmonics into the mains and is a problem that will only get worse. There is a thread on the forum about it. In this case however I agree with the previous posters and it is due in the main to the transformer.

author: Unknown
author_rank: Unknown
timestamp: December 18, 2011, 03:52:19 pm
content: Haha, that looks like a gear tooth mate, not like a sine wave. Clearly the core saturates and some other non-linearities.You can measure the crest factor of a sinewave to see how pure it is, or a frequency content analysis.How about the probe test waveform on your scope? Thats a square wave 1kHz-1MHz.

author: ejeffrey
author_rank: Super Contributor
timestamp: December 18, 2011, 11:28:11 pm
content: Quote from: FreeThinker on December 18, 2011, 03:13:00 pmActually it is a problem that is only getting better. More and more power supplies are becoming power factor corrected either due mandates or billing that accounts for power factor. As electronic loads are converted to use PFC, probably the old school "bad" loads like motors and TRIACs will take the crown back for causing the most distortion of your power waveform.

author: RCMR
author_rank: Frequent Contributor
timestamp: December 19, 2011, 12:26:38 am
content: Quote from: Alex on December 18, 2011, 03:52:19 pmYes, run an FFT and see what harmonics and other frequency components there are in that waveform.There is definitely some saturation in the second example -- the sine-wave is starting to flatten at the peaks as the core goes into saturation.

author: IanB
author_rank: Super Contributor
timestamp: December 19, 2011, 01:14:19 am
content: Oh well, today's experiment has failed. I tried to construct a current transformer by wrapping ten turns of wire round a toroid and slipping the toroid over one of the mains wires, but I could not get any signal at all out the other end. I tried both a 10 ohm and a 10k resistor across the winding but no voltage appeared. I had 0.8 amps in the main conductor (100 W bulb as load) so my current transformer should have produced about 80 mA if it was working correctly. I guess I have more to learn about building one. Either my toroid core was not good (no soft iron toroids to hand), or there were insufficient windings on either side of the transformer to produce good coupling. My toroid is strongly magnetic, so I think it may be an iron powder compound. Maybe I should try a few more turns of the current carrying conductor instead of just slipping it through the middle?I was able to use the original Radio Shack transformer as a current transformer, but passing 0.8 A through a secondary rated for 0.45 A probably doesn't help with core saturation issues. I got a better looking sine wave out of it (shorted the primary with a 100 ohm resistor), but still with some distortion.

author: amspire
author_rank: Super Contributor
timestamp: December 19, 2011, 01:23:55 am
content: Ian,If the toroid is the type designed for switching power supplies, it probably has a low permeability which means you will need a huge number of turns to work at 50Hz. It wouldn't surprise me if the toroidal transformer performance started rolling off at about 100KHz.There are high permeability toroids available, but they are not all that common.You do not have any other mains transformers lying around at all? It doesn't have to be the same as the one you are testing.Richard

author: IanB
author_rank: Super Contributor
timestamp: December 19, 2011, 01:35:10 am
content: Quote from: amspire on December 19, 2011, 01:23:55 amThe toroid came with about 5 turns of heavy gauge trifilar winding on it, which I removed. It is blue in colour. I am not sure what its original purpose was, but it does seem to work well with a few turns to construct a joule thief.QuoteIn the ordinary way finding another transformer would not have been a problem, but when I relocated from the UK to America I cleared out most of my life's collection of electrical stuff, including a box full of carefully hoarded transformers, and now my junk box is bare

author: amspire
author_rank: Super Contributor
timestamp: December 19, 2011, 02:26:41 am
content: Quote from: IanB on December 19, 2011, 01:35:10 amThe 5 turns make it sound like it came from a switching power converter. It will not be suitable for 50/60Hz. I would suspect that the power thief is running at a high frequency - certainly no where near mains frequency.QuoteIn the ordinary way finding another transformer would not have been a problem, but when I relocated from the UK to America I cleared out most of my life's collection of electrical stuff, including a box full of carefully hoarded transformers, and now my junk box is bareI have had to do that in the past. When you don't have the boxes of junk, things that used to be easy to do become hard.What you may be able to do is add a series resistor to halve the voltage into the transformer. If the transformer is saturating, reducing the voltage should make the secondary waveform look a lot better. So if the transformer is dissipating 3W (a guess) with no load, then the current will be about 25mA for a 120V transformer. So adding something like a 2K2 or 2K7 resistor in series with the primary should make a big drop to the primary voltage. If you only have 1/4W resistors, you can still try it, as long as you only switch the power on for a very short time. You only need a second or two to capture the waveform.Richard

author: IanB
author_rank: Super Contributor
timestamp: December 19, 2011, 03:05:31 am
content: Quote from: amspire on December 19, 2011, 02:26:41 amI would suppose that it is. One of the things on my to-do list is to put the oscilloscope on that circuit and see what frequency it is actually running at. And then possibly try to optimize the configuration to achieve the best efficiency.I like your idea of the series resistor. I have a 120 V 4 W lamp that should have a filament resistance of about 3k6 in normal operation (and apparently 360 ohms when cold), with an operating current of 33 mA. I could feed that 33 mA through the 450 mA rated secondary using the current transformer idea and see what happens. I could also put it in series with the primary and just measure the voltage on the secondary.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 19, 2011, 03:47:46 am
content: I was going to be a smart-a---e,& say :-"when it is a cosine wave!",but then I realised it was a serious question.You should be able to get a fairly good idea of whether the distortion is due to the transformer,the Rigol,or incoming on the mains,just by looking at the waveform on random hum pickup.You can usually source enough hum to look at,just by holding the tip of the probe in your hand.VK6ZGO

author: IanB
author_rank: Super Contributor
timestamp: December 19, 2011, 04:26:24 am
content: Well I tried the current transformer idea with the 4 W bulb to put a low current through the winding. It's starting to look like a reasonable shape now:Just for grins I tried touching the probe tip, but it wasn't pretty:I think there may be a fair bit going on in the airwaves besides 60 Hz hum...

author: amspire
author_rank: Super Contributor
timestamp: December 19, 2011, 05:58:18 am
content: Ian,Something is very odd about that first trace. With the globe in the circuit, are you only getting 1V AC p-p out of the transformer secondary?That seems amazingly low.Is that still the voltage on the 15V secondary?

author: IanB
author_rank: Super Contributor
timestamp: December 19, 2011, 06:17:44 am
content: Quote from: amspire on December 19, 2011, 05:58:18 amI should have explained more thoroughly perhaps. I put the transformer's secondary in series with the 4 W bulb, and I put a 100 ohm resistor across the primary. I traced the voltage across that resistor. I didn't check the voltage though, so let me try now.The 4 W bulb at 120 V should pass about 33 mA through the secondary. That should produce a current in the primary of 14/120 * 33 = 3.9 mA. Passing this through the 100 ohm resistor should produce an RMS voltage of 390 mV, and therefore a peak voltage of about 550 mV. At 20 mV (200 mV?) per division, that is about what the scope shows. Phew! The world works as it should(Note that I previously measured the open circuit voltage of the secondary at 14 V, which is where the 14/120 factor comes from. I am trusting my mains voltage to be 120 V, which it usually is--a spot check just now gives 121 V)Edit: I just noticed that 20 mV/200 mV mix up. I thought the scope was on the 10X scale, but maybe not. I'll have to check.Edit2: Oh, it looks like the scope had reverted to 1X on the scale factor instead of 10X. I feel sure I had previously set it to 10X. Perhaps it got reset later.

author: westfw
author_rank: Super Contributor
timestamp: December 19, 2011, 08:51:47 am
content: Is 50/60Hz a high enough frequency to use most scopes' AC coupling features?

author: amspire
author_rank: Super Contributor
timestamp: December 19, 2011, 11:37:03 am
content: Quote from: westfw on December 19, 2011, 08:51:47 amYes. The -3db point is often at 5 or 10 Hz.

author: ivan747
author_rank: Super Contributor
timestamp: December 20, 2011, 01:02:28 am
content: Quote from: amspire on December 19, 2011, 11:37:03 amIs it usually listed in the oscilloscope's spec sheet or is it an "obscure" thing like burden voltage on a multimeter and only seen in some advanced models?

author: IanB
author_rank: Super Contributor
timestamp: December 20, 2011, 01:09:59 am
content: Quote from: ivan747 on December 20, 2011, 01:02:28 amThe Rigol spec sheet says this:Lower Frequency Response (AC –3dB)<=5Hz (at input BNC)

author: saturation
author_rank: Super Contributor
timestamp: December 21, 2011, 11:55:13 pm
content: Those waveforms are interharmonic and harmonic distortions, and can be caused by the load or the transformer.http://www.ipsi.net/Power-Quality/PowerQuality.htmFor curiosity's sake you can FFT the waveform and try to identify what the harmonics are.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2012, 07:28:21 am
content: Quote from: saturation on December 21, 2011, 11:55:13 pmComing back to this after a break for the Christmas holiday, I went ahead and looked at the FFT. Here is the original waveform with no load on the transformer:And this is the FFT of that waveform:Looking at this, I'm not sure what I can deduce from it. Where there should be a single narrow peak at 60 Hz there is instead a smeared out peak spreading over a range of higher frequencies.I have learned how to access the FFT function on the Rigol, but I don't think I'm any the wiser about the distortion.

author: amspire
author_rank: Super Contributor
timestamp: January 01, 2012, 12:11:57 pm
content: Quote from: IanB on January 01, 2012, 07:28:21 amIan, try slowing down the timebase so you get more cycles visible - say 5 to ten cycles.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2012, 09:59:00 pm
content: Quote from: amspire on January 01, 2012, 12:11:57 pmAs Homer would say, "D'oh!"I get odd harmonics at 180 Hz, 300 Hz and 420 Hz (the 420 Hz peak is more prominent when the vertical scale is magnified).What do odd harmonics tell about the transformer behaviour?

author: amspire
author_rank: Super Contributor
timestamp: January 01, 2012, 10:08:00 pm
content: Quote from: IanB on January 01, 2012, 09:59:00 pmAny distortion that is symmetrical - ie the same on both the positive and negative parts of the waveform - will produce only odd harmonics. Other then that, I am not sure the distortion will tell you much. Current vs voltage waveforms on the primary would tell you a lot more.

author: slateraptor
author_rank: Frequent Contributor
timestamp: January 01, 2012, 11:03:49 pm
content: Quote from: IanB on January 01, 2012, 07:28:21 amThe perceived spreading is a consequence of the number of buckets (in this case, not very many) in the FFT calculation coupled with linear interpolation to produce the continuous plot.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2012, 11:16:32 pm
content: Quote from: slateraptor on January 01, 2012, 11:03:49 pmUnderstood. After I wrote that I read up on FFT sampling and windows and learned about leakage. For the last analysis I showed I adjusted the sample size to use a whole number of cycles and used a Hanning window for the transform.

author: G7PSK
author_rank: Super Contributor
timestamp: January 04, 2012, 03:58:56 pm
content: I have seen worse than this without the transformer from alternators of small size with electronic avrs with no load and the scope straight onto the output, the beauty of all valve sets. the waveform looked more like a wonky saw tooth. The answer is to build an attenuation circuit such as this. there is another thing you could check do you have a lot of fluorescent tubes on the same circuit as these are heavily leading power factor and can cause similar wave form deformation as a rule all capacitance loads are leading PF and inductive are lagging pf I say as a rule because if you have a synchronous motor on line as opposed to an asynchronous (induction) motor they behave as a capacitance load and at one time were used for power correction.

author: saturation
author_rank: Super Contributor
timestamp: January 07, 2012, 03:54:01 pm
content: Current losses in transformers cause harmonics, but it also amplifies harmonics already present in the primary side of the transformer. Since an FFT is fairly easy to do these days, what it tells you is it recconfirms a cause is within the transformer but it can't give you a qualitative answer as if you used a current vs voltage graph.For electronics use, its mostly academic. A practical consideration is in high loads, the more harmonics, the more heat the transformer will generate due to losses. In high power use, those harmonics start to matter. See transformer section of this link:http://ecmweb.com/mag/electric_effects_harmonics_power_2/Quote from: IanB on January 01, 2012, 09:59:00 pm