poor mans differential line driver & receiver? - Page 1
Forum section: electronics / projects

author: max_torque
author_rank: Super Contributor
timestamp: January 12, 2022, 07:55:18 pm
content: As i'm sure oyu all know, right now the supply of any component that is in anyway even slightly specalist, and lots of parts that are not even specalist at all, is very, very constrained!I'm trying to design out some digital isolators from a design to enable us to make that productNow, those isolators are not actually needed for their galvanic isolation as such, because the boundary across which the signals go is not, broadly speaking at two different ground potentials. However, the isolators we use to limit the coupling between the two sides for EMC reasons, because the power supplies of each side are heavily filtered etc. We had tried std optocouplers in this position, but due to the extreme temperatrue range of the product, and ageing effects on speed and DTC etc, these were replaced with the now-impossible-to-get isolators.After doing a bit of simulation and head scratching it looks like i can maintain enough EMC performance without galvanic isolation by moving to differential signalling. ie LVDS. But same problem, i can't guarantee LVDS drivers are available without enormous lead times etc.So, question.Given that my data rate is really pretty slow, lets say up to 200kbs or so as a max, can i replace the digital isolators with a home-brew differential signalling type arrangement, using jelly bean logic and analogue parts?The driver seems relatively easy, any comparitor or buffer with complimentary outputs can do some sort of psuedo differential or anti-phase type current loop output using fixed resistors.The diy reciever seems trickier to me however? As the common mode ground offset could be 1Vpkpk dynamically, although the DC offset should be much lower, in the order of a few hundred mVIf i centred the dif output at half supply, lets say 2.5v, then the reciever needs to account for this surely?I bet there are some nice tricks here i am missingIt's hardly a new thing in electronics after all.Any advice welcomed!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 12, 2022, 08:15:55 pm
content: Why LVDS over RS422?Since the transmission path isn't very long at all, termination (and drive strength) aren't even very important; you might even just use a pair of logic gates for all that matters, eh? Downside is propagation time likely won't match, but some filtering will address that.LVDS/RS422 receivers are basically just glorified comparators, of course the latter having specified input offset and hysteresis. If nothing else, you can do the same from plain comparators and a few resistors, no biggie.What's wrong with single ended, anyway? Digital logic rarely needs to carry much current.Tim

author: David Hess
author_rank: Super Contributor
timestamp: January 12, 2022, 08:27:18 pm
content: Quote from: max_torque on January 12, 2022, 07:55:18 pmIt is completely feasible to make differential transmitters and receivers using basic building blocks.QuoteAny logic gate function with complementary outputs can be used like a flip-flop or latch. An analog comparator with complementary outputs could also be used.Update: Or two analog comparators could be used with their inputs reversed. The reason this might be done instead of using gates is to produce a more balanced output or level shift low voltage logic to a higher voltage.QuoteThe analog comparator is the basic building block of a differential logic receiver. A common way to increase the input common mode range is to attenuate each signal before each comparator input. This also attenuates the differential signal but comparators are plenty sensitive. In the digital world, analog comparators are known as differential line receivers and optimized for speed over sensitivity.

author: BrianHG
author_rank: Super Contributor
timestamp: January 12, 2022, 08:51:05 pm
content: I used to use my pic's MCU comparator inputs. I would swap the 2 IOs to output to software send differential RS485 TTL levels out while changing them into inputs in comparator mode and use the comparator status bit when in receive mode. The downside is the software serializer. The up side is no separate transceiver ICs. I just use series resistors plus 2 load resistors so the comparator was also able to see an open bus condition.And I still had the hardware UART free for local PC communication. An all in 1 IC solution with bi-dir 485 and RS232 to my host.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 12, 2022, 09:13:31 pm
content: Interesting that some MCUs even are rated for IO drive strength nearly comparable to RS-485. They are however missing transient protection and outside-the-rails voltage tolerance. So, given some improvements, nearly as capable as a proper device.Tim

