Sense 220vac and report to arduino

Hello there

So the thing is , I'm currently working on a home automation project and would therefore need to detect/ sense 220vac in my wires all around the apartment and report the status to arduino so that I could know if a lamp is on/off ( relays are not the only tools used for switching power in my project).
Already heard about optocouplers, still after a lot of research have no idea how to use them.
I mean, like the input voltage for arduino pins ( to be read ) is 5vdc. SO any CHEAP way to .... using optocouplers or anything else.

Any suggestions would be appreciated guys.

This zero cross detector works like charm:


However, original web page doesn't exist anymore
http://www.dextrel.net/diyzerocrosser.htm
:frowning:

It would be much safer to use current transformers (CT). They are cheap, noninvasive and don't require connecting anything directly to high voltages. I got mine from Coilcraft.

A simple Arduino interface is described here.

Farazex:
Hello there

So the thing is , I'm currently working on a home automation project and would therefore need to detect/ sense 220vac in my wires all around the apartment and report the status to arduino so that I could know if a lamp is on/off ( relays are not the only tools used for switching power in my project).
Already heard about optocouplers, still after a lot of research have no idea how to use them.
I mean, like the input voltage for arduino pins ( to be read ) is 5vdc. SO any CHEAP way to .... using optocouplers or anything else.

Any suggestions would be appreciated guys.

Perhaps your engineering needs a bit more work. First you ask to sense 220 volts AC in your apartment wires. These wires are probably in the walls, so no you can't. Then you mention testing to see if a light is on or off. Makes no different to the voltage if the lamp is on or off, the voltage is still there.

What about overhead lights?

Paul

Well, My apartment is being constructed at the moment so it is not wired yet. So I could easily ask my guy to add a few more wires.
and I will be adding the optocoupler or cCT or whatever I have to use right after the switch on the wall, connecting a wire to my arduino somewhere else

Farazex:
Well, My apartment is being constructed at the moment so it is not wired yet. So I could easily ask my guy to add a few more wires.
and I will be adding the optocoupler or cCT or whatever I have to use right after the switch on the wall, connecting a wire to my arduino somewhere else

Ok, so you live in that part of the world with no building permits and electrical inspections. Most of us don’t, So it is hard to design something like you want.

Paul

Actually, I can't begin to understand why you would want to detect lights conditions.
In home automation we control light conditions.
From what I'm seeing, you really need to NOT do this thing your asking about because given the voltages and power that your working with solid state devices have the ability to burn your house down.
I don' mean to be mean sound mean, but your playing with fire.
There are many light control systems available on the market you can use that have great features.
Save the Arduino for learning, but not on your house.