A novel use of the LiDAR sensor of a smartphone spring in introductory physics experiments is discussed in this paper. We have determined the spring constant for various combinations of springs using the LiDAR sensor of a smartphone through the phyphox application. An electrical heater coil is used as a spring, and the period of oscillation of a vertical spring–mass system is measured using a LiDAR sensor. The experimental values of spring constants agree with the theoretical values. A high school student can perform this simple experiment in a smart way at home.