Maker Pro
Maker Pro

Discrete custom design of RS485 driver

J

Joerg

Jan 1, 1970
0
rickman said:
I would love to hear some sort of rational explanation of how that is
happening.

Many reasons. A major one is the new medical device tax. This will skim
2.3% off the top. From revenue. It means that start-up companies that
typically do not turn a profit for easily the first 10 years will get
burdened with it. For others that are in the disposables business and
run on 5-10% profit margins one can easily see that it will wipe out a
huge chunk of that.

Then there's rationing that'll happen. Medical is a zero sum game, we
can't run it on hot air (a.k.a. bonds) forever. We have already seen
slashing of reimbursements. This will make certain higher end products
unprofitable, and high-end is where our country excels. So while now
everyone may be entitled to a free enema or flu shot there are likely
going to be growing waiting lists when you need help with some serious
stuff. Just like there are in Canada. This means less revenue for
manufacturers.

Next, capital gains taxes. Funding a start-up is a major risk for the
investors. So if the rewards they can reap are majorly cut down by tax
increases they will, obviously, curb their risk exposure. That's what I
am seeing the most in the med venture space, a risk-averseness that I
have not encountered ever in the past. And I am in med tech since the 80's.

I could go on and on, but hopefully this suffices to explain some of the
effects that I (and a lot of others) see coming or have already
experienced. Personally I've seen things not being funded that used to
be a sure thing 10 years ago, plus whole projects got canned that had
progressed quite far. While people like me can move to other areas in
engineering because I have kept a generalist attitude all my life that
is no so for many others. My former employer is in the process of moving
production to Costa Rica. Other companies have started layoffs:

http://www.examiner.com/article/stryker-lays-1-000-people-off-blames-obamacare-s-medical-device-tax

Where will these people find work?
 
Usually they are about as sturdy as the channel in the FET, can take a
similar current.

Note: I don't see a spec for the FDV304P's trr. Body diodes' trr can
be horrendously slow--at least once upon a time on power FETs they
often were...
 
I've never seen a cmos chip latch up from driving a low-z load,
including a short to either rail. You can get them pretty hot. Pushing
a lot of current into an ESD diode can latch some parts. We use tiny
logic drivers in the thing I posted, and in other products that we've
sold thousands of, driving customer loads of all sorts, and haven't
had any latchup problems.

Usually the latchup current specs are considerably larger than the
possible output currents. Therefore, neither driver nor receiver
should be able to latch from reflections.

Lightning's a different matter.

We fielded some RTUs ages ago, a new design where I tried a number of
ideas, including improved lightening protection. Annual field
failures went down from numerous to two, one of which had a several-
inch lightning hole burned thru the heavy-gauge steel enclosure, a
direct hit.
 
Many reasons. A major one is the new medical device tax. This will skim
2.3% off the top. From revenue.

Right. 2.3% of sales, which, if a company's making 10%, is 23% of
their profits. Naturally, this is just the start. Rates will rise,
not fall.
It means that start-up companies that
typically do not turn a profit for easily the first 10 years will get
burdened with it. For others that are in the disposables business and
run on 5-10% profit margins one can easily see that it will wipe out a
huge chunk of that.

Then there's rationing that'll happen. Medical is a zero sum game, we
can't run it on hot air (a.k.a. bonds) forever. We have already seen
slashing of reimbursements. This will make certain higher end products
unprofitable, and high-end is where our country excels. So while now
everyone may be entitled to a free enema or flu shot there are likely
going to be growing waiting lists when you need help with some serious
stuff. Just like there are in Canada. This means less revenue for
manufacturers.

Next, capital gains taxes. Funding a start-up is a major risk for the
investors. So if the rewards they can reap are majorly cut down by tax
increases they will, obviously, curb their risk exposure. That's what I
am seeing the most in the med venture space, a risk-averseness that I
have not encountered ever in the past. And I am in med tech since the 80's.

I could go on and on, but hopefully this suffices to explain some of the
effects that I (and a lot of others) see coming or have already
experienced. Personally I've seen things not being funded that used to
be a sure thing 10 years ago, plus whole projects got canned that had
progressed quite far. While people like me can move to other areas in
engineering because I have kept a generalist attitude all my life that
is no so for many others. My former employer is in the process of moving
production to Costa Rica. Other companies have started layoffs:

