Detect AC current with Comparator

Discussion in 'The Projects Forum' started by moneymcr, Mar 28, 2013.

  1. moneymcr

    Thread Starter New Member

    Mar 8, 2013
    I have a project where I would like to detect whether or not a 24VAC solenoid is connected to an output port. The system has several ports available and I want to determine, through the use of a micro-controller, which ports have solenoids and which do not. If this were a DC solenoid, I could simply put a sense resistor in series with the supply and use a comparator to sense a voltage drop. The micro-controller would simply step through turning on each port, look at the comparator output, and know which ports have solenoids and which do not. But with an AC supply and AC powered solenoids, I don't know how to do this? If I used a comparator, the output would simply be a square wave.

    To complicate things, the 24VAC also supplies power to a linear regulator which powers the rest of the system so there would always be current flowing in the sense resistor. I could handle this issue by putting a sense resistor on each port but I believe it would be simpler just to add an offset to the comparator. But in any case I'm stuck because I don't know how to sense AC current flow.

    FYI, currently the micro-controller turns on and off the solenoids through triacs.

    Any help is greatly appreciated. Thank you.