The USB to UART Bridge RS232 Port Adapter is a high-speed USB device designed to connect peripherals that comply with the TIA/EIA232 standard.

The adapter is based on the Silicon Labs CP2102 controller and is intended for use in systems equipped with a USB bus. Peripheral devices are connected using a standard DB9 connector.

  • support for USB 2.0 specification;
  • full set of RS232 interface signals;
  • RS232 signal amplitude not worse than ±5.5V;
  • USB bus powered.

Installing and connecting the adapter

  1. Before installing and connecting the CP2102 adapter, make sure that external devices are de-energized and connected to the ground loop.
  2. Then, connect external device to the DB9 connector.
  3. Install the adapter into a free USB connector, visually checking the fit of the contact pads until it stops in the connector.
  4. supply voltage to the input-output device, the system is ready for operation.

Before installing the CP2102 adapter, be aware that the USB specification is hot-pluggable, but does not apply to serial I/O peripherals. When working with the adapter, only de-energized peripheral equipment must be connected! Failure to comply with these rules may lead to the exit of the components of the computer system!

Installing the driver based on Windows operating systems

After connecting the CP2102 adapter to the USB port in an operating environment Windows systems 2K/XP it is detected like this:

Now you need to download the CP210x USB to UART driver. Let's start installing it:

During the pre-installer, the user can specify the directory in which the device drivers will be stored CP210x:


If the operating system requests information about the location of device drivers, the user will be required to specify the path to them. The software model of the CP2102 adapter consists of a composite device and a USB to UART bridge, each of which is described by its own inf-file.

Therefore, during the automatic discovery process, the operating system requests both files in sequence.

Adapter drivers must be offered to the system for installation from the directory specified during the pre-installation process, unless otherwise specified by the user himself. Initially, the operating system installs drivers for the composite device (USB Composite Device):

If Current version USB Composite Device drivers are not verified by a digital certificate Microsoft, the user is warned about this with the following message:

The path to the files necessary for the composite device is selected based on the pre-installation conditions:

The next installation step is the USB to UART bridge drivers. As in the previous step, automatic installation is recommended.

If the current version of the USB to UART Bridge Controller drivers is not confirmed by a digital certificate from Microsoft, the user is warned about this by a message. The path to the necessary files is selected based on the pre-installation conditions:

After installation, the CP210x USB Composite Device universal serial bus controller and the COM3 serial port implemented using the CP210x USB to UART Bridge Controller appear in the system properties, and the list of devices takes on the following form:

Everything, the driver is installed!

In an environment where modern computers are rapidly losing COM ports, the USB converter<->COM is a very useful and necessary thing for a radio hacker. But also the USB converter<->UART is also a useful and necessary thing. Naturally, I wanted to have both, and something else, and all this not too expensive.

Buying or assembling any of these gizmos is not a problem today. There are a lot of schemes in the network, a lot of devices in stores. However, as it turned out, you can only buy them separately from each other! And this is despite the fact that all the USB converters I have considered<->COMs convert signal levels first to TTL, and only then to RS-232. Of course, none of these solutions suited me in terms of universality. Why would I buy a separate USB converter<->UART, if it is already included in USB<->COM? Thinking like this, I decided that I had no extra money and best solution will make your own universal converter.

As a basis, the well-known chip cp2102 was taken. Firstly, it allows you to emulate a full-fledged COM port (all lines, not just Rx, Tx), secondly, it has a minimum body kit and allows you to make a board of minimal size, and thirdly, it turned out to be the most attractive price. The converter circuit was taken from the datasheet for this mikruha with practically no changes, I just cut it in half in order to be able to separate USB to UART from UART to RS-232 if necessary.

USB to UART Converter Schematic:

UART to RS232 Converter Diagram:

As a result, it turned out not even two (as originally planned), but as many as three devices in one. Both parts of the developed device can be used as independent USB converters.<->UART and UART<->RS232 (only a pity that the latter requires external power). By connecting the two parts together, we get a USB converter<->com. To pair the parts of the converter, I used the IDC-14F and BH-14 connectors, which, when properly wired, are very successfully soldered to double-sided boards (below in the photo you can see exactly how).

Photo of the finished device:

The only difficult moment is soldering the cp2102 chip, since it is available in a QFN package. You need to solder it with a hairdryer, having previously irradiated the soldered contacts on the microcircuit and the pads on the board. In this case, it is not at all necessary to use any special expensive fluxes. Ordinary pine rosin is enough, only it needs to be dissolved in alcohol and then applied to the sites with a syringe or a special brush. If there is no alcohol, you can dissolve rosin in vodka, but in this case, after applying the solution, you will have to wait a bit, since water evaporates much worse than alcohol.

