Objective To develop a digital signal processing method for magnetic positioning of electronic capsules according to the theory of multiple alternating magnetic field source electromagnetic positioning, so as to reduce the volume and power consumption of electronic capsules. Method Based on STM32 MCU, software algorithms such as fast digital filtering, peak detection and frequency detection were designed to replace the corresponding analog hardware circuits such as analog filtering, peak detection and comparison circuits. Results The experimental results showed that the average relative error of the peak detection and frequency detection of the digital signal processing system were 1.51% and 0.28%, respectively. The linear relationships of theoretical amplification factor and actual amplification factor of the programmable amplifier were basically consistent, and the average ratio difference was 4.51 dB. Conclusions The proposed digital signal processing system can replace some analog hardware circuits, providing a basis for reducing the size and power consumption of electronic capsules. Key words: Electronic capsules; Magnetic positioning; Frequency division incentive; Digital filtering; STM32