anyone know any cool software for AC line voltage and frequency monitoring via soundcard, suitable for running on a small battery-powered computer (e.g. raspi)?
@xssfox @uint8_t @qualia It'd be good to have coherent sampling over a wide area, it should be possible to see where the power is going in 2D, though to make it really useful I suppose you'd need the power line electrical lengths between your sampling stations. It'd be like having a multi-port network analyser but no easy way to calibrate it.
@qualia did this a while back for fun but I dont remember if I ever published the code for it somwhere
@qualia https://gist.github.com/halcy/7fb41ae9457f25eb5d67fa0d2ee57aaf actually, I did
explanatory post and some testing against actual measurements: https://halcy.de/blog/2025/02/09/measuring-power-network-frequency-using-junk-you-have-in-your-closet/
I wrapped the floating audio cable around an electrical wire here but probably that was largely pointless and it would have worked just as well without
Measuring power network frequency using junk you have in your closet
@qualia I keep meaning to do this with a floating ESP32 and a direct AC measurement through a resistor divider.
@gsuberland i had the weird idea of generating a frequency response curve for the little 9V wall wart i was using this for in the past to kinda de-embed it a little bit. direct divider measurement would be cool, though the builtin ESP32 ADC is kinda dogwater. there's def room for a cheap 'n cheerful option and probably for a higher-end frequency-locked option here too, i bet, was thinking a soundcard might fall in somewhere near the middle
@qualia I was gonna use an external ADC. the annoying part though is that most decent audio ADCs include a power line notch filter designed to remove AC hum, and you generally can't fully turn them off, which sucks.
@gsuberland @qualia you’ll have enough signal despite notch filter if you have a direct connection to the grid. and you could equalize the filter back out if you can characterize the signal chain with a frequency sweep,
@qualia not helpful but slightly related: I wonder if when synchronized with PTP / GPSDO, using geographically distributed stations, whether you can observe relative phase shift (between the stations) to measure power flow in the distribution network