In our attic we have a junction box that has the power wire connected to a hallway ceiling light. Can we tap into that to get power to install a bathroom exhaust fan? We would be putting in a double rocker light switch in the bathroom (top switch would be for the vanity light and the bottom switch would be for the exhaust fan switch). How would we wire this?
There's several parts here
Can I tap into the junction box for power?
Yes, provided it's not overloaded with wires.
How do I wire it?
If I were you, I'd add a second junction box. You'll have
- 2-line power from the existing box
- 2-line cable run to your fan
- 3-line cable run to the switch
Find the breaker to the box you want to tap into and turn it off. If it's 15A, buy 14 gauge wire (Romex is white), if it's 20A, buy 12 gauge (Romex is yellow). Be sure to clamp the cables if any box is metal.
Inside the new box, wire
- All 3 white wires together
- All the bare grounding wires together (run an extra one to your box grounding screw if the box is metal)
- The incoming black wire from the other junction box to your 3-line black wire
- The black wire going to your fan to the red wire
Inside the junction box for your switch, it sounds like you have an existing switch. If so
- Break the tab on the side of your double-switch
- Wire the old switch wire to one of the switches
- Wire the new black and red to the other switch
- Cap your new white wire with a wire nut
The simple answer is yes, you should be able to make this work. But the details of the wiring depend on how your existing wiring is configured.
Your power source wire (the one from your electrical panel) probably either goes to the light or to the switch first. Sometimes it goes to another junction box, but that's typically only seen in older houses. Can you find this source wire (also called the "line")?
If you provide that info, then someone can better help with the exact wiring. Pics might also help.
With electrical, you need to be really careful about DIY jobs. There are many safety requirements that need to be considered and your local codes will differ from what other Home Improvement users have in their areas. Most building codes require a homeowner to involve a licenced electrician for such modifications, FYI.