Arduino AC Detector Help

Hi all,
I am working on a project on large water pumps that operates on 220V AC. The only thing that i want to know is a way to detect when the pumps are on (i dont want to controll them). I am thinking to use a relay but I am not really sure how to connect it to an AC source, and add the necessary components to protect the microcontroller. Any thoughts, or diagrams would be really helpful.
Thanks.

Try this:

Atmel AVR182 Zero Cross Detector.pdf (95.1 KB)

A very safe way of determining whether the pump is drawing current is to use a current transformer. This is a small toroidal coil that encircles one of the power leads to the pump and yields a very low voltage/low current AC signal proportional to the current flow. See this site http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface

I got free samples of current transformers from CoilCraft and use them to monitor my deep well pump current. The current transformer can be located anywhere on one of the wires leading to the pump, including within the circuit breaker box.

What exactly do you want to detect:

(a) That mains voltage is reaching the pump? Ways of doing that include using an optoisolator/series resistor/diode, and using a few turns of wire wrapped around the cable (capacitive sensing). Of course, this doesn't prove that the pump is running, it could have a broken connection.

(b) That current is flowing through the pump? The simplest way of doing that is to use a current transformer, as jremington has suggested.

if you want only detect if the pump powered, you need only a 220V relay, put it in parallel to the pump. To the other side of the relay you have a normal contact that you can connect to Arduino without protection. It is a normal contact, like a button.

Testato:
if you want only detect if the pump powered, you need only a 220V relay, put it in parallel to the pump. To the other side of the relay you have a normal contact that you can connect to Arduino without protection. It is a normal contact, like a button.

Bear in mind that most relays (except reed relays, which AFAIK are not available with 220VAC coils) have contacts designed for carrying a substantial current; and such contacts may become unreliable when asked to carry only the tiny currents associated with Arduino inputs. That's why I think an opto isolator or capacitive sensing are better solutions.

Thank you all for your suggestions. What I simply want is to check if the pumps are on, and post it online. I am only looking for an 1 or 0, so the cost could be minimum. I liked the idea of the optoisolator but as you said this doesnt prove that the pump is working. So I will check what the CT sensor has to offer. If you have any more suggestions feel free to say them

dc42:
Bear in mind that most relays (except reed relays, which AFAIK are not available with 220VAC coils) have contacts designed for carrying a substantial current; and such contacts may become unreliable when asked to carry only the tiny currents associated with Arduino inputs. That's why I think an opto isolator or capacitive sensing are better solutions.

Yes, thanks I forgot this, but it is possible use a resistor parallel to the input for increase the current, 10mA normally work

As I was doing some research I found a transistor called hall sensor. Generally, It uses the wire's electromagnetic field to generate a current based on the hall effect. It has easy implementation and it's relatively cheap.

aggelos16:
As I was doing some research I found a transistor called hall sensor. Generally, It uses the wire's electromagnetic field to generate a current based on the hall effect. It has easy implementation and it's relatively cheap.

Make sure that the Hall sensor you have in mind is sensitive enough to detect the pump current. Many of these sensors are designed to measure currents of 50A and higher, although there are some that are optimised for as little as 5A. Current transformers are generally better at low currents.

I wanted to do something similiar aggelos16, with the amazing help of the people at openenergymonitor.org we managed to put together a circuit that comes very handy.

http://openenergymonitor.org/emon/node/1050
Read through it and if you find it interesting and suits your needs let me know and I will post all the info I might find.