The invention relates to a photoelectric sensor, and discloses a photoelectric frost and ice sensor controller for an air-cooled refrigerator, which includes a controller body installed on an evaporator pipe of the air-cooled refrigerator, and the controller body is connected with a signal conditioning circuit , the controller body is provided with a transmitting light guide hole, a receiving light guide hole and a lead wire sealing groove, and two light-transmitting sealing plates are respectively provided at the openings of the transmitting light guide hole and the receiving light guide hole, and the controller body is provided with The detection panel, the surface of the light-transmitting sealing plate is flush with the detection panel, a light-emitting diode is arranged in the emitting light guide hole, a photodiode is arranged in the receiving light guide hole, the electrodes on the light-emitting diode and the photodiode are welded with cables, and The signal conditioning circuit is connected. The invention has the advantages of simple structure, convenient installation and low cost, which solves the problem of high misjudgment rate of defrosting controlled by timers in existing refrigerators, and achieves the effect of energy saving.