The invention relates to a multi-
grating programmable panchromatic
spectrometer aiming at monitoring the safety of foodstuff, comprising a
light source, a
sample pool, a detection part, dispersing components, an imaging device, a programmable
spatial light modulator area array and a plurality of detectors aiming at different wavebands, wherein, light emitted by the
light source passes through the
sample pool and is reflected to the dispersing components; the light with different wavelengths is reflected to the programmable
spatial light modulator area array by various dispersing components with different parameters; the programmable
spatial light modulator area array is modulated through
exertion of slaving
voltage, and then a plurality of subsequently arranged single detectors respectively obtain the
optical intensity of various wavelengths or the synthetic
optical intensity of light with a plurality of wavelengths in turn according to the
time sequence; finally, monitoring of spectra is realized by utilization of the
digital conversion method. The dispersing components of the instrument adopt gratings or commercial compact discs and so on; the programmable spatial light modulator area array is a spatial light modulator area array based on MOMES technology; photoelectric detecting parts are a plurality of detectors aiming at different wavebands. The multi-
grating programmable panchromatic
spectrometer has the advantages of low cost, small volume, quick response speed, portable use, capability of realizing full spectrum detection and so on.