Thanks for all the activity over the weekend! Yes, this is an industrial project. So the "few" kVA are nothing. And while I do have 16A 3-phase in the basement I wouldn't want to heat it with 11kW for weeks
First, because this leads down a rabbit hole: current measurement is not needed, because the load resistance is orders of magnitudes higher than relay contact's, so the current can be considered constant (defined by the load).
I was playing around in LTspice. See the schematic, which uses parts I have laying around.
The ground symbol is not mains earth, but the ground for the measurement circuit and is equivalent with mains neutral in this case. 5V will be supplied by an isolated supply, that is then referenced to neutral.
I do have USB isolators for the connection to the PC.
R_load is about 40 Ohm, which results in about 6A RMS.
R_parasitic is all the resistance in the traces leading to the relay pins
R_contact ist the resistance I want to measure. I know I could have assigned it directly to switch "MYSW", but it's clearer this way.
The two 2.2k resistors (R4, R5) before the diodes are there to limit the maximum current through the clamping diodes.
the other two 2.2k resistors (R2, R3) are voltage dividers. I will most likely change their value to adjust to our definition of "failed" contact resistance. They might not be there at all. They are needed when R_load + R_parasitic increases above about 0.6 Ohms, because at that point the upper diodes would start to clip the signal.
The rest is just a simple differential amplifier. I might need additional Schottky diodes to clamp the inputs closer to the rails (I don't have 400V rated Schottky diodes for the main clamping diodes at hand).
You can see the simulated result at the output in the graph. Where the output is clipped (right part from 300ms onwards), that's when the relay is open. I don't care about the value for that (might use it to check for welded contacts though). I'm interested in the change over thousands of relay switching cycles in the non-clipped part (left up to 300ms). The real cycles will be more like 2s on and 8s off, as I said. I chose 300ms here to show the waveforms better.
Sholdn't that work? As said the absolute values aren't that critical, but tracking changes accurately is. At the start of the measurement we will measure current with a clamp meter and voltage drop over the relay contacts with a multimeter to have reference values for the initial resistance. Then the setup will (hopefully) run for weeks (maybe with a daily clampmeter/multimeter check).
I'm now mostly wondering, how I will actually measure the value. Trying to catch the peak in software? Smoothing caps in parallel with the diodes? Smoothing caps at the output?