complete novice here so please take that into account when responding.

I want to add an on & off switch to the power cord of an AC motor so that I don't have to unplug it from the wall outlet every time I want to turn it off.

Both wires coming out of the motor are black, I guess that means there's no neutral, and I'm gonna be using a wall switch. photo of what I have, hope it's helpful.

Please help


  • 3
    What's the rating on the motor, are you sure it's able to handle line voltage? – Tester101 Apr 18 '18 at 11:32
  • See diy.stackexchange.com/questions/29496/… for a detailed explanation of polarized cords. – manassehkatz Apr 18 '18 at 14:00
  • 2
    Take that plastic box back! You can't do ugly hacks like this. In mains power, wiring methods and quality of work are everything. If you want to do hackydacky things like this, do it in low-voltage. Buy a UL-listed wall-wart and do all your messing around on the low-voltage side. – Harper Apr 18 '18 at 14:38
  • Little motor like that, I'd drill a hole in the top of a film canister for a smallish switch. Another couple holes near the canister bottom for the wires. Tie a couple knots down there to eliminate strain on the switch and solder it up. Put the lid on, and you're good to go. – Wayfaring Stranger Apr 19 '18 at 19:07

Run a conductor straight-forward from the plug to the motor, the other cable should be interrupted by the switch (pick one pole on the switch and connect there ONE of the wires coming from the plug, connect the other cable coming from the motor to the other switch pole). Get 3 wire nuts for the connections: 2 for the motor and one for the 'spare conductor' in the switch-box.

enter image description here

  • 1
    No. You have all the wires in the right place, but don't slap yourself on the back just yet. He's plainly said this is a cord-and-plug-connected appliance (apparently of his own construction) and you should not be helping him with a dangerous and illegal way to do that thing. – Harper Apr 18 '18 at 14:44
  • Dangerous ... why? the box is class II, the plug is sealed, wiring nuts are safe. It may not be elegant, but it's absolutely safe. (the worst case scenario is the motor running backward or not running at all if it's designed for 220V). – DDS Apr 18 '18 at 14:51
  • no. It's super not safe. The rationalizations are as horked together as the project. "Class" etc... you're cherrypicking code bits instead of considering all of it. Heck, just start with the first page: 110.3b. Where in the labeling and instructions for that box does it say this is OK? It doesn't. That box is not intended for that purpose. – Harper Apr 18 '18 at 16:02
  • Neither a bulb is intended to heat a easy-bake oven, but it does. Safety is a 'system' concept. You can combine many unsafe pieces to a safe appliance. Also safe is not a synonym of code-compliant. EX: A circuit controlled only by breakers is code-compliant, but not safe (it lacks GFCI protection so you can be burnt touching a failing appliance if ground protective earth is failing). I wouldn't live in a building that doesn't have GFCI on each circuit. – DDS Apr 18 '18 at 16:40
  • Yes, but the EZ-bake oven is UL listed to be used in that manner, which is described in the instructions and labeling on which the listing was based. Also, stop rationalizing. – Harper Apr 18 '18 at 16:45

The item you seek is called an inline appliance switch:

inline appliance switch

The switch is disassembled, placed on the wiring and one side of the wiring is cut. The switch keeps the cut ends apart for off and electrically connects them for on.

US$4.00 at Amazon, US$119.95 with expert installation!

  • With this solution, the cord needs to be intact, and the hot side (only) is cut and latched onto the wire. – Harper Apr 18 '18 at 14:46

Do not assume that the fact that both leads from the motor are black means that the motor "has no neutral". One of the leads will definitely be connected to neutral and one will definitely be connected to hot. It may be that the motor is designed to have either lead be hot or it may be that one particular lead is supposed to be the hot. Something in the documentation accompanying the motor or written on the motor will probably tell you which this is.

The electrical box you have chosen is designed to be inside a wall, not loose on a table or on the floor. The box has flaps covering openings for heavy #14 or #12 sheathed cables to enter and be clamped. It is not designed for lamp cord. The flap could cut the insulation on the cord. You would be better off an inline switch designed for flexible cord. You can buy cords with the switch already in.

How do you propose to enclose the motor and protect the connection of the cord to the leads of the motor?

What is the current draw of this motor? You should select the power cord based on the current draw of the motor. Your proposed wiring is stranded wire "lamp cord" to wire this motor. This varies in current capacity depending on its size and number of strands between 3.5 A to 7 A or maybe 10 A if the cord is larger than it appears in the picture.

