I need to probe the primary side of an SMPS in for repair. This side is not mains isolated, and could be hot/live, at around 330V.

My oscilloscope has only a 250Vpk input rating and can only reliably read up to about 100Vpk, so I would at least need a 1:10 probe. However, I don't feel happy connecting a £6 eBay probe to an expensive scope when magic smoke just loves to leak out. Is there a way to make it safer? I guess I could spend some more money on a high voltage probe, but that would cost me more than a new SMPS.

Also, I heard I should get an isolation transformer for the power supply so that I don't short anything out to earth. Is this a good idea? (The power supply is from a TV and does not use an earth pin.)

  • 3
    \$\begingroup\$ I just got my boss to buy a $300 differential probe for this, and it seems to me to be pretty much useless because the CMRR is only 40 dB or so. Trying to measure a 12 V wave on top of a 400 V wave results in 4 V of error. I think I shall return it. \$\endgroup\$ – endolith Jul 31 '11 at 15:16

You need isolation to measure anything connected to the mains, since parts of your scope will also be. One way is to isolate the power supply with a 1:1 isolation transformer, or you can use an isolation probe (costly!). I've known scopes being fried because they weren't isolated.

To measure the high voltage you can simply make a resistor divider. Don't forget to take the scope's input impedance into account, and make sure your resistors are OK for the high voltage. If necessary use multiple resistors in series.

  • \$\begingroup\$ Resistor divider isn't frequency compensated to produce an accurate waveform on the scope, though \$\endgroup\$ – endolith Jul 31 '11 at 15:42
  • \$\begingroup\$ 50 Hz? The waves you're looking at in an SMPS are in the 10s or 100s of kHz. I tried making my own divider the other day and the square wave was terribly distorted, which I believe means it needs to be frequency compensated. \$\endgroup\$ – endolith Aug 1 '11 at 13:15
  • \$\begingroup\$ @endolith - Yeah, forget what I said, I was talking gibberish :-) \$\endgroup\$ – stevenvh Aug 1 '11 at 14:31

Russell is right (as usual) but also excessively long winded (even more than usual).

We have occasionally had to design power supplies that connected directly to mains power. There are two important things we got for this, and one additional very useful item:

  1. Isolation tranformer. These are readily available, and usually have large toroid transformers in them. Ours has two of them in parallel. One thing to watch out for is that they often don't come wired isolated. Ours came with the input and output grounds and neutral connected, which defeats the purpoes. We had to rewire the inside to make the AC output truly isolated from the mains. That means it can float arbitrarily with respect to ground. I've seen others that came this way too.

  2. x100 probe. Even a x10 probe still leaves too much voltage going into most scopes. You can build your own x100, but they are readily available and designed for the higher voltage up front. I wouldn't waste time building one.

  3. A variac. This is just a adjustable autotransformer that can go from ratios of 0 to a bit over 1. Technically that's not needed, but it's useful for two reasons. First, when you're bringing up a power supply you don't want to put full voltage on it immediately. You want to bring it up slowly and test it in stages. You'll smoke a few parts anyway, but this way you have a better chance of understanding what went wrong and avoiding it next time. Second, most isolation transformers are toroids as I already mentioned. These work well and are efficient, but have one nasty drawback. They can hold residual magnetic field for quite a while, which happens if they are turned off at a particular part of the power line sine wave. If later switched on at the right place in the same sine wave so that the first current adds to the existing field, the core can saturate. Then you don't have a inductor anymore but a length of high current wire connected directly accross the input. This causes a large inrush, which can easily blow a fuse or trip a breaker. Bringing up the voltage by turning the knob on the variac builds it up slowly enough for this not to be a problem. For the same reason, it's smart to turn off the system by turning down the variac. This means the variac needs to be connected in front of the isolation transformer.

  • \$\begingroup\$ Why would someone design an isolation transformer that's not isolated...? \$\endgroup\$ – user253751 Jul 15 '15 at 6:13

Are you in UK?

Here follows a longish rant. It may well get boring and repetitive soon and discourage reading. There is some more technical stuff at the end. The temptation is to skip the rest. Do so and die. Possibly. "Are you feeling lucky, punk?" :-) ['Punk' only applies if you skip it and die :-) ].

