I'm wondering how practical (read: safe) it would be to use an audio capture device to "record" a mains AC signal for the purposes of monitoring the characteristics of the AC sine wave.
I am thinking something relatively simple like a feeding the live conductor through a resistive voltage divider and straight into the audio input. While this won't provide any isolation (but see below), I am assuming this will avoid any unwanted smoothing/filtering that could result from using a transformer to provide the isolation. However there is such a thing as a small 1:1 audio isolation transformer, but I'm not familiar with their behaviour - would they pass a 50/60 Hz sine wave of unknown quality without filtering it in any way? Obviously if it only passed through the 50/60Hz base frequency I wouldn't be able to see any distortion in the waveform so I imagine I will need something with a large enough bandwidth so as to allow any distortions to be accurately captured.
I would like to use a Raspberry Pi for the audio capture, mostly because it has an Ethernet connection for remotely streaming the waveform captures for display on a PC, but also because it has local storage to keep the captures in the event of a network interruption. Since it can be powered over the Ethernet connection and this also provides electrical isolation, I figure the solution with the resistive voltage divider isn't so bad because although the Pi itself would not be isolated from the mains, everything else would be. So long as the Pi is in a proper enclosure with the appropriate warning labels about it being mains referenced it should be fine...right?
My reasons for asking are that I am planning an off-grid set up and would like to experiment with using 3-phase motors as generators, so I would like to be able to continuously monitor the generated AC waveforms partly out of curiosity, and partly to have a way of identifying potential issues.
Being able to treat it as an audio recording also potentially allows me to capture say 24 hours worth of waveforms on a loop so that if anything goes wrong, I can look back and see what the power quality was like leading up to the event (e.g. frequency gradually dropping until it went out of range.)
There are devices you can buy that store waveform captures designed for power quality monitoring, but they are industrial devices and prohibitively expensive for hobbyists, so it would be great if I could accomplish the same thing myself with commodity parts.