Introduction: USB Control of AC Powered Signs and Lamps
I was given a very cool Doctor Who lighted sign as a gift: I mounted it on the wall in my home office above my computer. I liked it a lot but I didn't like having to turn it on and off as I went into and out of my home office and I didn't want to leave it turned on all the time. What I really wanted was to have it turn on when my computer was powered on and turn off when the computer was powered down.
This instructable shows how to use a PowerSwitch Tail to control an AC appliance like a lamp or lighted sign using an electrical signal from a computer. The way this works is very simple: one end of the PowerSwitch Tail is connected to an electrical outlet and the electric lamp or sign is connected the other end. A modified USB cable is plugged in a USB port in your computer and the other end is connected to the PowerSwitch Tail. The great thing about the PowerSwitch Tail is that the circuits for switching the AC power are isolated so the computer is protected from the AC power. A diagram of how the PowerSwitch Tail and computer are connected is shown in the diagram on this step.
I made this at TechShop.
Step 1: Parts and Tools
- PowerSwitch Tail II. Available from Adafruit, Jameco, Maker Shed, Sparkfun, among others.
- USB cable with a type A male connector on one end.
- Black duct tape or black Gorilla tape
- Black Sugru (optional)
- USB AC power supply
- Wire cutters and wire strippers
- Precision flat head screwdriver (like a jeweler's screwdriver)
- AC receptacle tester or a lamp
- Soldering iron and solder (optional)
Step 2: Prepare the USB Cable
- Cut off and set aside the non-type A connector as shown in the first photo. Set the non-type A connector aside: you will not need it for this instructable.
- Using a knife, gently cut off about a quarter inch of the outer insulation on the end of the cable with the type A plug as shown in the second photo.
- Cut off the shielding and the outer wire braid and then strip the ends of the red and black (power) wires as shown in the third photo.
- Cut off the green and white (data) wires as shown in the fourth photo.
- (Optional) Use a soldering iron and solder to tin the end of the wires as shown in the fifth photo.
Step 3: Connect the USB Cable to the PowerSwitch Tail
Loosen the screws to the two leftmost wire connectors on the PowerSwitch Tail using the precision screwdriver. Gently insert the bare part of the red wire into the leftmost hole (labeled "1: +in") and the bare part of the black wire into the middle hole (labeled "2: -in") and tighten the screws as shown in the attached photos.
Step 4: Test the Switch
- As shown in the first photo:
- Plug the PowerSwitch Tail into an electrical outlet.
- Plug the AC receptacle tester into the end of the PowerSwitch Tail. You can use a electric lamp if you don't have a receptacle tester.
- Plug the USB power supply into an electrical outlet.
- The red LED on the PowerSwitch Tail should not be illuminated (second photo); the light on the AC receptacle tester should also not be illuminated (third photo).
Step 5: Attach the USB Cable to the PowerSwitch Tail Case
The USB power wires are thin and not very strong as you can see in the first photo: they will not stand up to the stress of being twisted, jostled and moved about. To ensure they don't get broken or pulled out, the USB cable needs to be attached to the PowerSwitch Tail's case. The simplest way to do this is to carefully bend the cable as shown in the second photo and then tape it to the case using black duct tape or Gorilla tape. A second option would be to use Sugru to secure the cable to case as shown in the third photo. I like using Sugru because it has a nicer look than a piece of tape.
Step 6: Connect the Switch to Your Computer and Your Appliance
Voila! The USB controlled AC lamp and lighted sign switch is now complete! You can plug the USB cable into your computer and the PowerSwitch Tail into an AC outlet and whenever your computer is on, your AC appliance will be also be powered up.
Two important notes:
- Pay attention to the power requirements of what you plug into the PowerSwitch Tail. The PowerSwitch Tail II only supports up to 15 amps. Do not exceed that limit.
- Some newer computers have "always on" USB ports that provide power even when the computer is powered off but plugged in. These "always on" ports are used for charging devices. If you plug your PowerSwitch Tail into one of those ports your AC appliance will always be on. Try a different USB port on your computer. You may experience the same thing with powered USB hubs.

Participated in the
Epilog Challenge V
5 Comments
6 years ago
I the pictures it shows the whit & green wires being cut. In the diagram it shows the green wire, along with the red, being connected. Which are connected the black and red or the green & red?
thanks
Reply 6 years ago
Thanks for pointing out the error in the diagram. I've corrected the diagram. It's the black and red wires that are connected to the PowerTail.
9 years ago on Introduction
I really like the way you wrote this up and the pictures are helpful. Thank you.
10 years ago on Introduction
A cheaper and better alternative is to use a Wattstopper power unit which is UL approved, has zero voltage switching and as a bonus has DC output at about 150 mA to power your controller. One such unit (B-120 EP) is available from Amazon for about $15. - Enjoy.
Reply 10 years ago on Introduction
I was really intrigued by your suggestion because of the price and the UL approval but as I researched the product, it does not appear to meet the requirements for this project. From what I read, the B120E-P takes 120 VAC as input and outputs 24 VDC and requires a control voltage of 24 VDC. This project requires input and output voltage of 120 VAC and a control voltage of 5 VDC.