Black wire is 120 volts so turn off switch or circuit breaker. This circuit and wiring diagram. Photo diode is connected in reverse bias inverting end of lm358 pin 2 is connected to the variable resistor to adjust the sensitivity of the sensor. Photo sensor circuit diagram. Netlist created. Here is my wiring diagram thirdRead More