The determination of thermal expansion coefficient of materials is a representative experiment in thermal experiments.With the application of modern computer methods to experiments,When measuring the material's thermal expansion coefficient, the thermal expansion coefficient of the material is calculated by measuring the distance between the diffraction stripes. However, there are significant errors in conventional methods, because of the limitation of the observation of diffraction stripes through human eyes. By improving the receiving device, the diffraction fringe is monitored in real time by using a CCD data acquisition system, which is not only easy to operate, but also reduces the coefficient of thermal expansion of the calculated material by computer programming, which is close to the real value.