http://www.examiner.com/article/stryker-lays-1-000-people-off-blames-...

Where will these people find work?

Good, concise explanation: medical device tax, cap gains, lower
reimbursements, rationing, for starters.

It's a big hit, a very big hit.

James Arthur
 
M

miso

Jan 1, 1970
0
Is it possible the VC is going to stupid internet social media garbage?
Ya think?

Why build a market for a hardware device, which hey, is work, when you
can sell nonsense. The current mania is photographs that disappear, when
it used in sexting. Hey, I know of a few congressmen who could have used
such a service.
 
M

miso

Jan 1, 1970
0
If supply voltage is the only issue, have you investigated using a DC/DC
plus an off the shelf 485?
 
Yes, the Modbus standard defines that, but the widespread industry
standard is 120 ohms and no capacitor. (adopted from the RS485 standard)

I still think that you are trying to solve the wrong problem.

By using some add-hoc driver design, you are most likely going to
create much more compatibility issues with devices from various
vendors.

Since the RS-485 standard requires a +/-200 mV swing between the
receiver terminal, with 54 ohm total load, the driver must be able to
supply _at_lest_ +/-3.7 mA.

With +/- 2V Tx voltage swing, the total loop resistance should be
below 540 ohms, i.e 240 ohms in a single conductor, so at least 0.3 mm
wire diameter is required for 1000 m.

The power dissipation issue is worse in point-to-point RS-422
connections, in which the transmitters are constantly on and must be
able to supply 2 mA to the termination resistor at the opposite end,
even when the line is idle.

However, Modbus over RS-485 is a half duplex protocol with at most one
transmitter in the active state feeding the termination, while all the
other are in the tri-state. Thus the total system consumption is quite
low. Due to the request/response nature of Modbus, the master Tx duty
cycle would be around 50 %, while in a multidrop system, the duty
cycle for the Tx is much lower, perhaps a few percent, keeping the
total energy consumed at a low value for each device.

By using 120 /120 /1500 ohms, it appears that you do not intend to use
polarization a.k.a pullup/pulldown resistors. While no data is being
transmitted, no transmitter is active the bus in a high impedance
state, with only the receiver leakages as a load. That 1500 ohms was
for 32 slaves, but with only a few slaves, the impedance is quite high
and sensitive to electrostatically connected interference (typically
false start bits).

In Modbus standard, this has been accounted for, by requiring that the
pause between individual bytes must not be greater than 1.5 character
times and that when the transmitter is turned from tri-state to
active, it must send the idle (Mark, "1") state for at least 3.5
character times. This will allow any reflections to die out and during
this period, any receiver will flush any spurious line noise (the 1.5
character time rule). Then the actual message transmission is
performed, followed by the Tx driven actively to idle (Mark, "1")
state for an additional 3.5 character times. This allows reliable end
of frame detection, by suppressing any reflections etc. immediately
after the data frame.


However, in a multivendor environment, it is not clear how well these
timing rules are followed, especially at high speeds, thus to ensure
maximum interoperability, I would definitively recommend using those
pullup/pulldon resistors on the bus to lower the impedance levels
while all transmitters are in the tri-state.

Regarding the 1 nF+120 ohm termination, the RC time constant is 0.12
us, hence after a few RC time constants, say 0.5 us after the last
signal transition, practically no power is delivered to the
termination resistance. At 115k2 with bit times of 9 us, power is
dissipated during 6 % of the bit time. Since there can be consecutive
"00..." or "11..." sequences in a message, without state changes
between bits (NRZ), the actual duty cycle is even less.

So I really do not understand, why you want to design a custom driver
to reduce power dissipation.
 
Why not? Use tri-state tiny-logic drivers.


Even with tri-state you have to watch out for "kick"

Kick? Logic chips can't drive transmission lines? Add some protection
if you expect lightning bolts.

Logic chips have ESD diodes in both directions. Discretes usually
don't. You're being a jerk, as usual.

Please remember, that the RS-485 specification requires -7 .. +12 V
common mode voltage range, well above and below the usual 0, +5 V
power supply range.

Since the driver is constantly connected to the bus, so while two
other devices are communicating with each other, the common mode
voltage can vary greatly. I hope that your ad hoc driver will not go
into some latch-up or high protection diode leaking mode, disrupting
the communication between other stations.

I really hope that I will not encounter such substandard ad hoc
drivers on RS-485 systems that I am responsible of.
 
J

John Devereux

Jan 1, 1970
0
Yes, the Modbus standard defines that, but the widespread industry
standard is 120 ohms and no capacitor. (adopted from the RS485 standard)
[...]


In Modbus standard, this has been accounted for, by requiring that the
pause between individual bytes must not be greater than 1.5 character
times and that when the transmitter is turned from tri-state to
active, it must send the idle (Mark, "1") state for at least 3.5
character times. This will allow any reflections to die out and during
this period, any receiver will flush any spurious line noise (the 1.5
character time rule). Then the actual message transmission is
performed, followed by the Tx driven actively to idle (Mark, "1")
state for an additional 3.5 character times. This allows reliable end
of frame detection, by suppressing any reflections etc. immediately
after the data frame.

[...]

Thanks for such an informative post - I have been using/implementing
modbus, on occasion, for 15 years. And have never seen this stuff
spelled out before.
 
K

Klaus Kragelund

Jan 1, 1970
0
I still think that you are trying to solve the wrong problem.



By using some add-hoc driver design, you are most likely going to

create much more compatibility issues with devices from various

vendors.



Since the RS-485 standard requires a +/-200 mV swing between the

receiver terminal, with 54 ohm total load, the driver must be able to

supply _at_lest_ +/-3.7 mA.

The standard defines minimum 1.5V into 54ohms. I need to comply to that to be caompatible to other devices. The difference from 1.5V to 200mV is the noise and attenuation margin.
With +/- 2V Tx voltage swing, the total loop resistance should be

below 540 ohms, i.e 240 ohms in a single conductor, so at least 0.3 mm

wire diameter is required for 1000 m.

Modbus defines 1200m maximum length
The power dissipation issue is worse in point-to-point RS-422

connections, in which the transmitters are constantly on and must be

able to supply 2 mA to the termination resistor at the opposite end,

even when the line is idle.



However, Modbus over RS-485 is a half duplex protocol with at most one

transmitter in the active state feeding the termination, while all the

other are in the tri-state. Thus the total system consumption is quite

low. Due to the request/response nature of Modbus, the master Tx duty

cycle would be around 50 %, while in a multidrop system, the duty

cycle for the Tx is much lower, perhaps a few percent, keeping the

total energy consumed at a low value for each device.

We cannot know if we are in a multidrop system or if the user uses a point-to-point system (1 device). So the duty cycle can approach 50% and to avoid storage capacitors we would need to supply the full TX current (low baud rate constraint)
By using 120 /120 /1500 ohms, it appears that you do not intend to use

polarization a.k.a pullup/pulldown resistors. While no data is being

transmitted, no transmitter is active the bus in a high impedance

state, with only the receiver leakages as a load. That 1500 ohms was

for 32 slaves, but with only a few slaves, the impedance is quite high

and sensitive to electrostatically connected interference (typically

false start bits).

We have failsafe resistors, to put the bus in known state if the wires are open circuit
In Modbus standard, this has been accounted for, by requiring that the

pause between individual bytes must not be greater than 1.5 character

times and that when the transmitter is turned from tri-state to

active, it must send the idle (Mark, "1") state for at least 3.5

character times. This will allow any reflections to die out and during

this period, any receiver will flush any spurious line noise (the 1.5

character time rule). Then the actual message transmission is

performed, followed by the Tx driven actively to idle (Mark, "1")

state for an additional 3.5 character times. This allows reliable end

of frame detection, by suppressing any reflections etc. immediately

after the data frame.

We use the 3.5c to our advantage, since that prolongs the low current RX state
However, in a multivendor environment, it is not clear how well these

timing rules are followed, especially at high speeds, thus to ensure

maximum interoperability, I would definitively recommend using those

