Telecnatron

radio, electronics, computing, telecnology.

rss icon

Support This Site.

Please consider helping to support this site by making a contribution.

USB To RS232 Serial Adapter Dongle

By Stephen Stebbing 2020-11-06 12:34:01 2 comments

1. Introduction

Pretty much all of my microcontroller projects these days rely on robust serial communications between the development PC and the MCU board, both for flashing via a bootloader and for logging and control during testing and debugging.

After wasting much time on ad-hoc wiring with flaky connections, I decided to standarise on using ⅛” stereo jacks, plugs and sockets. These are cheap and pre-made cables are readily available.

stereo plug.

With ground and two signal lines, these connectors are ideal for RS232, and even come with the memory aid: ring -> RX, tip -> TX.

Of course, TX and RX need to be crossed over between the two connected devices, so my memory aid applies on the MCU side.

The board described here combines a USB-to-UART module with a max3232 to convert to RS232 voltage levels and a ⅛” stereo jack as the output connector. Two jumpers allow for the setting of TX and RX lines to be either ring or tip, and avoids the need to muck around with crossed-over cables. etc

PCB showing the two modules, the jumpers and the output jack

The prototype unit, show at left, is a little rough and a bit blurry, but has proved to be indispensable in providing quick, easy and robust serial connections.

According to the lsusb utility, the USB-to-serial module is Cygnal Integrated Products, Inc. CP210x UART Bridge In my experience, some USB-to-serial chips are unreliable when used on Linux, but the CP2102 chips work reliabily every time and I now use them exclusively.

PCB copper side, a bit rough, but perfectly good enough.

Unfortunately, the CP210x module shown in red above has become quite hard to find, and prohibitively expensive and the cheaper alternatives are unsuitable as they have a different pin-out.

The blue one shown at left is a suitable replacement although it has a micro USB connector and hence requires a USB cable to connect it to the PC.

The max3232 TTL-RS232 converter module is commonly available and for less that a dollar, there is some information on it available here.

2. Circuit

serial adapter circuit diagram.

The circuit is simple enough: the 5v from the USB module powers the max3232 module and the two jumpers allow for the RS232 TX and RX lines to be set to either the TIP or the RING of the ⅛" stereo jack

3. PCB

Well, the board sure looks pretty in the Kicad 3D render:



PCB kicad render of front


PCB top side, with toner-transfer 'silk screen'

But perhaps not so much in real life. The board was made with the ‘toner transfer’ method wherein the laser-printed artwork is transfered to the board using your wife’s iron when she’s not at home.

A reasonable ‘silk screen’ layer can be made on single-sided boards, as shown at left, with only a little heat required.

PCB back, copper side, with hairspray laquer to inhibit tarnishing.

On the back, the ground-fill areas were coloured in with a permanent marker and the board etched in 30% HCl from the swimming pool shop, mixed with a little 3% H202 from the supermarket.

A couple of coats of cheap hairspray does a good job of preventing tarnishing of the copper and doesn’t hinder soldering. The holes for component leads were drilled with a 0.8mm bit on a rotary tool. The slotted holes for the ⅛" stereo jack were drilled with 1.2mm bit.

PCB kicad render of front

Completed unit showing USB serial and max3232 modules and audio jack

The protype board, shown at left, had the ring and tip markings interposed, so a little white-out and marking took care of that. This error has been corrected in the artwork that is provided here.

4. Resources

PCB artwork

PCB Artwork in svg format:

Copyright 2012 - 2024 Telecnatron CSS | Login | Privacy | Sitemap Web software by Stephen Stebbing.