FTDI USB-RS485-PCB and cables receive 00h because FTDI has chosen a crap driver - Page 1
Forum section: electronics / projects

author: Chipguy
author_rank: Unknown
timestamp: February 19, 2014, 10:07:11 pm
content: I really like the FTDI products. The latest additions to the USB to serial portfolio are really useful.However, today I had to deal with the USB-RS485-PCB / USB-RS485-WE. That's the USB to RS485 from FTDI.Pictures of both:They are using an SP481 or ZT485 as the RS485 driver which are really a bad choice, since their data outputs are low when the RS485 bus is idle. That is just retarded since even every RS232 receiver has a defined high level at the output when there is nothing attached to the inputs.A decent IC like the SN65HVD08D also has a defined high output level whenever the bus is idle, short circuit or even both wires are broken. The FTDI cables and modules produce a framing error and it receives a "0x00" charachter whenever you sent a byte or character out. This is not depending on wether you choose local echo on or off.I had to modify the PCB of the USB-RS485-PCB module in order to make it work properly by replacing the RS485 driver. I also added a pullup resistor which later turned out not to be necessary since the FTDI FT232R already has 200K weak pullups built in.There is another methode of biasing the bus with a voltage >200mV but that looks to me like a bodge solution rather than a thoughtful design idea. You can see the circuit here.I really would like to see FTDI choosing a better driver to address these problems. Especially in mobile applications having a bias current of roughly 5mA added to the power consumption bill is a not what you want to do.

author: uwezi
author_rank: Unknown
timestamp: February 19, 2014, 10:34:26 pm
content: some might call it a bug, some might call it a feature...Normally you would not want to include the biasing (and termination) as a fixed part in every possible device you might want to attach to the RS485 bus, because this would load the bus beyond its specification. At some point on the bus, however, you have to make sure that the undefined state |A-B| < 0.2 V does not happen.It is described on page 8 in the manual of your device:http://www.ftdichip.com/Documents/DataSheets/Cables/DS_USB_RS485_PCB.pdfP.S.:I might add that I work in an environment where most commercial units do not have a built-in fail-safe for the RS485 bus they are sitting on.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 19, 2014, 10:40:19 pm
content: You should always bias a RS485 bus to guarantee correct idle state - relying on the receiver doing it is risky.

author: Chipguy
author_rank: Unknown
timestamp: February 20, 2014, 07:00:51 am
content: Quote from: mikeselectricstuff on February 19, 2014, 10:40:19 pmYes Mike that is my conclusion as well so I already changed the design and ordered some 30 boards from PCB Pool.Since I was only working with TI RS485 drivers before I was a bit surprised.To define a physical idle state of a bus as something that leads an undefined output off the receiver is still not well thought through.So TI did the very sensible thing and redefined the transistion area to -0.2V..-0.01V instead of +/- 0.2V.I don't think FTDI will change their design and use a better driver since the TI is 2..3 times the price of the Exar driver.

author: Monkeh
author_rank: Super Contributor
timestamp: February 20, 2014, 07:04:35 am
content: Quote from: Chipguy on February 20, 2014, 07:00:51 amI don't think they need to.The bus should be biased.

author: Chipguy
author_rank: Unknown
timestamp: February 20, 2014, 07:11:25 am
content: Quote from: uwezi on February 19, 2014, 10:34:26 pmI call it a flaw in the specGuess how many PC problems would that have caused if RS232 was badly spec'd like that as wellI have already given in and changed the design.Funny thing: As I wrote the last line the order confirmation from PCB pool came inPS: I like the headbanging smiley the most

author: Monkeh
author_rank: Super Contributor
timestamp: February 20, 2014, 07:17:24 am
content: Quote from: Chipguy on February 20, 2014, 07:11:25 am0V is an undefined level with RS232 too, sorry. Just because you're familiar with more modern chips which allow people to be lazy, doesn't make the reality change. The bus must be driven to a 1 or 0 at all times or behaviour is undefined.

author: Chipguy
author_rank: Unknown
timestamp: February 20, 2014, 07:29:49 am
content: In practice the RS232 transisiton is deliberately set to something positive just below 3V.Some dodgy designs even connect CMOS directly to it and it kinda works.You can see it in the datasheet:http://www.farnell.com/datasheets/1684420.pdfExaclty what TI does with RS485. So unconnected serial ports don't wiggle around generating interrupts in the PC.They even have a pull down resistor of around 5K.Sombody thought this through

author: Monkeh
author_rank: Super Contributor
timestamp: February 20, 2014, 07:33:05 am
content: Quote from: Chipguy on February 20, 2014, 07:29:49 amAnd what do you think they did before integrating this into the drivers? This isn't part of the RS232 specification, this is a convenience feature in the drivers. If you have a driver, RS232 or RS485, which doesn't implement this non-standard behaviour, then the state of your bus when undriven is.. undefined. You've just walked head-first into a real-world example of this.

author: Codemonkey
author_rank: Regular Contributor
timestamp: February 20, 2014, 07:35:28 am
content: Quote from: Monkeh on February 20, 2014, 07:17:24 amThis ^^, also add transient protection to each device on the bus or spend ages on site playing hunt the dead driver device when one fails and takes a large portion of the bus with it the first time there's a thunderstorm or someone switches on a nasty inductive load.

author: Rufus
author_rank: Super Contributor
timestamp: February 20, 2014, 07:49:23 am
content: Quote from: mikeselectricstuff on February 19, 2014, 10:40:19 pmYou should always assume the state of an un-driven RS485 bus is noisy garbage and the state of a driven RS485 bus is occasionally noisy garbage.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 20, 2014, 08:37:02 am
content: Quote from: Codemonkey on February 20, 2014, 07:35:28 am..and a series polyfuse to protect the transient protector when someone connects 24v to the bus

author: Chipguy
author_rank: Unknown
timestamp: February 21, 2014, 10:35:07 pm
content: Quote from: mikeselectricstuff on February 19, 2014, 10:40:19 pmJust realized Mike got bitten even worse than me:

author: Chipguy
author_rank: Unknown
timestamp: February 21, 2014, 10:44:10 pm
content: This is the answer I got from FTDI:Quote:Thanks for your informed feedback. FTDI designers have reviewed this comment and recommend adding 750ohm pull up on D+ and 750ohm pull down to GND to mask this issue.Alternative transceivers have been identified and will be considered in future design revisions.Quote ends here.Good to see that they kinda consider a revision.However, since so many people here said that biasing is almost a "must" I already revised this particula design, and my older designs are going to be revised as well.

author: uwezi
author_rank: Unknown
timestamp: February 21, 2014, 10:59:47 pm
content: Quote from: Chipguy on February 21, 2014, 10:35:07 pmWow... what a piece of ...OT.However, the opto-isolator stuff reminded me of a recent project in Elektor though. It was a fireplace simulator, intended to switch incandescent light bulbs.Apart from the fact that incandescent light bulbs are perhaps not the technology of today, the opto-isolators driving a couple of triacs were mounted so that control lines and power lines would cross each other in very close proximity, actually nullifying the meaning of the isolation barrier altogether. Everything needed to correct this was to turn the opto-isolators by 90 degrees, which they finally did:http://www.elektor-labs.com/contribution/pcb-revision-to-v12.13792.html