January 09, 2025

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

In recent years, with the development of wireless communication technologies, the integration of wireless communication devices has become higher and higher. This paper introduces a specific method for designing short-range wireless data transmission system using high-performance, low-power 32-bit microprocessor STM32F103 and RF transceiver chip nRF24L01.

1 system design

The short-range wireless data transmission system is mainly composed of a power manager AMC7635, a microcontroller STM32F103, and a radio frequency transceiver nrf24l01. The key circuits are described below.

1.1 Power circuit

The power supply of this design is powered by a 3.7V lithium battery, and then passed through the low-voltage drop power management chip AMC7635 to generate a voltage of 3.0V to supply power to the STM32F103 and nRF24L01. Figure 1 shows the power supply circuit of the system.

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Figure 1 system power supply circuit

1.2 Microcontroller Circuit

The microcontroller uses the STM32F103 with the ARMCortex-M3 core. The STM32F103 controller features high performance, low power consumption, low voltage, and high integration and ease of development. Figure 2 shows the microcontroller circuit in the system. The interface between the controller and the RF transceiver nRF24L01 is realized by the SPI port, namely, the four signal lines SPICS, MOSI, MISO and SCK in Figure 2 and the two signal lines CE and INT0. In addition, the controller can also extend the output of one motherboard RS232 port and eight GPIO ports.

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Figure 2 Microcontroller circuit

1.3 RF transceiver circuit

The nRF24L01 operates in the 2.4 GHz to 2.5 GHz ISM band. The transceiver is equipped with a frequency synthesizer, power amplifier, crystal oscillator, modulator and other functional modules. It is a highly integrated wireless transceiver. The external circuit of the nRF24L01 is relatively simple and incorporates the enhanced ShockBurst technology, where the output power and communication channel can be configured through the program. At the same time, the chip's power consumption is extremely low. When transmitting at -6 dBm, its operating current is only 9 mA. At the time of reception, the operating current is only 12.3 mA. The control circuit of the nRF24L01 can be connected to the SPI port and GPIO port of the STM32 controller. Figure 3 shows the schematic diagram of the RF transceiver circuit composed of the chip.

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Figure 3 RF transceiver circuit

2 system programming

This system can transplant UCOSII operating system on STM32F103. The system program is mainly divided into three parts: the system initialization program of the host, the keyboard and display program, and the control program of the RF transceiver nRF24L01. Figure 4 shows the software program flow.

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Figure 4 system program flow chart

The key to system programming is the migration of UCOSII operating system and SPI port communication control. Regarding the porting of the operating system, the chip manufacturers have provided examples on the official website, and will not be repeated here.

The program source code for the system SPI initialization and transceiver functions is listed below.

Void SPI_IniTIal (void)

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Design of short-range wireless data transmission system based on STM32F103 and nRF24L01

Of course, the GPIO port can also be used to implement SPI communication, but the communication rate requirement is not very high. Because the SPI's burst transfer protocol is implemented through GPIO port emulation, and its versatility is to be considered, its program is more complicated. The general procedure for implementing SPI transceiving via the GPIO port is given below:

3 Conclusion

The on-site debugging proves that the wireless data transmission system presented in this paper has the advantages of low cost, high speed and reliable transmission. In practical applications, nRF24LO1 can also be composed of one-to-one, one-to-many, many-to-many structures as needed. Therefore, the system can be widely used in wireless measurement and control, file transmission, home wireless applications, industrial control and other occasions.

Velcro Cable Sleeve

Description of velcro cable sleeve for cable harness

Velcro cable sleeve is a nonexpandable sleeving woven from monofilament (weft) and multifilament (warp) polyester yarns. It provides a lightweight, costeffective and tough solution for the protection of a wide range of components. Its inherent flexibility allows it to bend, coil and conform to irregular shapes, while its open design allows it to be installed on completed assemblies.

Material: Polyester monofilament and multifilament

Operating range: -50 °C ÷ 150 °C

Melt point: 250°C ± 5

Flammability: VW-1

Approved: RoHS, Halogen free

Standard colours : black, grey

Cutting tool: scissors

Colorful self closing braid wrap for automotive


Self closing velcro cable sleeve is a non-expandable sleeve woven from monofilament weft and multi-filament warp.

It provides a lightweight, cost effective and tough solution for protection of a wide range of wire and cable.

Its inherent flexibility allows it to be bend, coil and fit with irregular shapes while its open design allows it to be install on finished assemblies quickly.




Conduit Cable Sleeves,White Fabric Cable Sleeving,Black Fabric Cable Sleeving,Velcro Cable Sleeve For Cable Harness

Shenzhen Huiyunhai Tech.Co.,Ltd , https://www.hyhbraidedsleeve.com