power arduino from light switch wires

Hi,

I have a 220V wires that are used to control light switch.
I would like to setup an arduino with a relay and a wifi. The problem that i have is that the arduino itself needs to be powered.

Now since there already are wires that the light switch uses, how can i power arduino from those wires ?
I don't want to use battery nor a wall adapter power supply (since is to big).

Is there any small power converter, transformer that can be put behind the light switch and be powered by the same wires that power the light switch ?

Also, what relay do you recommend, in order to support the 220v power.

Those very small 5V USB adapters can be used. They provide mostly a little more than 5V, like 5.5V, but that is okay for the Arduino.
Use a good quality 5V USB adapter, the cheap ones can catch on fire when at end of life.

You can also use a capacitor to bring down the voltage to a few volts. But you have to know what you are doing when designing such a circuit.

Kinda depends on how your light switch is wired. You may not have Live and Neutral wires there, but just Live and Switched Live. (Plus the ground / earth lead if it's up to code.)

Also, YMMV, but none of the electrical boxen I've had the pleasure of working in had any room to spare. Certainly not enough for proper encasement to prevent shorting on the abundant conductive surfaces exposed in there.

Any relay with a 5v coil and switch contacts rated for several amps at your mains voltage will be adequate -- however, that's a basic enough question that it makes me wonder whether you are really ready for this project. No offense intended, but mains circuits are dangerous -- you should not be starting out by playing with 240vAC. Give yourself time to make mistakes where the level of risk is lower.

One of the wires in your light switch is connected to the live supply, the other one is connected to the lamp that the switch is controlling. There is no neutral there, the neutral is connected to the other side of the lamp.
So, what you are trying to achieve is not really possible.
Also, I do have to agree with SirNickity - If you do not have the correct knowledge and training to work at mains voltage levels,
then probably best to leave it alone.

tebbaerty:
Also, what relay do you recommend, in order to support the 220v power.

If you don't know the answer to that then I suggest you don't mess around attaching components to mains wires. Things can catch fire...

batteryman:
One of the wires in your light switch is connected to the live supply, the other one is connected to the lamp that the switch is controlling. There is no neutral there, the neutral is connected to the other side of the lamp.
So, what you are trying to achieve is not really possible.

Technically this is possible if you use a standard incandescent bulb. If you think about it that bulb has a filament in it which is joining that switched live wire to neutral. This wouldn't work with a CFL bulb as there is no filament.

This didn't occur to me until I bought a replacement PIR light switch for my hallway and I was surprised to find out that I didn't need to rewire it with 3 core.

http://pages.ebay.com/link/?nav=item.view&id=191029862953