USB to TTL IC recomendations - Page 1
Forum section: electronics / beginners

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 10:55:23 am
content: Hi All,There are several USB to TTL IC converters. The FT232RL being common and costs 4USD, ATmega16UR at 2USD, CH340G at less than a dollar on eBay but does not seem to be available on Mouse, Digikey or Newark and there is the FT230XS-R which is at 2USD.Experienced users at the arduino forums says that the ATmega16U2 is a no no as it needs to be programmed and often fails. The FT232RL is costly on Digikey the eBay is not reliable for Genuine ones as the windows drivers would brick any FAKE FTDI chips if detected. Then that leaves me with the CH340G and FT230XS-R, the CH340G, not sure if that would be a reliable would it fail at any time.I was hoping to go with one of the three, FT230XS-R, CH340G or the ATmega16U2(Since arduino already uses them, tho it has bad reputation for failing). I've seen that the FTD232RL is quite slow when uploading sketch and the UNO is quite faster and i believe that it is because of the ATmega16U2.I would really appreciate if anybody could advise me on this.

author: Nusa
author_rank: Super Contributor
timestamp: October 21, 2017, 11:50:11 am
content: Another choice is PL2303HX, which is another Chinese chip that predates the CH340G.CH340G seems to be the current chip of choice for arduino clones. I'm sure that choice has more to do with price than reliability.Both of the above can be had in module form for under a dollar each. If you just want the IC, they should be even cheaper.I'm no help on reliability issues, as I've not managed to kill any myself. Yet.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 12:13:50 pm
content: Yes CH340G are cheap and the arduino forums recommends to use it more than the FTDI as the Chinese version prone to getting bricked during windows update if not genuine.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D

author: stj
author_rank: Super Contributor
timestamp: October 21, 2017, 12:16:25 pm
content: CH340 is a great chip, you can even configure the ttl side for 3.3v or 5v

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 12:37:32 pm
content: Great chip but where can I get one. Seen only on eBay I am afraid if I should get them for a production environment.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D

author: sleemanj
author_rank: Super Contributor
timestamp: October 21, 2017, 12:54:21 pm
content: Cp2102/2104 from silabs

author: stj
author_rank: Super Contributor
timestamp: October 21, 2017, 01:17:08 pm
content: Quote from: anishkgt on October 21, 2017, 12:37:32 pmwell how many would you want??

author: stj
author_rank: Super Contributor
timestamp: October 21, 2017, 01:43:33 pm
content: something like this:https://www.aliexpress.com/item/10pcs-CH340G-CH340-WCH-SOP16-USB-turn-serial-IC-FREE-SHIPPING-IN-STOCK/904977665.htmlor contact WCH directly?http://www.wch-ic.com/http://www.wch.cn/

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 04:27:21 pm
content: But again the Chinese distributors are known for fake products. Does anyone have any experience with these ? does the fake really hold up ?I would generally go for the FTDI chip but as dave pointed out the fake ones can be bricked via the Windows update and i don't want that to happen once in production and i know how it feels when it reaches the end user.

author: Monkeh
author_rank: Super Contributor
timestamp: October 21, 2017, 04:30:12 pm
content: Nobody fakes the CH340, it's already cheap and ugly.CP2102.

author: stj
author_rank: Super Contributor
timestamp: October 21, 2017, 04:31:26 pm
content: contact WCH for a list of distributors,but i'll say this, the chinese do act against copying of products from chinese company'sso it would be pretty stupid to clone a WCH product - unless you want to go to prison or be shot!!

author: Monkeh
author_rank: Super Contributor
timestamp: October 21, 2017, 04:33:28 pm
content: Or just buy a chip which wants to be bought.By the time you've added a crystal and extra parts and used three times the board area using that thing..

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 06:49:04 pm
content: The CP2102 does not come in 5v, I guess then it is the WCH SOP16 then.

