Close
0%
0%

Magnetic Field Scanner

The MFS is a magnetic field mapping instrument used to locate ferrous objects, like property pins. ESP32-S3 and RM3100 based.

Public Chat
Similar projects worth following
50 views
0 followers
A professional-grade, open-source spatial magnetic gradiometer designed to detect buried ferromagnetic anomalies (property pins, pipes, and other magnetic field distortions caused by magnetic field generating objects) by isolating highly localized magnetic gradients from the Earth's background magnetic field.

Powered by an Waveshare ESP32-S3-Touch-LCD-3.49 and utilizing dual PNI RM3100 magneto-inductive sensors, this device achieves nanotesla-level sensitivity, executing 9-parameter ellipsoidal matrix calibrations and real-time Madgwick AHRS sensor fusion to provide an intuitive, HUD-style interface and audio feedback on a high-speed LCD.

Current state of affairs is a working and assembled MFS which has been fully characterized in it's current form. Looking at possibility of adding third PNI RM3100, GPS, and further refining it's detection ability. Further field testing to locate unknown property pins is also expected to continue the real-world analysis.

Problem Description

I was inspired to create this project when a new development started on an adjacent property and I wanted to be assured that this development would not infringe on my property lines. 

I started with the basics, and began researching my deed and the deeds of the adjacent properties and this was an interesting journey in and of itself. Suffice to say that locating property pins from a deed description, even with the help of AI to translate the bearings and strange worded descriptions into GPS coordinates, and the given accuracy of GPS coordinates, didn't work as easily as one would think.

Next I tried a metal detector I borrowed from a friend. Even with a few known property pins I could see that using a metal detector wasn't going to make it any easier.

With more research and I found out about magnetic property pin locators (e.g. Schonstedt - Magnetic Locator) that surveyors use. These professional level instruments run $600 to $1,000 or more. But the premise is they detect the magnetic field distortions and acquired magnetic properties of property pins that have been being pounded into the earth and sitting there for years.

To my current understanding, these instruments detect the magnetic field line differences and distortions in a localized area. In my case I installed two RM3100 Tri-Axis Magnetometer Sensors 24" apart inside a fiberglass tube and connected these to a ESP32-S3 based touch display from Waveshare.    

Let me know what you think.

Core Components

  • Base Platform: Waveshare ESP32-S3-Touch-LCD-3.49 v3 (PCBA v1.1 silkscreen). This highly integrated device provides the MCU, display, audio, and power management core.
  • MCU: ESP32-S3 (16MB Flash, OPI PSRAM) embedded on the Waveshare board.
  • Magnetometers: 2x RM3100 (TIP (at 0") and REF (at 24") sensors), with hardware reserved for a 3rd (NEAR at 8").
  • IMU: QMI8658 (6-axis Accelerometer & Gyroscope) offset mechanically by 60° relative to the wand axis.
  • Display: 172x640 QSPI LCD with capacitive touch.
  • Audio Codec: ES8311 / ES7210 via I2S for audio feedback.
  • Storage: External SPI SD Card + Internal FFat (Flash).
  • Wiring: See the MFS Wiring Diagram.
  • RTC: PCF85063 for precise timestamping.
  • I/O Expander: TCA9554 to offload static control pins (Backlight, Resets) and free up high-speed GPIO.

Pin Allocations & Rationale

To support this many peripherals on a single ESP32-S3, strict pin management and an I2C I/O expander are utilized.

FeatureGPIO / PinProtocol / TypeRationale
I2C BusSDA: 47, SCL: 48I2CShared bus for RM3100s, IMU, RTC, and TCA9554 IO Expander (capped at 200kHz for cable capacitance).
I2S AudioMCLK: 7, BCLK: 15, WS: 46, DIN: 6, DOUT: 45I2SFull duplex audio codec interface.
SD CardCS: 38, MOSI: 39, MISO: 40, SCLK: 41SPIDedicated high-speed SPI bus for high-bandwidth data logging.
LCD DisplayCS: 9, PCLK: 10, D0-D3: 11, 12, 13, 14, TE: 21QSPI / 8080High-speed bus dedicated to driving the 172x640 LVGL display.
Battery ADC4Analog (ADC1)Dedicated for battery voltage monitoring.
RM3100 DRDYTIP: 3, REF: 2, NEAR: 5InterruptDirect hardware interrupts for DRDY synchronization.
Future GPSTX: 43, RX: 44UARTReserved. Freed up by migrating static control pins to the IO Expander.

TCA9554 I/O Expander (Address 0x20)

Used to handle low-speed/static signals to conserve MCU pins:

  • P0: Touch Interrupt
  • P1: LCD Backlight Enable
  • P2 / P3: IMU Interrupts 1 & 2
  • P4: RTC Interrupt
  • P5: LCD Reset
  • P6: System Power Enable (Keep-alive)
  • P7: Night/Sleep Mode

Software Architecture (v5.x.x)

The software is built on the Arduino ESP32 Core but heavily utilizes ESP-IDF native features and FreeRTOS for professional-grade isolation and performance.

1. Synchronized POLL Architecture & FreeRTOS

The v5.x.x architecture completely eliminates I2C collisions and phase-drift by orchestrating synchronized measurements:

  • POLL Mode: The ESP32 broadcasts a simultaneous REG_POLL command to both RM3100 sensors across the I2C bus.
  • Event Groups (Core 0): The Sensor Task sleeps...
Read more »

  • 1 × Waveshare ESP32-S3-Touch-LCD-3.49 v2 High-performance, highly integrated microcontroller development board designed by Waveshare. It is equipped with a 3.49inch capacitive HD IPS screen, a highly integrated power management chip, a 6-axis IMU (3-axis accelerometer and 3-axis gyroscope), an RTC, a low-power audio codec chip, and echo cancellation circuitry, facilitating development and integration into end products.
  • 2 × RM3100 Tri-Axis Magnetometer Sensor

  • 1
    Step 1

    How to Build & Deploy

    Prerequisites

    • Environment: Arduino IDE v2+ or VSCode/Arduino.
    • Core: ESP32 Board Package v3.3.x (ESP-IDF v5 based).

    Arduino Board Settings (ESP32-S3 Dev Module)

    • USB Mode: Hardware CDC and JTAG
    • PSRAM: OPI PSRAM
    • Flash Mode: QIO 80MHz
    • Flash Size: 16MB (128Mb)
    • Partition Scheme: app3M_fat9M_16MB 
    • Core Debug Level: None (for performance)

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates