Arduino UK Mains Light Switch 230v to 5v

arduinoavrcapacitormainstransistors

My aim is to create a wall light switch similar to the LightwaveRF ones with a momentary switch rather than a rocker style switch. To handle the momentary switch I will create a custom chip based on the Arduino with a small AVR and a solid state relay switch and will also be controlled by radio frequency.

So my question is how can I safely power the custom chip behind the switch with 5v stepping down the 230v used for UK mains? Obviously I am aware of similar methods of reducing power such as the ones used in iPhone chargers for example using resistors and capacitors but I need this to be as small as possible and be safe in the event of a power surge. I am more than happy to purchase all of the parts separately and create the circuit myself but I could do with some guidance. I am guessing the LightwaveRF switches must use a similar method what I am proposing.

Best Answer

Here is a paper from ST Microelectronics about capacitive zener AC voltage droppers. Here's a picture from this document: -

enter image description here

TAKE NOTE - THIS IS NOT ISOLATED FROM THE INCOMING AC POWER MAINS - TAKE EXTREME CARE.