author: Monkeh
author_rank: Super Contributor
timestamp: October 21, 2017, 06:49:50 pm
content: Quote from: anishkgt on October 21, 2017, 06:49:04 pmWhat do you need 5V for? Check your thresholds..

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 06:51:23 pm
content: Quote from: Monkeh on October 21, 2017, 06:49:50 pmMy pcb runs at 5v and am i do not have much space on it now and can't afford to add a refulator into it.

author: Monkeh
author_rank: Super Contributor
timestamp: October 21, 2017, 06:51:53 pm
content: Quote from: anishkgt on October 21, 2017, 06:51:23 pmYou don't need to, read the datasheet.

author: sleemanj
author_rank: Super Contributor
timestamp: October 21, 2017, 09:12:01 pm
content: Cp2102 has an internal 3v3 reg, it can take 5v no problem and power itself from it's 3v3, you can tap off the 3v3 to pass to your target if you want (for low currents). It also does not need a crystal, and indeed the external component count is very low. The downside is the package, it doesn't come in big leaded packages only MLF which can be a bit of a pain hand soldering, but not impossible.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 21, 2017, 09:15:15 pm
content: The quick search showed 2.7 to 3.3v but the datsheet has a better not on it. Soi it does have a 5vWww.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D

author: savril
author_rank: Regular Contributor
timestamp: October 21, 2017, 09:43:16 pm
content: On mac, only FTDI has driver that don't require you to download something (as on Windows, if you forget the kill fake episode). Cp2102 has official drivers but they are not updated often.CH340 has no official driver but you can find some drivers on the net. But there are no "main" trusted source of theses driver. So you could end up with drivers with embedded malware.FTDI are expensive but they offer more than other alternatives. A computer/micro-controller chip is more than a piece of silicone, you have to consider the whole set : hardware+software.For my own hardware, I would consider the CH340 but If I were to distribute it to friends, family, etc, I would prefer to use FTDI. I wouldn't want to update the drivers on each of their computers.Edit: I haven't seen you were looking for a chip for production. As more knowledgeable people have said, I would stay away from the cheapest offer and look for a know enterprise such as silab.

author: ebclr
author_rank: Super Contributor
timestamp: October 22, 2017, 12:52:27 am
content: CP2102 is the best, and simple works no trick drivers, that will trouble you due to fake, Trouble-free Ic. FTDI is a nice id, but since on 10 9 will be fake, and FTDI put a "bomb"on the driver is better to avoid this brand, same for profilic, Go with CP2102 is the best option

author: cdev
author_rank: Super Contributor
timestamp: October 22, 2017, 01:04:48 am
content: Subjectively I have had the most experience with the CP-2102 and its never given me trouble.Their user support is good. They will answer end user queries if you have a question.OTOH I also recently bought a ($9) USB device based on a WCH Ch341A chip and it claims to interface USB to - almost everything.TTL+CMOS UART, SPI, I2C and parallel interface..I have not had the time to figure out how to use this device but I am looking forward to it.It already appears to be supported in the Linux kernel, it is immediately recognized, which is a pretty good start.Quote from: anishkgt on October 21, 2017, 10:55:23 am

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 09:21:29 am
content: Thank you guys for the suggestion.I would just somebody to verify this schematic as this quite new to me, i've done it with the best of my knowledge.

author: ebclr
author_rank: Super Contributor
timestamp: October 22, 2017, 11:29:32 am
content: This will clarifyhttps://www.silabs.com/documents/public/user-guides/CP2102-EK.pdf

author: ElektroQuark
author_rank: Unknown
timestamp: October 22, 2017, 12:03:41 pm
content: You have the Microchip part too, theMCP2200.About $1.50.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 12:10:29 pm
content: Quote from: EdoNork on October 22, 2017, 12:03:41 pmwhich does not seem to work out of the box and in quantity of 1500 the price is USD1.5, else USD2.0

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 12:11:43 pm
content: Quote from: ebclr on October 22, 2017, 11:29:32 amwas not helpful as it is specifically for USB powered.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 04:27:20 pm
content: would this be correct.