You are risking working at the edge of your competence level and putting your life at risk. That's fine a long as it's a conscious and intelligent choice made with a proper awareness of all the significant factors involved - after all, we do that when we drive a motor-vehicle on the roads anywhere - especially a motorcycle. Just as with a motorcycle you'd be Darwin Award fodder if you didn't wear a helmet, know the road rules properly, wear a helmet, drive (mostly) on the correct side of the road, wear a helmet, be properly aware of how people typically behaved, wear a helmet or wear a helmet - and THEN behave very very carefully until the ways of staying alive become intuitive, so too here. Do it properly and you may survive to be come an old wise repair man. Don't do so and you'll possibly die.

Hopefully that sets the scene.

A line from an (I think) Bell Helmets ad from decades ago has stuck in my head ever since.

  • "If you have a $10 head, buy a $10 helmet".

Unlike helmets, with mains protection you can in fact build the equivalent of a quality helmet yourself for very little. BUT you can also use or build rubbish. And you may die. What's your "head" worth?

With mains equipment your "helmet" is insulation, or not coming in contact with live conductors. That's obvious but needs repeating and repeating.

All this may sound vastly over dramatised. In some ways it is. People get mains shocks every day and live with no damage at all. That's true. Others do it and die on the first occasion. Every day. With mains you need to act excessively cautiously until the natural tendency to act intuitively doesn't kill you. With luck you can survive mains shocks and worse dozens of times and survive. I've probably had dozens of 230 VAC mains shocks of various severity over the year and survived with no known bad effects. ** Others have died on their first encounter**. Quite literally. I cannot remember when I last received a mains shock (probably decades now). I was lucky to have the chance to learn. You may not have.

  • If you have to ask, as you did, whether an isolating transformer is a good idea then you don't understand the risk or the principles. That's somewhat scary. Read up on it and understand it. Get your helmet and put it on! Now.

  • A high voltage probe (or high enough voltage) is essential. You don't need anything at all fancy - just fancier than what you have. You can easily and cheaply make a high voltage probe. There are dozens of circuits for this on the internet. Read a number. Understand the issues. Understand the issues. The biggest perhaps inobvious one is that resistors have a voltage rating that is unrelated to power dissipation. A 100k resistor with 230VAC mains applied will dissipate about 0.5 Watt. A 470k will dissipate about 100 milliWatt. You may think that a 470k resistor, 0.5 Watt rated would be safe for use with 230 VAC mains applied. Usually it would not be. 230 VAC Mains peak wrt ground is 325 V. Peak full wave rectified you can get double that. A resistor may be rated at 200 VDC or 300 VDC. Or 100 VDC. If the voltage rating is exceeded it may break down suddenly. Once main starts to drive current it produces break down products and makes itself a lower resistance conduction path. A 470k resistor that suffers breakdown may become a 10 ohm resistor in about 10 milliseconds. You job is to avoid becoming a 10 ohm resistor yourself.

  • Get and use an isolating transformer. Understand how they work and what they do and don't do for you. Don't assume they are actually working. NEVER rely on your helmet - but wear it anyway.

  • Make or buy a probe that is rated to the peak voltage you may experience. Build a cheap once yourself by all means. But do it properly. Wear your helmet. A cheap HV rated probe may be OK as long as you know why it justifies the rating.

  • Old old advice is to put one hand in your pocket so you do not accidentally do the intuitive stupidity of touching the work with two hands at one. Mains loves a path to ground but even more loves a shorter path via two hands. Hand in pocket is possibly more dangerous as it lowers ability to respond fully. But one hand consciously away from the work is advised.

  • Be aware that work surfaces may be conductive. Putting a PCB with mains on onto a benchtop - even a notionally non conductive one, may life interesting. Or short.

  • There is a trick of floating a scope by removing the earth connection so that the whole instrument floats at mains or what ever potential. This trick has its place. I won't even say don't do it - I will say that this can kill you in 10 milliseconds if you get it wrong - that's in the UK. In the US it can kill you in 8 milliseconds :-(. If you want you and your scope to live consider not running it at a differential anything like what it is rated for. Resistors get old. dust and moisture gets newer. Breakdown happens. Wear your helmet.

  • A proper probe is probably worth more than a new SMPS, you say. Maybe so. You can certainly build one for far less, as above. BUT your life is, hopefully, worth far more than a new SMPS. Wear your helmet.

  • Strongly [tm] consider getting an using an "earth leak circuit breaker" / ELCB / "ground fault interrupter" / RCD / "Little magic box that trips and stops main when you get a phase to ground fault". Know what it will do for you. Know what it won't do for you. Know that it does not help at all for live to neutral or HV to chassis ground type faults.

