Metal detector
STM32-Experiments Free Updated Sep 26, 2026

Metal detector

Metal detector

Introduction

Airport security walkways and treasure-hunting handheld detectors both use exactly this underlying sensing principle to find hidden metal objects. In this experiment, a metal detector module is wired to the STM32F070RB, providing both a graduated analog reading and a simple digital presence flag, and detected metal presence both lights an indicator LED and prints a report over UART.

2. Scope

This experiment covers reading both an analog and a digital output from the same sensor module simultaneously, using the digital output for simple presence detection and the analog output to additionally gauge relative proximity or size of the detected metal object. This combines two different signal types from a single sensor module into one complete reading.

3. Prerequisite

3.1 Hardware

  • STM32 Nucleo-F070RB development board

  • Metal detector sensor module, with both analog and digital outputs

  • LED and a 220 ohm resistor

  • Breadboard and jumper wires

  • Micro-USB cable

  • PC with PuTTY

3.2 Software

  • STM32CubeMX (standalone)

  • STM32CubeIDE

  • ST-LINK USB driver

  • PuTTY, or an equivalent serial terminal application

Community Q&A

0 questions

Ask questions and get answers from our community and staff moderators.

No questions yet — be the first to start the conversation!

Ask a Question

Please log in to ask a question or post a reply.

Login to Participate