pullup/pulldon resistors on the bus to lower the impedance levels

while all transmitters are in the tri-state.

Modbus is funny, the standard has contracteditions, and the industry users has invented their own semistandard. We have scanned the usergroups to be sure we cover the "funny" cases
Regarding the 1 nF+120 ohm termination, the RC time constant is 0.12

us, hence after a few RC time constants, say 0.5 us after the last

signal transition, practically no power is delivered to the

termination resistance. At 115k2 with bit times of 9 us, power is

dissipated during 6 % of the bit time. Since there can be consecutive

"00..." or "11..." sequences in a message, without state changes

between bits (NRZ), the actual duty cycle is even less.



So I really do not understand, why you want to design a custom driver

to reduce power dissipation.

We have not found any drivers below 3V supply that can drive 54 ohms, and that 3V drive is beyond our power budget.

Thank you for your valuable comments :)

Regards

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
Can you make the whole system LVDS?

Our device is one out of many Modbus device from other suppliers, so we cannot do other than comply to RS485/Modbus standard

Cheers

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
If supply voltage is the only issue, have you investigated using a DC/DC

plus an off the shelf 485?

Yes, currently we are using off the shelf RS485, but the bus voltage is high due to 3V supply, so the power budget is exceeded

We have seen no devices below 3V that can drive 54 ohms

Regards

Klaus
 
Modbus defines 1200m maximum length

That referenced Modbus.org document states on page 27,
For a maximum 9600 Baud Rate and AWG26 (or wider) gauge,
the maximum length is 1000m.

I am fully aware that the RS-485 specifies maximum 1200 m or to be
pedantic 4000 ft.
Modbus is funny, the standard has contracteditions,
and the industry users has invented their own semistandard.
We have scanned the usergroups to be sure we cover the "funny" cases

The Modbus was developed by Modicon to be used in their PLCs in the
1970's. By studying the various Modicon PLC documentations, there were
already some differences. When other vendors tried to create
compatible products, the number of variations grew significantly.

By creating the Modbus.org organization, there was an attempt to
standardize the situation to ensure interoperability.

I still do not understand, why that referenced document uses
conventions different from the RS-485 standard, such as 1000 m vs.
1200 m. or why they call the serial lines D0 and D1 instead of
RS/EIA/TIA-485 lines A and B.

To make situation worse, some manufacturers call those lines D+ and D-
and different manufacturers can't even decide which is Plus and which
is Minus, so you may have to connect D+ from one vendor to D- of an
other manufacturer and vice versa. One manufacturer uses the driver
chip manufacturer convention, while other use established
practices:).

The original Modbus protocol only specified binaries (coil/binary
input) and 16 bit scalars (register/input registers), Since there are
needs to transfer 32 bit integers and 32 bit IEEE floats, most
manufacturers have elected to use consecutive 16 bit registers to
carry those beasts and the receiver then has to concatenate these two
registers into a single value. Unfortunately, one manufacturer puts
the most significant part into the lower numbered register, while the
other into the higher numbered register :).

If this would not be enough to create confusion, some "Modbus
compatible" device when reading registers 5001 to 5002 might return 8
bytes (two 32 long ints/floats). To read two registers at 1001 will
return 4 bytes (two 16 bit registers).

There are enough interoperability problems without adding your own ad
hoc serial line drivers :). For interoperability, it might be better
to solve the power issues than trying to invent something special of
your own.
 
T

Tim Williams

Jan 1, 1970
0
Define "slow". This is the one I'm currently using (Trr=40ns) for a
power supply. I'm going to have to go to a 60V device, though.

http://www.ti.com/lit/ds/symlink/csd18501q5a.pdf

FYI, note their switching speed measurements specify "RG=0", which really
just means the figures they give are utterly meaningless.

My experience is, t_rr is roughly proportional to Vds(max), and usually
about 2-3 times the rating of the fastest junction diode of comparable
ratings.