The USB connector is specially connected to the board with a flexible wire, and not hard soldered to it. As practice shows, such converters are very often used to connect various converters to a computer (COM to HART, COM to RS485, etc.) and when hard soldering a USB connector, it is it that most often breaks off, unable to withstand the weight of all equipment connected to the converter.

Separately, I would like to dwell on the issue of choosing capacitors. The datasheet shows the ratings of the capacitors for power supply 4.7 uF and 1 uF. Often, to save space on the board or for some other reason, they put smaller capacitors instead. Again, as practice shows, this can lead to instability in the power supply of devices connected to the converter (which do not have external power supply and must be powered from the COM port) and, as a result, to their inoperability.

The UART interface is supported by almost all microcontrollers and is very convenient when developing and debugging all kinds of MK devices: upload the firmware through the bootloader and view the debug logs of the device on the computer. But, alas, in modern computers The COM port is gradually disappearing from the number of available interfaces, having been supplanted by the USB bus, and even more so in laptops. This made me puzzled by the issue of manufacturing a USB -> COM adapter. Usually, such adapters are made on the basis of the popular FT232 series microcircuit, but it has a couple of drawbacks: 1) the cost of the microcircuit is ~ 150 rubles 2) microscopic dimensions with all the ensuing difficulties of soldering and manufacturing a printed circuit board.

As an alternative to the FT232, a lesser-known CP2102 was discovered, which costs two times cheaper, and has two times smaller dimensions, and even the QFN-28 case (5mm x 5mm). This microcircuit is a completely finished USB-UART converter that does not require any external wiring (a pair of filter capacitors on the power bus does not count) and has the following features:

  • USB 2.0 specification compliant, full-speed (12 Mbps)
  • integrated 1024 byte EEPROM for storing manufacturer ID, product ID, serial number, device description, etc.
  • virtual RS232 speed from 300 bps to 1 Mbits
  • support for data transfer formats of 5, 6, 7 and 8 bytes of data; 1, 1.5 and 2 stop bits, various parity
  • receiver buffer - 576 bytes, transmitter buffer - 640 bytes
  • built-in reference frequency sources, built-in 3.3V regulator
  • Drivers for Windows Vista/XP/Server 2003/2000, Linux, MacOS-X/ OS-9

Scheme

The adapter diagram is taken from the datasheet, the optional peripherals were thrown away and an LED was added to indicate the presence of power.

The DB9 plug is wired similarly to the output of the computer's COM port, here is its wiring (the direction of the signals is indicated relative to the computer).

The main problem of designing the adapter - the problem of the printed circuit board and mounting the QFN-28 was solved by gluing the microcircuit upside down to the printed circuit board and soldering its leads with a 0.1mm PEV wire. Somewhat dreary, but miniature. Here is the result:


And in the case from DB-9, everything looks like this:

Drivers

Now, having carefully checked the installation, you can test it. The device was detected by the system but windows drivers could not find. I downloaded them. After that, in my system appeared new port- COM5 on Windows and /dev/ttyUSB0 on ​​Linux. Now, by connecting RXD to TXD (pins 2 and 3 of the adapter plug) and running any COM terminal, you can make sure that bytes are sent .. and received .. moreover, the latter coincide with the first ..

One important point: the signal levels at the output of the adapter are TTL and differ from the signal levels of the standard RS232 interface, therefore, ordinary devices for the COM port cannot be connected directly to the adapter, moreover, this can damage the adapter. To connect standard COM devices, you need to add a level converter on the MAX232 family chip.

Below you can download a project in Eagle, as well as a finished drawing of a printed circuit board for a laser iron (for ironing a double-sided printed circuit board, I recommend printing a drawing on tracing paper).

In continuation to the topic “AVR910 Programmer”, about a small device, I want to bring to your attention my next “device”.
At one time, starting to master the microcontroller, I had the goal of exchanging, with the help of it, data with a computer.

The ATmega16 controller has a UART (RS-232) or, more simply, a COM port, only with 5 Volt levels.
To "reduce" it with a computer, you need to increase these levels to 10 volts.
This operation is mainly done by the MAX232 chip.

It can be used when the COM port on the computer (hardware) is used.
But I wanted to use USB port. I went to the store and bought a simple data cable to cell phone.
As I thought, then all cables are the same and the pins in them are RX and TX.
I was wrong... The cables I came across are made on a PL2303 chip, which does not provide a full COM port.
Of the three purchased cables, I got one, which, as they say, worked "with a bang."
It is based on a microchip CP-2102. it USB-RS232 adapter.

