Why are there USB-to-Serial converters if USB is Serial? - Page 1
Forum section: electronics / general

author: zdelarosa00
author_rank: Regular Contributor
timestamp: April 19, 2015, 02:43:10 am
content: My question is, if the USB standard is serial communication, why there are USB to serial shields and little boards for microcontrollers? ... If you know or have the answer. Im sure im missing something regarding to UARTs

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 19, 2015, 03:06:43 am
content: Because old-school RS232 is VERY SIMPLE, just the data stream with a few protocol "characters". And USB is a REMARKABLY COMPLEX packet-based protocol which requires extensive hand-shaking and negotiation between the master and slave.Comparing RS232 to USB is like comparing 1890's Morse code to SMS texting in 2015.The reason for those "FTDI" (et.al.) boards is to make themselves look like a modern USB device to the computer, while looking like a vintage, simple RS232 port at the other end.

author: sleemanj
author_rank: Super Contributor
timestamp: April 19, 2015, 04:36:06 am
content: Quote from: Richard Crowley on April 19, 2015, 03:06:43 amCareful now, rs232 is not the same thing as uart. Most usb-serial are usb-uart not usb-rs232. You don't want to be connecting your average mcu directly to rs232 :-)

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 19, 2015, 05:00:07 am
content: Quote from: sleemanj on April 19, 2015, 04:36:06 amYES, right you are!"UART" implies the serial "bitstream", typically at logic voltages (0-5V, etc) but not the RS232 voltages (+ and - 15V)I guess I'm showing my vintage to automatically think of "serial" as RS232. Please replace any mention of "RS232" with UART.Thanks, sleemanj

author: andersm
author_rank: Super Contributor
timestamp: April 19, 2015, 06:41:58 am
content: Read through the first few chapters of this and the differences should be clear:USB in a Nutshell

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: April 19, 2015, 08:43:28 am
content: Formally, "serial" refers to a class of connections that send data sequentially on a single wire, as opposed to parallel.But informally "serial" is often used to mean the traditional serial port on a PC, which was originally RS232. There was (occasionally still is) a "serial" port and a "parallel" port.While RS232 defines certain voltage levels, the same signalling can be used with difference voltages e.g. TTL for MCUs.USB goes a lot further than defining voltage levels and byte framing, it includes a lot of higher level protocols.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 19, 2015, 03:09:59 pm
content: Quote from: zdelarosa00 on April 19, 2015, 02:43:10 amUSB Virtual Com is a simplification layer on USB host and device side. Often found in of-the-shelf ICs such as FTDI or Silicon Labs. They are Plug&Play on all platforms, and are easy to use on both sides of the line.And they are not limited by standard baudrates anymore. You can easily get any baudrate and most FTDI's go up to 3Mbaud.Is makes USB way more accessible to the developers who are not able to or do not want to spend time or money on USB.Much better than a world where you need USB - RS232 converters with non-plug&play drivers and that enormous db9 plug without power delivery.One level up will be USB-HID, which is driverless and works with small data packets. But requires effort in both sides. Especially with Windows applications.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: April 19, 2015, 05:05:09 pm
content: "Serial" is averygeneral term for a bus which sends data serially on a single wire. It's similar to the word "vehicle". Just like there are hundreds of different vehicles - cars, trucks, motorcycles, buses, boats, planes, helicopters - there are also many different serial protocols - USB, RS232, RS422, RS485, UART, SPI, I2C, etc.I think the reason you're confused is because "USB to Serial" is a stupid name for that product. It's not precise at all and doesn't tell you what it's actually doing. Chances are it's a USB to RS232 or USB to UART converter, simply converting between two different serial protocols, but you'd have to check the details to be sure.

author: zdelarosa00
author_rank: Regular Contributor
timestamp: April 19, 2015, 06:18:20 pm
content: I see, I viewed products like these... Im gonna use them for a projecthttps://www.sparkfun.com/products/11814http://www.arduino.cc/en/Main/USBSerialhttps://www.sparkfun.com/products/9716

author: zapta
author_rank: Super Contributor
timestamp: April 19, 2015, 06:26:57 pm
content: Make sure to match the voltage level, 5V vs 3.3V, to your MCU.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: April 19, 2015, 08:13:08 pm
content: Quote from: zdelarosa00 on April 19, 2015, 06:18:20 pmThose are all USB to UART, all you have to do is pay attention to the voltage level.

author: zdelarosa00
author_rank: Regular Contributor
timestamp: April 19, 2015, 08:30:35 pm
content: Quote from: suicidaleggroll on April 19, 2015, 08:13:08 pmUSB standard is 5v am I right..?, At this point I expect a "not always"

author: c4757p
author_rank: Super Contributor
timestamp: April 19, 2015, 08:32:14 pm
content: No - the USBpower supplyvoltage is 5V. The data lines are not. They're actually a bit complex, they have multiple modes - none of which are 5V.The voltage level you have to pay attention to is the one on the other side of the converter. If you feed 5V signals into a 3V3 microcontroller you can damage it, and if you feed 3V3 signals into a 5V microcontroller, they might not be interpreted correctly.

author: zdelarosa00
author_rank: Regular Contributor
timestamp: April 19, 2015, 08:42:13 pm
content: Quote from: c4757p on April 19, 2015, 08:32:14 pmVery interesting, I'm approaching to the goal

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 19, 2015, 08:44:02 pm
content: Quote from: zdelarosa00 on April 19, 2015, 08:30:35 pmThat is not even the right question. USB power is ALWAYS 5V by definition.No choice. No options. No settings. No variations.What you need to be concerned about is the OTHER END (the UART side).You have not revealed what you are using this converter for.If your mystery device is 3.3V, then setting the converter for 5V on the UART side will damage your device.And setting the converter for 3.3V when your device is 5V will result in unreliable (or non-functional) communication.

author: timb
author_rank: Super Contributor
timestamp: April 20, 2015, 08:40:35 am
content: Most FTDI cables can't be set as they come hard wired for a particular voltage. This is generally true with the bargain basement stuff you find on eBay, but even a lot of the higher end units (SparkFun, Adafruit) are like this as well.SparkFun sells 3.3V, 5V, semi-switchable and switchable adapters, so make sure you read the description throughly.Some adapters will physically have a switch on them for selecting the voltage. Some will have a set of pads you have to bridge with solder.Finally, most of the time a 3v3 UART adapter will work just fine on a 5V device, so long as you aren't powering the device from the cable (I.e. Only have TX, RX and GND connected). [High is generally 2.8V max, which a 3.3V UART will have no trouble reaching.]Sent from my Tablet

author: zapta
author_rank: Super Contributor
timestamp: April 20, 2015, 10:04:44 pm
content: IIRC the college setting controls also the voltage regulator output, not just the signal lines. Useful for low power applications.

author: Zbig
author_rank: Frequent Contributor
timestamp: April 20, 2015, 10:22:27 pm
content: Quote from: timb on April 20, 2015, 08:40:35 amThis fella:http://www.adafruit.com/product/284begs to differ.

author: mtdoc
author_rank: Super Contributor
timestamp: April 20, 2015, 10:58:41 pm
content: And for $3 you can get one ofthese with jumper selectable 3.3 or 5 V interface.

author: neslekkim
author_rank: Super Contributor
timestamp: April 21, 2015, 08:02:11 am
content: Quote from: mtdoc on April 20, 2015, 10:58:41 pmAnd how do you know if you don't need to replace the ftdi chip?

author: mtdoc
author_rank: Super Contributor
timestamp: April 21, 2015, 06:12:35 pm
content: Quote from: neslekkim on April 21, 2015, 08:02:11 amHow do you know any device has a real FTDI chip? All i can say is, no issues with the one i bought. But that's ebay, you pay your $3 and ya take your chances. It is only $3 after all...

author: neslekkim
author_rank: Super Contributor
timestamp: April 21, 2015, 06:15:21 pm
content: Quote from: mtdoc on April 21, 2015, 06:12:35 pmOr buy something like this:http://www.ebay.com/itm/311013143260

author: suicidaleggroll
author_rank: Super Contributor
timestamp: April 21, 2015, 06:18:31 pm
content: Quote from: mtdoc on April 21, 2015, 06:12:35 pmNot buying it on ebay is a damn good start...

author: Richard Crowley
author_rank: Super Contributor
timestamp: April 21, 2015, 06:20:38 pm
content: Quote from: mtdoc on April 21, 2015, 06:12:35 pmWhich, at the end of the epic discussion, was the fatal flaw in the whole FTDI mess. There really is no way of knowing whether you as the customer are getting a genuine FTDI chip without testing each one yourself. Even "authorized dealers" were victims of counterfeit chips, and if you are having boards made over on the other side of the planet, you have no control or assurance of anything. IMHO, FTDI fouled their own nest and made it more attractive to use some other USB-to-serial solution and just avoid the whole FTDI fiasco.

