Fluxgate magnetometers like the FG-3+ sensor offer high sensitivity and low noise level for detecting minute changes in magnetic fields. They are commonly used in geophysics and in security applications such as metal detection because they can precisely sense the magnetic disturbances caused by metallic objects.
The FG-3+ sensor by www.fgsensors.com provides stable and accurate magnetic field measurements and is well-suited for embedded platforms like Arduino, enabling development of compact, portable detection systems.
Hardware SetupConnect the FG-3+ Sensor as following.
- Position the FG-3+ sensor near the detector's walkthrough frame to sense metallic objects passing through.
- Connect the FG-3+ sensor signals to Arduino UNO R4 WiFi
Firmware Functionality
Sensor Reading: The sensor outputs a frequency proportional to the local magnetic field (typically from 40 kHz to 120 kHz). This frequency is measured using interrupt-driven counting logic.
Signal Filtering: A moving average baseline is maintained to track ambient field conditions and smooth sensor output to avoid false triggers.
Metal Detection: Sudden deviations beyond a configurable threshold relative to the baseline indicate a metal object presence.
Visual Alert: The LED matrix displays "!" during detection events.
How the Code WorksInterrupt Counting: Each rising edge on the sensor output increments a counter during a fixed measurement window.
Baseline Tracking: The system establishes a baseline frequency count during startup representing no metal present. This baseline is continuously updated slowly to adapt to environmental changes.
Peak Detection: When sensor readings deviate beyond a threshold for a sustained period, a detection event is flagged.
Display Update: On detection, the exclamation mark is shown on the matrix display to alert users.
Test by moving a metal object (like keys) near the sensor. The exclamation mark should appear on the matrix indicating detection.
Note: The FG-3+ sensor is highly sensitive and may respond to electromagnetic interference in your environment, so calibrate thresholds carefully.
Suggested Improvements - Multi-Sensor Array Using AI- Deploy several FG-3+ sensors spaced across the walkthrough frame.
- Use their comparative outputs to detect and localize metal objects precisely.
- Combine readings to filter out false positives caused by environmental EMI (which may only affect some sensors non-simultaneously).
- This approach enhances sensitivity, positional awareness, and reduces false alarms.
- Use AI to identify different objects
- Security checkpoints for metal detection without bulky equipment.
- Museum exhibits to monitor access or protect sensitive artifacts.
- Industrial safety where metal detection is needed in restricted zones
This walkthrough metal detector design harnesses the precision of FG-3+ fluxgate magnetometers and the versatile Arduino UNO R4 WiFi to create a cost-effective and cloud-enabled metal detection system suitable for diverse security and monitoring needs.
Comments