Shared Communications Bus - RS-422 or RS-485

The two-pair topology is like RS-422. The three-stating levels are RS-485. This is a hybrid system.

I used about 400 kbps, but if you use small stubs, proper termination and not too long a cable, 1+ Mbps is possible. A chip like

formatting link
would do: 3.3/5V, full duplex, enables, 20 Mbps, 256 nodes, $1 at 1K+.

But there are cheaper ones, a searching link including filters is:

formatting link
Arie

Reply to
Arie de Muijnck
Loading thread data ...

RS485 is simple, reliable and can run quite fast, if you really need more bandwidth you could just split the string and add more interfaces to the PC

Reply to
Lasse Langwadt Christensen

Ricky wants to communicate with a PC. RS-485 does not handle the timing from the standard PC UART signals well, the disabling of the TX after the last character is a problem. Black-box did that with retriggerable one-shots from the TX signal, they had to be set for the proper baudrate. Even then, the slave cannot answer directly but has to provide some dead time before answering.

However, some RS-485 USB dongles have proper TX enabling control by the UART chip inside, they turn off just after the last stop bit. That leaves only the slave timing to be considered, and terminators plus pull-ups / pull-downs.

Arie

Reply to
Arie de Muijnck

This one is plenty cheap enough, but "Out of stock", like many, many devices these days.

Reply to
Ricky

just get something like an FTDI USB to RS485 serial interface cable, it does the correct timing and has pull up/down and optional termination

actual PC UARTs are something you find in a technical museum

Reply to
Lasse Langwadt Christensen

LCSC have million of transceivers in stock

formatting link
and most of the SO8 rs-485 ones are likely pin compatible

Reply to
Lasse Langwadt Christensen

The trouble is, I'm not using RS-485. I guess I could use two of these chips and never enable the driver on the receiver part. They have nothing in stock that's actually RS-422 with a separate driver and receiver, also, some level of ESD protection. But thanks for the pointer. I tend to not use LCSC. These days, even they don't have much in stock.

Reply to
Ricky

using two chips in a package with lots of pin compatible alternatives might be a good strategy there days

Reply to
Lasse Langwadt Christensen

This is a test fixture, not a deliverable. I only need to buy a few.

Looking at the schematic for the FTDI cable, they use RS-422 transceivers that have no enables, so they fit in an 8 pin package. The 16-pin TSSOP on the product I'm selling has separate enables on the drivers. The two 8-pin SOICs are twice as large, so it isn't to save space. This was not designed in the last couple of years, so it's not about availability.

Reply to
Ricky

Find transceivers that are themselves 1/4 load (or less) and you can have 128 on the bus.

eg: SN75HVD3082EDR is 1/8 load

Reply to
Jasen Betts

16650 UART has hardware RS485 support - these days that's almost "standard PC UART", but there's no reason not to use a USB UART interface instead, and there's plenty of them that can drive RS485 too.

I don't trust anything cheaper than a dollar to do RS485 properly, I verify instead, I have some that do and some that do not :)

Reply to
Jasen Betts

I don't know why people are pushing RS-485. At this point RS-485 offers no advantages over a split bus, full duplex solution using RS-422. I expect to use a pair of RJ-45 connectors to make cabling simple and cheap, and an FTDI RS-422 USB adapter. The FPGA UART will have perfect control over the transmitter enable using the custom UART already in the design. The FTDI transmitter will remain on all the time, so timing of the transmitter enable is of no consequence.

This is about as simple and fool-proof as I can design it. I can't see how RS-485 offers any advantages, other than allowing the use of a smaller connector, RJ-11 perhaps. Actually, I can run the full duplex interface over RJ-11 connectors, it would just require four conductors rather than two (or six if you want to include grounds).

Reply to
Ricky

The master can be standard RS-422, but the slaves needs to be 4-wire RS-485 i.e. the slave Tx is in tri-state until the slave is addressed.

On a PC side, do NOT use standard RS-232 PC ports followed by an RS-232 to RS-422/485 external converter, there is a great risks for timing problems. Use proper RS-422/485 PCI cards (or external Ethernet to RS-422/485 converter for laptops).

Reply to
upsidedown

PCI cards? What's wrong with USB cables? FTDI makes chips that provide serial ports from USB interfaces. I would use an RS-422 adapter as that provides separate transmit and receive interfaces. The PC does not need to tristate the RS-422 output, so it doesn't matter if there are risks of "timing problems".

The chip FTDI makes is a small, very fast processor, that emulates serial ports in software. It is the same processor for all interfaces, including SPI and JTAG. As others have said, their devices just work, and there are no timing problems. I'll probably provide for the ability to use either split RS-422 buses or a single RS-485 type bus. The driver/receiver chips are the same. It's just how they are connected.

Easy enough to try both.

Reply to
Ricky

