I have an arduino controlling some home appliances (220v) with some relays, via I2C. When each relay is closed, these appliances may be consuming power or not, because each one of them have their own switch (some are floodlights with presence detector, water boiler with its own thermostat, etc.).
I'd like to know when the appliances are really on (consuming power), because turning it on with the relay cannot tell me for sure (their internal switch may be on or off). For each appliance I have an output port, driver and relay, and will have an input port that should tell if the appliance is consuming or not.
I used some ACS712 kits connected to a PCF8591 (I was planning to know if the appliances were on/off by reading the value on each ADC port). There are kits of 5, 10 and 20A. I tested a 5A kit, the datasheet says it will increase 185mv per Ampere. The appliance I tested is a 20w Led floodlight and therefore consumes around 90mA (220v AC). This means the ACS712 would increase 16mV when ON, which is difficult for the PCF8591 to notice any difference (8 bits). Also, since my appliances are AC, the output of the ACS712 is also variable (50 Hz).
So I gave up of detecting if the circuit is closed by current sensors, and I believe I need to approach this problem differently.
Basically I need a circuit that detects that the appliance circuit is closed (relay and internal switches) and then puts a digital pin at "1". I saw some ideas in the web with phototransistors, like the TLP620, but I'm not sure it could support voltages like 220V AC.