At present, most instruments and equipment use RS232 interface to communicate with computers, but with the development of computer technology, the USB standard interface that supports hot plugging will replace the RS232 interface, so computers will be less and less equipped with or even not equipped with RS232 interfaces.

1 Introduction

At present, most instruments and equipment use RS232 interface to communicate with computers, but with the development of computer technology, the USB standard interface that supports hot plugging will replace the RS232 interface, so computers will be less and less equipped with or even not equipped with RS232 interfaces.

Although both RS232 interface and USB interface are serial interfaces, their data format, communication protocol, signal level, and mechanical connection mode are different. In this way, the computer cannot control the existing equipment. To solve this problem, the RS232 interface of the existing equipment must be converted to a USB interface. To realize this conversion, USB/RS232 bridge devices such as CP2102 and CP2103 can be used to design. The computer virtualizes an RS232 interface through the USB interface and connects with traditional equipment devices. The device-to-computer interface is in the form of a USB interface.

2. Interface design of wireless data communication terminal system

The wireless data communication terminal system system includes: CP2102USB to RS232 module, STM32F103C6T6 control module, NRF2401+ wireless sending module. The structure diagram is shown in Figure 1:

 Design of wireless communication terminal system based on USB to UART technology and wireless technology

3. Selection of wireless data communication terminal system

The USB interface and RS232 interface converter CP2102/CP2103 launched by Silicon Laboratories is a highly integrated USB-UART bridge that provides a simple and convenient solution to convert RS232 to USB using minimal components and PCB space. As shown in Figure 2, CP2102/CP2103 includes a USB function controller, USB transceiver, oscillator, and asynchronous serial data bus (UART) with all modem control signals, in a 5×5mm MLP-28 package.

Design of wireless communication terminal system based on USB to UART technology and wireless technology

P2102/CP2103 is used as a USB/RS232 bidirectional converter. On the one hand, it can receive USB data from the host and convert it to RS232 information stream format and send it to the peripheral; on the other hand, it can convert the data received from the RS232 peripheral to the USB data format and send it to Host, which includes control and handshake signals.

UART is set by programming to support various data formats and baud rates. Program the data format and baud rate of the UART on the COM port of the PC. Table 1 is its data format and baud rate.

Design of wireless communication terminal system based on USB to UART technology and wireless technology

The NRF24L01+ module wireless data transceiver module uses Nordic’s nRF24L01+ high-performance wireless radio frequency chip to perform wireless data transmission in the 2.4GHz wireless frequency band, ensuring high-speed communication quality, and can implement a strict data verification mechanism on the wireless communication protocol. Ensure reliable communication of data. The NRF24L01+ module can configure the local address and sending address. You can select the channel (0-127) to set the frequency and realize the data transmission of multiple Electronic systems, which can realize the wireless data transmission between the device and the device. Convenient and simple.

4. Hardware design of wireless data communication terminal system

The peripheral design of CP2102 is shown in Figure 3, and the main controller circuit is shown in Figure 4.

Design of wireless communication terminal system based on USB to UART technology and wireless technology

5. Wireless data communication terminal system debugging

The software design interface of the PC is shown in Figure 5.

Design of wireless communication terminal system based on USB to UART technology and wireless technology

6. Concluding remarks

This solution uses USB to UART technology, combined with wireless technology, provides a simple and practical design solution for data communication between PC and remote equipment, reduces development time, reduces development costs, simplifies peripheral ports, and provides peripherals The 5V power supply can be used for data transmission and signal control; and it provides a convenient and cheap method for the development and learning of data wireless application systems.

The Links:   A50L-0001-0326 CM400HA-24E