The source hot is spliced to the red wire which is connected to the bottom terminals on the switch at the other end. The black wire is connected to the top terminal on the switch which runs power back to the fan where it is spliced to both the black and blue fan wires.
This diagram illustrates the wiring for a circuit with gfci receptacles followed by an unprotected light and switch. The light switch is connected directly to the source and the load terminals on the gfci are not used.
The hot wire to the fan in a fan/light kit will usually be black and the light wire will be blue. The white wire is usually the neutral which is always connected directly to the source neutral, either at the source or through a splice in the switch box. The white wire may also be used to carry current when necessary.
Splice both the fan and the light hot wires together with the common wire from the SW2. The traveler wires are spliced together in the ceiling fixture box. To control the fan and light separately, a builtin switch such as a pull chain or remote control is required on the fan/light.
Use this wiring when the source is at the fixture and you want to control the feed to both components with the same switch. Three-wire cable runs from the fan to the switch box and the source neutral is spliced to the white wire and to the fan neutral.
In this wiring, a switch and receptacle are in the same box and the switch controls the power to the outlet. The hot wire connects to the bottom terminal on the switch and the top output goes to the receptacle hot terminal. The neutral wire from the source connects directly to the receptacle neutral.
This diagram shows the wiring for multiple receptacles in an arrangement that connects each individually to the source. All wires are spliced to a pigtail which is connected to each device. This wiring allows for voltage at each device independent of the other outlets in the circuit.
This diagram illustrates a switch and receptacle in the same outlet box located in the middle of the circuit. This wiring allows the electricity to continue from the receptacle, on to any other outlets in the circuit and it provides a switch to control a light fixture or other load, such as another receptacle or a fan.
Here a gfci receptacle is added at the end of a row of duplex receptacles for single-location protection. The first outlet is connected to the source and 2-wire cable runs from box to box. All wires are spliced with a pigtail at the devices to pass current from one to the next. The load terminals on the gfci are not used and it does not protect the other receptacles in the circuit.
In this wiring, the source is at the switch and 3-wire cable runs from there to the fan/light. The switch controls the light and the source is spliced through to the fan. With this arrangement, the fan is controlled by a pull-chain on the motor housing and the light is controlled with the switch. The neutral and ground wires are also spliced through to the fan/light.
This diagram illustrates the wiring for a circuit with gfci receptacles followed by a light and switch. By connecting the switch to the load terminals on the gfci, the light is protected against ground faults as well.
In these cases, it should be wrapped with electrical tape to mark it as hot. The ground wires will be green and/or bare copper. The ground should be spliced with a short piece of wire and connected to each device and outlet box that has a grounding terminal. In these drawing the brass colored terminal represent the hot side of the device and the silver colored terminal represent the neutral. Ground wires and terminals are in green.
This is the updated wiring for this arrangement, with a 2-wire cable added between the fan/light and switches. The white wire is no longer used for hot and the source neutral is run through to the switch box to satisfy the 2011 NEC requirement of a neutral wire in all switch boxes. All other wiring is the same as above.