aularma.net

project: aularma.net

This project started back in 2012 as an experiment to detect geomagnetic disturbances linked to auroral activity. Over the years, it’s evolved through many iterations — part electronics lab, part software sandbox. The main goal has always been to build a reliable, low-cost, DIY instrument network that can measure local variations in the Earth’s magnetic field and visualize them in near real-time.


Hardware Overview

The system is based around two main components:

  • FG-3+ sensor — a fluxgate magnetometer that measures absolute field strength and directional changes in nanoteslas (nT).

  • AU-100 controller — my custom-built interface board that powers the sensor, reads its data, and handles network communication

 

The FG-3+ outputs a frequency signal proportional to the magnetic field. The AU-100 measures that frequency with microhertz precision using a 32-bit timer/counter on a Microchip SAME54 MCU (ARM Cortex-M4F). The MCU runs at 25 MHz and has 1 MB flash and 256 KB RAM, which is plenty for local data processing, buffering, and network I/O.


Power and Signal Design

The AU-100 runs from a standard 5 V USB supply. Internally, the 5 V rail is:

  • Regulated down to 3.3 V via a buck converter for logic, MCU, and Ethernet PHY.

  • Boosted up to ~13.6 V to power the remote sensor and RS-485 transmitter.

The FG-3+ sensor is typically placed 40 cm underground and at least 50 m away from metal or moving vehicles to minimize interference. The sensor signal travels over twisted-pair Ethernet cable, using RS-485 differential transmission for improved noise rejection and longer runs (tested up to 100 m).

A stable 25 MHz crystal oscillator and low-noise LDO regulator provide a reference clock for both the MCU and Ethernet PHY, ensuring timing accuracy for frequency-to-nT conversion.


Local Interface

The AU-100 has a small OLED display and three LEDs:

  • Green = normal
  • Yellow = moderate activity
  • Red = high activity

A PWM-driven buzzer gives an audible alert when activity exceeds a configurable threshold (default: 1 nT/s).

The user interface allows simple navigation and configuration without a PC. Settings (thresholds, calibration constants, and GPS coordinates) are stored in an external EEPROM, which also holds the device’s unique MAC address and ID.


Firmware and Communication

Firmware measures geomagnetic field changes by counting the sensor frequency over 5-second intervals, then calculates ΔB/Δt in nT/s. Readings and status data are serialized as JSON and sent securely to the backend every 10 seconds.

The firmware uses:

  • DHCP for IP assignment
  • DNS for domain resolution
  • NTP for clock sync
  • TLS for encrypted communication

There are no open ports, no ICMP responses, and no port forwarding a “zero trust” design to reduce attack surface. Firmware updates are signed and encrypted, downloaded on demand, and verified before installation.


Software Stack (Earlier AWS Setup)

The first version of the backend ran fully in AWS:

  • API Gateway + Lambda (Python) for API handling
  • DynamoDB + Aurora Serverless V2 for data storage
  • S3 + CloudFront for the frontend
  • All managed through Terraform (Infrastructure as Code)

It worked reliably, but it was expensive for a small hobby network, mainly due to Lambda invocations and database storage costs.


Migration to Hetzner

In 2024, I moved everything off AWS to a dedicated Linux server at Hetzner. This single instance now runs:

  • NGINX as reverse proxy and static file host
  • PostgreSQL for data storage
  • FastAPI (Python) backend replacing Lambda
  • Systemd services + cron jobs for scheduling and data cleanup

All services run in Docker containers, making updates and redeployment simple. The new setup is about 5× cheaper than the AWS stack while being just as capable for this scale.

Data is stored locally with daily encrypted backups to another Hetzner volume. Latency is low, and the bandwidth is more than enough to handle all active devices and a few future nodes.


Why It Matters to Me

This project isn’t about commercial use, it’s about learning and building something meaningful from scratch. It’s a testbed for embedded systems, low-level firmware, and  data handling. 

If you’re running similar setups or want to compare magnetometer readings across different latitudes, I’d love to exchange data or ideas.

This article was updated on 1 November 2025