A safe and inexpensive probe for direct mains measurements - diyAudio
Go Back   Home > Forums > Design & Build > Equipment & Tools
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 8th January 2016, 07:52 PM   #1
Elvee is offline Elvee  Belgium
diyAudio Member
Elvee's Avatar
Join Date: Sep 2006
Default A safe and inexpensive probe for direct mains measurements

Hi there,

The subject of visualizing the mains waveform on an oscilloscope has always generated a lot of controversy, bad advice, and as a result topic closures by the moderation for obvious safety reasons.

Here is a typical recent example:

How to measure 120V mains on an oscilloscope?

I propose a different approach, simple and easy, yet 100% safe provided you follow strictly the guidelines, and use a bit of common sense.

I am pretty sure my approach will cause an outcry, because it is a non-isolated (sort of, more on that later) circuit connected to both the mains and the oscilloscope, but sensible people will very quickly realize that this method is indeed extremely safe, more so than any alternative available to DIY people, including transformers.

It is also quite faithful, at least for relatively low frequency signals.

The circuit couldn't be simpler:

Click the image to open in full size.
It is just a textbook difference amplifier.

The smart bit is that no "ground" or "common" terminal is used at the input.

How can it work, and why is it "smart"?

-It works, because the common mode voltage will either be imposed by the source (this will be the case with mains-connected circuits), or generated by the circuit itself (for isolated sources like inverters or transformers).

-It is smart, because it eliminates all of the usual safety issues encountered with other solutions: there will be a small leakage current, but perfectly controlled, deterministic and completely safe.

There is no need to change anything to the earthing arrangements of the DUT or the oscilloscope, or to use an isolation transformer: everything works simply and transparently.
The leakage current is determined by the value of the input resistors, 230µA maximum here.
This value is perfectly safe, and will have no impact on a human or a GFI, even a sensitive one.

Note that the grounds of the supply and of the oscilloscope still need to be connected to a protective earth, in case something fails.

The principle also allows for safe handling: even when the circuit is left floating, with the power and the output disconnected, you can safely touch one of the terminals while the other is plugged into the hot side of the mains: the maximum current you will experience in this case is 58µA: completely safe.

Now, it's time for ....


This circuit is completely safe if built properly and using proper components, but even it can be deadly if you are sloppy, negligent, or if you try to save a few pence on the wrong things.

Mainly two things matter:
  • The construction, in particular the distances and clearances.
  • The quality of the input resistors: all of the safety relies on them, and if you use the wrong type, it could be seriously compromised

The distance between an input terminal and the opamp side must be greater than 20mm.
The distance between the two input terminals has to exceed 10mm.
The clearance area must be free of any conductive element: copper track, pad, or any foreign object.

The input resistors must be of a high voltage type (>1250V breakdown voltage) and must be composed of at least two elements.

Do not compromise on the quality!

Risking life and injury in order to save a few cents is a very bad calculation, and you have to choose a reliable seller: if you find HV resistors on Ebay, they are most likely ordinary carbon or metal film types in disguise.
Use known and reliable outlets: RS, Farnell, Mouser to name a few.
Choose a known and reliable manufacturer: Vishay, Yageo, Philips, etc.
Here is the datasheet of the resistors I used:
Other acceptable models include VR25 from Philips or Vishay for example

The circuit can be built on a regular PCB, or on a perfboard as in my example. In this case, either chose a "naked" one (no pads), or remove the pads surrounding the input resistors:
Click the image to open in full size.

Click the image to open in full size.

The finished circuit must be housed in an insulating case: I have used a plastic (PP) drug container:
Click the image to open in full size.

For additional safety, I have placed the probe inside a heatshrinking tube:
Click the image to open in full size.

Any other similar option is acceptable, but do not use anything containing metal.

There is no "common" connection in sight, but that's on purpose: such a connection is not only superfluous, but it could lead to to dangerous mistakes: with only two input leads, the room for errors and mistakes is seriously curtailed (though I wouldn't swear it is idiot-proof: that's a dangerous thing to state).

To be continued, and in the meantime, be careful!
. .Circlophone your life !!!! . .
♫♪ My little cheap Circlophone© ♫♪

Last edited by Elvee; 10th January 2016 at 07:24 AM. Reason: typo
  Reply With Quote
Old 9th January 2016, 09:31 AM   #2
AndrewT is offline AndrewT  Scotland
diyAudio Member
Join Date: Jul 2004
Location: Scottish Borders
Thank you.

Can this be used as a scope differential input for amplifier testing where the two "ends" are both at an elevated voltage?

Can one add DC blocking capacitors to the inputs? Would that bring any advantages?
regards Andrew T.
Sent from my desktop computer using a keyboard
  Reply With Quote
Old 9th January 2016, 07:47 PM   #3
Elvee is offline Elvee  Belgium
diyAudio Member
Elvee's Avatar
Join Date: Sep 2006
Originally Posted by AndrewT View Post
Thank you.

Can this be used as a scope differential input for amplifier testing where the two "ends" are both at an elevated voltage?
Well, you could, but in a limited measure: I will come back on that with more details later, but I can already say that this is one of of the performance limitation of this scheme: if you try to amplify a small differential voltage riding on a much larger common-mode one, you will be confronted with CMRR issues, just like any audio bal-to-unbal electronic converter or instrumentation amp.
In my prototype, I hand-picked the resistors to have a better than 0.05% ratio matching between the two dividers, but even that wouldn't be sufficient to measure correctly the voltages across the emitter resistors of an amplifier delivering its full 150Vpp swing.
If the voltage to be measured is somewhat larger, or if you know what to look for (for example measuring a small AC voltage affected by a large DC offset), and your resistors are accurately matched, it is possible, but the main purpose of this probe is to measure large differential voltages whilst tolerating large common-mode ones.
With the values indicated, the CM voltage could reach almost +/-1kV, which is clearly overkill for audio applications. You could use a smaller ratio than 1/100: this will improve SNR issues, but not the CMRR ones.

