STM32F303RET6
STM32 High-Frequency Vlf Metal Detector
Overview
A handheld high-frequency VLF metal detector powered by an STM32 MCU, featuring an LCD display, keypad, audio buzzer, and a USB-C rechargeable Li-ion battery for coin and treasure hunting.
System architecture
- MCU → TX_DRIVERPWMHigh-frequency carrier PWM signal to drive Tx coil circuit
- RX_FRONTEND → MCUADCDemodulated In-phase (X) and Quadrature (Y) DC signals sampled by MCU internal ADC
- MCU → RX_FRONTENDGPIOPhase reference switching control signals for synchronous demodulation
- MCU → DISPLAYSPISPI interface for UI rendering on ST7735 LCD
- KEYPAD → MCUGPIOShift register serial data interface for keypad input reading
- MCU → AUDIOPWMPWM tone output driving the audio amplifier and buzzer
- POWER → MCUPowerSystem 3.3V main power rail
- POWER → TX_DRIVERPowerBoosted power rail for Tx driver stage
- POWER → RX_FRONTENDPowerAnalog power rails for Op-Amps and switches
- POWER → DISPLAYPowerPower supply for LCD screen
- POWER → AUDIOPowerPower supply for audio amplifier
Bill of materials
| Part number | Type | Component | Manufacturer | Package | Qty | Datasheet | Match |
|---|---|---|---|---|---|---|---|
| GD32F303RET6 | MCU | STM32F303RET6 Main DSP, synchronous demodulation control, internal ADC sampling, and user interface management | GigaDevice | LQFP64 | 1 | Matched | |
7 alternatives consideredAI verified | |||||||
| UCC27524D | ACTUATOR | TC4420 + AO3400 Drives the transmitter (Tx) search coil with high-frequency PWM carrier signal | Texas Instruments | SOIC-8 | 1 | Matched | |
18 alternatives consideredAI verified | |||||||
| OPA1652AIDR | SENSOR | OPA2134 + TS5A3157 Low-noise signal amplification and phase-sensitive synchronous demodulation (PSD) for X/Y channels | Texas Instruments | SOIC-8 | 1 | Matched | |
14 alternatives consideredAI verified | |||||||
| 1.8inch LCD Module | DISPLAY | ST7735 Displays target identification, signal strength, and menu UI | Waveshare | Module | 1 | Matched | |
19 alternatives consideredAI verified | |||||||
| CD74HC165M96 | SENSOR | 74HC165 + 4x4 Keypad Matrix User input interface for detector settings and mode selection | Texas Instruments | 16-SOIC | 1 | Matched | |
11 alternatives consideredAI verified | |||||||
| LM386 | ACTUATOR | LM386 + Piezo Buzzer Audio target indication and tone pitch generation | PJSEMI | SOP-8 | 1 | Matched | |
4 alternatives consideredAI verified | |||||||
| TP4056 | POWER | TP4056 + TPS61023 + MCP1700 Manages USB-C Li-ion battery charging, 5V boost, and 3.3V LDO regulation | GOODWORK | ESOP-8 | 1 | Matched | |
4 alternatives consideredAI verified | |||||||
Build guide
Procurement & Preparation
- Source all required electronic components including GD32F303RET6 MCU, UCC27524D driver, OPA1652AIDR operational amplifier, 1.8-inch ST7735 LCD module, CD74HC165 shift register, LM386 audio amplifier, and TP4056 power management IC.
- Inspect the custom dual-layer printed circuit board (PCB) for manufacturing defects, short circuits, and continuity across power planes (3V3, 5V, GND).
- Prepare workshop tools including temperature-controlled soldering station, lead-free solder wire, flux pen, oscilloscope, and ST-Link V2 programmer.
Hardware Assembly & Wiring
- Solder the power management section containing TP4056, TPS61023 boost converter, MCP1700 LDO, and the USB-C connector onto the PCB. Verify output voltages (3V3 and 5V) before proceeding.
- Mount and solder the GD32F303RET6 MCU, decoupling capacitors, and the 8MHz crystal oscillator. Check for solder bridges on fine-pitch QFP pins.
- Assemble the transmitter driver circuit using the UCC27524D and AO3400 MOSFET equivalent, and the receiver analog front-end using OPA1652AIDR and TS5A3157 analog switches.
- Integrate the user interface modules by soldering the ST7735 1.8-inch LCD, CD74HC165 shift register with the 4x4 keypad matrix, LM386 audio amplifier, and piezo buzzer.
Firmware Setup
- Connect the ST-Link V2 programmer to the SWD header (SWCLK, SWDIO, GND, 3V3) on the metal detector PCB.
- Compile and flash the firmware binary incorporating the high-frequency PWM transmitter output, synchronous demodulation (PSD) control, ADC sampling routines, ST7735 SPI display driver, 74HC165 keypad scanning, and audio tone generation.
- Perform a sanity check on the serial debug output to confirm successful peripheral initialization (LCD, keypad, ADC, PWM).
Testing & Calibration
- Connect the Li-ion battery and plug in the USB-C cable to verify charging functionality via TP4056 and stable 3V3/5V rail generation.
- Probe the Tx search coil output pin with an oscilloscope to verify the correct high-frequency PWM carrier signal generation and amplitude.
- Test the user interface by pressing keys on the 4x4 keypad matrix and verifying menu navigation, backlight control, and responsive rendering on the ST7735 LCD.
- Perform live target detection calibration by passing test coins (e.g., copper, silver, nickel) over the search coil. Adjust phase-sensitive demodulation (PSD) offsets in software to maximize X/Y channel separation and audio response via the LM386 and buzzer.
Document
high-frequency VLF metal detector
A handheld high-frequency VLF metal detector powered by an STM32 MCU, featuring an LCD display, keypad, audio buzzer, and a USB-C rechargeable Li-ion battery for coin and treasure hunting.
Design Overview
| Item | Details |
|---|---|
| Product Type | high-frequency VLF metal detector |
| Key Functions | High-frequency VLF metal detection for coin and treasure hunting, STM32 microcontroller-based signal processing and control, Built-in LCD screen and keypad user interface, Audio buzzer target indication, Rechargeable Li-ion battery power with USB-C charging |
| Power Source | Rechargeable Lithium-ion battery pack with USB-C charging |
| Connectivity | |
| Size | Handheld unit, compact/medium form factor |
| Environment | outdoor |
| Difficulty | Advanced |
| Est. Time | 6-8 hours |
System Architecture
Power Topology: Single cell rechargeable Li-ion battery (3.7V nominal) charged via USB-C using TP4056. TPS61023 steps up battery voltage to 5V for the Tx driver and audio amplifier. MCP1700 LDO steps down voltage to 3.3V for the STM32 MCU, display, and analog front-end circuits.
Module List
| Module ID | Type | Name | Function | Voltage |
|---|---|---|---|---|
| MCU | MCU | STM32F303RET6 | Main DSP, synchronous demodulation control, internal ADC sampling, and user interface management | 3.3V |
| TX_DRIVER | ACTUATOR | TC4420 + AO3400 | Drives the transmitter (Tx) search coil with high-frequency PWM carrier signal | 5V/12V |
| RX_FRONTEND | SENSOR | OPA2134 + TS5A3157 | Low-noise signal amplification and phase-sensitive synchronous demodulation (PSD) for X/Y channels | 3.3V/5V |
| DISPLAY | DISPLAY | ST7735 | Displays target identification, signal strength, and menu UI | 3.3V |
| KEYPAD | SENSOR | 74HC165 + 4x4 Keypad Matrix | User input interface for detector settings and mode selection | 3.3V |
| AUDIO | ACTUATOR | LM386 + Piezo Buzzer | Audio target indication and tone pitch generation | 5V |
| POWER | POWER | TP4056 + TPS61023 + MCP1700 | Manages USB-C Li-ion battery charging, 5V boost, and 3.3V LDO regulation | 3.3V/5V |
Key Components
7/7 modules matched to real parts. See the BOM tab for the full component table.
STM32F303RET6 (GD32F303RET6)
GD32F303RET6 is a direct pin-to-pin and peripheral-compatible alternative to the STM32F303RET6, sharing the same Cortex-
TP4056 + TPS61023 + MCP1700 (TP4056)
TP4056 is the primary Li-ion battery charger IC explicitly mentioned in the module description.
Build Summary
- Difficulty: Advanced
- Estimated time: 6-8 hours
- Tools required: Soldering station, Hot air gun, Digital Multimeter, Oscilloscope, ST-Link V2 programmer, Magnifying glass / Microscope
See the Build tab for the full step-by-step assembly guide.
Generated by YuanQi AI Design System · Query: Design a high-frequency VLF metal detector circuit with an STM32 MCU