Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CH340 UART - USB Chip - Cable Length Problems?

Status
Not open for further replies.

JonSea

Well-Known Member
Most Helpful Member
I'm having some communications issues with a CH340 UART - USB chips. They work great with a 3 - 4 foot USB cable but with longer cables they aren't working reliably or at all. The device may or may not be recognized but no data is sent if it is recognized with a longer cable.

Is this a common, known problem? I can't believe my circuit is the problem, with about an inch of parallel tracks between connector and chip.
 
Do you have the terminator resistors on the data lines? You can get away with not using them for short cables, but they're recommended for longer cables, IIRC.
Is the 5V power getting to the CH340 stable and appropriate?
 
The CH340 takes care of terminating resistors I believe.

The CH340 is powered from the host. The rest of the circuit is isolated with its own power supply.
 
3 or 4 feet is the longest that works reliably.

I'm mostly wondering if this is a known condition with this chip. Being able to reliably use a 6' cable would be nice.
 
Specifically, I'm asking about the performance of the CH340G, 6' seems like a reasonable length of cable. I'm wondering if anyone else has experienced this or if it's unusual.
 
I've used a lot longer cable then 6 foot with a CH340G I cut the end off a old usb printer cable I'm sure its close to 8 feet less cutting the end off .
I used the circuit that's in there data sheet to make mine.

usb.png
 
Last edited:
Maybe I read the wrong data sheet, but the frequency response on the opto seem kinda low for USB.
 
They are on the UART side of the chip, and I'm running 9600 baud, so they're not part of the problem
 
oops
 
I thought the same thing at first Mike.:)

But staying with the 9600 baud side for the moment.

It is not clear what pin 3, Rx, on the CH340G comprises, but it seems that the drive to pin3 needs a bit of consideration. R13, 10K, seems high and a pull-down resistor would seem to be required.

spec
 
The circuit works flawlessly with a 3' USB cable, so I believe my circuit on the UART side of the chip is ok. It's based on a circuit in the "data sheet" with the exception of leaving out what they call a buffer/show as an inverter on the lines from the from the micro in case it's lacking in drive current.
 
I thought the same thing at first Mike.:)

But staying with the 9600 baud side for the moment.

It is not clear what pin 3, Rx, on the CH340G comprises, but it seems that the drive to pin3 needs a bit of consideration. R13, 10K, seems high and a pull-down resistor would seem to be required.

spec
Yeah I was a bit hasty in my reply. I should know better. :)
 
There is a limit on the length of USB cables and not all USB interfaces are the same. The quality of the USB cable also has an effect: https://www.yourcablestore.com/USB-Cable-Length-Limitations-And-How-To-Break-Them_ep_42-1.html I have a hard drive that will not work reliably with any old three feet USB cable.

That is to do with data integrity, but generally speaking, transporting 5V power over USB cables ia unsatisfactory because of the characteristics of the USB plug/socket and the resistance of the two power routes in the cable- some mobile phones, Android for example, need a special low resistance USB power cable to charge in the specified time. Otherwise Android phones take longer to charge.

spec
 
I have some 6 foot usb cords one i paid 28 dollars for it charges and data works great. I left it at home one day and was in need of it to upload some picture i stopped at a dollar store and picked up a cheap cord it would charge my phone and data didn't work to upload
 
I found out the hard way....some of the cheap cables with chargers don't even have wires for the data lines!
 
Status
Not open for further replies.

Latest threads

Back
Top