I haven't quite followed the entire thread, not sure of the bandwidth requirements or the need for full duplex communication. If noise immunity is of concern, you may want to consider 4-20ma current loops. Some years ago, I designed a RS-232 to 4-20ma converter. The control computer connected to ~ 50 micros in the plant (10 micros/loop). The communication topology was basically a token ring. I also wrote the communication code on the micros. Don't know if you want to go down this road - probably looking for something out of the box. Of course there are lots of other system requirements that need to be taken into account, e.g. minimum event latency, etc. They would need to be looked at when considering the network topology.

Reply to
three_jeeps

Thanks for your reply. Noise immunity is why I'm using RS-422, but I could just as easily use RS-232 for the noise aspects. The problem is RS-232 is hard to use in a multiple transmitter arrangement. It's also not specified for higher bit rates, even if some chips support it.

I started looking at RS-422 mostly because I'm familiar with it and an RS-422 chip is already on the UUT. I like using the same components on the test fixture as the UUT, it makes my life easier in many regards.

A current loop would work fine for this app, except it would make the cabling a bit more complex. We need to be able to take cards out of the system at will. For a current loop, that would mean cabling in a way that always completes the loop. It also means an adapter board in addition to the USB cable to the PC, plus extra logic on the slave boards, even if it is very simple logic. I believe the slaves would be an opto-isolator, plus something to open the loop when transmitting, so an analog switch or FET? In other words, it's design work rather than just plopping an RS-422 chip on the board. Is there an equivalent 20 mA current loop chip I could use?

The RS-422 solution lets me use a bog standard chip and all cabling is just in parallel, so very easy to implement without thinking about keeping the loop complete. I'm not saying that's tricky, but I guarantee that with this being torn down and reinstalled every day to remove the UUTs, it would result in a screw up by every member of the test team at least once. It's also one run, not multiple loops to prevent the need for a higher voltage with the greater number of nodes.

Reply to
Ricky

Each pair is a short drop from the backbone; how do you wire that 'in parallel' when it requires two terminated endpoints on a serial string? U-turn cables, and plug in a dummy short link when a slave is removed from the ensemble?

Reply to
whit3rd

The master has a cable with an RJ-45 plug. Each test fixture board has two RJ-11 connectors, wired to each other and to an RS-422 receiver/driver chip. The master (PC) plugs into one of the connectors on the first test fixture card. The other connector is jumpered to the next card. Jumpering continues to the last card. I haven't decided yet, but the termination resistor can be either through a jumper installed on 0.1" header pins on the last card, or I could make an RJ-45 plug with the terminating resistor.

I could use RJ-11, but RJ-45 seems to be much more available in various combinations of lengths, colors, and stock!

I'm a bit concerned about buying premade cables intended for Ethernet, like Cat5e. Seems they use a rather odd wiring scheme, with 4 twisted pairs. Pair 1 is on the first two pins. Pair 2 is on pins 3 and 6. Pair 3 is on pins 4 and 5. Pair 4 is on pins 7 and 8. Even odder, is that the colors used are different between two variations of the standard, EIA/TIA 568A & 568B. Every reference I've found so far, talks as if there's no big difference in the two standards, A and B, but it seems as if the only difference is the color of pair 1 and pair 2, being reversed between them. That's it, no electrical difference at all, just the two pair colors are swapped. They even say there's a preference for one over the other depending on the use. WTF is that about??? It's hard to believe there would be two different standards, if there's no difference other than the insulation color!

Anyway, the first web site I found to easily buy the combination of length, etc. I would want doesn't say how the connectors are pinned out. The A vs. B versions of the standard don't matter, but it does matter if twisted pairs are not wired to the standard. I need to know which pins are paired and twisted, to put the differential signals on.

Reply to
Ricky

OK, I found that some FTDI chips provide unique serial numbers, so you could safely use multiple identical chips on the same PC. Without a unique serial number I would not use two or more identical USB devices on the same PC. Moving the USB device to an other USB port on the PC could cause safety critical issues.

With any RS-422/48/current loop system you need to calculate the available bandwidth for each slave device and possibly limit the number of slaves (less than 31 for RS-485). Thus multiple masters and networks may be required.

For applications requiring a few or a few dozen serial lines I prefer using Ethernet (UDP) yo serial (RS-232/422/485/current loop) converters. First of all, these systems have galvanic isolation as a bonus, serial signals can be routed to the final use using Ethernet with cheap standard fiber connections.

Reply to
upsidedown

Perhaps you don't understand the use case. There is only one master serial port on a PC. It runs at some rate ≥ 1 Mbps. It will run two buses (one master transmit and one master receive) with up to 32 slave test fixture cards. The USB protocol provides polling rates at 8 kHz. With every master message getting a slave response, that's 4,000 message pairs per second. That is over 100 messages per second to each slave and should be fast enough for my needs.

Even if I'm off by 2:1 and probably if I'm off by 5:1, the system will still be very usable.

I see no need for Ethernet, or galvanic isolation. The power supplies will provide galvanic isolation. It is possible I would use one FTDI cable per rack, rather than combine two 16 test fixture card racks on one serial port. But in that case I'd probably use two PCs as well. At this time, a single rack, testing 128 UUTs will suit my expected needs.

Reply to
Ricky

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.