author: max_torque
author_rank: Super Contributor
timestamp: January 12, 2022, 10:01:31 pm
content: The choice of diffeential was to push the two lines through a fair bit of common mode choking, which obviously doesn't attentuate the diff signal, as that is always in counterpoint, but that hopefully allows, given some sensible pcb routing, to kill the EMC transmisson between the two devices. It also allows (most) the drive current come back to the transmitting boardm hopefully minimising the proportion that ends up coupled through the power rails between the devices (which as i say are heavily filtered)In reality, i coupld probably do all that single-ended at the datarates i need, but from a pure EMC perspective diff just feels a better, and if i can do it with jelly bean parts, doesn't carry a particularly big cost overhead. I have iirc, 6 or 8 data lines to get across the boundary, so a couple of CD4041's (old skool!) as the TX and some comparitors as the RX and we are away.I need to work on the comparitor bit though. It feels to me that where the snaffu's lie?? ;-)

author: BrianHG
author_rank: Super Contributor
timestamp: January 12, 2022, 10:37:43 pm
content: Quote from: T3sl4co1l on January 12, 2022, 09:13:31 pmSeries resistors and 2 dual diodes.I have host and addressable monitor terminals on a regular 4 wire phone lines going through an entire apartment building with branches on each floor.2 wires for 12v, 2 for bidirectional 485 data. No problems at 9600baud.Each terminal just has a regulator and a PIC with some LEDs, buttons and thermostat.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 12, 2022, 11:20:44 pm
content: Otherwise, just looking on Mouser, "lvds transceivers" yields a lot of parts that are in stock. Mostly TI parts from what I've seen.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 13, 2022, 12:44:58 am
content: Quote from: BrianHG on January 12, 2022, 10:37:43 pmBasically. A few resistors to set impedances/levels/improve immunity, clamp diodes or TVS, maybe some filtering.Tim

author: mazurov
author_rank: Frequent Contributor
timestamp: January 13, 2022, 01:04:41 am
content: Can you use CAN transceivers? They seem to always be available in one form or another.

author: langwadt
author_rank: Super Contributor
timestamp: January 13, 2022, 01:14:03 am
content: LCSC has few million different RS485 transcievers in stock,https://lcsc.com/products/RS-485-RS-422-ICs_578.html?keyword=rs485many of them likely pin compatible

author: eugene
author_rank: Frequent Contributor
timestamp: January 13, 2022, 01:16:31 am
content: Not sure if they qualify as jelly bean, and obviously no one can guarantee availability over the next 12 to 24 months, but I have noticed that many 8 pin RS485 transceivers share the same pinout. There might be some differences in spec's such as max speed or common mode complience, but you don't care if they can sustain 2Mbs or 12. With so many manufacturers making parts that are essentially pin compatible you stand a good chance of finding a source somewhere.

author: David Hess
author_rank: Super Contributor
timestamp: January 13, 2022, 03:19:56 am
content: Quote from: SiliconWizard on January 12, 2022, 11:20:44 pmThere were other differential bus standards which used switched current outputs like LVDS but slower and cheaper. Unfortunately they are mostly depreciated so parts are no longer commonly available and inexpensive. Appletalk comes to mind.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 13, 2022, 07:55:12 am
content: Appletalk was just RS-422.Tim

author: jonpaul
author_rank: Super Contributor
timestamp: January 13, 2022, 11:45:55 am
content: Bonjour,For many protocols eg Ethernet, the PHY has a simple 1:1 transformer for isolation.Very lowcost and isolation to 2 kVJon

