大学物理 ›› 2026, Vol. 45 ›› Issue (7): 60-.doi: 10.16854/j.cnki.1000-0712.250303

• 物理实验 • 上一篇    下一篇

基于HMC5883L传感器的微弱磁场测量

朱佳琦,马凤翔,彭春发,魏立武,张立   

  1. 北京林业大学 理学院电子系 北京100083
  • 收稿日期:2025-06-06 接受日期:2025-06-17 出版日期:2026-09-22 发布日期:2026-10-15
  • 作者简介:朱佳琦(2004—)男,浙江绍兴人,北京林业大学理学院物理与电子系,2022级本科生.

Measurement of weak magnetic field based on HMC5883L sensor

ZHU Jiaqi, MA Fengxiang, PENG Chunfa, WEI Liwu, ZHANG Li    

  1. Department of Electronics, School of Science, Beijing Forestry University, Beijing 100083,China
  • Received:2025-06-06 Accepted:2025-06-17 Online:2026-09-22 Published:2026-10-15

摘要: 本文利用HMC5883L传感器提出了基于STM32的微弱磁场测量系统的设计方案,搭建了微弱磁场测量系统,系统分为硬件和软件两部分,硬件部分为仪器搭建,软件部分为数据处理,数据处理模型植入单片机,单片机将处理好的数据在显示器端显示.系统以官方公布的已知的空间某点磁感应强度为标定,对测量系统进行校准,校准后的测量系统可以用来测量空间任意点的磁感应强度.为了检验该系统测量结果的准确性,对通电螺线管轴线中点磁感应强度的测量值与对应励磁电流理论计算的磁感应强度值做比较和分析,结果表明,70个电流测点,相对误差随电流线性增大呈指数式下降,系统可以相对精确地测量微弱磁场.

关键词: 微弱磁场, HMC5883传感器, STM32单片机, 通电螺线管, 电流源

Abstract: This article proposes a design scheme for a weak magnetic field measurement system based on STM32 using HMC5883L sensor and a weak magnetic field measurement system is built, which is divided into hardware and software parts. The hardware part is instrument construction, and the software part is data processing. The data processing model is implanted into a microcontroller, which displays the processed data on the display end. The system calibrates the measurement system based on the officially announced magnetic induction intensity at a certain point in space. The calibrated measurement system can be used to measure the magnetic induction intensity at any point in space. In order to verify the accuracy of the measurement results of the system, the measured values of the magnetic induction intensity at the midpoint of the energized solenoid axis were compared and analyzed with the corresponding calculated magnetic induction intensity theory values of the excitation current. The results showed that the relative error of 70 current measurement points decreased exponentially with the linear increase of current, and the system could measure weak magnetic fields relatively accurately.

Key words: weak magnetic field, HMC5883 sensor, STM32 microcontroller, energized solenoid, current source