Shared Communications Bus - RS-422 or RS-485...

On Saturday, November 5, 2022 at 3:32:42 AM UTC-4, whit3rd wrote:
On Friday, November 4, 2022 at 5:17:26 PM UTC-7, Ricky wrote:

The RS-422 solution lets me use a bog standard chip and all cabling is just in parallel, so very easy to implement...

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?

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.

--

Rick C.

--+- Get 1,000 miles of free Supercharging
--+- Tesla referral code - https://ts.la/richard11209
 
On Fri, 4 Nov 2022 07:57:04 -0700 (PDT), Ricky
<gnuarm.deletethisbit@gmail.com> wrote:

On Friday, November 4, 2022 at 5:17:57 AM UTC-4, upsid...@downunder.com wrote:
On Tue, 1 Nov 2022 22:30:58 -0700 (PDT), Ricky
gnuarm.del...@gmail.com> wrote:

I could do an RS-422 interface with a master to slave pair and a slave to master pair. The slaves do not speak until spoken to, so there will be no collisions.
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).

PCI cards? What\'s wrong with USB cables? FTDI makes chips that provide serial ports from USB interfaces.

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.
 
On Saturday, November 5, 2022 at 8:18:35 AM UTC-4, upsid...@downunder.com wrote:
On Fri, 4 Nov 2022 07:57:04 -0700 (PDT), Ricky
gnuarm.del...@gmail.com> wrote:

On Friday, November 4, 2022 at 5:17:57 AM UTC-4, upsid...@downunder.com wrote:
On Tue, 1 Nov 2022 22:30:58 -0700 (PDT), Ricky
gnuarm.del...@gmail.com> wrote:

I could do an RS-422 interface with a master to slave pair and a slave to master pair. The slaves do not speak until spoken to, so there will be no collisions.
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).

PCI cards? What\'s wrong with USB cables? FTDI makes chips that provide serial ports from USB interfaces.
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.

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.

--

Rick C.

--++ Get 1,000 miles of free Supercharging
--++ Tesla referral code - https://ts.la/richard11209
 
On Sat, 5 Nov 2022 09:03:32 -0700 (PDT), Ricky
<gnuarm.deletethisbit@gmail.com> wrote:

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.

If you want 1 s update cycle with 32 slaves, you have only 30 ms/slave
transaction (request+response). Since this is simple half-duplex
(despite separate Tx and Rx paths) you need to transmit the request,
decode and generate the response and send the response within 30 ms.
The slave processing delay will quite drastically reduce the system
throughput.

At 1 Mbs (100000 cps) the transaction (request+response) can just
contain 3000 characters.

>The USB protocol provides polling rates at 8 kHz.

That is 125 bits or 12.5 characters/poll.

>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.

You have to calculate how many slave Rx/Tx delays are required at each
slave to generate a response and add this to the message Tx and Rx
times to get the total transaction times.

Of course, if you only need to poll every slave once every few seconds
or every minute, you cuild use 1/2 or 1/4 UL RS-5485 Unit load (UL)
transceivers and poll 64 or 182 slaves in one loop.
 
On Sunday, November 6, 2022 at 7:09:30 AM UTC-5, upsid...@downunder.com wrote:
On Sat, 5 Nov 2022 09:03:32 -0700 (PDT), Ricky
gnuarm.del...@gmail.com> wrote:


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.

If you want 1 s update cycle with 32 slaves, you have only 30 ms/slave
transaction (request+response). Since this is simple half-duplex
(despite separate Tx and Rx paths) you need to transmit the request,
decode and generate the response and send the response within 30 ms.
The slave processing delay will quite drastically reduce the system
throughput.

The slave will have sub-microsecond response time.


At 1 Mbs (100000 cps) the transaction (request+response) can just
contain 3000 characters.
The USB protocol provides polling rates at 8 kHz.
That is 125 bits or 12.5 characters/poll.
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.
You have to calculate how many slave Rx/Tx delays are required at each
slave to generate a response and add this to the message Tx and Rx
times to get the total transaction times.

Of course, if you only need to poll every slave once every few seconds
or every minute, you cuild use 1/2 or 1/4 UL RS-5485 Unit load (UL)
transceivers and poll 64 or 182 slaves in one loop.

I don\'t think you are grasping how this needs to work.

All 128 or 256 UUTs are addressed on the same bus with 8 UUTs on a test fixture card, with one RS-422 driver receiver, so 16 or 32 RS-422 bus loads. The messages are short enough that the bit rate is not limiting. Rather the message rate (USB polling rate) is the limiting factor. With an 8 kHz polling rate of USB high speed, I would get 32 message pairs per second per UUT (the pair is one command from PC and one response from a slave).

With the polling rate of 1 kHz of USB full speed, the message pair rate is only 4 per second. That\'s a bit limiting although it can still work. I\'d like to find serial cables that work at USB high speed data rates.

--

Rick C.

-+-- Get 1,000 miles of free Supercharging
-+-- Tesla referral code - https://ts.la/richard11209
 

Welcome to EDABoard.com

Sponsor

Back
Top