Old Prolific USB-Serial cable as programmer for Arduino

 Posted by:   Posted on:   Updated on:  2019-10-11T21:09:28Z

How to use PL-2303HX USB serial adapter to program Arduino Pro Mini. Get the right driver for this chip to make it work on Windows 10

I got a 3.3 V Atmega328p development board for a project. Since the board will be plugged into a PCB, I choose the Arduino Pro Mini compatible design, which is just the MCU with a few external parts that are required for proper functionality. There is no USB to serial TTL converter chip. This means that in order to program this board, I needed such a converter.

And I realized I didn't have a suitable one just when the development board arrived. All I own were CH340G with Tx and Rx lines only and the CH341A programmer locked to 5 V levels. The price of such a converter is not a problem, but having to wait for a month or so to be delivered is a problem. I remembered I had some old USB phone cables with included USB-RS232 converter so I decided to make my own adapter to program the 3.3 V Pro Mini board.

PL2303 Serial Adapter for Arduino Pro Mini

PL2303 Serial Adapter for Arduino Pro Mini

To program any Arduino board using the bootloader a serial port is used. Data is transferred using Rx and Tx lines. Besides that, DTR signal is wired to MCU reset, triggering the bootloader to allow data download to board. This is missing to the cheap CH340G adapters. The pin exists at the chip, but it is not wired to the pinheader. Soldering a wire directly to the DTR pin chip could be a valid option, but I didn't want to modify the adapter. The recommended adapter which matches pin to pin with Arduino Pro Mini serial port is based on FT232 and CP2102. I don't know what voltage levels those two use or if they have a level switch.

Anyway, getting back to my situation, I needed to provide the development board with: 3.3 V supply and ground, Rx and Tx lines and DTR signal. Knowing this, I opened the plastic case across the old phone cable. To my luck, it contained something that looked like a rather generic PL-2303 PCB with pads on two opposite sides, for the USB port and for the serial port.

PL-2303HX adapter PCB

PL-2303HX adapter PCB

With the help of the multimeter and chip datasheet I identified the pins. More than that I found out it used 3.3 V levels (the chip includes 5 V to 3.3 V regulator and supports 1.8 V to 3.3 V signal levels). The internal 3.3 V regulator can supply no more than 4 mA, so it wasn't an option to power the development board from it. Instead, the 5 V USB voltage, passed through a small value resistor, was available at the other end of the cable.

In the above photo, on the left side there is the USB port, with GND at the top, near the LED and VCC 5 V at bottom. Between them, there are the data lines. On the right side, there is the TTL serial port, with the following configuration.

The pads of the PL-2303HX PCB

The pads of the PL-2303HX PCB

There are three problems here. First of all, the DTR pad is not connected to a wire. Second, on the red wire, there are 5 V, not 3.3 V and the third is that RxD is pulled up to 5 V. I proceeded by moving yellow RTS wire to DTR pad. Then I removed the pull-up resistor. That's all I could do here. Next step was to build the connector for the development board. I used a small piece of raw circuit board and I cut the copper to make some simple tracks. This piece of circuit must also hold a voltage regulator (1117-3.3).

Connector for Arduino Pro Mini

Connector for Arduino Pro Mini

In the process I switched RxD for TxD, because I got them wrong. This thing is small enough and it can be included in a heat shrink tube. CTS is an input pin and I connected it next to GND, in the same way it is on CP2102/FT232 boards. On Pro Mini board, that pin is GND, so it doesn't make a difference if you connect it or not. The adapter can be plugged into Arduino Pro Mini port.

PL-2303HX USB serial adapter used to program Arduino Pro Mini

PL-2303HX USB serial adapter used to program Arduino Pro Mini

Now, unless you're using Windows XP or Linux, you'll have a surprise when you'll attempt to use PL-2303HX on Windows 7, 8 or 10. The bad thing is that I still found some USB serial cables with this chip version in local stores. Either because it is old either because it is detected as not genuine, the latest driver will not work. You get device error in Device Manager or you get no error at all, but the serial port cannot be opened.

To make it work, I installed a previous driver version and I replaced the newest version got from Windows Update. WDM Driver 3.3.2.105 and previouse versions have been reported to work. You can get version 3.3.2.102 it from here. More information about this issue and fixes can be found here.

No comments :

Post a Comment

Please read the comments policy before publishing your comment.