The invention discloses an escalator speed and fault detection method and device based on a
rotary encoder and relates to the field of escalator
speed measurement and reversal detection. The method comprises the following steps that 1), the state of the
rotary encoder is monitored at startup to determine whether an escalator is running or not, and if yes, the self-learning is started, and the second step is executed; and if not, the process ends; 2), an A-phase
signal and a B-phase
signal of the
rotary encoder are acquired, and statistic of the pulses of the rotary
encoder is performed; and 3), whether the escalator reversal exists or not is judged according to the acquired
signal, and if yes, the escalator is stopped; and if not, the escalator speed is calculated by the adoption of an interrupting mode according to the pulses. The device comprises an acquisition circuit, a filter circuit and a
single chip microcontroller. The acquisition circuit comprises a rotary
encoder signal acquisition unit, an amplifying unit and a strong and weak
electricity conversion unit. The escalator speed and fault detection method and device solve the problem that the rotation direction is measured by the adoption of a rotary
encoder, and difficult capturing is caused by the
microsecond class time in the prior art, capturing of the
microsecond-class A-phase signal and the
microsecond-class B-phase signal is achieved, and therefore the effect of measuring the rotation direction is achieved.