Nowadays, Sleep disorder is a common disease, and spindle spindles are important features of the second stage non-rapid eye movement (NREM) sleep. In this paper, we propose an improved automatic detection method of spindles based on wavelet transform. The spindles automatic detector is mainly composed of wavelet transform and clustering. We collected the electroencephalography (EEG) signals of six patients with sleep disorders all night for ten hours, and then preprocessed the data and other operations, and then used our improved method to detect the sleep EEG signals by spindles. By comparing with the previous automatic detection method not improved and another automatic detection method, the results show that the accuracy of sleep spindles detection can be effectively improved. The accuracy of the improved detector is 5.19% higher than before, and 9.7% higher than that of another method based on amplitude threshold. Finally, we made a simple comparison between people with sleep disorders and normal people. We found that there were significant differences in spindle density between people with sleep disorders and people without sleep disorders. The average spindle density in the normal population averaged 2.59 spindles per minute. People with sleep disorders had an average spindle density of 1.32 spindles per minute. In future research, our research direction is to improve the accuracy of spindles automatic detection by improving the spindles detector and study the difference of spindles between patients with sleep disorders and normal people in a large number of samples, so that the difference of spindles can be used as the basis for the diagnosis of sleep disorders.