USB to TTL - quality device suggestion - Page 1
Forum section: electronics / beginners

author: RigidNormal
author_rank: Newbie
timestamp: October 20, 2022, 04:09:38 am
content: Hello,So I killed 2 access points while trying to develop an OpenWRT image for them.The first one I killed when I used a USB TTL adapter that I believe kept the TTL signal level at 5V even when selecting 3.3V.The second one I killed (I did check the TTL voltage this time) probably due to a broken USB adapter or maybe some isolation issues.My biggest problem is that I have a heap of cheap USB TTL adapters that worked well with Arduinos and the long time between having a chance to work on the access points. So I might pick one of the incompatible USB adapter.The access points normally are running at 115kbit and will need reliable transfer for binary uploads.So my first idea was to buy a (maybe isolated) USB adapter and putting it in a heavy enclosure with a selection switch that makes it very obvious the voltage was.A bit like that:https://m.aliexpress.com/item/1005004546126064.htmlI ordered this part for now:https://www.ebay.com.au/itm/354280550619Then I saw level shifter like a TXB0104 - would that be something where I could simply connect RX/TX/VCC/GND on both sides and turn my brain off?I.e if I connect any combination (1.8V/5V) without risking damaging the devices?Are there any other solutions that might reduce the chances or my messing up?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 20, 2022, 05:49:06 am
content: I am a hobbyist, not an EE, with about a dozen Linux SBCs and a half a dozen WiFi switches and access points, two of them in active use running OpenWRT. An Odroid HC1 I have has an UART at 1.8V logic levels; it is probably the most ornery one I have. I need 1.8V and 3.3V, and occasionally find that 2.8V-3.0V and 3.8-4V would also be useful, so basically I want "whatever the device uses, between 1.6 and 5.3 V" or so.I now useTI TXU0202in VSSOP-8 for this. Before, I used to use TI SN74LVC1T45's in SOT23-6, which can be easier to work with, as VSSOP-8 has 0.5mm pitch, whereas SOT23-6 has almost 1mm pitch, and can even be dead-bugged (soldered directly to thin wires in air). TXU0202 can handle either side with logic levels between 1.1V and 5.5V, which means it's pretty darn good for this. I also use the related TXU0304 in TSSOP-14 for SPI.You want to use unidirectional voltage level translators or isolators for UART and SPI, and not bidirectional ones, as the latter tend to have glitches (in the low level signal part, when the direction sensing circuitry isn't sure of what is going on) in this kind of use that can cause transmission errors. So, I'd say forget TXB chips, and all bidirectional voltage level conversion chips.For isolation, I prefer to use the el-cheapo ADuM3160-based USB full speed (max. 12 Mbit/s) isolators off eBay; they're exact implementations of the datasheet, with only the isolated DC-DC converter on them the difference between the variants. This way at least my computer is safe from my bumblefumblery.Are you interested in open-source DIY solutions? I've been thinking of cleaning up my circuit based on aTeensy LC(native full-speed USB, three UARTs, SPI, and one of the I2C's I'll use for a small 128x64 OLED display), and would love to have someone elses real-world experience and opinions on it. (I currently only have that one LC, so you'd have to get your own parts, though; and I only use Linux, currently, and don't have any Windows machines at all.) I could do a circuit and carrier board in EasyEda.

author: redkitedesign
author_rank: Regular Contributor
timestamp: October 20, 2022, 06:24:43 am
content: Put 220 Ohms series resistors in the TTL Tx and Rx wires. 220Ohms is not enough to actually damage the signal quality enough to break things, but it is enough to prevent damaging currents if there is a voltage mismatch.

author: Whales
author_rank: Super Contributor
timestamp: October 20, 2022, 06:30:46 am
content: Quote from: redkitedesign on October 20, 2022, 06:24:43 am3.3V to 1.8V: 1.5V/220ohms = 0.68 mA max5V to 1.8V: 3.2V/220ohms = 1.5mA maxI guess the output drivers are designed to sink/source at least 1mA. A few milliwatts shouldn't burn out even the tiniest ESD protection diodes inside the IC? Or am I wrong?

author: magic
author_rank: Super Contributor
timestamp: October 20, 2022, 06:35:11 am
content: At 115kbaud and with a reasonably short cable (like 1m) much more could be added, even 2.2kΩ.Another thing is chips like FT232, where the UART I/O pins can be powered from your device. No chance of voltage mismatch.The right voltage is usually provided on a fourth pin at the UART header.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 20, 2022, 06:54:22 am
content: QuoteBidirectional level translators are evil and should be avoided unless there is absolutely no alternative. They have a tendancy to oscillate when there is significant capacitance on either pin, so when someone who doesn't understand them connects them to a cable, all hell breaks loose.As mentioned above, serial resistance will get you a long way for protection, as it limits the current that can potentially cause latchup, which is the typical damage mechanism. 5V through a 2k2 never killed anything.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 20, 2022, 06:55:16 am
content: Quote from: magic on October 20, 2022, 06:35:11 amUntil something puts too many volts into it and blows up the FT232..!

author: radiolistener
author_rank: Super Contributor
timestamp: October 20, 2022, 08:55:47 am
content: you can use usb isolator module with CH340 serial module with 3.3/5 V selection.It allows you to make complete isolation between USB and your device, include ground line isolation.You can buy these modules on aliexpress. For example:CH340 serial:https://www.aliexpress.com/item/1005001579252818.htmlUSB isolator:https://www.aliexpress.com/item/32999177453.html

author: py-bb
author_rank: Regular Contributor
timestamp: October 22, 2022, 01:00:18 am
content: Quote from: RigidNormal on October 20, 2022, 04:09:38 amIf you want a 3.3v I can link you the one I use, it's got a CP210x in it (I believe a 4) and it has a pinout of 3.3v, tx, rx, ground and 5v - I can confirm it's definitely 3.3v on the tx. Little USB dongle from ebay for a few quid.I'd like to know what you had that was at 5v TBH, as we'd like one!

author: RigidNormal
author_rank: Newbie
timestamp: October 25, 2022, 05:39:26 am
content: Quote from: py-bb on October 22, 2022, 01:00:18 amThis one has a 3.3V and 5V switch. It only switches the VCC.I just measured again:GND TO VC 3.3GND to TXD 5.1V while the switch is set to 3V3.It's a BTE13-009 with a link of betemcu.cn printed on the board.The chip is marked as CH340GI probably had that one for a long time

author: RigidNormal
author_rank: Newbie
timestamp: October 25, 2022, 05:48:06 am
content: Quote from: Nominal Animal on October 20, 2022, 05:49:06 amI would love to help, but I can only spend minutes/month on electronics. Anything that needs assembly ends up on my pile of 'to-do' projects

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 25, 2022, 06:02:13 am
content: Quote from: RigidNormal on October 25, 2022, 05:39:26 amSome of these boards are flawed in the sense that the power supply of the chip is not switched to the lower voltage.Check pin 16 of the CH340G to see what the level is there.https://static.efetividade.net/img/ch340g-datasheet-34852.pdfThis board has a similar problemhttps://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html

author: ozcar
author_rank: Frequent Contributor
timestamp: October 25, 2022, 06:05:29 am
content: Quote from: RigidNormal on October 25, 2022, 05:39:26 amI have two of those that I got years ago. I modified one of them so that the switch changes the data level as well as VCC. That involved cutting one track to isolate the CH340G VCC and one decoupling cap, which were then jumpered to the 3.3V regulator output (the 3.3V/5V switch shorts the regulator input and output in the 5V position.)

author: Mr.B
author_rank: Unknown
timestamp: October 25, 2022, 06:06:07 am
content: I purchased a couple of muArt adaptors from a Crowd Supply project run by one of the members here.(https://www.eevblog.com/forum/crowd-funded-projects/art-a-uart-converter-finally-done-right/msg1482108/#msg1482108)It is an isolated USB to UART adaptor that works so well I never use anything else now.The main side of the board is powered by the USB.Full isolation.The device *to be programmed* powers the other side of the board.This way you always have the right voltage on your TX/RX of the UART.His wedsite is:https://uart-adapter.com/Original Crowd Supply:https://www.crowdsupply.com/signoid/muartMouser also stock them: NZ site (~NZD110):https://nz.mouser.com/ProductDetail/Signoid/CS-MUART-02?qs=u16ybLDytRb6Pv8ta%2FenIA%3D%3DWell worth the (small) investment.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 25, 2022, 09:41:16 am
content: Quote from: RigidNormal on October 25, 2022, 05:39:26 amI have that model, too. That board is a mistake by design. It was very infuriating to find out the power supply was changing, while the levels on the data pins voltage were always 0..5V.However, if you look at the CH340 datasheet, the same board can be modified to change both the Vcc and the data pins voltage from the same switch, but you'll have to cut a few traces and rewire. I modified mine, but can not find the schematic with the changes right now. It was only a few traces to rewire as seen in the pics, and now it switches both the power and the data levels.Other than that mistaken design, anything can go as a good USB to TTL.Often the FTDI based ones are preferred. The FTDI chip is very expensive in comparison with other USB to TTL bridges, but they are often preferred. So look for FTDI when searching USB to TTL. Often FTDI ones use fake clones instead of the genuine and expensive FTDI, so if it's too cheap then it's probably not genuine FTDI.Another alternative is to buy the FTDI chip from a reliable vendor, so to be sure it is genuine, then wire your own. Here's an example of a FT232RL wired by hand to a 0.1 inch perfboard.If you buy your own FTDI chip, go for something that has two serial ports, e.g. FTDI FT2232H, those are often used as JTAG interface with an additional serial port, too.Yet another source of good USB to TTL serial converters are the devboards you may already have, and that they connect to USB and have a FTDI chip on board. Usually it is possible to use only the FTDI part from a devboard, and disconnect the rest of the devboard.

author: py-bb
author_rank: Regular Contributor
timestamp: November 05, 2022, 11:46:58 pm
content: Quote from: RigidNormal on October 25, 2022, 05:39:26 amUhh that doesn't sound right?When you plug it in and it transmits nothing it the tx line should be high (not ground) - eg +3.3v which is nice.Mine has 5 pins going down3.3v, tx, rx, gnd. 5vNo switches or jumpers, no matter what I do that tx is at 3.3vIs yours the same? WTF does your switch do?