Oscilloscope and mains, again - Page 1
Forum section: electronics / beginners

author: Quaxo76
author_rank: Newbie
timestamp: February 26, 2023, 10:58:06 pm
content: Hello, Please bear with me with this newbie question... I've searched around and I'm still unsure.I've recently bought my first oscilloscope (a mains-powered Rigol DS1202Z-E). I'm not totally inexperienced with electricity and electronics, but an oscilloscope is a whole new beast for me.So, I wanted to see - like so many before me - the shape of my mains line's waveform. I don't need a precise reading, I just want to see the shape of the wave, to learn about noise, peaks, and to see what happens when my solar panels and/or batteries kick in.From reading around here, I know that it's unwise to test the live wire directly (risk of electric shock, damage to the equipment in case there's a peak, and risk of ground-loop if I also connect the clip to neutral).I also realize that testing with two channels between live and neutral with A-B doesn't solve the problems about shock and damage risks.So I tried testing the otuput of a 220V->12V transformer. But I got a weird waveform, with flattned tops and bottoms, and weird angles. I've found out that it's probably the transformer core saturating.So I'm wondering, what if I connect two resistors in series (say 10MOhm and 500KOhm) across live and neutral, and then measure across the neutral and the node between the resistors (without using the clip of course, to avoid the ground loop)?I would think that the high total resistance would prevent dangerous currents flowing in the resistors, and the voltage reading across the smaller resistor should be quite safe for the instrument. Of course I would have to be careful to keep the 220V part well insulated. Would the waveform reading be influenced by the resistors?The only risk would be if I inadvertently insert the plug the other way around (plugs aren't polarized here in Italy): in this case the oscilloscope would still see a low voltage across the small resistor, but there would be a shock risk, right?Another thing I could do, is to connect the two resistors not across live and neutral, but across live and ground. This way, if I plug it incorrectly, one end would still be connected to ground, and the other would be connected to neutral instead of live. So I would see nothing on the scope, but it wouldn't be dangerous. Can I read a good wave between live and ground? I'm not sure where, in the building, the neutral is shorted to ground...Thank you and I apologize in advance for any gross misunderstanding I may have here, but as I said this is a new field for me...Cristian

author: nightfire
author_rank: Frequent Contributor
timestamp: February 26, 2023, 11:10:56 pm
content: If youi want to poke around circuits that are connected to mains, the canonical thing would be to use a differential probe- a good entry point to this is probably the micsig DP10007 that sells for around 200 €.

author: Quaxo76
author_rank: Newbie
timestamp: February 26, 2023, 11:16:23 pm
content: Yes, sorry, forgot to mention that I have read about high-voltage differential probes. Sadly at the moment they're out of my budget, as I've spent all my "hobby money" on the scope itself.And I can't justify a rather major investment on such a tool, just to have a look at a wave and then forget about it...Thanks for your reply BTWCristian

author: TimFox
author_rank: Super Contributor
timestamp: February 26, 2023, 11:33:52 pm
content: Without a differential probe, a safe method (assuming you wire it safely) would be to start with a voltage divider using high-power resistors, say 60,000 ohms (1 W for 120 V, 5W for 240 V, substantially derated) and 600 ohms to form a resistive divider with 600 ohms output impedance, then couple that through an audio transformer that can handle a few volts across the 600 ohm windings (and with enough voltage rating for primary-secondary insulation--most important).For good safety, make sure that the low end of that divider (bottom of the 600 ohm resistor) is close to PE/ground of your power line (verify with an AC voltmeter before connecting the transformer).Normal low-current power transformers (including those in wall warts) do not have sufficient iron to avoid saturation with full line voltage across the primary, since it's not needed for their normal application.You might be able to use directly a line-to-low voltage ("filament") transformer where the rated primary voltage is at least twice your line voltage.

author: shapirus
author_rank: Super Contributor
timestamp: February 27, 2023, 12:10:33 am
content: There are 100:1 probes, appropriately rated in terms of insulation strength, which can be used directly.Assuming that the scope is connected to the wall outlet with a 3-wire power cable and the earth connection in the outlet exists and is wired as it is supposed to be, you need to remove the ground lead, the one with the clip, from the probe and then probe the mains wires with the probe's tip. One wire is line, another is neutral, so you will see the waveform on one of them. The scope will show you the signal that it samples across mains earth (connected with scope ground) and the mains wire you touch with the probe, coming into the scope input via a 100M resistance.Use one hand, keep the other in the pocket. Use rubber gloves if you have any doubt concerning the quality of your probe. Do not remove the removable hook attachment from the probe, since it will expose the ground connection close to the central pin which you want to avoid having close to the mains line.I cannot see how this approach is less safe than using a differential probe. Both are as safe as the insulation strength on both probes provides. The differential probe only prevents damaging the scope, but it still needs to be properly insulated and of good quality without any exposed metal parts.Correct me if I am wrong.

author: TimFox
author_rank: Super Contributor
timestamp: February 27, 2023, 12:36:17 am
content: @ shapirus:Done exactly as you say would be safe, but the resulting display may not be accurate.The actual power waveform you want is between Line and Neutral, and there may well be an unclean waveform of a few volts between Neutral and PE/Ground.Your setup would show the waveform between Line and PE/Ground.

author: srb1954
author_rank: Super Contributor
timestamp: February 27, 2023, 01:15:45 am
content: Quote from: Quaxo76 on February 26, 2023, 10:58:06 pmThat "weird" waveform with flattened tops may actually be the true representation of your mains supply waveform. Rarely does a mains waveform look like a nice clean sine wave.Many electronic devices have capacitive input filters and only draw current from the mains at, or near, the peak voltage of the waveform. The peak current drawn at these times can be quite high and this, together with the inherent impedance of the mains system, causes a droop from the true sine shape and hence the apparent flattened tops on the waveform.If your 220V->12V transformer transformer is properly designed it shouldn't be saturating significantly on a normal mains supply. Just make sure it isn't a 60Hz rated transformer; these don't work so well on a 50Hz supply

author: tautech
author_rank: Super Contributor
timestamp: February 27, 2023, 11:00:16 am
content: Quote from: srb1954 on February 27, 2023, 01:15:45 amYup, all this ^^^As the OP has a modern DSO one of the first things they should do before fucking with mains voltages is learn how to capture a screenshot and upload it as an attachment so we can see the waveform and the settings used to capture it.

author: shapirus
author_rank: Super Contributor
timestamp: February 27, 2023, 11:23:55 am
content: Quote from: TimFox on February 27, 2023, 12:36:17 amRight, and there can be quite a bit of garbage between them. This can be worked around by capturing the PE-Neutral signal on the second channel and setting scope to show Ch1-Ch2 (aka poor man's differential probe).

author: TomKatt
author_rank: Frequent Contributor
timestamp: February 27, 2023, 11:52:54 am
content: Isn't Italy 220v? That would explain why there's no polarization - both legs are "hot" compared to earth. There is no 'neutral' side on 220, unlike the 120v in the US, where the neutral is bonded to earth at the breaker box, creating a 'hot' side and a neutral side.Although differential probes are basically just fancy voltage dividers, I'm not sure I would trust a few DIY resistors in probing 220v mains...I think the biggest danger in probing mains power is people connecting their ground lead to the wrong spot, which can result in a direct short through the scope.Quote from: Quaxo76 on February 26, 2023, 10:58:06 pmIndeed - there are many mains monitoring circuits that are nothing more than a basic isolated step-down transformer. I believe the utility companies monitor the mains in a similar fashion.

author: Ice-Tea
author_rank: Super Contributor
timestamp: February 27, 2023, 11:58:49 am
content: Quote from: Quaxo76 on February 26, 2023, 10:58:06 pmAsk yourself this question: if you're not attaching the gnd clip, what are you measuring exactly?In case you're interested in some advise:- for as long as you're asking questions like these (by your own admission "newbie" questions): stay away from mains. And stay away from mains some more after you consider yourself to be out the newbie zone to in order to avoid an entry in the Darwin Arwards (Dunning Kruger section)- if you plan to go ahead anyways: at least get a differential probe. If that's out of your budget: reconsider. From cheap, newbie and safe you can have two. Not three.

author: Ice-Tea
author_rank: Super Contributor
timestamp: February 27, 2023, 12:03:23 pm
content: Quote from: TimFox on February 27, 2023, 12:36:17 amYou have checked that 100M resistor datasheet, then? Or how it is set up? You have checked the cables? The probe cables?

author: shapirus
author_rank: Super Contributor
timestamp: February 27, 2023, 12:12:09 pm
content: Quote from: TomKatt on February 27, 2023, 11:52:54 amUnless Italy standards are very special, one of the wires is Neutral, another is Line, of which only the latter is "hot", that is, oscillating +/- 230*sqrt(2) V relative to Neutral and Earth, which are too connected together at a certan point.

author: vk6zgo
author_rank: Super Contributor
timestamp: February 27, 2023, 12:25:23 pm
content: Quote from: TomKatt on February 27, 2023, 11:52:54 amNope! Italy still has a Neutral line whichisconnected to ground, although, I believe not always at the customer's house.(not sure of the latter point).The 240v supply in North America is the "odd one out", where the two sides are fed from the two ends of a centre tapped transformer on the power pole, so you have two "hots", whilst the centre tap is "Neutral"------sorta!If 120v power points are fed from the same type of transformer, you could find that if you measure between the "hots" of two 120v power points you may see 240v.

author: vk6zgo
author_rank: Super Contributor
timestamp: February 27, 2023, 12:37:35 pm
content: Quote from: TimFox on February 27, 2023, 12:36:17 amIn a lot of cases, such a test is "near enough".I have definitely done this, & there is very little hazard involved.The "proper" way to use this method, is to attach the probe to the point you mean to test, with the power plug pulled out of the outlet.(In those systems that let you do this, also turn the outlet off.)Step away from the connections, plug the power in, & switch on as necessary, observe the waveform, then switch off (if this is provided) & unplug the power lead.

author: shapirus
author_rank: Super Contributor
timestamp: February 27, 2023, 01:44:42 pm
content: Quote from: vk6zgo on February 27, 2023, 12:37:35 pmIndeed.Here's what I have just captured (using a battery-powered handheld scope).1. Earth - Line (100:1 probe)2. Neutral - Line (100:1 probe)3. Earth - Neutral (notice the changed scale, 10:1 probe)

author: newbrain
author_rank: Super Contributor
timestamp: February 27, 2023, 02:24:55 pm
content: Quote from: shapirus on February 27, 2023, 12:12:09 pmWell, yes, while while what TomKatt says is false as a generalization, it is sometimes true - yes, Italy is "special" in that respect.It depends on your area and the age of the infrastructure.In Rome there are still many houses - including the four I've lived in, going back 50 years - where the distribution comes from an upgrade of the original 125 V single phase from a triphase to a 220 V one - so we went overnight (with ample forewarnings!) from 120 V neutral to phase to 220 V phase to phase, including a slight overvoltage to the distribution transformers (citation needed on this, TBH).Before, the nominal 220 V was called "Industriale", and, as in the USA used for more demanding appliances.OTOH, newer areas have always been 220 V, using the normal neutral-phase arrangement.The sparky renovating my apartment about 10 years ago had just moved to Rome from the north, where this situation is far less common, and was quite puzzled he could not find the neutral (the fact that he found all wires coming to panel from the meter downstairs were yellow-green was also a nice touch- I don't know who the original criminal was).So, in Italy NEVER assume there's a neutral. That is in any case a good rule to live by: a mains wire is always hot.Dove Quaxo abiti?Regardless, cobbling together a nice oscillator or some other circuit to learn how to use a scope should come first - leave more dangerous endeavour for later.At least watch our kind host'svideo on the topic.