How would you power this project?

I would like to have an enclosure that plugs into household voltage and has the capability to turn outbound power on and off via command that comes in over radio (WiFi or nRF.) I would like this to be self contained. I intend to use a one of those blue relays to control the 110V line voltage. What is he best way to provide power to the AVR? The best thing I can think of is to put a wall wort into the enclosure and wire that up to power a small custom board that implements the functionality. I'm also considering running the device at 3.3V since that's the level that the RF solutions are happy with (nRF24L01, ESP8266.) One strategy would be to buy an outlet strip (that can be opened up) and remove enough outlets to provide space for the rest of the electronics.

The problem I am trying to solve is keeping a laptop battery charged. Battery life can be extended by charging between 30%-70% and the bios and drivers on my laptop do not support internal control. :( Moreover, it seems to me that this setup is generally applicable to lots of situations and I cannot be the first to want to do something like this. The Power Tail comes close but provides no provision to power the AVR.


Why not design your system to control the low voltage DC supply to your laptop. It would be a lot safer and would probably be much preferred by your fire and liability insurers.

You could have an input socket to match the PC socket and an output cable with a matching plug so there is no need to tamper with the existing DC power cable.


Switching the low voltage is easier, but you can't get generic power supplies for all laptops. For example, Dell laptops will not charge with non-dell chargers, even if they supply the right voltage (they'll power the laptop, but not charge it). There's a third pin used by the charger to tell the computer that it's an official Dell adapter and enable charging.

If you can, though, I agree that switching the DC supply to laptop has a lot of advantages.

For my R/C outlet (3 relays and DC output for LED, driven by tiny85 controlled over 433mhz), I used one of these:

For safety (in addition to wiring everything right), you must put it into a box of some sort. If the box is metal, it must be connected to AC ground (green wire from the power cord). If the box is plastic, don't put metal screws through it. Those old power centers that people used to get for the computer, with switches for computer, monitor, printer, etc - those are really convenient boxes if you're going to make something that switches AC: Outlets pre-installed, lots of space for electronics, and they're practically empty inside. Even already have the fuse holder mounted all nice, and most have a phone jack surge protector too, which can be removed, and the hole used to get the antennae out. They're also pretty easy to scare up for free, cause nobody uses them anymore, but they were made in massive quantities.

Thanks both for the suggestions. This is a Lenovo with a rectangular connector and now that I have looked, I found adapters that fit the PC (but none that fit the charger.)

I particularly like the suggestion to use a PC oriented power center. If I chose one that had USB charging ports it would have a suitable power supply already built in. Otherwise that one from ebay seems like it would fill the bill. Thanks also for the safety reminders. I'm well aware of that but a reminder is always welcome.