Does all this scare you? Hopefully yes. Does all this make it seem far more dangerous than it is? It shouldn't. People do die daily from treating AC mains too lightly. You don't need to be one of the statistics.



  • I have gathered there is a problem with the feedback, but I haven't determined if there is some issue in the primary or secondary, or in the optocoupler between them.

It can be extremely hard to find a fault in a feedback system like this.

Seeing if there is at least feedback occurring across the opto link is an easyish place to start.

  • Seeing if there is ever any variation at the opto input (psu output side) shows if it is being driven. If it is always hard across one way or other you have a lead.

  • Then if here is drive, seeing if there is any opto output variation on the primary (mains) side shows you if it is transferring the signal. That's where you need a helmet.

  • Then ...

Here's a reformatting of para 2, sentence 3. I may delete this in due course. The object was to get people to try a bit when reading it.

Just as with a motorcycle you'd be Darwin Award fodder if you didn't

  • wear a helmet,

  • know the road rules properly,

  • wear a helmet,

  • drive (mostly) on the correct side of the road,

  • wear a helmet,

  • be properly aware of how people typically behaved,

  • wear a helmet or

  • wear a helmet -

and THEN

  • behave very very carefully until the ways of staying alive become intuitive,

so too here.

Do it properly and you may survive to be come an old wise repair man.

Don't do so and you'll possibly die.

  • \$\begingroup\$ Ah, well it looks like I will just leave out probing the primary side. I have gathered there is a problem with the feedback, but I haven't determined if there is some issue in the primary or secondary, or in the optocoupler between them. \$\endgroup\$ – Thomas O Jul 29 '11 at 19:37
  • \$\begingroup\$ No no no !!!! I was not trying to put you off. Just trying to keep you alive to live to be as olde as I am :-) (is it obvious :-) ). The points I raised were just as real before I raised them. By all means address the issue - but wear your helmet. The fact that you have turned away suggests you have enough wisdom to recognise the need exists to do things well. That is the absolutely fundamental first step. Congratulations. Now put helmet on and progress suitably carefully. // technical: See in answer at end. \$\endgroup\$ – Russell McMahon Jul 29 '11 at 19:58
  • \$\begingroup\$ Several parts of this are incomprehensible, like the 3rd sentence of 2nd paragraph. Can you go back through and edit it to say what you meant to say? \$\endgroup\$ – endolith Jul 31 '11 at 15:22
  • 1
    \$\begingroup\$ @endolith - My favorite piece of advice I received about this kind of work is to do it all with one hand behind your back. Literally. Basically, the most dangerous type of short is where the current flows in one arm, and out the other, since it passes directly through your chest, e.g. your heart. Holding one hand clear from everything prevents this current path, and, assuming you are wearing rubber shoes, makes it so you can only contact one voltage potential. (You may have current flow through your hand, but that won't kill you, just hurt like hell.) \$\endgroup\$ – Connor Wolf Aug 1 '11 at 9:06
  • 1
    \$\begingroup\$ Rubber gloves would not be a terrible idea BUT may give you a misguided sense of safety. Thin gloves could get a spike puncture through them. And Murphy says that that is likely to be what happens. Thicker ones would start to become a nuisance but would add to safety. Other work may then be more difficult. Some linemen have super thick gloves that allow handling live wires where/if required. Very impressive items. // The isolating transformer is in part doing the same job - but it is placing the "glove" in the ground return line. Only offers one hand protection - not two like gloves do. \$\endgroup\$ – Russell McMahon Aug 1 '11 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.