The invention discloses an LSPR sensor device based on Ag nanoparticles, which is composed of a compact optical path and a circuit, and the compact optical path adopts a detection method of a resonance angle optical signal, which includes a laser source, a polarizer, a vibrating mirror, a lens group, a reflecting mirror, Hemispherical prism and sample cell; the circuit is composed of photodetector, photoelectric conversion circuit, micropump drive circuit, galvanometer drive circuit, data acquisition card and computer. The angle of the reflected light is changed by rotation, the reflected light is converged by the lens group, and the converged light is reflected to the hemispherical prism through the mirror. When the surface plasmon resonance effect occurs, the light emitted to the photodetector shows a change in strength , through the photoelectric conversion circuit to convert the electrical signal to the computer, the micropump drive circuit controls the sample cell through the linear motor; to realize the sample pumping and pumping out, the photoelectric conversion circuit is connected to the galvanometer through the galvanometer drive circuit.