RS485 transceivers and Ethernet MagJacks - Page 1
Forum section: electronics / projects

author: KhronX
author_rank: Frequent Contributor
timestamp: December 22, 2016, 02:56:35 pm
content: I've yet to actually breadboard / prototype anything for this particular piece of my design, but i'm just wondering / throwing this out there:Would / should RS485 transceiver chips play along well with standard transformer-isolated Ethernet / CAT5 cabling?For the project i have in mind, i'd need to shove about 12Mbit/s of data down a twisted-pair cable, on a distance of 10-15m or so (30-50ft), in as simple and cheap a way as possible.Galvanic isolation would be highly appreciated, hence the idea of MagJacks & CAT5 cabling.Obviously, i'm aware i might need to play around with termination resistors, although some ballpark starting values would be nice.

author: ajb
author_rank: Super Contributor
timestamp: December 22, 2016, 03:20:21 pm
content: Well, you lose DC by sending a signal through a transformer, so if you can encode pulse-encode your data it might sort of work, but anything that relies on longer periods at a fixed level (mark/break signals, bytes that are all 1 or all 0) you're liable to run into trouble.Why don't you use a conventional isolated RS485 interface? There are all-in-one isolated transceivers that will do the isolation, isolated DC-DC, and transceiving in a single wide SO package, or you can do separate digital isolator, DC-DC, and transceiver at a slightly lower cost but larger PCB footprint. If you're only running one-to-one, you only need to isolate one side of the link.Although 15m isn't all THAT far that I'd be worried about isolation unless you're trying to break fault current paths or something. As it is, RS-485 is designed for a common mode range of +12/-7V.

author: KhronX
author_rank: Frequent Contributor
timestamp: December 22, 2016, 04:19:05 pm
content: Good catchDid a bit of digging and it turns out the protocol of the signal i intend to use (ADAT Lightpipe) actually does have a string of ten zero bits as a synchronisation sequence. Talk about throwing a wrench into the workshttps://ackspace.nl/wiki/ADAT_projectIt's never as easy as it oughtta be, is it?Well, since that's the case, i just started browsing for Ethernet IC's on Mouser. Seems quite standard for the "reference clock" to be 50MHz (either provided externally, or PLL-derived from a 25MHz crystal). I'm starting to wonder whether (or how) some might work with a lower frequency external clock...

author: KhronX
author_rank: Frequent Contributor
timestamp: January 25, 2017, 11:38:03 pm
content: Ok, FIIIIINALLY i've got some updates... containing good newsThe other day, i "scored out" a little prototype board (copper-clad pcb, pencil, box-cutter knife and elbow-grease) - no frills:- RS485 transceiver chip (in this case, a TI SN65LBC179A)- 100n 0603 bypass cap- 15R series input resistor- a BelFuse MagJack scavenged from an old 3Com network cardOn the receiving end, a daughterboard from a Lenovo laptop (containing the DC-in jack, RJ45 / transformer / LAN chip) - nice and compact, and easily scope-ableHooked up my sig-gen, set it for 6MHz, powered up the board, hooked up a 3-5m(?) CAT5 cable (couldn't be bothered to unroll & measure it), and... all is well!As suspected, i might need to toy around in the prototype for the receiver end, with some termination resistors, to clean up the edges, but for a preliminary test, i'm REALLY happyMy biggest worry was that, considering this whole system is AC-coupled (via the Ethernet magnetics), the voltage droop on a sustained succession of same-value bits (such as the string of 10 zeroes that is the sync frame in the ADAT protocol) would be too great, and as such, would make this whole idea a no-go.Not the caseI wound down the input signal all the way to 600kHz - the droop from between the start of the squarewave and its transition back to zero was a mere 0.2v (of a 2.5Vpp signal). Took it down even further, down to 200kHz - droop merely doubled, to about 0.4v. That's waaaaay more than plenty for meYep, this thing's starting to look pretty damn promising, if i may say so myselfEDIT: As a side-note, the driver sips about 15mA with an input of 2-600kHz, 18mA at 2MHz and up to 32mA at 6MHz.Photo 1: an overall view of the test setup - pardon the chaos / messPhoto 2: a closer look at the prototype transmitter and the guinea-pig "repurposed" receiverPhoto 3: scope probes hooked up to the two outputs of the transformer associated to the twisted pair i was transmitting through (1V/div, 200ns/div); sig-gen, as can be seen, set to 1MHz

author: KhronX
author_rank: Frequent Contributor
timestamp: January 26, 2017, 08:57:03 pm
content: I just thought of another potential issue.Say, the driver part of a chip has no input. that means one output will be high, and the other one low, which means a bit too much current would be flowing through the primary of the respective twisted-pair's transformer.I was thinking of adding a DC-blocking cap in series with each TX pair's winding, but... I'm wondering how great a risk there is, of inducing some resonance / ringingEthernet specs mention a minimum inductance of 350uH @ 100kHz, but that's with an 8mA DC bias (supplied via the center-tap of each primary winding). I just unsoldered one from a laptop board, and it measures at about 500-510uH @ 100kHz.