author: Monkeh
author_rank: Super Contributor
timestamp: October 22, 2017, 04:28:27 pm
content: No.Read the datasheet. All of it.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 04:30:57 pm
content: was expecting something better than a 'NO' like where exactly.

author: Monkeh
author_rank: Super Contributor
timestamp: October 22, 2017, 04:32:16 pm
content: Well for starters you're going to blow the chip up by shoving 5V into the rail indicated to be 4.2V absolute max..VBus should not be tied high. See datasheet, page 20.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 07:53:18 pm
content: Thanks but, Page 20 was all about Functional description. Going through the datasheet with a cup of coffee, came out with the one attached.

author: Monkeh
author_rank: Super Contributor
timestamp: October 22, 2017, 08:10:13 pm
content: Quote from: anishkgt on October 22, 2017, 07:53:18 pmPlease make sure you're reading the current datasheet, then:https://www.silabs.com/documents/public/data-sheets/CP2102-9.pdfQuoteWe're getting somewhere.Now the self-help is out of the way:Your Vbus divider will exceed input specs at 5.5V in. Probably not a big concern, but I'd go for 22k over 33k.The 4.7? cap on +5V isn't really needed, but per-datasheet a 1? ceramic should be there. Realistically, you're fine with 100n on both Regin and Vdd.Your LEDs are never going to light. You may want to look at other chips in the Silabs range (CP2102N, CP2104) which have programmable I/O, including dedicated LED drive functions.Showstopper: You're never going to come out of reset.Oh, and where'd the third ground pin come from?

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 09:11:41 pm
content: Quotei could be wrong with the parameters on LTSpice but i see 3.4v. How true is that ?QuoteI was following this from digikeyhttps://www.silabs.com/documents/public/data-sheets/cp2102n-datasheet.pdfand their the TX and RX leds are connected to TX and RX pin of the CP2102N on Pg:18Quotechange to VDD from GNDQuoteWhich third GND?

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 09:22:37 pm
content: I was working with the wrong package in eagle. The one that eagle has is the MLP28 and i was following the QFN28 datasheet.

author: Nusa
author_rank: Super Contributor
timestamp: October 22, 2017, 10:28:33 pm
content: VBUS looks like a 5V input (abs max 5.8V). Why the voltage divider?

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 10:46:45 pm
content: Quote from: Nusa on October 22, 2017, 10:28:33 pmto ensure reliable device operation, pg:5

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 10:53:05 pm
content: made an eagle QFN28 Package and a symbol.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 10:59:09 pm
content: replacing 22k and 47k with 33k and 22k respectively gives 2.00vJust adding LEDs on the RXT and TXT pins would make it glow or should the IC be programmed in any way ?

author: eugenenine
author_rank: Frequent Contributor
timestamp: October 22, 2017, 11:03:30 pm
content: Quote from: EdoNork on October 22, 2017, 12:03:41 pmI thought this one myself but it appears to need some setup to use. I couldn't find anywhere that didn't require some silly windows program to set the baud rate and such. I ended up going back to the FTDI since I don't run windows anyway I don't have driver issues.

author: Peabody
author_rank: Super Contributor
timestamp: October 22, 2017, 11:27:54 pm
content: I just want to reinforce what's done with the /RST pin on the CP2102. I ran across a batch of USB-to-TTL modules using this chip, and unfortunately all the outputs - DTR, RTS and TXD - were at about 4.3V instead of the correct 3.3V, which might easily destroy a 3.3V processor. It turned out that it was because the designer had connected /RST to VBUS (5V). One of the drawings above showed it connected that way, and that's a no go. VDD yes, but not VBUS. Actually, it will run fine if you don't connect /RST to anything.Anyone needing to add this function might want to look at using a module instead of the chip and all the supporting parts. The one I used had a micro USB connector already installed, and sells for $1.23, which is less than what I would have paid for the chip alone. The modules I got here have /RST as NC, which works fine:https://www.ebay.com/itm/162217753561

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 22, 2017, 11:34:41 pm
content: QuoteThe RST pin if grounded would be in reset state would never come out of it hence the same is connected to +5v and not VBUS. VBUS is connected to a voltage divider. The schematic is self-powered and not VBUS powered. At least that is what i intent to do it.I will wait for the pros to have a look at it.

