Aiming at the current use of CCD as a miniature spectrometer for photoelectric detection, this paper introduces a miniature spectrometer designed using a high-performance linear CMOS image sensor S11639-01. The drive of the image sensor and the control of the data acquisition system of the spectrometer are all based on the 32-bit processor STM32H743 chip of ARM Cortex-M7 core. The system hardware circuit has a compact structure, high data acquisition resolution, and good real-time transmission. The optical path system structure of the spectrometer consists of an entrance slit, a flat-field concave grating, and a linear array CMOS detector. The structure is relatively simple, which is conducive to the miniaturization of the spectrometer. The spectrometer is tested by using the American ocean optics standard low-pressure mercury lamp and tungsten halogen lamp. The experimental data is processed by wavelength calibration and automatic peak-spectrum technology, and the spectral response range of system is 220 nm~950 nm. The calibration error of spectral wavelength is less than 0.05 nm, the minimum resolution of the system is 1.153 nm, and the linearity is above 99.898%.