Problem with SCT013-020A

I am currently making a 3-channel power meter using SCT013-020A. It consists of an adjustable LM317T voltage regulator and arduino nano on pcb, while the sensors are placed near around the pcb. The wires of measured loads were placed around the pcb so that's why I came up to put the sensors around the pcb. It worked just fine when I tested it on breadboard. On pcb, it worked fine at the first time, but it has given wrong value after several times of testing with long duration. I did not know at he first time what kind of problem I had. Then, I have troubleshooted this issue by changing the whole component on pcb. It worked fine but the problem still remains. I changed the components again, and again, the problem still remains. I wonder if the electromagnetic field produced by the magnetic core of the sensor is the one causing the problem which harmful to the components?

The core is not producing a significant magnetic field. The current you are measuring has significantly more magnetic field.

What are you trying to measure with a 0-20A sensor? Nothing on an Arduino board draws 20A.

Thank you for the reply. I am trying to measure the power absorbed by the home electrical devices such as irons, rice cookers etc. The connection I made is based on https://www.youtube.com/watch?v=Z3YSHhS39Bc&t=2s. So, It has no problem on the arduino despite how much the current I measured is. The reason I using that sensor is just that that sensor is in my stock.

Does the current of that devices I measuring impact the components?

Trying to measure 10mA with a 20A sensor either won't read anything.

That sensor only outputs 0-1V. Use the 1.1V internal reference to maximize the counts per range. That will make the resolution about 21mA per count.

Also don't forget you must only clamp either the line or neutral wires connected to the device. Clamping in the sensor at once, results in 0 field and 0 current reading.

Yes, I actually did that. That’s why I explained that the circuit worked fine when I tested it on breadboard but on the pcb, it worked fine for the first time and then suddenly threw an error after a long time running (I mean it can not show the correct value anymore). I use a 2.5V reference by using a voltage divider and connect it to the capacitor before analog pin. I made the prototype depicted in the picture below. The pcb mounted at the bottom is used to make a parallel connection. The pcb of the power supply and the arduino is placed above it and the spacers while the sensors are clamped to the line wires of each channel.

Check the printing on the sensor.
The model you listed has a 1volt output, and the sensor used in the article has a 50mA output.
The only difference is that the 1volt output sensor already has a build-in burden resistor.

Those sensors output AC, so you must bias the sensor mid-voltage to avoid sending negative voltages to the analogue input. See this recent post where an ADS1015/1115 is used in differential mode to read two of those 1volt sensors.

The wires seem thin for 20Amp.
You could make the sensor twice as sensitive by running both neutral and phase wires through the clamp, but in opposite directions.
Leo…

Wawa:
Check the printing on the sensor.
The model you listed has a 1volt output, and the sensor used in the article has a 50mA output.
The only difference is that the 1volt output sensor already has a build-in burden resistor.

Those sensors output AC, so you must bias the sensor mid-voltage to avoid sending negative voltages to the analogue input.

The wires seem thin for 20Amp.
You could make the sensor twice as sensitive by running both neutral and phase wires through the clamp, but in opposite directions.
Leo…

Thank you for the reply. Yes, the wires seem thin because I just want to measure the power of home electrical appliances which do not draw the current exceeding 10A. I use the sensors because it is only those in my stock. I have made sure that I have followed the procedure on how to interface the sensors with the arduino. The actual problem I have is why the system can not work correctly anymore after a long time running test (It is good for the first time running, I got an error percentage about 2%). Does it either because of me laying the parts in the prototype incorrectly or I actually have another problem? I fixed the issue by changing the pcb of power supply and the arduino. It worked good again but then the same issue still followed. The difference between breadboard test and pcb test is only the distance of the sensors and the arduino.

Post a hand-drawn diagram with values and voltages. And the code (inside code tags). Read the forum rules before you do. Leo..

Wawa: You could make the sensor twice as sensitive by running both neutral and phase wires through the clamp, but in opposite directions.

Or just loop the same wire around the clamp multiple times. But each loop reduces the range by that factor. So 4 loops makes 0-20A into 0-5A.

jendiiw: I use a 2.5V reference by using a voltage divider and connect it to the capacitor before analog pin.

Using the 1.1V reference will provide twice the resolution and 10x the temperature stability over the resistor divider. Since the sensor output is 0-1V, using 2.5 reference you only use 40% of the 10 bit range. Using 1.1V reference allows the use of 90% of the 10 bit range.

jendiiw: I fixed the issue by changing the pcb of power supply and the arduino. It worked good again but then the same issue still followed. The difference between breadboard test and pcb test is only the distance of the sensors and the arduino.

So it worked but it didn't? You are going to need to provide exact details of what setup worked and what setup doesn't and when it doesn't work, details on what doesn't work (should read X but reads Y).