At present, there are a variety of coal gangue identification technologies in automatic top coal mining. Gamma ray is too expensive and harmful to human body. Infrared technology is affected by ambient temperature. Radar detection has serious signal attenuation when the coal seam is thick. Sound technology has low cost and small difficulty, but can be severely interfered by external sound signals. Image technology is effective when the color difference of coal gangue is large, but is affected by dust and light factors. However, vibration technology not only has the advantages of sound technology but also can avoid environmental noise interference and obtain a higher detection accuracy. For the properties of top coal and gangue are different, the vibration signal generated when falling onto the hydraulic support tail beam also shows different characteristics. Based on this feature, a vibration sensor is designed, which is installed at the web of the tail beam of the hydraulic support to sense the vibration signal generated by the top coal or gangue hitting the hydraulic support, and identify the coal and gangue in the coal release process through signal processing and analysis. The sensor uses an accelerometer to collect the tail beam vibration signal, and conducts front-end filtering processing of the collected data. Fourier transform is applied to analyze the power spectrum of the data so as to obtain the maximum vibration frequency, amplitude and power spectrum energy per unit time. The laboratory test results show that the sensor measurement error is within 1%. The underground test results show that most of the signals collected by the vibration sensor are the vibration signals of coal falling, and the frequency range is 100-200 Hz. However, the vibration signals of gangue falling is above 200 Hz. Therefore, the differences of the vibration signal characteristics are useful to identify the top coal and gangue.