Design and Implementation of USB-based Wireless Transmission System (1)

Single chip microcomputer STM32L151CCU6
SMD LED
RF cable can be customized for other specifications

0 Preface

Distance creates a demand for communication, and as distances increase, the requirements for effective communication also grow. Compared to wired communication, wireless communication has become increasingly popular due to its convenience and practicality. There are various methods for implementing wireless transmission. In this paper, a single-chip microcontroller-based system using wireless transmission technology is designed and implemented. The system connects with the host computer via a USB2.0 interface to transfer data to the lower unit. This data is then wirelessly transmitted to control a portable handheld device. The teaching simulator using this system has been applied in real-world scenarios and has shown excellent results.

1 System Design

To enable computer control of certain systems, the lower unit is typically controlled by a microcontroller, and communication between the upper and lower units can be achieved through interfaces like serial or parallel ports. In this paper, we implement a wireless communication system using the USB2.0 interface. The system's connection is illustrated in Figure 1.

Wireless Transmission System Connection

Figure 1: Wireless transmission system connection.

As shown in Figure 1, the host computer receives user input, sends it via the USB2.0 interface to the lower computer, which processes the data and transmits it wirelessly. The receiving device then displays the corresponding information on the handheld device, enabling wireless communication between the upper computer and the handheld device. LEDs are used to show synchronization status from the host on the handheld device. Based on this, the system structure diagram of the wireless transmission system is designed as shown in Figure 2 on the following page.

Wireless Transmission System Structure

Figure 2: Wireless transmission system structure.

2 Specific Implementation of the System

2.1 Realization of USB2.0 Interface to Serial Interface Function

Since the lower computer uses the widely adopted USB2.0 interface, it offers great flexibility for application. However, the 51-series microcontroller used in the lower computer does not support the USB interface and only supports a standard full-duplex serial interface. Therefore, data conversion between the USB and serial interfaces is required. This is achieved using the FT232BM chip [3].

The main function of the FT232BM is to convert protocols between USB and serial ports. On one side, it receives USB data from the host and converts it into a serial stream format, sending it to the peripheral. On the other side, the peripheral can send data back to the host in USB format through the serial port. All intermediate conversions are handled automatically by the chip, so developers do not need to handle firmware design. The FT232BM consists of a USB transceiver, a serial interface engine, a USB protocol engine, and a FIFO controller. The USB transceiver provides a full-speed physical interface for the USB bus, supporting UHCI/OHCI host controllers. The serial interface engine performs serial/parallel conversion of USB data according to the USB1.1 specification, including bit stuffing, bit anti-padding, and CRC generation and error detection. The USB protocol engine manages data flow from the device’s control port. The FIFO controller handles data conversion between the external interface and the transceiver buffers, and it interfaces with a microcontroller such as the AT89C51, interacting through two data lines (P30 and P31) and a read/write control line. The FT232BM includes two FIFO buffers: one for a 128-byte receive buffer and another for a 384-byte transmit buffer.

Design and Implementation of USB-based Wireless Transmission System (1)2 [1] [2] [3] Design and Implementation of Wireless Transmission System Based on USB (1)3

Din Connector

DIN Connector, DIN Circular Connectors, Mini DIN Connector, Male Female DIN Connector, DIN MIDI Adapter

Changzhou Kingsun New Energy Technology Co., Ltd. , https://www.aioconn.com

Posted on