Cheap USB to Serial adapter to leave in your project

lazarus

New Member
Hi,

For some projects I need constant Picaxe to PC communication over USB.
The Picaxe download cable is very nice but at 12£ it's quite expensive (compared to the low cost of a picaxe) it also, for a good reason, lacks the ability to power the picaxe.

One example is a project where I upgrade a old NES controller to send button events over USB to my PC where a application written in C# converts the serial data back to keystrokes.
the circuit only draws a few miliamps, far less then 100 mA and runs on 5V so it should be perfectly happy with USB power.

If I google a litle bit I find all kinds of USB to Serial/UART devices ranging from 2.5 USD up to infinity :)

What are your experiences with these USB adapters?

One of the cheapest is this one from, where else, China:
http://www.benl.ebay.be/itm/1pcs-USB-2-0-to-TTL-UART-6PIN-Module-Serial-Converter-CP2102-STC-PRGMR-/251039347548?pt=LH_DefaultDomain_0&hash=item3a731c735c
or this one
http://dx.com/p/usb-2-0-to-ttl-uart-5-pin-cp2102-module-serial-converter-blue-152317?item=47

I have used the arduino one before but at 10€ + shipping it is almost as expensive as the Download cable.
http://store.arduino.cc/eu/index.php?main_page=product_info&cPath=11&products_id=143
 

Buzby

Senior Member
Just about any cheap, or expensive, Serial-to-USB will do the normal serial comms.

It's only when you need to program the PICAXE that you need a specific type.
 

lazarus

New Member
Indeed, I read that the levels for programming the picaxe are inverted.

I think I'll just order some dirt cheap adapters and see what happens.

Perhaps they can be reconfigured to use the inverted levels.
 

lbenson

Senior Member
I have used 3 or 4 of the type of usb/serial board shown in the first link in post 1, both cp2101 and pl2303. All have worked, but on all that I have tried, serial idles high as opposed to serial idling low for the programming cable. Your code has to accomodate that.

I have found that pl2303 usb/serial cables and dongles with DB9 connectors idle low, so I have used a number of those for programming.

If anyone has found one of the little circuit boards which idles low, please post a link. They are probably programmable somehow, but I haven't seen how.
 

manuka

Senior Member
The dirt cheap (~US$3) transluscent blue USB-D9 adapters work a treat - I've bought crates of them in recent years & never had (or heard of) any problems. They're faster than the Rev. Ed offering, & their distinctive colour makes them easy to find in a cable snakes pit too. But be aware of a "fake" near lookalike that's not PICAXE friendly. I'd mentioned some months back ( Post 27) that -

FWIW I've been passed a non behaving "fake" adapter of similar colour & sturdy build quality,but in spite of checking all manner of drivers (both new & old) have found it non behaving for PICAXE programming. This is not to say it won't be handy in other applications of course - the issue may relate to Serial/TTL levels. Yeah- I'm lazy & have not measured. Visible differences (with testing under Win XP SP3 & PICAXE Editor Ver 5.5.1) are -

Fake: Only a "340" on D9, thumb screws same colour as housing, no crystal visible, black blob COB (chip on board), no USB rib grips, white cover over USB connections, editor sees as "Prolific USB-to-Serial Comm Port"