Having found a diagram of an adapter based on this chip on the net, I began to assemble the device. This microcircuit can be programmed according to your data (Manufacturer, serial number, device name, if you want to connect your device to a computer). All in attachments.

Its scheme is outrageously simple.
Moreover, the controller can be connected immediately, without level translations (5-10 Volts).
Execution, as always, super miniature.

Excluded fragment. Our magazine exists on donations from readers. The full version of this article is only available

Files

Driver Sample
🕗 13/12/08 ⚖️ 3.23 Mb ⇣ 435 Hello reader!

--
Thank you for your attention!

Program for making your own drivers
🕗 13/12/08 ⚖️ 238.88 Kb ⇣ 416 Hello reader! My name is Igor, I'm 45, I'm a Siberian and an avid amateur electronics engineer. I came up with, created and maintain this wonderful site since 2006.
For more than 10 years, our magazine exists only at my expense.

Good! The freebie is over. If you want files and useful articles - help me!

--
Thank you for your attention!
Igor Kotov, editor-in-chief of Datagor magazine

Scheme and seal
🕗 13/12/08 ⚖️ 41.22 Kb ⇣ 461

Program various arduino- and non-aduino-like controllers, receive information on a computer from everything that has a serial interface with TTL logic.
I use it in my projects with Arduino Pro MIni, Gboard / Iboard and homemade controllers.

How is it different from other similar devices?

  1. An additional DTR pin that can be directly connected to the RESET input on controllers that do not have USB on the board. After that, when programming, it is not necessary to press the RESET button. For me, this is very convenient when the controller is hidden in the bowels of my craft and access to the button can be very difficult.
  2. Manufacturer support, compatibility with original drivers and software, unlike fake FTDI, which have problems with native drivers
  3. Additional pins (holes for contacts) on the board, for example, allowing USB to be put into power-saving mode.
  4. An interesting opportunity to change the VID, PID and the text with which the board is recognized, to assemble your own driver with the required parameters, which is quite interesting in commercial projects. I will talk about this further.

Where to order?

Characteristics

  • CP2102 chip from Silicon Labs
  • Data exchange rate via UART 300bps - 1Mbps
  • Read buffer 576 bytes, write 640 bytes
  • Support USB 2.0 12Mbps
  • Support for SUSPENDED USB mode
  • Built-in power regulator 3.3V 100mA
  • EEPROM with configuration parameters 1024 bytes
  • Supported OS Windows 8/7/Vista/Server 2003/XP/2000, Windows CE, Mac OS-X/OS-9, Linux, Android
  • Ability to customize board and driver settings for your projects
  • Board dimensions 26.5 x 15.6 mm

The board has additional holes where you can solder the outputs of additional modem control and transfer USB to SUSPENDED mode

The size of the board differs little from other similar USB / UART converters

  1. FOCA 2.2 board taken for commercial projects with Gboard /Iboard controllers
  2. Cheap FT232 converter used so far
  3. Surveyed CP2102

Connecting and installing CP2102

Before using the board, you need to install drivers from the official website of Si-Labs

  • To connect to the controller, 5 wires are needed:
  • GND-GMD
  • VCC - V5.0 (V3.3) depending on the board used
  • TX-RX
  • RX - TX
  • RESET controller - DTE


Now the controller can be programmed without pressing the RESET button.

Changing VID, PID and other characteristics of the converter

The board is recognized in the system as Silicon Labs CP210X USB to UART Bridge (COM35)

Sometimes in commercial projects it is necessary that the device has its own commercial name when programming. The CP2102 chip and the board on it provide great opportunities for this

First, download and run the utility for configuring the EEPROM CP1202 parameters (I also needed to download Java Runtime to run the utility)

Now you can change the following settings:

  • Vendor ID (VID). Manufacturer ID. The default value is 10C4 (hexadecimal). In this case, it belongs to SiLabs.
  • Product ID (PID). Product ID. The default value is EA60 (hexadecimal). In this case, it refers to all CP210x bridges.
  • Max Power. The maximum current consumption requested by the bridge on the USB bus. The default value is 32 (hexadecimal). Maximum value 500mA
  • power use attributes. Diet. Bus-powered (USB bus powered) or Self-Powered (powered from an external source).
  • release version. Issue number. The default value is 1.0. Fields can take values ​​1-99 in integer and fractional parts.
  • serial number. Serial number. The default value is "0001" (text format). The field can take any text value up to 64 characters long. Needed to connect multiple devices to a computer
  • product string. The field can accept any text value up to 126 characters long. This identifier is displayed in operating system when connecting the CP210x bridge to the computer for the first time and guides the user in selecting the appropriate driver
  • Custom Data Lock. Configuration data protection.