author: KhronX
author_rank: Frequent Contributor
timestamp: January 27, 2017, 11:17:50 am
content: Just for kicks, i whacked in a 100n / 100v 0603 X7R cap in series with the driver output & MagJack TX winding.It "imbalances" the duty-cycle of the squarewave (it's no longer a symmetrical 50%), and i get some overshoot, but only on one of the transitions.As one might expect, it gets worse with increasing frequency.Photo 1: 6MHz inputPhoto 2: 600kHz inputOne thing to note is that the receiving end is terminated with whatever resistance / impedance is inside the LAN chip itself (i haven't cut the traces).Would experimenting with (alternative) termination be worth a shot?

author: KhronX
author_rank: Frequent Contributor
timestamp: January 29, 2017, 11:43:11 pm
content: One more step towards fulfillmentToday i decided to lift the three "output" pins of the receiving Ethernet transformer (the two ends of the winding, and the center tap), and scope the signal without those pins connected to the LAN chip on my "guinea-pig" test-receiver.Kinda horrible-looking signal - kinda resembling what can be seen in the 6MHz photo in the previous post. Driver was sucking about 40mA @ 5v, by the way.What the hell, let's whack a termination resistor on there, i had an 0603 100one. Result = damn near perfect-looking signalJust the sliiiiiightest hint of ringing after the transitions, but the amplitude is about as large as the trace itself is wide, on the scope display, so... I'm not gonna sweat thatDriver eats up just 25mA like this.But that duty-cycle asymmetry's still there. Next week i'll get the chance to test things with a real-world ADAT signal, because i'm not 100% sure this asymmetry will affect things (but at the same time, i'm not 100% sure that it WON'T affect things either)... Ah well, time will tellOne thought that crossed my mind was adding another cap, between the other driver output and the Ethernet magnetics (ie. at the other end of the "primary") as well, although i'm not sure whether that would help things. Another thought was going up to a 1u cap instead of the present 100n. Thoughts?If that asymmetry turns out to screw with the audio after all, i guess i'll just resort to tacking on some sort of turn-on delay for the power going to the driver chip, in the final design. I've been spicing a quick-'n-dirty NPN + P-MOSFET circuit with a few passives, which should do the job well enough (to keep the driver chip from being powered before the MCU / "brain" of the audio interface this will go into finishes booting and starts outputting an ADAT signal).

author: KhronX
author_rank: Frequent Contributor
timestamp: January 30, 2017, 06:48:47 pm
content: GREAT NEWS!For myself, anywayI finally hacked together a small prototype receiver board as well. I lifted the whole circuit-side half of the Ethernet transformer from my guinea-pig-board, and tacked on the two ends of the RX winding. I also added a Toslink-type transmitter, for later testing.I'm very happy to report that my worries about the duty-cycle "asymmetry" turned out to be unfounded. The waveform coming out of the receive pin of the RS485 chip is as symmetrical as the input signal coming out of my sig-genSave for a ~50ns-ish delay, and the tiniest bit of overshoot (the receive pin's only connected to the Toslink transmitter and a scope probe).Photo 1: prototype receiverPhoto 2: lower trace = input signal; upper trace = signal coming out of the receive pin; both 2V/div and 50ns/div

author: KhronX
author_rank: Frequent Contributor
timestamp: February 02, 2017, 08:30:33 pm
content: Even more good news(Well, not like anyone cares anymore - in case anyone did, in the first place)Today i finally received my real guinea-pig... I mean, test-bed (a slightly faulty MOTU Traveler mk3 audio interface, with ADAT outs, among many others).Photo 1: transmitter board tacked-on, straight at the ADAT outputPhoto 2: an overall view of part of the systemADAT signal goes into the transmitter board, through the grey coiled-up CAT5 (i think i noticed some "14ft" marking on it somewhere), into the "test subject" Ethernet connector & magnetics, and into a receiver board, with a Toslink-type LED transmitter on it. Then onwards via optic fiber into my main home interface (a TC StudioKonnekt 48).Before powering it all up, i set the SK48 to get its clock / sync from the ADAT input. Upon connecting the optic cable, the "external lock" indicator greeted me with a heartwarming green colourThen after setting up some routing options, the wonderful sounds of hum induced by a finger on a 1/4" jack could be heard

author: magetoo
author_rank: Frequent Contributor
timestamp: February 02, 2017, 09:15:13 pm
content: I for one enjoyed reading about this experiment. Some people seem to think that this could only work with Ethernet and I wasn't sure what to believe. Congratulations!

author: KhronX
author_rank: Frequent Contributor
timestamp: February 02, 2017, 09:17:50 pm
content: In that case, i'm glad to hear thatBack at the beginning of this whole thing i figured, since RS485's a differential bus, and Ethernet's transformer-isolated... What're the odds, y'know?But i'm reeeeeeeeeeal glad it all worked out, i can tell you that much