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.
| Feature | GPIO / Pin | Protocol / Type | Rationale |
|---|---|---|---|
| I2C Bus | SDA: 47, SCL: 48 | I2C | Shared bus for RM3100s, IMU, RTC, and TCA9554 IO Expander (capped at 200kHz for cable capacitance). |
| I2S Audio | MCLK: 7, BCLK: 15, WS: 46, DIN: 6, DOUT: 45 | I2S | Full duplex audio codec interface. |
| SD Card | CS: 38, MOSI: 39, MISO: 40, SCLK: 41 | SPI | Dedicated high-speed SPI bus for high-bandwidth data logging. |
| LCD Display | CS: 9, PCLK: 10, D0-D3: 11, 12, 13, 14, TE: 21 | QSPI / 8080 | High-speed bus dedicated to driving the 172x640 LVGL display. |
| Battery ADC | 4 | Analog (ADC1) | Dedicated for battery voltage monitoring. |
| RM3100 DRDY | TIP: 3, REF: 2, NEAR: 5 | Interrupt | Direct hardware interrupts for DRDY synchronization. |
| Future GPS | TX: 43, RX: 44 | UART | Reserved. 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...
Roland
Vishnu Mohanan
Mike Teachman
Maulik
Bertrand Selva