Example:
- The above does 60V and 100A, and the body diode is specified at 25A.
There aren't any junction diodes available to compare with that, they're
all schottky. (A plain old UF4001 is rated 50V, 1A, and 50ns, but it's in
the same bracket as UF4004, which ought to be 50ns. A true, optimized
UF4001 should be quite fast indeed, basically 3-4 x 1N914 in parallel.)
- A better comparison would be made between, say, 200V, 600V and 1200V
devices. Offhand, I think the ratings for something like a 200V, 10A
MOSFET will be maybe 100ns, and a 200V, 10A diode, 50ns; at 600V 10A, more
like 250ns and 100ns; and at 1200V 10A, around 350ns and 150ns.

Tim
 
K

Klaus Kragelund

Jan 1, 1970
0
That referenced Modbus.org document states on page 27,







I am fully aware that the RS-485 specifies maximum 1200 m or to be

pedantic 4000 ft.








The Modbus was developed by Modicon to be used in their PLCs in the

1970's. By studying the various Modicon PLC documentations, there were

already some differences. When other vendors tried to create

compatible products, the number of variations grew significantly.



By creating the Modbus.org organization, there was an attempt to

standardize the situation to ensure interoperability.

In the documents from Modbus.org they have contradictions in the same document. A lot of weak statements like "shall" and possibility to add power on the RJ45 connector, which seems almost non-existant in the industry
I still do not understand, why that referenced document uses

conventions different from the RS-485 standard, such as 1000 m vs.

1200 m. or why they call the serial lines D0 and D1 instead of

RS/EIA/TIA-485 lines A and B.



To make situation worse, some manufacturers call those lines D+ and D-

and different manufacturers can't even decide which is Plus and which

is Minus, so you may have to connect D+ from one vendor to D- of an

other manufacturer and vice versa. One manufacturer uses the driver

chip manufacturer convention, while other use established

practices:).

We have observed the same. We have a setup where we have tried different modules and in some cases we need to switch A and B
The original Modbus protocol only specified binaries (coil/binary

input) and 16 bit scalars (register/input registers), Since there are

needs to transfer 32 bit integers and 32 bit IEEE floats, most

manufacturers have elected to use consecutive 16 bit registers to

carry those beasts and the receiver then has to concatenate these two

registers into a single value. Unfortunately, one manufacturer puts

the most significant part into the lower numbered register, while the

other into the higher numbered register :).

We are new to this, so we have leaned against an experienced consultanty house, to use the sensible modbus function codes. We discussed the broadcast code, but did not implement it since no error checking is possible (no response)
If this would not be enough to create confusion, some "Modbus

compatible" device when reading registers 5001 to 5002 might return 8

bytes (two 32 long ints/floats). To read two registers at 1001 will

return 4 bytes (two 16 bit registers).

During our tech scan we found a common PLC, that even did not comply to 3.5c. Users simply made workarounds for that, since it was from a major supplier.
There are enough interoperability problems without adding your own ad

hoc serial line drivers :). For interoperability, it might be better

to solve the power issues than trying to invent something special of

your own.

We will design it to comply with the standard, supplying 1.5V during TX and 200mV trigger level during RX. We will simply use better (lower RDSon) transistors to allow for lower supply voltage.

The receiving circuit could be done just by a standard IC (only with RX functionality), so we don't need to worry to much about that part of the design

Regards

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
Please remember, that the RS-485 specification requires -7 .. +12 V

common mode voltage range, well above and below the usual 0, +5 V

power supply range.

[snip]

We have galvanic isolation to combat common mode issues.

Regards

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
Can you make the whole system LVDS?

I am afraid not, LVDS has to low voltage levels and common mode compliance to conform to RS485

Cheers

Klaus
 
We have galvanic isolation to combat common mode issues.

Excellent, that is what I have recommended for my customers for
decades (and most adhere to this recommendation :).

However, since you do not have full control of the network, there
might still be large potential differences between signal line(s),
signal ground and protective ground.

Now, putting my system integrator hat on :)

I am trying not to be un polite, but while it is a bad thing if a
point-to-point connection fails due to driver latchups, it is
_completely_unacceptable_ if such problems will stall the traffic on a
multivendor RS-485 bus !!

Please consider twice, before you are going to implement your own
discrete driver designs. As a system integrator, I would promptly
throw out such designs, or at least allocate an own serial line (with
extra cost) for such devices.
 
Top