I'd like to design and layout a light switch replacement that essentially contains an arduino, touch sensor, latching relay, and power supply. The problem is, I need a power supply that's not going to require me to remove the light switch plate every couple months to replace a battery, and having a solar cell just hanging out of the wall isn't very aesthetically pleasing. Is there any sort of solution that is completely self sufficient? I'm wondering if I can siphon off some power from the 120v wire during the time the light is switched on and store it in a rechargable battery or something.
Shameful bump.
Is there any sort of solution that is completely self sufficient? I'm wondering if I can siphon off some power from the 120v wire during the time the light is switched on and store it in a rechargable battery or something.
When you mention this, I'm a bit worried if you really have a deep enough understanding of electricity for this to be safe. It's a whole other thing to be good with low voltage signals, and messing with more dangereous currents is not to be lightly.
You might already know, but Direct Current and Alternating Current are very different from eachother, and the 120v in your house is not the same as the voltage used by the arduino, as it is reduced and rectified in the power supply.
To get anything that could be stored in a battery, you would need a rectifier as AC cannot be stored in a battery. And to have low enough voltage for the arduino, you would ned a power transformer. At that point, you've got the same thing as the regular arduino power supply.
In other words, you're going to need a PSU.
I would reccomend having a "central" PSU that could supply future arduino projects, and then run the wiring to each arduino that requires it. A pc power supply would probably be cheap for this.
If you want it really compact, one could open up a power supply meant for external use, "wall-warts", and mount that inside your box. I wouldn't reccomend this.
You can get an AC/DC module to mount on a board:
http://www.mouser.com/Power/Power-Supplies/_/N-axgi2?Keyword=ac%2Fdc+module&FS=True&Ns=Pricing|0
Or get a 5V wallwart, gut it, and mount that in the junction box:
http://www.dipmicro.com/store/DCA-0510
I/'ve posted pics of the card inside this unit before, it's maybe around the size of a thumb.