Need help: spikes in current measurement signal conditioning circuitry - Page 1
Forum section: electronics / projects

author: balage
author_rank: Regular Contributor
timestamp: July 17, 2019, 11:59:09 am
content: Hi All,Background: I am developing an industry 4.0 power meter. I can measure the power consumption of the machine on one phase, it can calculate everything based on the measurements, and send everything to the server for further analysis.Basics: I have done the field tests, and have found serious problems. You can see the problematic part of the schematic down below. S1 is a LEM HAIS50-P type hall-effect current transducer. U5 and the surrounding resistors form a subtractor amplifier, so the resulting voltage will be in the range of -0,635V - 0,635V (in case a -50A to +50A input current) and relative to the GND1 ground. This subtractor amp is required because the transducer outputs the voltage on a 2,5V reference potential.Problem: I have connected the circuitry to the machine, one of the phases go through the current transducer. The whole device is powered from the line (L1 and neutral). Once the machine, that draws around 5 amps, is turned on, spikes generated between TP1 and TP2 test points. It seems that the transducer produces them. The problem is that they seems to be pretty huge, more than 20Vpp, while the power meter can tolerate 250mVpp. The IC seems have survived until now, but it will not live long I guess.Here is one of those spike zoomed:Question: How can I suppress these spikes? What kind of filter circuitry should I put to avoid them? Have you ever faced a problem like this? I should have visited the field earlier to investigate the behavior.Thank you very much for your time.

author: balage
author_rank: Regular Contributor
timestamp: July 18, 2019, 12:36:37 pm
content: I was thinking on this problem. I cannot understand how can I even decide if these spikes are coming from the current transducer or coming from the ACDC brick. I does not answer if I measure at different point as the disturbances are everywhere.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 18, 2019, 01:14:09 pm
content: First you'd have to make sure the spikes are really there and do not come from the probing itself.Then we haven't seen your layout either...

author: duak
author_rank: Super Contributor
timestamp: July 18, 2019, 06:25:21 pm
content: I have used the LEM current sensors that produce a current output rather than a voltage output like this one. The LEM sensors are very good at rejecting noise so I suspect another cause.I agree with SiliconWizard that the voltage pulse is a measurement artifact caused by the transient current conducted by the oscilloscope probe. The transient current is converted into a differential voltage that is shown on the oscilloscope. Try making a common mode choke by looping the oscilloscope probe cable through a high mu core as in the picture. The small snap on cores will help but for a problem like this you will need are larger core with higher permeability (> 500 H/m) to present enough common mode impedance to limit the current into the probe. If you have more cores, you can try adding them to other probes and to the AC line cord.Is the power meter IC on this board or do the output signals go to another assembly?

author: balage
author_rank: Regular Contributor
timestamp: July 18, 2019, 09:20:39 pm
content: Thanks for your replies.I have attached the layout. U1 is the power meter IC type CS5463 from Cirrus Logic. You can see the wirings of the 3 phases. It may be also problematic that the high current wires run close to the electronics.I have repeated the measurements in my home lab, so the conditions are not the same as on the field. Now I can only test with a one phase load, there is an heating resistor dummy load, that draws 5 amps, and there is a hairdrier. The scope probe is not connected directly, but with a 20 cm long RG174 wire to mitigate the pickup. See the pic.When the whole device was plugged in the following transient was generated.Otherwise the output signal of the whole current meas circuit is like the following. The signal looks basically the same with the resistive load, but with higher amplitude. No change in noise.But here comes the spikes: transients are generated when I turn the either the resistive load or the hairdrier. E.g. here is a transient by the resistive load.I'm tired like hell, tomorrow I will solder another coax cables to different point of the PCB to see if the spikes are the same in time and in amplitude everywhere. I will also have some ferrite cores as duak suggested.

