I have a circuit powered by a 24Vac transformer. The 24 Vac is used to drive some stuff through relays. I am also tapping off that voltage to power my circuit: rectifier and voltage regulators.
I'd like to measure the current that my 24 Vac devices are consuming. Accuracy is not important. I'd like mostly to be able to distinguish between open, dead short, and looks-about-ok.
I could use something like Hall effect, but cheap is important, so something with just a sense resistor and an opamp would be great.
Thing is, I'm getting wrapped around the axle because the sense resistor is in series with the circuit before the rectifier and I can't quite figure out how to arrange the opamp. It's AC and neither high- nor low side, at least relative to "system ground" at the negative terminal of the bridge rectifier.
If I could just get something that made peaks at 1.5 volts when there was about 1 amp of AC current, peaks at 3 volts when there is 2amps or more, and no peaks when open circuit, I could easily peak detect that and send it to the uC.
But the high common-mode voltage of 24v across that sense resistor is vexing me.
Any hints?