Bob Minchin wrote, >The real way to do this is with a current transformer which provides >safety isolation and is easily made from a miniature audio >transformer salvaged from and old fashioned transistor Amen, Bob, this is the way to go. I would go further to say that I hope the line current is that of a somewhat pure reactance, that is, sinusoidal in nature. If you are monitoring the current into an off-line rectified switching supply, say, you will have huge current spikes only at the peaks of the AC voltage. Standard formulas for RMS values which would apply to a sinusoidal current, don't work for this case. Perhaps some code which detects the frequency, thus the period, and roughly integrates the current waveform would help. Mike