Patent ID: 8223029

Claim:
A method for controlling a cleaning device, comprising: providing a cleaning device which comprises a control unit, a fan module, an optical emitter and an optical sensor, wherein the fan module and the optical sensor are respectively electrically connected to the control unit, the optical emitter and the optical sensor are located in an air inlet of the fan module, the optical sensor receives a light ray emitted by the optical emitter and detects an intensity of the received light ray, and the control unit is preset with a first impedance value (Z1), a second impedance value (Z2) and a threshold, where 0<Z1<Z2; and reading an impedance value (Z) of the fan module by the control unit and comparing the impedance value with the first impedance value and the second impedance value, wherein if Z1<Z<Z2, the control unit drives the fan module to generate a first pressure difference; and if Z2<Z, the control unit reads the intensity of the received light ray detected by the optical sensor, where the control unit drives the fan module to generate a second pressure difference greater than the first pressure difference if the light ray intensity exceeds the threshold, and the control unit turns off the fan module if the light ray intensity is smaller than the threshold.