In this paper, a study was conducted on the Ramsey interference and spectral line locking techniques based on rubidium-87 cold atoms. Using sequential control technique, the timing design of a three-dimensional magneto-optical trap (MOT), cold atoms’ free fall, Ramsey microwave interference, and two-level fluorescence detection was realized, achieving the state preparation of cold atoms and clock transitions. By designing an automatic peak-finding algorithm, numerical integration was performed on the time-of-flying (TOF) signal, and narrow linewidth cold atom Ramsey interference fringes were obtained. Based on this, a frequency-hopping method was used to lock the frequency of the 10MHz oven-controlled crystal oscillator (OCXO) in a closed loop, achieving a linewidth of 38Hz. This preliminary result verifies the feasibility of the system design.