The infrared tube can detect the obstacles. If there are obstacles in the infrared light emitted by the transmitting tube, the infrared light will reflect back to the infrared receiving switch when encountering the obstacles and detect the signal, so as to realize the garbage can full and human detection function.