2

I am rather new with micro controllers, please, push me in the right direction. I'm planning to use RS-485 network for audio streaming at home. On maxim-integrated site there are drivers, which have throughput of 30-40 or even 52Mbit. But I wonder, what MCUs should one use to get such speeds? UART is several times slower even on ARMs. Atmega's have no chance. What hardware should I use? Global idea is to connect every speaker at home to separate MCU and to get a very versatile multi-room. Mostly it will broadcast 1 stream of CD-audio quality (1.5MBit), but it will be good to have reserve for couple more and maybe low quality video one day.

Of course, the biggest priority is price, so I plan to make PCBs and solder everything by myself. Bunch of raspberries + ethernet is NOT an option. I think it will be an overkill and too expensive.

AKR
  • 2,273
  • 4
  • 22
  • 34
  • 3
    Have you considered using S/PDIF, as it's designed for this purpose and available on a lot of commercial audio equipment? – pjc50 Nov 05 '13 at 14:36
  • 1
    speed is measured in bits per second – Andy aka Nov 05 '13 at 14:37
  • TI Has a purepath wireless audio system. To answer your question, you can use an fpga driven by a uC. – HL-SDK Nov 05 '13 at 15:51
  • 2
    Why are you ruling out Raspberries + Cat5? If you put any value on your development time/effort they start to look like pretty good value - and re-usable / expandable / adaptable. – John U Nov 05 '13 at 17:09

2 Answers2

3

If you are planning to use asynchronous communication (a standard UART) then this will be very difficult. In order to properly detect the beginning to a transmitted data word the serial receiver must have a clock frequency much higher than the data rate, typically 16x higher but you might get away with 8x. So, your 50 Mbit/s data rate will require a UART running at something like 800 MHz. This is far beyond the normal data rate for a UART so it is unlikely that you will find a standard, low-cost device that meets your requirements.

You will probably need a synchronous data stream that either provides a clock on another pair of wires or embeds the clock in the data.

Joe Hass
  • 8,447
  • 1
  • 29
  • 41
3

MAX9205, MAX9206 serializer and deserializer are a good choice if you want to "ship" several encoded bit-streams around. One chip serializes up to ten inputs and you can have a bunch of the deserializers in each of your speker systems. Because the serializer can use ten channels you have spare capacity to send a sync pulse down meaning no elaborate decoding of data is required. This picture shows 4 out of the ten channels being used - note that the inverse of the 4 channels are applied to inputs IN6 thru IN9. Serial clock (that will be a clock that is synchronous with the data) is also sent and so is WS (which I presume is like a word or frame sync for knowing when the MSBs are being shipped-out.

enter image description here

There are only two wires needed between the chips and I can vouch for them being good quality - there are also identical 2nd sources from National Semi and TI although I suspect TI aren't promoting the NS ones since the takeover.

How does it work? REFCLK is as a minimum 16MHz and each time the clock rising edge occurs, whatever is on the ten inputs is serialized up to a 160Mbpsec stream and sent over the twisted pair in a current loop. The 9206 reverses the process. You'll need to match xtals at both end but the can suffer a +/5% difference (from memory of tests I did when choosing them).

I've used these at clocks of 38.88MHz over a distance of 35m (very good twisted pair).

Conclusion about interfacing to DACs - Given that you can send serial data from ADCs and you can also simultaneously send the conversion start data I see no reason whay the 9206 has to interface with any microcontroller - the signals can be transported from the send end to suit most DACs like this: -

enter image description here

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • +1 for a nicely documented solution that you've actually used, but I fear this fails OP's cost criterion: those parts are $12 in single quantities from digikey, so 2 of them plus cable connectors and PCB = same cost as a Pi :( – pjc50 Nov 06 '13 at 10:03
  • 1
    @pjc50 The TI equivalent parts (SN65LV1224 and 1023) are about £5 each in 10 of qty in Farnell. So that's £5 per speaker-pair on the receive side. I wonder how much 100m of decent twisted pair will cost to route to all the OP's speakers and how much the speakers cost!! I'd go radio myself! – Andy aka Nov 06 '13 at 10:16