I'm interested in installing a solar power system in my garage and am wondering how to connect the three-prong receptacle output of the power inverter to a NM-B lighting circuit that was previously hooked into a switch in an electric box receiving power from the main panel.

Here's the inverter, in case it helps.

I'm comfortable with basic electric work like rewiring receptacles, installing GFCIs, etc., but I haven't done this before and want to be sure I'm not under- or over-thinking this.

5 Answers 5


I think the simplest answer is to install a piece of SO/SJO cord with a cord cap to the switch box for your lighting circuit and plug it in to the inverter when you wish to use it.

Make sure you disconnect the lighting circuit from the existing main power wiring first.

Good luck!

  • Easiest way to do that is by having the cord plug into a mains receptacle on the existing lighting circuit -- not sure if that's 100% up to Code (it's a weird corner case) but practically speaking, there's no problem here. Apr 23, 2016 at 20:47

Note that these days the best answer for solar, if you aren't determined to go completely off-grid and if your electric company supports it, may be to get inverters that support line synchronization and ask the electric company to set you up for net metering.

In this setup the inverters and line feed the house in parallel. If you're producing less power than you need, you buy the remainder from the power company; if you're producing more than you need, you sell the excess back to the power company. Much simpler than trying to maintain local batteries for extra or nighttime power, ensures that all power generated deducts from your electric costs, and in some cases you may be able to sell carbon-reduction credits as well.

I've been quite happy with this setup. I have a relatively small solar setup (8 "standard" panels), but my electricity use is relatively low too, and in the summer I usually do have one or two months of negative net usage. I haven't yet gone negative enough to actually have a negative bill, due to the utility's $6 account fee, but I've come close.

Note: The one disadvantage of a newer metering system is that, to keep your system from electrocuting linemen who expected a cable to be unpowered, net-metering systems are designed explicitly not to run in "island mode"; if the network goes dead, they shut down for safety. That does mean you have to make other plans for dealing with blackouts. As I said, if being able to go completely off-grid is important to you this may not be the best solution.

If it sounds interesting, ask your solar supplier/contractor for details. Anyone competent should be able to explain it in detail, and run numbers to tell you how long it would take for the system to pay back it's purchase cost after figuring in any currently available rebates and carbon credits (though the latter will be a best-guess, since these are sold via an auction mechanism and prices may change depending on supply and demand).


Separate the supply to your lights so that they are supplied from one of these.

Get a double-pole 120v relay capable of switching 15-20 amps, powered off the inverter. The common being your lights, the NO being inverter in, and the NC being mains in. Use short 12 AWG extension cords for their connectors to save time and keep the project looking clean. Tie all grounds together and to the enclosure you use for the relay. Then plug it all in.

When the inverter comes on, the lights may flicker because the phase angle won't match, but that should be the extent of it and they will run on battery until it depletes to the point the inverter cannot run.

If you want GFCI protection, I'd recommend using in-line GFCIs so it's more modular.

You might also consider using "a proper transfer switch" if you want to spend some more and appease building codes, but the above will work, and is easily removable during any inspection or when you go to sell the house.

And if you want to be more efficient, consider using DC lighting at the same voltage as your batteries. Do the same thing with the relays, but entirely on the DC side. It will be safer, better compliant with code, and by not running an inverter you will save significant energy in waste heat.

  • 2
    "and is easily removable during any inspection" Are you recommending a system that is not code compliant, and further recommending that he hide it from inspectors?
    – Johnny
    Jan 4, 2016 at 19:32
  • 1
    um, no. It cannot double the voltage. The relay would be switching the load between one of two supplies. (break before make) I've done it before. It works. It works well enough with computers that they can transition between power sources without downtime. There is NO chance if wired as I described, that the voltage would double. I welcome you to answer better. Jan 5, 2016 at 0:26
  • 3
    +1 for @billycrook for an answer that is inventive and sounds like it will work. I have argued before that code compliance is not a prerequisite for answers, safety issues should be mentioned when known and the community should point those issues out as well. If you don't like an answer (because you live the codes or any other reason), vote it down. Jan 5, 2016 at 1:12
  • 2
    The main problem with this system as-proposed, btw is the cord spaghetti, which probably is a 400.8 violation. Mount the relay in a permanent box and wire it to permanent chapter 3 wiring with a single inlet for the inverter only -- and you're golden. Note that the inverter must supply the neutral bond as if it were a separately derived system as the neutral is being transferred, and you need a placard saying so as per 702.7(C) Jan 5, 2016 at 5:48
  • 2
    +1 For answering the question with an intelligent answer. +1 for mentioning removing it when selling the home which is infinitely better than leaving something like this for the next owner to figure out and possibly mess things up. +1 For mentioning running 12V to avoid many "issues". And +1 to @ThreePhaseEel for a code compliant alternative. This is diy.stackexchange, not "Licensed Professional Stack Exchange" the Q and A seem perfectly inline with the scope of the site.
    – Damon
    Jan 5, 2016 at 6:50

