Analog Input to Digital Serial occasionally quits (Uno)

It seems that you are feeding an AC signal into the Arduino, which wont produce any kind of sensible result.
You need some kind of peak rectifier to convert the signal into DC between 0 and 5V, and also possibly some smoothing.