Select a dc motor with an encoder, which is a rotating sensor that converts the rotational displacement into a series of digital pulses that can be used to control the angular displacement. If the encoder is combined with a gear bar or screw screw, it can also be used to measure the linear displacement. The speed of dc motor controlled by encoder AB phase can be calculated by using oscilloscope to see the frequency of feedback speed signal of rotary encoder, or the feedback speed signal (z phase) can be connected to the frequency meter and the motor speed can be calculated by pulse.