Can Arduino be connected to a NO switch side of a 220V relay?

Hey you guys,

First of all. I've just been reading about Arduino. I haven't got the smallest idea whats possible and whats not. There for... forgive me ;). I just need to know this quick, so I can continue with checking this out. Or move on to the next solution.

Can you connect Arduino to respond to a 220V Relay? Is it possible to connect an input and output from your Arduino to a Normal Open switch side of a 220V relay, so when the relay gets powered up, the output will receive power from the input and then activate whatever you've written...

Thanks

Yes. The safe way to do it would be to power a regulated 5V DC transformer to the AC supply so that it generates a 5V output when the AC supply is on. Then connect the ground output to the Arduino ground, and the 5V output to a digital I/O pin. You can use digitalRead() to test whether the pin is being held high or low by the supply.

If you only want the Arduino to do anything at all when the input is powered up, you also have the option of just powering the Arduino from the 5V output so that it will boot up and run your sketch whenever power is applied, and then die when power is removed.

Nice!

Perfect

Now I'll just have to learn how to write arduino code... I guess :wink:

Thanks man

DeMich:
Hey you guys,

First of all. I’ve just been reading about Arduino. I haven’t got the smallest idea whats possible and whats not. There for… forgive me ;). I just need to know this quick, so I can continue with checking this out. Or move on to the next solution.

Can you connect Arduino to respond to a 220V Relay? Is it possible to connect an input and output from your Arduino to a Normal Open switch side of a 220V relay, so when the relay gets powered up, the output will receive power from the input and then activate whatever you’ve written…

Thanks

First of all, let me apologize for what’s coming next. It is not intended to insult, but rather to keep you safe.

The mere fact that you ask this question means you shouldn’t try it. Again, I’m not trying to be insulting. 220 volts can be LETHAL if not dealt with correctly and carefully. Please be careful and KNOW what you are doing (or get some help) before you work on live 220 circuits. We don’t want to have you die.

With that out of the way, be aware that the Arduino board (as well as most other microcontroller boards) work at 3.3 volt or 5 volt levels and currents in the 10 to 20 milliamp (10 to 20 one-thousandths of an ampere). They are not in any way compatible with connection to 220 volts (or 120 or even 12 volts) without some signal conditioning circuitry.

Signal conditioning circuitry is a circuit that transforms an “out of band” (i.e. incompatible) voltage or current into a voltage or current that a computer can use. It also typically filters out electrical noise, voltage spikes, etc…

Getting to your question, IF your 220 volt relay has an extra set of contacts used for NOTHING ELSE then you could connect these to an Arduino input and sense if the relay was open or closed.

But, even with isolated contacts, being so near to 220 is generally a bad idea.

What I would do is use a little transformer to change the 220 volts into a low voltage AC (6 to 12 volts) then rectify and filter it (to convert it to DC) and finally voltage and current limit the DC with resistors (no more than 5 volts DC, no more than a few milliamps current) and then use THIS signal to tell the Arduino if you are getting 220 VAC or not.

The transformer gives you good isolation from the AC line (your safety and the safety of the Arduino) and it converts the 220 volts down to a safe 6 to 12 volt signal that will not hurt you, even if you touch it with bare hands.

Hope this helps.

(edit to add); Or as PeterH said, use a small “wall wart” (black cube plastic power pack that plugs into the wall). This is an even better idea. It’s everything I described above, all in one convenient package.

You may wish to add a resistor across the wall wart DC output (if you’re just using it as a signal) because the Arduino input will load it so lightly that it’s internal capacitors may keep it “turned on” for quite some time after the AC power is removed. If you use it to power the Arduino directly (another awesome idea), then this is not a problem.