Today, "on the bench", I connected the "board" with current transducer and voltage transducer, to the microcontroller.
I plugged inputs of the microcontroller into my military "universal battery charger".
I immediately had a disappointment by learning that the voltage reading was jumping all over the place. Further investigation revealed the following:
1) the input into voltage transducer was from a military "battery charger", which was a rectifier/transformer setup, fully unfiltered, looking like rectified sinewaveabs( sin(60 * 2*pi * t) )
2) If, instead of that, I fed input from a nice regulated power supply, the readings would be very stable.Hence, my quite obvious conclusion is, since my 3 phase rectifier in the welder also delivers "wavy" DC, input needs to be somehow filtered so that a reading over a few cycles is obtained.
I suspect that it is a very simple matter, I should use a capacitor and a resistor. Impedance of the inputs of the microcontroller is well into megohms (30-50M, according to Comfile).
My question is how do I choose R and C so that I get a nice reading that is the exponential average of last, say, 5 cycles.
My feeling is that for 5 cycles, I should have RC = 5/50s, or RC =
1/10.From that, I could choose something like C = 0.1 uF, R = 1 MOhm.
Is that right?
----input----R--------- input of uC | ===C | ____ gnd _______+______ gnd of uC
i