author: Monkeh
author_rank: Super Contributor
timestamp: October 23, 2017, 01:40:05 am
content: Quote from: anishkgt on October 22, 2017, 09:11:41 pmBecause you just ran it with a 5V input, not a 5.5V input. And seriously, LTSpice for a divider?Quote from: anishkgt on October 22, 2017, 10:59:09 pmOther way around..QuoteRead the datasheet! Pages 15 and 18.Why are your 100n caps polarized?

author: jdgabbard
author_rank: Contributor
timestamp: October 23, 2017, 03:23:10 am
content: I've used the CH340 without any problems. I actually needed a USB to TTL adapter the other day and wired one up in about 10 minutes. It's a good option. The only catch is that you need a 12mhz oscillator/crystal.

author: ebclr
author_rank: Super Contributor
timestamp: October 23, 2017, 05:54:11 am
content: CH340 is nice but have some little problems.Windows Driver interface is very unusual and ugly,When new ms release new windows versions, drivers take a long time to be updated while CP2102 coming in beta test stagerequires a crystal, that cp2102 does notIt's bigger in size than CP2102Other than that CH340 works nice

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 23, 2017, 06:39:42 am
content: Quotethose are US model caps and they are ceramic, polarised has a '+'QuoteThe page saysBy default, all of the GPIO pins are configured as a GPIO input. The speed of reading and writing the GPIO pins is subject to the timingof the USB bus. GPIO pins configured as inputs or outputs are not recommended for real-time signaling.More information regarding the configuration of these pins can be found in Xpress Configurator in Simplicity Studio and AN721: CP21xxDevice Customization Guide. Guidance on GPIO usage can be found in AN223: Runtime GPIO Control for CP210x.Link to the guidehttps://www.silabs.com/documents/public/application-notes/AN721.pdfwell in that case i'd rather go with CH340.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 23, 2017, 06:44:03 am
content: @cdev how is the GPIO's configured to blink the TX and RX LEDs

author: Monkeh
author_rank: Super Contributor
timestamp: October 23, 2017, 11:36:43 am
content: Quote from: anishkgt on October 23, 2017, 06:39:42 amThat's up to you. It only takes a moment to configure and you get custom serial numbers as a free bonus.Please read page 18 as well.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 23, 2017, 11:37:41 am
content: Yup that sure is an advantage and that’s why I would give it a try.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 23, 2017, 03:25:49 pm
content: Oh just thought i'd share as i was a bit confused. There are two models of the same one is CP2102 and one with the 'N' at the end which is the new one which is USD1.4 and CP2102 is USD3.00.My design and all questions were about the CP2102N and so are my schematic. With that cleared would the attached be correct following this datasheethttps://www.silabs.com/documents/public/data-sheets/cp2102n-datasheet.pdfJust a few questions about the schematic.Are the leds connected on pins 18 and 19 correct and is there 4.7uf polarized cap required ?Can this be connected to the VREGIN on pin 7.

author: Monkeh
author_rank: Super Contributor
timestamp: October 23, 2017, 03:45:29 pm
content: The LEDs should work now, yes.You'll survive without the extra cap.Your divider is still the wrong way around.Once again, where is the third ground pin coming from?

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 23, 2017, 09:36:59 pm
content: Thanks ! appreciate thatQuoteThe source of 5v is from the USB as mentioned in the Datasheet so that VBUS detects and USB is connected.QuoteThat is the Exposed pad underneath. correct the symbol by adding two more pins for that rather than appending them to GND.

author: Monkeh
author_rank: Super Contributor
timestamp: October 23, 2017, 11:59:53 pm
content: Quote from: anishkgt on October 23, 2017, 09:36:59 pmSwap the values. 22kover33k.

author: anishkgt
author_rank: Frequent Contributor
timestamp: October 24, 2017, 05:31:38 am
content: so both at 22k ?