I am working on a clapper right now, and my goal is to be able to put everything into a 100% self contained box once I'm done: something like this. But I don't want to need an external wall wart or battery... so I was thinking about using a usb wall charger (like for iDevices) and soldering that in parallel with the mains input (before the relay). So would this be safe? If so, anybody have any suggestions for specific chargers? Apple's charger is tiny, but it costs $30....
There's at least a few threads here mentioning using an uncased wall-wart as a power supply. Also at least one recent mentioning that some of them (I assume the cheaper ones) can have significant ripple. I've wondered about that myself, but I don't have a scope to take a look. Makes me think about throwing in an extra filter cap on the output side.
Yep. I have 120V mains. and I would prefer to have everything sealed up... a 5V short circuit can cause a fair amount of damage, let alone 120V. Also: are there any latching relays out there? I've been thinking about using a regular relay, but it will draw A LOT of current when in the "on" state... and especially since USB is 500mA max, I want to minimize how much power is used by the clapper.
NiHaoMike:
There are plenty of places to get cheap wall warts. Check the local Goodwill for used ones. They'll also show up at garage sales and dollar stores.
Agree. That most commonly avalible cell phone charger wall warts seems to all be 5.1 vdc 1 amp switching regulator and I see them at Goodwill for $1-2 each all the time and they have tons of them. They are small, light weigth and suitable for powering an arduino board via it's +5v pin.