Detecting A/C

I am working on a data logger for an irrigation system in which I plan to use an arduino to sense and collect data then send it to a pc via usb. I can handle the programming OK but my electronics is a little weak.

Does anyone have a simple way to detect on-off state of A/C lines other than just wiring in a relay?

I've posted about an AC optoisolator here, and recently someone posted about a different optoisolator here that uses fewer (or maybe cheaper/smaller?) external components than my circuit.

-j

If you are trying to determine if there is a current flow thru an AC line, you might consider a current transformer doughnut. Digikey sells various amperage transformers like the ACME AC-1005 AC-1010 AC-1015 etc

e.g. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=TE1010-ND

These act like a clamp type volt meter when one wire of the AC line runs thru the doughnut. Adding diodes and/or zener diodes would let detect any current flowing thru the line.

Does anyone have a simple way to detect on-off state of A/C lines other than just wiring in a relay?

If you mean just to sense if there is 120vac present or not then there are two simple methods I would consider:

  1. A 120vac relay using the contacts as a digital input to the Arduino.

  2. Find or buy an inexpensive regulated +5vdc 'wall wart' transformer (some cell phone AC charger modules are +5vdc regulated output) and wire the output to a digital input pin. Plug the transformer into the circuit you want to monitor for power.

Lefty

Thanks guys; That gives me a couple of options to check out.

Shaky