I have designed a circuit to measure high currents indirectly using a TAK8348 current transformer:
https://cdn.shopifycdn.net/s/files/...-75c4-4b1d-a63b-a792b07066b4.pdf?v=1616374876
This is the circuit that connects to the microcontroler:

The circuit works fairly ok and can measure to a degree of 0.1A accuratly.
The problem occurs when current flows for a very long time (1h+). When the whole thing runs for a long enough time, it heats up just a little bit, and the ADC signal on the pin increases. This causes the measurment to eventualy be off by 1A (shows 31A instead of 30A).
My question is what would cause this drifting. I have eliminted a change in Vref as a possible reason, since i tried powering the whole thing through an external USB charger and got the same result. The microcontroler (ESP32) isnt more then 10 degrees warmer as well, so that is also not the reason.
The strange thing is that the microcontroler also measures voltage, which is much more complex and sensitive circuit, and that stays perfectly accurete even after a long time. So by that i am deducing that the issue might be in the part of the circuit in the picture.
Any recomendations for possible causes or troubleshooting?
https://cdn.shopifycdn.net/s/files/...-75c4-4b1d-a63b-a792b07066b4.pdf?v=1616374876
This is the circuit that connects to the microcontroler:

The circuit works fairly ok and can measure to a degree of 0.1A accuratly.
The problem occurs when current flows for a very long time (1h+). When the whole thing runs for a long enough time, it heats up just a little bit, and the ADC signal on the pin increases. This causes the measurment to eventualy be off by 1A (shows 31A instead of 30A).
My question is what would cause this drifting. I have eliminted a change in Vref as a possible reason, since i tried powering the whole thing through an external USB charger and got the same result. The microcontroler (ESP32) isnt more then 10 degrees warmer as well, so that is also not the reason.
The strange thing is that the microcontroler also measures voltage, which is much more complex and sensitive circuit, and that stays perfectly accurete even after a long time. So by that i am deducing that the issue might be in the part of the circuit in the picture.
Any recomendations for possible causes or troubleshooting?