Electronic – Can a 2-prong AC/DC converter switch polarity based on inverting the plug

acdc

I got an electrical engineering degree 15 years ago that I barely use. Although I bought a fairly fancy multimeter, I will freely admit to having only a vague recollection of what I did back then… which was mostly discrete math and signal processing (as opposed to circuits).

A friend of mine who has a lot more real-world "electrician" experience was trying to figure out what was wrong with some cameras he owned. They were powered by cheap wall-warts and failing. We were trying to check these power supplies to make sure they were working, as we didn't know if the problem was with the power or the camera. Sure enough, some of the supplies were dead.

We tried to substitute in some switchable supplies to get them working. In the process, I noted with the multimeter that the polarity was different on the switchable supply from the adapters we were trying to replace. As we were plugging in these 2-prong plugs haphazardly into 3-prong outlets, I wondered out loud if we might have the plugs in upside-down.

He looked at me condescendingly and said "Oh, I see. You have a degree in this, do you?"

Well firstly, it's been 15 years, and secondly…while he may know a lot about being an electrician I know about the diode bridge inside the stupid wall wart. And yes, diodes can tell the difference between electron source and electron sink. But if the power is an AC sine wave then it spends as much time in an up cycle as down cycle and so the decision about polarity is in the circuit post-rectification, etc.

(So it was; to change the polarity on the adapter you just changed the terminals on the plug once it had been converted to DC, not before. Fine.)

But the hypothetical question kept nagging me. Given that one of the terminals is ostensibly true ground, would it be possible to build an AC/DC converter whose DC polarity would flip based on which way you plugged it in (and I'm talking about no connection to 3rd prong)? Do such things exist?

Best Answer

No way. Given just a differential, just a pair of connections, there's no way for a circuit to tell which is which.

If you had access to phase information about the grid, you might be able to do it, but as the mains frequency isn't terribly constant, you would not be able to rely on predicting this. Your device would have to get information about the present phase angle of the mains from someplace.

However, if you do have a real earth-ground reference from some place, you could build a circuit to look at the voltage of each supply line with respect to ground. One will be a small drop below the full 120 (or whatever the local mains supply) whereas the other will be slightly above ground. (Neutral return current vs your neutral run's resistance). This would just let you know which leg was 'hot', and you could swap your output polarity accordingly.

A Second Thought

If the power supply has only four connections with the world, two from the mains plug, and two to output the DC, there's no way I can think of that you could deterministically set output polarity based on plug orientation.

BUT

if you're willing to make your otherwise simple supply a lot more complex, you could conceivably make it so that if you pulled the plug and flipped it, and plugged it back in straight away, the output would flip.

Here's the idea: You stuff some kind of micro-controller in the box, that monitors the line voltage, and determines when rising-crossing-zero (or some other phase point) happens on one of the legs. You'd have to reference this to the midpoint of the two supply legs via a voltage divider. The micro could then anticipate when the next such phase point would occur. Now you'd also have to put some kind of super-cap in the box and pick a low power micro that could live off the super-cap long enough for the user to flip the plug. When power comes back, either the anticipated phase change happens when you expect, or half-way between. Half-way between means the user flipped the plug, so your micro flips the output polarity.

Of course, that still would be problematic. If the thing had been unplugged for a while, the micro would be dead, and you'd have to make an assumption about what the output polarity should be. Finding a micro that could last maybe 10 seconds on a cap's worth power while actively chugging away could be easier said than done. Last and not least, this would really only be a novelty gadget.