Electronics > Projects, Designs, and Technical Stuff
Digital audio protocol for 100M copper
<< < (3/14) > >>
Doctorandus_P:
I've had success with tying the output of an S/Pdif transmitter directly to an RS-485 driver.
Bitrate of S/Pdif is about 1.5Mbits/s and Cat 5 is perfecty suited for long runs of wire with an  RS-485 driver.
On the other end of the wire, the signal gets picked up by 2 RS 485 transceivers.
One RS-485 transceiver picks up the (possibly degraded) signal from the wire and outputs a logic signal. The third RS-485 transceiver is used to send the signal to the S/Pdif transformer in the remote equipment.
I actually use this with a distributed system, where the same S/Pdif data is send to multiple remote nodes. RS-485 is perfecty suited for that. There are no delays added to the signal, except for the length of run or cable, and propagation delays through the drivers, which can all be safely neglected. (Grace Hopper said that a ns is about 30 cm long). You can distribute high quality audio through a house with multiple taps and no chance of stuff ever getting out of sync.

This works very well, but it has to be designed properly. A wrong cable termination can completely demolish your signal.

But for you standard Ethernet is probably better suited.
You can use microcontrollers with chips like the Wizznet W5500, but you have to do some calculations if the whole chain can manage the bitrate for the audio quality you need.

Nowadays it is also common to have microcontrollers with built in Ethernet. Some of the STM32F400 series have built in Ethernet.
Ethenet does add some latency. This is in the order of ms, and unlikely to be an issue for you. But if you have a system in which audio and video are combined you may loose lip sync if you send the audio over ethernet.
Talking mouths with no sound or speach after the actor shut his mouth is annoying and destroys the movie experience. Using a uC with Ethernet also gives you a lot of design flexibility. You can add compression / encryption if required (maybe your next customer requires it). You can also add other features, such as call buttons, blinking led's or add a camera with motion detection and have it signal when someone starts walking in the direction of the front door or cars drive into a drive-in.
You also get the use of standard switches and routers to maintain signal integrity.
Part of Ethernet is signal tuning to match driver and receiver and compensate for cable influences.
Ethernet also reduces the probablility of single point of failure. If in the RS-485 system the cable is shorted anywhere, or even if it is open, you get impedance mismatches and the whole system collapses.

With ethernet and uC's you can also easily add diagnostics data to your protocol. Plug in a cable and the box gives instant feedback if the remote audio node is connected and if it works.

If you want to design a system with a total installed base of 3000 nodes, you want reliability. You do want one of your customers calling you every week with problems. With 3000 nodes development costs are also not so much of an issue. Lots of vendors for the bigger uC's have software stacks available for using the Ethernet controllers on their chips and for audio compression. Some are free, others have commercial licenses.
With Ethernet you can also add remote diagnostics. You can talk to the customers hardware instead of to a frustraded customer over the phone.
nctnico:
Before Voip large telephone systems often use a so called ping-pong system over a balanced link between the telephone switch and the telephones. Audio (ulaw or alaw encoded) + data are transmitted in packets using an NRZ modulation scheme. The master sends a packet and the slave responds with a similar packet. Buttons and indicators can be mapped directly onto bits inside the packets which greatly simplifies the slave (telephone side). You could use a simple CPLD and a codec at the stall to implement this. A fast microcontroller should also be able to handle this. This scheme is extremely simple, resillient and reliable.

Ethernet may sound nice but when I read that bad wiring is part of the environment ethernet just isn't a good choice.
mikeselectricstuff:
Seems to me Ethernet is going to be the most flexible in terms of hardware - maybe running a  very lightweight protocol, raw frames rather that TCP/IP.
There are plenty of MCUs that have onboard ethernet MACs and sometimes PHYs as well Maybe look at the PIC32MZ, as it also has I2S support for audio,.
 I probably wouldn't go with W5500 as you may struggle with bandwidth, and it has limited onboard buffer. It also doesn't support larger frames or fragmentation, though having said that, for a simple one-channel audio in or out node, it could be a pretty low-cost, low-learning-curve solution coupled with a cheap 32 bit MCU with I2S support.
Making it be a digital network means you can easily adapt to various permutations needed at different sites and in future, and you can easily find local cable installers that know how to install & test ethernet cabling.
You also have plenty of off-the -shelf kit, so, for example could do fibre if you have the occasional very long run, or use PoE to power some remote kit. 
 
mikeselectricstuff:

--- Quote from: Doctorandus_P on December 10, 2018, 11:10:33 pm --- If in the RS-485 system the cable is shorted anywhere, or even if it is open, you get impedance mismatches and the whole system collapses.

--- End quote ---
It can be worse than that - with RS485, opens and shorts can make the system sort-of-work, some of the time, so faultfinding can be tricky.

Another important thing to consider is that for long runs you want isolation, which comes as standard with ethernet, but adds not insignificant cost for RS485 at the sort of speeds you'd be looking at.

Unless you're taking literally single-point to single-point, ethernet looks like a no-brainer, the only question being what protocol you run over it. Personally I'd avoid any unnecessary protocol layers and software stacks - keep it simple, but think about and allow for future expansion.
tooki:
Why not just off-the-shelf SIP (VoIP) intercom hardware like this? https://www.digitalacoustics.com/product/full-duplex-ip-intercom/
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod