Maker Pro
Maker Pro

Mains to 5v?

RodRitter

Apr 1, 2015
1
Joined
Apr 1, 2015
Messages
1
Hello all,

I'm looking for some advice as I'm a programmer and not 100% sure about my electronic skills.

I've been messing around with some Arduino stuff and controlling things remotely, but this has been on a small scale. I've created a control system to remotely control outputs via a web interface.

All I have left to do is to research how I'm going to implement it into wall light switches. I've never played with anything bigger than 12v so I'd appreciate any advice on where I can learn how to utilize the mains power to keep some small circuitry powered. I assume using some sort of switch or voltage regulator will handle this? I'd also like advice on safety, etc.

Thank you!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Get a mains powered USB charger. An old phone charger is likely to be a good option.
 

shumifan50

Jan 16, 2014
579
Joined
Jan 16, 2014
Messages
579
The biggest problem you will have is fitting it into a light switch box as space is normally at a premium. You might be able to do it in the ceiling (which is what I did) rather than in the light switch itself. You have to be very careful when you do this ensuring that it is not easy to touch the high voltage connector(s) easily - preferably enclose them inside the casing.
If you just want to use these in your own house, be aware that it might invalidate your buildings insurance unless you get it certified by an electrician (and I am not even sure if this is enough in RSA). The law regarding Certificate Of Compliance (COC) for electrical installations is quite rigid in South Africa.

All that being said, it is possible to use special caps to build a stepdown power supply that will provide about 20ma max - this is often used by Chinese devices that require low current. I could try and find the circuit, but I am sure somebody on here will know it off the top of their heads. it must be noted that these power supplies are fairly dangerous to the user as they have exposed 220V all over the place, but they are comparatively small and inexpensive.

As a side note: Have you already solved how you will switch the 220V to the lights as this cannot be done directly from Arduino outputs.

I also notice that you can switch using a web interface - I hope you implemented tight security if you are going to open ports to these boxes to the internet.
 
Last edited:

Tha fios agaibh

Aug 11, 2014
2,252
Joined
Aug 11, 2014
Messages
2,252
Once you start modifying building wiring you are stepping on the rules of your local electrical codes.
I know in the states this would be a violation, unless your device has been approved by a nationally recognized testing agency, and its installed and used within the listing instructions.
 
Top