Electronics-Related.com
Forums

Discrete custom design of RS485 driver

Started by Klaus Kragelund December 21, 2012
On Fri, 21 Dec 2012 14:48:12 -0800 (PST), Klaus Kragelund
<klauskvik@hotmail.com> wrote:

>On Friday, December 21, 2012 10:17:44 PM UTC+1, Jim Thompson wrote: >> On Fri, 21 Dec 2012 11:11:58 -0800 (PST), Klaus Kragelund >> >> <klauskvik@hotmail.com> wrote: >> >> >> >> >On Friday, December 21, 2012 6:16:02 PM UTC+1, John Larkin wrote: >> >> >> On Fri, 21 Dec 2012 03:02:40 -0800 (PST), Klaus Kragelund >> >> >> >> >> >> <klauskvik@hotmail.com> wrote: >> >> >> >> >> >> >> >> >> >> >> >> >Hi >> >> >> >> >> >> > >> >> >> >> >> >> >The standard RS485 drivers available has a minimum voltage of 3V and a rarther large drop voltage when loaded with the defined bus load for Modbus of 54ohms, and this causes problems for our design since we have limited power available for driving the bus >> >> >> >> >> >> > >> >> >> >> >> >> >So, we are thinking about designing our own driver in discrete components, so we can reduce the supply down to 2V and still comply with minimum 1.5V differential voltage into 54ohms. >> >> >> >> >> >> > >> >> >> >> >> >> >We only need 115k baud, so we could use a tiny logic level FET as the output stage. Shortcircuit protection would be done with a current limit circuit along with a low value supply capacitance (to reduce peak power in the FETs) >> >> >> >> >> >> > >> >> >> >> >> >> >Backfeed would need to be solved with a beefy diode to a defined clamp voltage. >> >> >> >> >> >> > >> >> >> >> >> >> >So, anyone been down this road, designing your own RS485 driver? >> >> >> >> >> >> > >> >> >> >> >> >> >Cheers >> >> >> >> >> >> > >> >> >> >> >> >> >Klaus >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Just use a cmos quad xor gate; two paralleled sections for one phase, two for >> >> >> >> >> >> the other, with maybe 3.3 volt supply and 30 ohm source terminations. There's no >> >> >> >> >> >> need to use discrete fets. >> >> >> >> >> >> >> >> >> >> >> >> We recently did this: >> >> >> >> >> >> >> >> >> >> >> >> https://dl.dropbox.com/u/53724080/Circuits/ESM/Line_Drivers.pdf >> >> >> >> >> >> >> >> >> >> >> >> The basic line driver is a couple of tiny-logic gates driven from complementary >> >> >> >> >> >> FPGA outputs. The downstream junk is selectable line driver equalization, to >> >> >> >> >> >> partially correct for CAT5 cable losses. This runs up to 125 MHz. >> >> > >> >> >Maybe a good point, if I can find a logic device that has low RDSon at 2V. >> >> > >> >> >The ones I have found have 10ohms RDSon (NC7SZ74), but could parallel some of those to bring down the RDSon to the 2-3 ohms range >> >> > >> >> >Regards >> >> > >> >> >Klaus >> >> >> >> Do you need to tri-state the driver? If so, Larkin's suggestion >> >> doesn't work. Even with tri-state you have to watch out for "kick" >> >> above/below rails. >> > >Yes, I need to tristate the driver, since it is a 2 wire system, half duplex. > >Regards > >Klaus
Can you make the whole system LVDS? -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation Picosecond-resolution Digital Delay and Pulse generators Custom timing and laser controllers Photonics and fiberoptic TTL data links VME analog, thermocouple, LVDT, synchro, tachometer Multichannel arbitrary waveform generators
On Dec 21, 3:48=A0pm, Joerg <inva...@invalid.invalid> wrote:
> Klaus Kragelund wrote: > > On Friday, December 21, 2012 7:12:56 PM UTC+1, Joerg wrote:
> >> Just a comment: Diodes are already in the FETs, in the form of body di=
odes.
> > > Yes, I added parallel more sturdy diodes, to direct the current away fr=
om the low current body diodes.
> > 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... -- Cheers, James Arthur
On Dec 21, 6:09=A0pm, John Larkin  wrote:
> On Fri, 21 Dec 2012 14:52:43 -0800 (PST), Klaus Kragelund wrote: > >On Friday, December 21, 2012 11:41:12 PM UTC+1, John Larkin wrote:
> >> if you expect lightning bolts. > > >We would need to add protection in any case to reduce the currents, the =
driver IC would suffer from latchup problems if not.
> > 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. -- Cheers, James Arthur
On Dec 21, 7:45=A0pm, Joerg <inva...@invalid.invalid> wrote:
> rickman wrote: > > On 12/21/2012 6:54 PM, Joerg wrote: > > >> I sure hope we can at least keep high-end semiconductor engineering an=
d
> >> processing in the country for a while, now that Obamacare is smotherin=
g
> >> much of the med device investment climate. > > > 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.
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
On Fri, 21 Dec 2012 19:06:43 -0800 (PST), dagmargoodboat@yahoo.com
wrote:

>On Dec 21, 3:48&#4294967295;pm, Joerg <inva...@invalid.invalid> wrote: >> Klaus Kragelund wrote: >> > On Friday, December 21, 2012 7:12:56 PM UTC+1, Joerg wrote: > >> >> Just a comment: Diodes are already in the FETs, in the form of body diodes. >> >> > Yes, I added parallel more sturdy diodes, to direct the current away from the low current body diodes. >> >> 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...
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
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.




If supply voltage is the only issue, have you investigated using a DC/DC 
plus an off the shelf 485?

On Fri, 21 Dec 2012 14:46:15 -0800 (PST), Klaus Kragelund
<klauskvik@hotmail.com> wrote:

>> What Modbus "standard" ? >> >> The closest that I can think as electric Modbus standard is the >> http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf >> "MODBUS over serial line specification and implementation guide V1.02" >> >> Look at page 28 >> >> >Line termination may be a 150 ohms value ( 0.5 W ) resistor.
>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.
On Fri, 21 Dec 2012 14:41:12 -0800, John Larkin
<jlarkin@highlandtechnology.com> wrote:

>>Do you need to tri-state the driver? If so, Larkin's suggestion >>doesn't work. > >Why not? Use tri-state tiny-logic drivers. > > >Even with tri-state you have to watch out for "kick" >>above/below rails. > >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.
upsidedown@downunder.com writes:

> On Fri, 21 Dec 2012 14:46:15 -0800 (PST), Klaus Kragelund > <klauskvik@hotmail.com> wrote: > >>> What Modbus "standard" ? >>> >>> The closest that I can think as electric Modbus standard is the >>> http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf >>> "MODBUS over serial line specification and implementation guide V1.02" >>> >>> Look at page 28 >>> >>> >Line termination may be a 150 ohms value ( 0.5 W ) resistor. > > >>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. -- John Devereux