Matching the resistors to a higher degree is possible, but with ordinary opamps, this will only help the LF rejection, not the HF one

Can one add DC blocking capacitors to the inputs? Would that bring any advantages?
Yes you can, it will rid the output of any DC component, including the common-mode one, which is likely to be the most problematic
. .Circlophone your life !!!! . .
♫♪ My little cheap Circlophone© ♫♪
  Reply With Quote
Old 9th January 2016, 09:20 PM   #4
JMFahey is offline JMFahey  Argentina
diyAudio Member
JMFahey's Avatar
Join Date: Mar 2009
Location: Buenos Aires - Argentina
  Reply With Quote
Old 11th January 2016, 08:43 AM   #5
Elvee is offline Elvee  Belgium
diyAudio Member
Elvee's Avatar
Join Date: Sep 2006
Before going further, here are some useful reminders:
  • Do not use the probe in a "half-finished" state (ie naked PCB with flying leads)
  • Make sure it is properly encased in a completely hermetic, insulating case
  • Before you definitively close the case, make sure no foreign object has accidentally found its way inside: solder splash, cut wire, washer, etc, ....
  • Secure the input leads properly, or block them so that they cannot be ripped off; alternatively, use female receptacles
  • Before you connect or move the inputs, be sure to always power off the DUT. Never make a manipulation on a live circuit.
  • If you intend to use this probe in a "difficult" environment (humidity, dust, grease, dirt, ...) apply a silicone-based conformal coating to the board

Now let's talk about performance.

Here is the 10KHz squarewave response:

Click the image to open in full size.

It is somewhat rounded, but perfectly recognizable. The measured -3dB bandwidth is 1.5MHz, with a LF356 as opamp and the crude compensation shown on the schematic.
The behavior is almost identical with a LF411 or a TLO71.
This means that the bandwidth is primarily limited by the compensation, not the opamp itself, and before upgrading to a faster type, the compensation should be refined.
The compensation relies on the self-capacitance of the input resistors; this capacitance is not only very small, but it is also "impure": because of the distributed coupling to the opposite side, the PCB and the ambient space, it cannot be compensated by pure, lumped capacitors.
If you want to exploit the full bandwidth of the opamp, you would need a number of RC networks instead.
I didn't take the time to tweak this aspect, because it was not needed for the application in mind, but it is probably possible to gain one order of magnitude with some patience.

On my prototype, the LF CMRR is about 60dB. It begins to degrade as of ~25KHz.

The LF figure can be improved with a tighter resistor matching, but it will be difficult to improve the HF performance: the degradation is caused not only by the opamp itself, but also by the layout: it is very "open" for safety reasons and the insulating case makes it sensitive to proximity or hand effects.
Reconciling shielding and safety would be very difficult at an amateur level, and shouldn't be attempted.

These performances mean it would also be usable for basic troubleshooting of ordinary SMPS's: it is sufficient to assess the presence of a signal and appreciate its global outlook, but finer details like transition times will be completely lost.
For development work, it would be useless.

If great DC accuracy is required, the opamp can be equipped with an offset trimmer.

The resistors values and ratio's can be modified to suit the exact application: I have chosen values as low as possible whilst keeping the worst-case leakage < the 250µA limit.
Lower values are in principle preferable, because they are more stable, and make the probe less sensitive to electrostatic effects. If required, the value can be made much larger, like "standard" 10Meg for instance
The resistors I used have a theoretical limit of 3.5kV, which means 7kV for the pair, but the 1Meg value mean they are in fact dissipation-limited to a total of 1kV, which matches nicely the common-mode limit with 12V supplies.
Note that the theoretical 7kV are not useless: they still apply for pulses, and that matters very much for safety.
More than a pair of resistors can be used on each side, but not less, for safety/reliability reasons.

The current consumption is ridiculously low: ~3mA on each supply rail, meaning the supply can be simplified to the extreme: a 1~3VA transformer, a pair of diodes for half-wave rectification, a pair of 220µF for filtering and 78L12/79L12. 12V zeners would also be perfectly sufficient here. Do not forget to earth the PSU.

This probe would also be perfect for work on tube power amplifiers: its limitations would not be problematic there.
For preamp work, the impedance is too low, and 10Meg or higher should be used.

I also include the sim file:
Attached Images
File Type: png SmartP.png (93.4 KB, 62 views)
Attached Files
File Type: asc SmartProbe.asc (2.2 KB, 5 views)
. .Circlophone your life !!!! . .
♫♪ My little cheap Circlophone© ♫♪

Last edited by Elvee; 11th January 2016 at 08:57 AM.
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Test Set for Nondestructive Safe-Area Measurements Tarzan Solid State 26 29th July 2010 03:02 AM
Direct from the mains? Jonathan Bright Tubes / Valves 2 12th September 2008 10:36 PM
Mains current measurements. x-pro Power Supplies 6 9th June 2008 06:53 AM
Direct Impulse Response measurements jzagaja Multi-Way 33 4th October 2007 11:33 AM

New To Site? Need Help?

All times are GMT. The time now is 04:02 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2