In this work we propose an inexpensive laboratory practice for the laboratory of an introductory course of Physics for any grade of Sciences and Engineering, which was very well received by our students, where a smartphone (iOS, Android or Windows Phone is irrelevant) is used together with some mini magnets, similar to those that can be found in the door of our refrigerators, a 20 cm long school rule, a paper and a free application (app) for measuring the magnetic field using the magnetic fields sensor or magnetometer of the smartphone, which needs to be downloaded and installed. The apps we have used are: Magnetometer (iOS), Magnetometer Metal Detector and Physics Toolbox Magnetometer (Android). Nothing else is needed. Cost of this practice: 0 coins. The main purpose of the practice is that students determine the dependence of the component x of the magnetic field produced by different magnets (from the typical magnets that are decorated in refrigerators even with a ring magnet and spherical magnet). We have obtained that the dependency of the magnetic field with the distance is of the form x -3 , in total agreement with the theoretical analysis. The secondary objective is to apply the technique of least squares fit to obtain this exponent and the magnetic moment of the magnets, with theirs corresponding absolute error.