Genuine: Full "HL-340" on D9, clear thumb screws, slightly darker blue, canned crystal visible, shrunk small-outline package (SSOP) IC just visible, 3 grip ribs on USB, editor sees as "USB-SERIAL CH340" (CH = "ChipHead” ex Nanjing Qinheng Electronics. Details => http://wch-ic.com/product/usb/ch340.asp).
 

Attachments

Last edited:

Goeytex

Senior Member
@lazarus

I have done extensive testing of most of the "cheap" USB to TTL adapters , including several different models of CP2102, Prolific, and CH340/341. All can usually be made to work unless you happen to get a "fake" Prolific based adapter where the Bridge Chip is not a real Prolific Chip. Even then, a fake may actually work.

None of these can be programmed to invert the data ( required for Picaxe programming) so external inversion will be necessary. Inversion can be done with either a digital inverter chip such as an 74HC14 or equivalent .... or two NPN transistors or even two 2n7000 FETS. Any of these methods should give adequate results.

The only way you would not need to invert the data is if you get a USB to RS232 cable/adaptor, in which case the adapter will be sending RS232 level voltages to the Picaxe just like using an AXE026 serial cable. Some of these are known to be fakes and might not work.

While I use these cheapies here on the bench with good results, my preference is still an FTDI based adapter.

There are some CP2102 based USB to TTL adapters on EBay branded "BAITE". These bring out ALL of the serial signals including DTR,RTS, DSR, CTS and RI. All you have to do is solder in a header into an unpopulated header position on the board. Having DSR, CTS, RTS and DTR available can come in very handy, allowing for example, a VB based app to do I/O with the Picaxe.
 
Last edited:

manuka

Senior Member
None of these can be programmed to invert the data (required for Picaxe programming) so external inversion will be necessary.
I'm confused- we have NEVER needed external data inversion with the cheap transluscent blue "HL-340" USB-D9 adapters when used for PICAXE programming!
 

Billo

Senior Member
I'm confused- we have NEVER needed external data inversion with the cheap transluscent blue "HL-340" USB-D9 adapters when used for PICAXE programming!
Those blue USB-DB9 adapters are at RS232 levels out, which are already inverted. The USB to TTL adapters need to be inverted.
 

Flenser

Senior Member
The dirt cheap (~US$3) transluscent blue USB-D9 adapters work a treat
Have you had a chance to try these on Win 7?

Looking at ebay now I see some of these transluscent blue USB-D9 adapters with the comment that they support XP but not Vista (and no comment on Win 7)
 

Goeytex

Senior Member
I'm confused- we have NEVER needed external data inversion with the cheap transluscent blue "HL-340" USB-D9 adapters when used for PICAXE programming!

Read again closely. I clearly qualified that the inversion requirement was for 1. USB to TTL adapters and 2. For Programming. The adapter you are referring to is NOT a USB to TTL adapter but rather a USB to RS232 adapter/cable that incorporates a MAX 232 type
RS232 Serial line driver IC that does the inversion.
 

SAborn

Senior Member
Have you had a chance to try these on Win 7?

Looking at ebay now I see some of these transluscent blue USB-D9 adapters with the comment that they support XP but not Vista (and no comment on Win 7)
I have used these on Vista for as long as Vista has been around, and also on Win7, to the point later versions of win7 actually include the driver, as a few days ago i plugged one into a PC (win7) that has never used the HL340 before, and to my supprise it found the device and installed the driver.

The HL-340 driver is rather common nowdays and should you get a cable and a early version driver that wont install on Vista or win7 then you can download a new version driver very easy.
The cables are made by Ritmo and the drivers are always on their website and other sites.
The latest driver i use is from the Dorji website as its the HL-340 chip they use for their usb-serial or TTL adapters too.
There is some glitches in the real early drivers, but the later ones work perfect.
 

Flenser

Senior Member
a few days ago i plugged one into a PC (win7) that has never used the HL340 before, and to my supprise it found the device and installed the driver
That was a good pickup SAborn. I just tried this with the blue usb-rs232 adapater I bought on ebay two years ago and my win7 laptop found and installed the driver too. [Update: This was 64-bit win7 too, which is nice]

Mine is very similar to manuka's checklist for "genuine", but not exactly the same
- Full "HL-340" on D9
- clear thumb screws,
- rubbery, translucent, darker blue,
- canned crystal visible (on back of PCB)
- 3 grip ribs on USB (if these are the three ribs that are visible thrrough the plastic on the USB plug in the listing picture)
- black blob COB (chip on board)
- device manager reports as "USB-SERIAL CH340" (both the XP driver delivered on CD with the usb-rs232 adapter and the win7 driver installed automatically report this)
 
Last edited:

Goeytex

Senior Member
I looked at the drivers for the RITMO CT-144 USB to Serial adapter and they are Prolific PL2303 drivers. In the "backup" folder there were older CH340 drivers. So it seems RITMO has used both the Prolific 2303 and CH340/341 in their product, the latest being the PL2303.

The Ritmo 0nline Store does not seem to sell CT-144 adapters any longer as there is no available listing. I highly doubt that the $2.99 "HL340" Cables on Ebay are manufactured by RITMO unless they come in a retail pack branded RITMO or have RITMO stamped on them somewhere.

"HL340" could possibly be a knockoff of the legitimate CH340 chipset manufactured by QinHeng Electronics (WCH). If they work ... great.

I have only tested legitimate CH340/341 adapters like the ones from Dorji. These have worked flawlessly.
 
Last edited:

SAborn

Senior Member
That might have been my mistake calling the chip HL-340, when its actually CH-340 chipset and they all use the HL-340 driver.
 

kentmh

New Member
See my reply to "alternative serial cable." That approach works without additional inversion or soldering and costs less than $13US. I am awaiting delivery on a $1.77US clear blue USB to RS232 adapter with an HL340 chip from China to see if it works too. I will post here if it does.

Cheap HL340 cable does not work!
 
Last edited:
Top