author: duak
author_rank: Super Contributor
timestamp: July 18, 2019, 10:48:35 pm
content: I forgot to mention that the frequency of the transient waveform is outside of the bandwidth of the LEM sensor and the differential amplifier so it is unlikely that they are causing the problem. They may be affected by the transient, but solve this problem first.Try this experiment: leave the oscilloscope probe ground connection where it is but clip the probe tip to the ground probe and then repeat the transient. I think you will get much the same waveform. The probe is convenient but is a very good antenna and can pick up high frequency interference.Using one coax cable directly to the oscilloscope is a very good idea because it minimizes loop area. Looping this cable through a ferrite core can further reduce the interference.Best Wishes,

author: StillTrying
author_rank: Super Contributor
timestamp: July 18, 2019, 11:24:20 pm
content: Where the coax is soldered across C5 it looks like the signal and GND are the wrong way around.

author: duak
author_rank: Super Contributor
timestamp: July 19, 2019, 04:21:10 am
content: Good catch StillTrying - is your first name Sherlock perhaps?If the cable is connected that way, & it seems like it is, that would do it!

author: balage
author_rank: Regular Contributor
timestamp: July 19, 2019, 06:40:27 am
content: Quote from: duak on July 18, 2019, 10:48:35 pmYou have enlightened me. I was totally wrong.But it is always hard to find where are those transients coming from. So I've done a quick measurement to lock out the LEM sensor as the source. With no wire through the sensor there were the same transients. Going forward, I have connected the load to a twin socket with the device. AND: when the load was turned on, the same transients appeared. So the transients are coming in through the power line!! BTW there is a RAC04 series and a RAC01 series ACDC converter to provide power. So if this is all true than a power line filter should help. I will verify this thread.https://hu.farnell.com/corcom-te-connectivity/10emc1/filter-10a-1-phase/dp/9586474?st=power%20line%20filterI will also try to make the correct probing as you have mentioned.

author: balage
author_rank: Regular Contributor
timestamp: July 21, 2019, 05:46:46 pm
content: Quote from: duak on July 18, 2019, 10:48:35 pmHere are the results regarding those above. I have connected the probe tip and the ground to the same wire: the transients were almost the same. I have then shorted the ground and the tip of the probe directly and placed it near the device: the transients were almost the same.I have then wired a cable directly to the scope with minimal leads to the capacitor. The result is conspicous, see the before-after screenshot below:[ Specified attachment is not available ]This all means that the PCB has a wrong design, as there is a big loop around the filtering capacitors:

author: StillTrying
author_rank: Super Contributor
timestamp: July 22, 2019, 11:20:26 am
content: "This all means that the PCB has a wrong design, as there is a big loop around the filtering capacitors:"Not necessarily. I don't understand the differential GND going to the metering IC, I don't think it does anything useful.So what's the plan for measuring the noise spikes, that mostly don't exist.For a difficult case such as noise spikes across a component, I always use 2 scope channels. One probe connected across the component and the other probe shorted to the GND as near to the component and other probe as possible, and with both scope probes following exactly the same straight path to the scope. And then compare the difference between the 2 traces.Both scope probes have to be well matched at HF, but you can check that by having them both shorted to GND, or both across the component, where both traces should be identical.

author: balage
author_rank: Regular Contributor
timestamp: July 25, 2019, 10:56:22 am
content: I have tried the measurements with two probes, as you've mentioned. One of them is shorted while the other one is connected to the capacitor.I don't know why, but the transients are displayed/measured with opposite polarity.The situation seems like"noise spikes, that mostly don't exist."The interesting thing is that the power line filter has not helped at all. The load and the device were plugged to the same wall socket, while the power was fed to the PCB through the filter. The transients are the same.There were another trial to measure: I've prepared a triaxial cable that had it outer shield connected to the power line's ground while the inner shield and center conductor were connected to the capacitor. Nothing. The transients seemed to be the same.It is not so easy. Still I cannot judge if those transients are there or not. Or if so, than how big are they.