author: mtdoc
author_rank: Super Contributor
timestamp: April 21, 2015, 06:43:30 pm
content: All good points. My only reason for posting it was in response to a previous post stating that the cheap eBay converters were fixed at 3.3 or 5 V.

author: senso
author_rank: Frequent Contributor
timestamp: April 21, 2015, 07:00:35 pm
content: How about and iTead FDTI USB-Serial board that costs 14€, was "guaranteed" that the FTDI was original and in the end its a fake one, and a new FTDI232 from Mouser costed an extra 5€, so sweet..

author: Monkeh
author_rank: Super Contributor
timestamp: April 21, 2015, 07:12:56 pm
content: Quote from: senso on April 21, 2015, 07:00:35 pmWhat did you expect from iTead?

author: rob77
author_rank: Super Contributor
timestamp: April 21, 2015, 07:59:53 pm
content: Quote from: timb on April 20, 2015, 08:40:35 amlet me slightly correct that... it works only if the 3.3V device is 5V tolerant. andit works because the logic levels are the same for both 5V and 3V3 logic - HI is defined as 2.0V minimum and supply rail maximum, and LO is defined as GND to 0.8V max . that's for TTL levels - cmos is always below 1/3 of VCC is LO and above 2/3 of VCC is HI

author: electr_peter
author_rank: Unknown
timestamp: April 21, 2015, 08:38:24 pm
content: A note regarding 3.3/5V voltage levels in USB/TTL adapters - if voltage level is changeable, it is most likely that only the VCC is changed and Tx/Rx are 3.3V regardless of setting. Still works, though.

author: Zbig
author_rank: Frequent Contributor
timestamp: April 21, 2015, 08:47:35 pm
content: Quote from: electr_peter on April 21, 2015, 08:38:24 pmIn FTDI Friend by Adafruit both are independently configurable via solder bridges.

author: senso
author_rank: Frequent Contributor
timestamp: April 21, 2015, 11:13:10 pm
content: Quote from: Monkeh on April 21, 2015, 07:12:56 pmCloned clones of cloned rip-off OSHW projects, but for the price, they could use the real deal..Its working fine now, but for 20€ I could have designed my own pcb's..

author: zapta
author_rank: Super Contributor
timestamp: April 21, 2015, 11:54:29 pm
content: Quote from: senso on April 21, 2015, 11:13:10 pmThat's the idea behind OSHW, mixing and cloning.

author: westfw
author_rank: Super Contributor
timestamp: April 23, 2015, 12:21:41 am
content: I'm not sure why you'd expect the small Chinese vendors (like iTead) to be better at acquiring "genuine" components than small non-Chinese vendors. Even if they think they are doing so.

author: Howardlong
author_rank: Super Contributor
timestamp: April 24, 2015, 10:46:01 am
content: Quote from: westfw on April 23, 2015, 12:21:41 amI can only go by my own experience of manufacturing in China, and that's that unless you have someone working for you on the ground ensuring the provenance of the parts, what you get could have anything on it. Any written or verbal agreement is worthless, it seems to be a cultural thing that if it's possible to do it cheaper by purchasing a different part to what's on the BOM, or by purchasing devices of questionable source (rejected batches, fake parts etc) then itwillhappen, to get those extra pennies of margin. When I used to have boards assembled in China, they had the audacity to complain to me about things like connectors not fitting the board, but they had not purchased those on the BOM.To be clear, this is a cultural difference which leads to misunderstandings, and it can and does work, but only if you have a presence there who understands the culture and is representing you.On the other hand, if my local assembler has difficulty in sourcing a part from the original BOM, they call me up, we have a discussion about it and they request, in writing, an authorised change to the BOM.

author: Smokey
author_rank: Super Contributor
timestamp: April 25, 2015, 08:37:13 pm
content: USB.....It's not a bus, it's a network!http://travisgoodspeed.blogspot.com/2012/07/emulating-usb-devices-with-python.html

author: zdelarosa00
author_rank: Regular Contributor
timestamp: April 27, 2015, 03:44:55 am
content: are the ones on the links, i was planning to buy one but i concluded that its not what i need, but i now know that usb is not the same serial as a microcontroller rx tx