The magnetic field density (H) around a current carrying coil depends on the coil parameters and the current. The magnetic flux density (B) depends on H and the magnetic permeability of the medium. B and H They are related by the equation B = μH where μ is the permeability.
Permeability is not a constant for ferromagnetic materials, like iron. If H is increased B increases and saturated at some point. When we reduce H, B does not follow the same path, as shown in the figure.
To Record Magnetic Hysterisis using a solenoid connected to PV1, and a MPU925x magnetometer connected to the I2C port.