The switch is supposed to be in the hot wire. Is the plug you have selected polarized, that is, does it have one blade larger than the other so it will only go into the receptacle one way? If not, get one that is polarized. Your wall receptacles are supposed to be wired so that the smaller slot is hot and the larger slot is neutral. The insulation on one side of the cord will be marked or ribbed so that you can keep the hot and neutral identified as you make connections. The convention is that ribbed or marked side is neutral. The smooth or unmarked side is hot.

Addition Edit

The inline appliance switch is the better and standard way to put a switch in a flexible cord, but if you would want to use the components you already have on hand, below is how I would used them to wire the connection in the switch box. But this is not an approved use for these devices and the inline switch would be.

Drill two small holes in the sides or ends of the box that are just large enough to insert the wires. File or sand the edges of the holes so they are not sharp. Insert the wires through the holes leaving about 6" or 7" of wire on the inside and then tie the wire into a simple knot large enough so that the knot cannot pull back through the hole. Connect the neutral wires with a wire nut and connect the hot wires to the switch terminals.

  • 1
    Hot and Neutral are just conventions in our power supply system. An AC motor still doesn't care which lead is which. – DaveM Apr 19 '18 at 4:46

You can't just throw stuff together

It's easy to forget mains electrical can kill you*.

If you are an electronics hobbyist, you should be working in low-voltage. The common, UL-listed "wall wart" power supply is your "get out of jail free" card, as the rules are very much relaxed for low voltage DC devices. This is precisely why near every consumer electronics device from a CPAP to an Internet router uses this technique.

In mains wiring, the wiring methods and other details are everything. We're not banging rocks together here, so don't you do it.

That plastic box is intended only for in-wall installation of "Romex" NM, UF etc. cable. The box does not have the proper strain relief for any other kind of cable, and certainly not for use outside a wall.

Credit to you for using proper cordage instead of Romex, which is not made for cordage, is too brittle and will fatigue crack.

Ground this thing

Any homebrew device should always be grounded. A side-effect of grounding is that the hot and neutral are now polarized, assuming we're in North America and other places with asymmetrical sockets. Now that you're polarized, switch the hot obviously.

Use 3-wire cordage -- unlike Romex, cordage counts the ground so it is called /3 (as in 16/3 for 16AWG cord). Hack up an extension cord if the cable itself is marked correctly as cordage (SJOOW or other legal markings as listed in NEC Article 400). Target sells an 8' black for under $5, or visit an electrical supply house**. You'll want round.

You can get inline switches for 3-wire (w/ground) cordage. You just have to look a little harder.

Since you are grounding, a metal switch enclosure now makes more sense. This will handle abuse much better. Also make a point to fit a switch cover plate to keep fingers, Mountain Dew and cat tongues away from the hot switch terminals.

Any homebrew like this should be protected by both GFCI (ground fault detection) and AFCI (arc-fault detection). GFCI detects current deviating from the normal "out the hot back the neutral" flow, and grounding helps by providing a safe third path. AFCI detects electrical arcing trying to start a fire. This would be in the circuit upstream of the device, commonly an AFCI/circuit breaker and GFCI/receptacle.

Neutral is not ground, and neutral should not be intentionally bridged to ground anywhere in any of your work. Doing so is a ground fault. Obviously that will trip GFCIs, as well as most AFCIs.

3-prong plugs have a side effect: They are polarized. That means you have a definite "Hot" and "neutral" wire. Put the switch on the hot wire obviously.

The safer way to do it illegally

The legal way would be a pre-made, 3-wire, listed inline switch whose labeling and instructions say to use it this way. But if you prefer illegal we can at least up the safety.

Instead of that plastic junker, get an aluminum 1-gang box with 2 threaded 1/2" (trade size) holes top and bottom, your strain reliefs screw into those.

Bring the cord into the electrical supply house (or buy it there) and get an appropriate compression strain relief to fit the cord and screws into the 1/2" trade size thread. It probably comes with a "nut" for going into steel boxes, ditch the nut.

Continue onto the appliance with /3 cordage and a strain relief there as well. Tying a knot in the cord doesn't cut it. (or to be more precise, does.)

At the machine's chassis, use the strain relief with the nut to enter a 1/2" trade-size knockout (otherwise known as a 13/16" hole).

Wiring wise, ground goes to chassis in all locations. The aluminum box has a hole pre-threaded #10-32 and everywhere sells little green #10-32 machine screws for grounding. Any 10-32 will do. Crimp terminals are OK here.

* It can also burn your house, and a fire inspector will find the cause. Your fire insurance will not pay, leaving you fiscally liable. If someone is injured, civil actions; if killed, criminal charges. Debt from an illegal act can't be cleared in bankruptcy.

** Home Depot is not an electrical supply house. Walmart is not an electrical supply house. Most are local family businesses, but Greybar and City Electric are semi-national chains.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.