This study solves the challenges of mechanical wear and electromagnetic interference in magnetic field measurement using an improved method of measuring the magnetic field of any current-carrying circuit using the Hall effect. It analyzes magnetic fields in a spiral coil, including those from single-turn current, internal field-current relations, etc. Based on this, the Hall effect sensor design is completed. Its driving circuit uses a constant-current mode to set the Hall element's driving current for measuring magnetic fields in current-carrying circuits. Static calibration is done to enhance measurement accuracy. The experimental results show that this method can effectively determine the parameters of the spiral coil and accurately measure the magnetic field of the current-carrying circuit. It exhibits good uniformity and a high Matthew coefficient in magnetic field measurement, with high measurement accuracy and excellent anti-interference performance.