jahboater wrote: ↑
Wed Nov 01, 2017 9:19 am
+1 very useful.
Please could you give a link to where you purchased the cable from?
I purchased mine many years ago for Arduino projects, so I doubt any ebay links from then would still be valid. Just go to ebay and search for CP2102. There are zillions of them, and prices are all over the place. As long as it's a CP2102 chip based model it should work the same as any other. Typically they run in the $2-$5 range, but there are a few for under $2, and even some under $1.50.
There are 5 and 6 pin models. The 5 pin models are mostly missing the DTR line, which is important for Arduino but not needed for the Pi serial console (Pi only needs RXD, TXD and GND, which they all have). So if you don't care about Arduino compatibility, get either type. The ones I have are all 6 pin, but even some of those don't have DTR, so it's a little whacky because they all aren't wired the same. Generally if you purchase a bunch at once from one vendor they will all be the same (for that order). And usually the pictures show what you are getting. I purchased mine in several different batches, which is why I have several different ones.
As long as you follow the labels on the output pins you'll be okay. The connections from the USB TTL adapter to the Pi are:
GND (ground) > GPIO pin 06 (GND)
RXD > GPIO pin 08 (TXD)
TXD > GPIO pin 10 (RXD)
Note that in my picture the Pi Zero has four connections, and no micro-USB power cord. The CP2102 also has 3V3 and 5V outputs, so for the Zero I connected the 5V to GPIO pin 02 (5V) to provide power. It would probably be okay for a model A or B as well (although it would bypass the power protection), but a Pi2 or Pi3 should have its own power supply and only the 3 connections listed above.
For a serial terminal under Linux I install screen and open the serial terminal with sudo screen /dev/ttyUSB0 115200. Under Windows you can use PuTTY with Serial as the connection type, the COM port number under Serial line, and 115200 as the speed (check the port number in Device Manager). With Windows 10 you can also use the Windows Subsystem for Linux (WSL), but you'll need the Fall Creators Update to use serial ports. The procedure is similar to Linux, but the COM port will be ttyS# (note the capital S), with # being the port number Windows 10 assigned to your adapter (if Device Manager shows COM4, you'll use sudo screen /dev/ttyS4 115200 to open the serial terminal). WSL is still beta, so PuTTY might be a little more reliable, but I have found that hitting enter a few times will often connect when the terminal window isn't showing any output.
Linux supports the CP2102 directly. Windows will need a driver: CP210x_Windows_Drivers.zip
(not sure about Mac).
This one looks interesting
, because it has a micro-USB jack instead of a USB-A plug (so you'd connect it with a micro-USB cable). Even though I have a pile of the other ones left over, I couldn't resist ordering a few of these. LOL! I really should learn to resist, because I have spent the last week trying to thin out the fluff in my stuff in preparation to moving in the next month or two. And now I just ordered more stuff I don't really need. I just can't resist cute little electronic doodads, especially when they're so cheap! And now begins the long wait for China shipping (I hope it gets here before we move
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?