How to prevent spikes in isolated DC power rail? - Page 1
Forum section: electronics / beginners

author: Baltazar
author_rank: Contributor
timestamp: May 21, 2021, 10:58:26 pm
content: I built a double DC multimeter comprising 2 completely independent boards with MCU + ICL7135. Power supply for each one is as follows:- small mains EI transformer (a couple of watts)- bridge rectifier + capacitors- linear voltage regulatorsAfter final assembly into a grounded metal housing, I found that they are very sensitive to disturbances: unit A can detect false key presses or its MCU can even reset when I turn on/off the unit B.I separated one unit and was able to reproduce the misbehaviour by just touching the mains live line by a screwdriver at the entry into the housing. The screwdriver wasn't connected anywhere else, I was holding its isolated handle in my hand.I measured the 3.3V rail from the regulator when the screwdriver's metal part gets into contact with the mains live. The circuit's GND was grounded via the scope's probe during this time; it is intended to be floating during normal operation. Here is the spike I get:Similar signal can be observed on several GPIO lines of the MCU. While false key presses could be filtered out in FW, this makes me worry about component damage. In fact, I am surprised that everything is still working.Given the ns time scale of the spike, I imagine it cannot come via the transformer but must be injected by radiation. So I put some metal foil between the mains and the low voltage sections of the system, connected to the ground. No improvement. With RC snubber on mains neither.Any explanation & ideas how to get rid of this strange behaviour?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 22, 2021, 06:50:59 am
content: Well, it takes two. It seems you have a source of interference, and also a susceptible device.You must improve the grounding and filtering on either one, preferably both.The rectifier can produce short spikes like that due to reverse recovery. This isn't usually a problem as rectifiers have soft recovery that suppresses that, but perhaps your diodes aren't what you expected.The turn-off spike is far stronger, typically being a few thousand volts in about as much time, as the switch sparks.Tim

author: Manul
author_rank: Super Contributor
timestamp: May 22, 2021, 11:40:28 am
content: It is not very clear for me from this description. One thing I can say, is that isolated circuit inside a metal case at small distance can make things worse. There is a noticable amount of capacitance formed between PCB and case. If PCB is "riding" at some AC voltage, or especially if high frequencies are involved, then you may experience interference. Generally, the shield of circuit should be referenced to that circuit. Otherwise it is often even worse, then no shield at all. One way whould be to shield PCB with its own shield (referenced to PCB ground). That would be like a metal box inside metal box. But only outside box is mains earth referenced. Inside box is floating together with all the circuit. This could be is not very practical. Another option is to use capacitors between PCB ground and metal case. So at least at high frequencies the PCB will not be floating. Also some filtering caps at AC side of power supply might be useful. And a choke.

author: Baltazar
author_rank: Contributor
timestamp: May 22, 2021, 01:43:03 pm
content: Quote from: Manul on May 22, 2021, 11:40:28 amAs I wrote before, the PCB ground was directly connected to earth during measurements and this did not prevent the spikes.In the meantime, my analysis went further. Forget about this particular multimeter circuit. Even if I take a DC power supply and hook a scope on the output, I can observe very similar spikes generated by touching the mains live with the screwdriver or a piece of wire. The mains plug I touch is >1m away from the power supply. I tried (A) connecting live & GND lines of the scope probe to the power supply output terminals as well as (B) measuring each output terminal with a separate scope channel without reference to ground and subtracting them. Both showed same spikes on the power supply output.I started to wonder how all my other circuits can stably operate in such conditions.

author: Baltazar
author_rank: Contributor
timestamp: May 22, 2021, 02:07:26 pm
content: Quote from: T3sl4co1l on May 22, 2021, 06:50:59 amThe rectifier diodes too indeed create some spikes on the secondary AC voltage when they turn from conducting to blocking state, but of much smaller voltage. They are of course in phase with the mains 50Hz. And they do not propagate to the DC rail. While my "screwdriver generated spikes" are asynchronous to 50Hz - I checked that they can appear at any time during mains power cycle.Any concrete proposals how to "improve the grounding and filtering"? I tried inserting a NTC resistor + capacitor + varistor + choke in their original configuration that I took out of a PC power supply input stage. Nothing changed.To avoid sparks at switch opening, any better idea than an RC snubber parallel to the transformer primary winding? I prefer not to put anything across the switch contacts since I want the circuit to be completely deactivated when the switch is open.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 22, 2021, 04:09:34 pm
content: You may not may not see that ripple in the DC rail, true. But that's the problem. At those frequencies, signals don't stay in wires. The layout itself is questionable, as is the probing method.The best starting point is to build everything on ground plane (e.g. deadbug style), so that signals aren't coupled into each other willy-nilly, they all act with respect to the nearest conductor -- which shall always be ground. This reduces external fields so signals stay in wires better.At these frequencies, a meter of "ground" wire is wet spaghetti. Galvanic grounding is meaningless.Tim

author: Manul
author_rank: Super Contributor
timestamp: May 22, 2021, 05:02:41 pm
content: Quote from: Baltazar on May 22, 2021, 01:43:03 pmI understand that, but grounding through scope ground clip is connecting metal case to PCB through a very long wire. What I was suggesting is to make short, low impedance RF path, using a capacitor.You have a shielded case - that's good. You also have AC input and meter inputs. So two paths where something can enter. If you RF short these paths to metal case (shield), there will be almost no interference possible to your circuit, both conducted or radiated. That's it, theoretically.Edit: My personal verdict is same, what I wrote before, floating a sensitive circuit inside a grounded case and having no RF path between them is bad. And what you measure with a scope could very well be just common mode noise, so how you probe is also important.

author: Baltazar
author_rank: Contributor
timestamp: May 22, 2021, 07:03:54 pm
content: Quote from: Manul on May 22, 2021, 05:02:41 pmI gave it another try with connecting the PCB GND to the grounded case with the shortest possible thick wire. No difference. Replacing the wire by 100nF neither. BTW, the AC input already has the standard pair of capacitors from live and neutral to earth, they are part of the input socket. And meter inputs are shorted during all these tests.But a 100ohm + 0.1uF snubber on transformer primary side at least helped to avoid MCU resets of unit A when turning on/off unit B. Given that those spikes generated by touching the live line can be seen everywhere, not only on this particular board, I will fight false key press triggering in FW.Ideas still accepted, of course

author: radiolistener
author_rank: Super Contributor
timestamp: May 22, 2021, 08:07:56 pm
content: use ferrite RF choke on any wire which come outside of device metal shield - this is most important. Use pass-through capacitors to enter wires into metal shielding of the device. Check that device metal shielding is continuous and don't have large holes.

author: coppercone2
author_rank: Super Contributor
timestamp: June 24, 2022, 07:49:55 am
content: have you considered moving towards bio-optical circuits instead of relying on electronic technology? Is this for the centurions?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 24, 2022, 06:22:46 pm
content: This is posted in the beginners section by someone with 12 posts (whatever that means) and a self designed circuit.With that combination almost anything can have been wrong, or simple things can have been omitted neglected or forgotten.One thing I've learned is to never ever build a power supply for a microcontroller without some kind of inductor or choke in it's power supply circuit.Another thing, Are there even decoupling and buffer capacitors on this circuit, and are they connected properly?How is the power supply built? Is it even stable?