Electrical – Two white and two black wires in ceiling box

electricalwiring

Im trying to install a replacement light and the box has 2 black, 2 white and 2 ground wires, but my fixture only has one of each. I didn't really pay attention when i was pulling everything apart… Anyway, the light is now on and won't turn off so I'm guessing just wiring all black to black, all white to white and all ground to ground was a bad idea.

How should this be done?

EDIT: We used a voltage sensor and discovered that one line is always hot. Wired it to one of the white lines and hooked up the others to the light. We now see intermittent flickers, but it won't light up. Wondering now if I did caused damage to the dimmer switch earlier. Will put a regular switch in and see in the AM.

EDIT 2: Dimmer switch was bad. Janessa's answer explained what was going on, and the two comments below are correct in saying I shouldn't be working on it.

Best Answer

Alright there are two options.

1.Either your light was fed power from the panel (or a plug etc...) first.

OR

  1. The light switch box was fed power first and your light has two cables in it because it goes to another light after that one.

You need to first figure out where your strait hot power is coming in from. I understand that you believe you have found it. Just make sure to double check. Like you say use just a basic light switch (not that dimmer) and test for hot again. Is that wire you believed was hot , still hot when you have the switch in an up and down position? I will give you both options for wiring below. If there is power in both the up and down position of your light switch, than that is the hot power.

  1. If the light was fed power first than here is how you connect the wires. Take your black (hot all the time wire) and marrett it onto the white of the opposite cable (that brings hot power down to your switch). On the same cable (the white you just used that goes to your switch) put the black wire onto the light (under the copper looking screw). Now you have one white wire left (it goes back to your panel somehow or another) so attach that to your silver coloured screw on your light. Done. You have a path, the hot going thru your switch, coming back to the light as switched power, going through your bulb and back to your panel.

  2. If your hot wire feeds your light switch first. Heres how you wire it. Your switch box will be opened from testing and finding constant hot power in it so lets start there. Take your always hot black and put it on your light switch, than take the other black in that box and put it on the light switch. Take your white that is in the same cable as your always hot black and wire nut it with your other white. Now go up to your light box. Take the two blacks and wire nut them together with a pigtail. The pigtail will go to the copper coloured screw on your light. And take the whites and wire nut them together with a pigtail that you put on the silver looking screw on your light. Done. Power goes thru your switch, out of the switch to the light, thru the light and back on the white/neutral to the panel.

If you are using a light that you do not attach to screws you attach to wires, than the copper coloured screw is the equivalent of a black wire. And the silver coloured screw is the equivalent of a white wire. Your dimmer might be ruined but just try first with your basic switch and than add the dimmer in after to see if its ruined...

Have fun!