Panel For Example Panel For Example Panel For Example
STM32 Metal Detector Transmitter Hardware Design

STM32 Metal Detector Transmitter Hardware Design

Author : Adrian September 02, 2025

This article outlines the design of a wireless detection system. The system consists of a transmitter with six detection channels and a receiver that controls six corresponding LEDs and a buzzer. When the transmitter detects a signal, it sends the data wirelessly to the receiver, which then activates the appropriate LED and the buzzer. A key system requirement is a wireless transmission range of approximately one kilometer. This first part focuses on the component selection, and PCB design for the transmitter unit.

1. Power Supply Selection

The system requires a wide input voltage range of 12V to 36V. To meet this requirement, the power supply must regulate the input to a stable voltage for the internal components. Since the input voltage can be equal to, less than, or greater than the required output voltages (e.g., 12V input for a 12V rail), a standard buck or boost converter is insufficient. A buck-boost converter is necessary for this application.

The XL6019 buck-boost converter was selected for this design. It features a wide input voltage range, high conversion efficiency, and a high output current capability. It also requires minimal external components, which simplifies the circuit design and reduces overall cost.

2. MCU and Wireless Module Selection

The STM32F103C8T6 microcontroller was selected as the main controller for the transmitter. For wireless communication, the nRF24L01 module was chosen. This module operates in the 2.4 GHz ISM band and offers a transmission range of up to 1100 meters under ideal conditions. It communicates via the SPI protocol, making it straightforward to integrate with the STM32 microcontroller.

To simplify development, a pre-built nRF24L01 module was used rather than integrating the RF circuitry directly onto the main PCB. This allows for a modular, plug-and-play approach.

3. Sensor Signal Processing

The sensor's signal output has a maximum rated load current of 100mA. To protect the microcontroller from potential high-voltage signals from the sensors and to prevent ground loop issues, an optocoupler is used to isolate each sensor output from the corresponding MCU input pin.

4. PCB Considerations

To ensure circuit stability, several tantalum capacitors were placed near the wireless module and the microcontroller on the PCB. These capacitors provide additional power supply filtering, reducing noise and ensuring reliable operation of the sensitive components.