author: duak
author_rank: Super Contributor
timestamp: July 25, 2019, 05:07:41 pm
content: Balage, I am not familiar with the oscilloscope you are using - is it a Rohde & Schwarz? Is one of the channels inverted? Can you display the sum of the two input channels? When I took at the two waveforms and take their instantaneous sums, I think most of the noise will be eliminated. It will not be perfect if the sum is performed after digitization in the oscilloscope. In this case, common mode cancellation is better performed by analog electronics.I also do not understand the measurement scales and your exact test layout. The oscilloscope indicates a 141 Vp-p amplitude? Would you provide a simple connection diagram of your measurement setup including power supply connections to everything connected to the circuit under test?Were you able to get some ferrite cores to place on the coaxial cables? This reduces the common mode transient current before it enters the oscilloscope. If you only have one ferrite core, run both cable though it. If you have two cores, try various combinations - two cables through both cores, one cable through each core and so on. Also try a core on the power cable to the oscilloscope because the transient may also be present on the mains connection.

author: StillTrying
author_rank: Super Contributor
timestamp: July 27, 2019, 01:36:03 pm
content: I think the shorted to GNDCH2helps show that nearly all of the 80V spikes aren't real. But I don't know why the induced spike noise on that CH is showing as just one polarity, it should be impossible."I don't know why, but the transients are displayed/measured with opposite polarity."I don't know why either!, are you sure that one channel wasn't inverted. When it comes to 22ns wide pulses, the 22nF and 220pF's should mean thateverythingis shorted together there, and both channels identical.It's a mystery.

author: balage
author_rank: Regular Contributor
timestamp: July 31, 2019, 02:01:35 pm
content: Yes, it is a Rohde RTH, the 4-channeled version. It is great that is has isolated ones and working from a battery.Maybe the reason for the signal being with one polarity is that the GND of the channels is the GND of the whole circuitry. I have double checked, the channels are not inverted. And here is the most annoying thing: when I change the cables of CH2 and CH3, the signals look the same!! Also, if I swap the wires of one of the coaxes, the signal looks the same. So I think it is coming not from the PCB but induced to the cable or I don't know... I cannot answer all this. Scaling is tricky as well. I have realised that it produces the same 2-3DIV high spikes in the 5V/DIV range and in 40V/DIV range as well.The scope itself is calibrated and working good. It seems not the scope nor the circuit is bad, but the designer should be fired. Jokes aside, I will talk about this above with somebody from Rohde to investigate this paranormal measuring thing.Quote from: StillTrying on July 27, 2019, 01:36:03 pmWhen something like this happens, I always regret I've not paid enough attention at the university...The ferrite rings have not helped, everything looks the same.When both coaxes were shorted and soldered to the GND of the circuit, it was producing the same spikes. So the transients are not there. I am stepping forward and will continue the field tests.

author: duak
author_rank: Super Contributor
timestamp: July 31, 2019, 04:51:59 pm
content: Perhaps the oscilloscope has an Hieronymous Effect sensor:https://en.wikipedia.org/wiki/Hieronymus_machineBalage, are the two cables from the circuit to the oscilloscope the same length and beside each other? I wonder if there is any chance that the two cables form a loop with the switched line current passing through the center. This might explain why one is inverted.

author: StillTrying
author_rank: Super Contributor
timestamp: July 31, 2019, 05:28:30 pm
content: I think there's quite a bit of evidence that it's the scope or the probing, and that you'd be better off with 2 proper scope probes and the scope about 1 meter away before asking Rohde, but if you do end up asking them let us know what they say!

author: chuckb
author_rank: Frequent Contributor
timestamp: August 01, 2019, 12:11:07 am
content: Something caught my eye.The scope display is showing 40V / division with coax inputs, 1:1 probes. I would expect there to be a maximum of 10V / div with 1:1 probes.The manual lists 100V / division max when using 10:1 probes. So with coax I'm guessing that the max will be 10V / div. This scope does not automatically compensate when probes with different attenuation are installed so there has to be a manual setting somewhere in the menus.The two channels are electrically isolated from each other so it may help reject high freq noise if the BNC connectors are electrically connected with a strap right at the scope.Good Luck!

