Electrical Engineering problem

S Aufrecht

The bedroom in my apartment, which is in a hundred-year-old building, has some wiring issues. There’s a switch by the door to turn on the overhead light. Because the wires go in conduits on the surface of the walls rather than inside the walls, the overhead light switch actually leads to a box at the top middle of one of the walls. The idea is that a cable then extends from that box to the hook in the middle of the wall, and then down to your chandelier. The conduit extends past this box to a power outlet on the far wall. Since the box in my bedroom has no such wire emerging from its hole, I opened it. After brushing away the cracked ceramic pieces and dust, I found four wires.

The question, then, is how I should connect these wires, along with two new wires to the new overhead lamp, so that the switch controls the lamp and the far outlet always works. Through trial and error, I have determined the following:
  1. If wire A is connected to wire C, then the outlet works but is controlled by the switch
  2. If wire B is connected to wire C, then the outlet always works.
  3. If wire A is connected to wire B, then the outlet does not work.
  4. If wire A is connected to a lead for the overhead lamp, and the other lead is connected to wire B, and wire B is connected to wire C, then the outlet always works and the lamp never works and the switch does nothing.
  5. If wire A is connected to the a lead for the overhead lamp, and the other lead is connected to wire C, neither the outlet nor the bulb works if the switch is off. If the switch is turned on, the bulb in the overhead lamp lights up for less than a second, then fades, and then the outlet works. The bulb in the overhead lamp is not burned out.
At the moment I have it wired so that the outlet always works and the lamp never works and the switch is useless. How should I wire it so that the switch controls the lamp and the outlet always works?