author: max_torque
author_rank: Super Contributor
timestamp: January 13, 2022, 12:16:47 pm
content: yup, i thought about using CAN, RS-422 or similar transceivers etc. Cettainly workable, but the space to get my 8 channels in is going to be tricky, i also have fixed directionality for my signals.And yes, there are indeed LVDS transcievers in stock, but again, once i use a specific part, i might be setting myself up for a fall later, although to be fair, at the moment i dont' believe any part is immune to supply issues. However, with boggo logic gates and comparitors being so cheap, i can just simple buy enough reels of parts to cover my requirements for at least the next year i think, without having many $$$ of stock sat on the shelfI guess with the comparator solution, the key is to ensure that in the case of no connection, ie floating inputs, the output state is fixed, ie to bias the input appropriately?

author: David Hess
author_rank: Super Contributor
timestamp: January 13, 2022, 05:40:26 pm
content: Quote from: T3sl4co1l on January 13, 2022, 07:55:12 amWas it just RS-422? An old Linear Technology application note showed a switched current drive transmitter and isolation transformers for other applications and I thought it was with Appletalk transceivers.

author: langwadt
author_rank: Super Contributor
timestamp: January 13, 2022, 06:10:05 pm
content: Quote from: David Hess on January 13, 2022, 05:40:26 pmhttps://en.wikipedia.org/wiki/AppleTalk#Physical_implementation

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 13, 2022, 06:14:44 pm
content: Could be? That's what Wiki says anyways. And like, Ethernet and RS-422/485 aren't too dissimilar, broadly speaking. Assuming your line coding is RZ, Manchester or other balanced code. Don't know why it would need to be done quite that way though; maybe current was just for ease of symmetry (i.e. long tailed pair)?Drive method doesn't really matter of course, analog might be easier with current mode, logic with voltage mode; the line needs to be terminated either way so Thevenin doesn't care.Tim

author: David Hess
author_rank: Super Contributor
timestamp: January 13, 2022, 06:44:26 pm
content: Quote from: T3sl4co1l on January 13, 2022, 06:14:44 pmLVDS despite its name is current driven.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 13, 2022, 08:03:40 pm
content: Yup, and are at least commonly depicted as LTP driven. So, likely the analog application case.What theyreallydo, who knows; they're rather secretive about that?It's clearly not a 100% free floating situation, because the common mode impedance is rather modest (a few 100 ohms). I don't know that the output voltage is ever much more than nominal, anyway (~300mV); honestly I haven't actually measured one so it may have a generous compliance range, I don't know.I think one catch is they may use an all-Nch H-bridge between a CCS up and down each: notice this forces the pullup into saturation for Vout < Vg,hs(on) - Vgs(th). Because it's not an ideal current source (after all, it's just another transistor). So, this both sets a limit on output voltage (compliance range), and Vcm. Again, don't know if that's actually representative of what they do, or if they're doing more/other things to maintain balance; just that from what little I've seen documented, it's a plausible mechanism.CML, too (like HDMI, isn't it?). Probably just because a single Nch mirror/sink is easier, and not having to be so big as to fully saturate, the tiny transistor can deliver quite high bandwidth. Or most 10/100 Ethernet PHYs (into CT transformer!), but not the low-power or gig types (which use an H bridge or something).Tim

author: David Hess
author_rank: Super Contributor
timestamp: January 14, 2022, 11:44:13 am
content: All of the ones I have studied are built on CMOS processes so the output current source and sink, and the switches are straightforward. Older bipolar designs were historically built on bipolar NPN only processes so had to use totem-pole voltage output stages, like RS-422 and RS-485.I think another reason for a current output stage is lack of ground and supply bounce, like with ECL, and lack of shoot-through.I have designed and implemented a couple of discrete current mode RS-232 drivers with the output voltage limited by compliance and they worked fabulously, but of course they were not low power.And old standard integrated RS-422 or RS-485 driver and receiver like the 75176 may be the way to go for this application. Some were multiple sourced and reached essentially jellybean status.

author: jonpaul
author_rank: Super Contributor
timestamp: January 14, 2022, 11:55:56 am
content: Reccomend Intersil ISL3259E transciever RS-485 15 kV protectionJon