The easiest method to achieve what you appear to want is:

  1. Disconnect power to your garage circuitry in your breaker panel. NOTE: If there is ANY chance that someone could fiddle with your breakers, it would be ideally best to physically disconnect the garage circuit wires from its circuit breaker. Otherwise, it is possible that your inverter could cause harm to someone who has to service the power lines in your electric service area.

  2. Install a male to male power cord from the inverter outlet to any outlet in your garage. (wiring = hot to hot, neutral to neutral, & ground to ground). NOTE: this suggestion is a hack (i.e. not a building code compliant solution).

  3. When you want to provide inverted battery power to your garage circuit, connect your inverter to the battery terminals & switch on the inverter power switch. Note, you may need to switch on the wall-mounted light switch to allow power to flow to the other parts of the garage wiring.

Note: The major disadvantage of this setup is that you will not have power to your garage circuitry when the inverter is off or your battery is drained.

Depending on the wiring in your garage, it may be possible to use your light switch to switch between mains power & inverter power, but you will likely need to install a pull switch light fixture to control the light & do some rewiring inside the light switch box. That setup, however, would also definitely NOT conform to standard wiring codes.

  • 4
    DO NOT DO THIS A male-male cable is extremely dangerous. If it's plugged into a running generator or inverter, the other end is live to the touch. If it's connected and you forget to switch off the main breaker, your generator/inverter will backfeed the rest of your house, and backfeed through the transformer the lines - this could step up the 110V up to several kV, and seriously harm/kill any linesmen working on them. Either get a proper transfer switch (which gives you a second main breaker for the inverter; only one of the inverter and main breaker can be on simultaneously), or have the Mar 20, 2016 at 12:49
  • "or have the inverter feed completely separate circuits to the mains." (Someone's comment was cut off due to length)
    – BMitch
    Mar 20, 2016 at 13:11
  • 1
    @SomeoneSomewhere - WRONG. IF you would have comprehended what I wrote, you would have NOTICED that step 1 disconnects the garage circuit from the rest of the house wiring. True, the plug would be hot if the user does not disconnect power from the batt/bank when the inverter is producing power, however, the suggested solution IS a hack (NOT a code compliant solution) to allow MD2 to run off inverted batt power, if he wants to do ONLY that--NO MAINS power is involved whatsoever.
    – DIYser
    Mar 20, 2016 at 21:43
  • 1
    How often have you left your keys in the ignition, or forgotten to disengage the parking brake, or left your lights on etc.? Are you willing to take the chance that you'll never forget to turn off the breaker? Or plug the wrong end of the male-male cord in first? Mar 21, 2016 at 22:54
  • 1
    By 'wrong end', I mean plugging your M-M cord into the inverter before plugging it into the house. The other end is live, and the cord would be rather dangerous if anyone found it lying around (even not plugged into the inverter - they try plugging it in somewhere else. As for the breaker, I have no issue with switching breakers on when needed. But if only one can be on at a time, I would want an interlock. Mar 22, 2016 at 3:50

Disconnect means to physically disconnect - not switch or turn it off. To me that is logical. When you disconnect an electrical appliance you pull the plug on it not just simply switch it off.

The M-M connection could be in the form of Anderson connectors where the terminals are not exposed. Anderson connectors are used in solar system arrays quite frequently and come with different current ratings to suit. Those are what I use in my solar system and they are very safe. The ones I use are rated at 50amps.

  • 1
    Welcome to Home Improvement. If you'll take the tour, you'll note that this is a Question & Answer board, not a general discussion forum. As such, we expect answers to the question to be posted in the box labeled "Answer". Since this doesn't seem to answer the question, would you please edit it into an answer? If you'll stick around, you'll quickly earn enough rep to make a comment on someone else's Q or A, which is what this is as it stands.
    – FreeMan
    May 6, 2022 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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