author: balage
author_rank: Regular Contributor
timestamp: August 01, 2019, 07:46:07 am
content: Quote from: duak on July 31, 2019, 04:51:59 pmThere is the "RTH-B99: Advanced Hieronymous Effect sensor" option installed.This is a must have feature.The cables were run beside each other, yes.Quote from: StillTrying on July 31, 2019, 05:28:30 pmI will let you know the consequences of course!

author: StillTrying
author_rank: Super Contributor
timestamp: October 10, 2019, 01:17:11 pm
content: Quote from: balage on August 01, 2019, 07:46:07 amWhat was the answer to the inverted trace in Reply#11. I'll bet it was something to do with the scope's isolated channels.

author: balage
author_rank: Regular Contributor
timestamp: October 10, 2019, 04:12:15 pm
content: I have not forgotten to write here, but the meeting on this topic has not happened yet. The guy I've mentioned will come soon.However in the meantime the device is operating good and without any problem.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 11, 2019, 12:05:58 am
content: Common mode noise. What you are seeing is most likely not in the circuit itself, but introduced by the probe.Does the circuit have ground planes?Tim

author: balage
author_rank: Regular Contributor
timestamp: October 11, 2019, 09:42:21 am
content: Actually the system has two isolated parts, one is tied to the power line (here is the Hall-sensor, signal conditioning, etc...) and the other part is isolated from the power line. This isolated part has the OrangePi and some digital circuits. So the whole system is floating, the power line ground is not connected anywhere.Finally it has turned out the spikes are fake ones, kind of picked up transients by the probes. However it is still hard to decide what is fake and what is real transient in such a circuit.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 11, 2019, 11:55:45 am
content: Weird, if it's all line referenced then why use a higher noise, lower accuracy hall effect sensor?Tim

author: balage
author_rank: Regular Contributor
timestamp: October 12, 2019, 08:41:09 am
content: Because up to 50 amps needs to be measured. No way to use a shunt.After the signal conditioning circuitry it is much better.

author: balage
author_rank: Regular Contributor
timestamp: January 05, 2020, 11:54:10 am
content: Well, we have disgussed the things with the guy I've mentioned.1., Those spikes are there actually, as they are transients generated by the power switch, or by the power line plug.2., We have not discussed the problem why I have seen spikes with those high amplitudes, as I was not able to reproduce them.3., The probing itself (soldering RG174 as short as possible to the PCB) is correct, it is how such measurements are supposed to be probed. The ferrite core on the cable matters actually, parameters of the core matter much than I tought first.In the meantime I have ignored this problem. It caused only the power meter IC to resetted not too often, but it can be managed in the firmware.

author: coppice
author_rank: Super Contributor
timestamp: January 05, 2020, 12:08:32 pm
content: Quote from: balage on October 12, 2019, 08:41:09 amThe CS5463 was specifically designed for utility meters, where a shunt is used to measure up to 40A, 60A or even 100A with much better than 1% accuracy. "No way to use a shunt" would be a big surprise to most other people using this chip.

author: balage
author_rank: Regular Contributor
timestamp: January 05, 2020, 01:44:21 pm
content: Hmm... You are right. But what kind of shunt it is inside utility meters? I mean the current itself is not routed onto the PCB, the shunt is the terminal block itself. Isn't it?Also, a consumer one can measure 63 A, what means actually 100 A, because they can deal with a temporary overcurrent. I think.I had to find a solution to put things into this box, so I have chosen the Hall-sensor version. I cannot still image how to deal with let's say 50 amps on a pcb.

author: StillTrying
author_rank: Super Contributor
timestamp: January 05, 2020, 02:01:08 pm
content: Quote from: balage on January 05, 2020, 11:54:10 amWell we know that, the question was is the noise in the GND and signal exactly the same so that the IC's input doesn't see it.In this thread I think there's lots of evidence that the spikes in the signal aren't real, or at least much less than shown by the scope.