Project to transport Audio Over Ethernet

Hello guys.

I'm new to the forum, so forgive me if I end up making a mistake.

First of all, my name is Adenilton and I worked with the arduino pro micro, creating a usb controller for effects pedals on the computer.
Today I have an idea to help the church band that I participate in: I want to transport 8 different audio channels through a network cable (AOE).

I researched and read a lot about it, but I still have questions and would like someone to show me other possible ways to do it.

At first I have 4 questions:

  1. Can Arduino do this job easily?
  2. I need at least 8 analog inputs and 8 PWM outputs (?) In order to continue with this project. So can the Arduino DUE help me? If not, can you give me example of another board?
  3. As for audio quality, to stream CD-quality audio, i would need at least 16 data bits. Does it seem to me that I could do it with the DUE?
  4. As for the audio transmission, I believe it has a space of 15 meters. Will I have problems with latency? If so, what would be the ideal?

I would be grateful if anyone could help me with these questions. And in the course of our discussion, I will introduce you more about the project.

Cheers!

I don't know but I'd be surprised if any Arduino can handle it. There is a protocol called [u]Dante[/u] which seems to be the "latest thing" in the pro audio world for networked audio.

  1. I need at least 8 analog inputs and 8 PWM outputs (?) In order to continue with this project.

Why? PWM is no good for audio* and I don't know why you'd need 8 digital outputs.

  1. As for audio quality, to stream CD-quality audio, i would need at least 16 data bits. Does it seem to me that I could do it with the DUE?

16-bits at 44.1kHz is a bitrate of a little over 700kbps. 8 channels would be about 6Mbps.

  1. As for the audio transmission, I believe it has a space of 15 meters. Will I have problems with latency? If so, what would be the ideal?

Do you mean a cable length of 15 meters? Electrical signals travel at approximately the speed of light so the cable length is no problem. Latency is related to buffering, which is required over the network because of data collisions and error correction, etc.

On the computer side, buffers are needed because of the multitasking operating system and that's the biggest cause of latency. But, if you are building your own dedicated system with microcontrollers (or DSP chips) and no operating system that's not an issue.

  • Class-D amplifiers use a kind of PWM but the digital PWM is filtered to analog so it only exists inside the amplifier. They are analog-in and analog-out.

DVDdoug, thans for u repply.

There is a protocol called Dante which seems to be the "latest thing" in the pro audio world for networked audio.

Hmm I did not know that protocol. I just saw that it's an improvement on CobraNet and EtherSound - the two protocols I'm basing.

Why? PWM is no good for audio* and I don't know why you'd need 8 digital outputs.

I always had in mind that I would need PWM. But in my case I need to have 8 analog in and 8 analog out.

16-bits at 44.1kHz is a bitrate of a little over 700kbps. 8 channels would be about 6Mbps.

So, arduino would not be ideal for this project? Given that the DUE has a clock speed of 84MHz ... (?)

Do you mean a cable length of 15 meters?

Yes

But, if you are building your own dedicated system with microcontrollers (or DSP chips) and no operating system that's not an issue.

Yes. I will only transfer 8 channels of audio to another location in the room. The only other feature in the design is that at the output of each analog channel, I will have a potentiometer for volume control.

adhenrique:
Hello guys.

I'm new to the forum, so forgive me if I end up making a mistake.

First of all, my name is Adenilton and I worked with the arduino pro micro, creating a usb controller for effects pedals on the computer.
Today I have an idea to help the church band that I participate in: I want to transport 8 different audio channels through a network cable (AOE).

I researched and read a lot about it, but I still have questions and would like someone to show me other possible ways to do it.

At first I have 4 questions:

  1. Can Arduino do this job easily?

No, not feasible, or rather extremely hard as stated.

  1. I need at least 8 analog inputs and 8 PWM outputs (?) In order to continue with this project. So can the Arduino DUE help me? If not, can you give me example of another board?
  2. As for audio quality, to stream CD-quality audio, i would need at least 16 data bits. Does it seem to me that I could do it with the DUE?

8 channels of I2S audio is specialist hardware territory, you probabably need DSP or FPGA or ASICs for this. I say I2S as that's the standard for ADC chips for audio - 2 channels per I2S bus, normally
clocked at 48, 96 or 192kSPS per channel

  1. As for the audio transmission, I believe it has a space of 15 meters. Will I have problems with latency? If so, what would be the ideal?

The DSP within the ADCs may be the main causes of latency, you would need to use
devices with minimal DSP built-in, but as I say this is specialized hardware territory I think.

I would be grateful if anyone could help me with these questions. And in the course of our discussion, I will introduce you more about the project.

Cheers!

My suggestions are either find a device you can buy that does this, or send the audio in analog to a multichannel USB soundcard? The idea of creating a whole AoE/IP stack from scratch is highly
daunting.

Digital audio interconnect like S/PDIF or AES3 might be more feasible to implement, being a
lot closer to a low-level protocol like the I2S from the ADCs.

Audio over IP is aimed at the professional audio market only AFAICT, if you want a simple cheap way to
send 8 channels of audio 15m, a bundle of 8 screened cables spring to mind. You could
send differential analog audio over two CAT5 cables, correctly driven and terminated.

Another approach would be to directly multiplex several I2S streams into one high speed
digital signal, but that still means having 4 I2S busses to drive, I doubt many microcontrollers
support that, this is DSP territory.

MarkT:
8 channels of I2S audio is specialist hardware territory, you probabably need DSP or FPGA or ASICs for this.

I would beg to differ.

We've made 8 channels work quite well on Teensy 3.2 and Teensy 3.6, using TDM protocol with the CS42448 chip. Here's conversation and resources for the hardware.

https://forum.pjrc.com/threads/41371-Quad-channel-output-on-Teensy-3-6?p=138705&viewfull=1#post138705

https://oshpark.com/shared_projects/2Yj6rFaW

This hardware works very well. I and many others have used it.

So far, I've not heard of anyone successfully doing Audio over ethernet. I recently put quite a lot of work into optimize the Arduino Ethernet library. Details here:

https://www.pjrc.com/arduino-ethernet-library-2-0-0/

As you can see in the benchmarks section, speeds over local LAN approach 1 MByte/sec. I can tell you I've also tested with faster SPI clock rates. On low-latency local ethernet, it's possible to get up to approx 2.5 MByte/sec using faster SPI clocks. Unfortunately, that'll well short of what would be needed to achieve 8 channel audio streaming. I'm afraid the Wiznet ethernet chips just won't be up to this task.

There may be some hope to do this with native RMII ethernet. Arduino Due and Teensy 3.6 have this capability. But it's not well supported on the software side. So I'm afraid I don't have an easy answer there.

But as far as 8 channel audio on a microcontroller is concerned, using the CS42448, I can tell you that part works very nicely. :slight_smile:

And in the course of our discussion, I will introduce you more about the project.

No we need it all upfront. There is no point in giving you advice on part of your project only for you to turn round an pull a rabbit out of the hat that makes all the previous work done null and void.

pjrc:
I would beg to differ.

We've made 8 channels work quite well on Teensy 3.2 and Teensy 3.6, using TDM protocol with the CS42448 chip. Here's conversation and resources for the hardware.

So how is the CS42448 not an application specific IC (ASIC) in this context???

Pretty sure CS42448 is generally called a CODEC chip. If it had only the outputs, it'd be called a DAC (digital to analog converter), and if it had only the inputs it'd be called an ADC (analog to digital converter). Audio CODEC chips, and audio ADCs and audio DACs, are meant for a wide range of audio uses where signals convert between analog and digital.

Don't take my word for any of this. Here's Cirrus Logic's page about their CS42448 chip. You can see for yourself how they describe their chip.

https://www.cirrus.com/products/cs42448/

But ok, if you need to be proven correct, I suppose pretty much any chip can be considered to be meant for use in certain types of applications. If that's what you meant by "ASIC", then yes, you're correct.

Guys, thank you so much for the answers. I see this discussion is becoming interesting.

We've made 8 channels work quite well on Teensy 3.2 and Teensy 3.6, using TDM protocol with the CS42448 chip. Here's conversation and resources for the hardware.

Thanks for the links, I'll check them out. I like what Tensy can do: D

Yesterday I was reviewing the project and realized that I am passing the incorrect information. See this diagram:

Let's think about the concept Transmitter -> Receiver.
The correct thing is that the Transmitter has 8 analog inputs, use the ADC and transmit the digital signal to the Receiver.

At the moment the signal reaches the Receiver, I want to be able to control the volume of the 8 channels - which are now digital - and after that use a DAC to have 2 analog channels output.

Ps: I have already found a small project of a DAC with 2 analog channels and 16 bits of data.

See if it's clearer now.

Thanks.

Why use a microcontroller, or even bother with conversion to digital and then back to analog?

Why not just send the signals as ordinary analog signals (perhaps balanced audio signals), and use opamp buffer and ordinary analog volume control at the far end of the 15 meter wire?

Balanced audio is commonly used for professional sound application to send analog signals much farther than 15 meters. Why make this so much more complicated than just simple analog circuits that have been very widely used in the audio industry for dozens of years?

Or what I meant to say: of course you should totally buy Teensy. Buy lots and lots of them! :wink: (full disclosure: my company makes them....)

Seriously though, this whole thing seems like a whole lot of complexity to do such a simple thing that's been very commonly done since pretty much the dawn of microphones, electronic amplification, and speakers.

Why use a microcontroller, or even bother with conversion to digital and then back to analog?

For professional audio, it's not that simple. If we take into account that a balanced cable costs around R $ 3.30 per meter, we have the following equation:
1 meter cable = R$ 3.30
15 meters of cable = R$ 49,50
15 meters * 8 channels = R$ 396.00

That is, with this value here in Brazil, I can assemble an arduino project with all the necessary parts.

Where did this idea come from?

On the stage of our church we have 6 musicians. Each of them uses a earphone, and each earphone has the mix of the other instruments. And this mix is ​​only made on the main sound table, +/- 15 meters away.

Ex:
Guitarist - On his earphone he asks to listen to 10% of the Drums, 10% of the electric bass and 50% of the voice singer.
Drummer - on his earphone he asks to listen to 50% of himself and a little over 10% of the other members of the band.

Ideally, each musician should have their own personal earphone control, regardless of the sound desk. So, it has the ease and portability to mix in whatever way you feel it is necessary.

There are devices in the market that do this like [http: //www.aviom.com/](http://http: //www.aviom.com/) but here in Brazil they are very expensive - about R$ 3.000,00 - and do not always give the necessary support.

I want to develop a low cost project with all the necessary support and that can attend us. Also, if this project works, I want to market it.

Thank you.

A couple of 15m lengths of shielded CAT5 are going to be way cheaper than that.

Have you seen that come people already do this: SoundTools Analog Audio Over Cat5 Systems

A couple of 15m lengths of shielded CAT5 are going to be way cheaper than that.

Yes, but it's not just CAT5 that solves it. There are converters, audio cards, among other equipment involved.

Have you seen that come people already do this: SoundTools Analog Audio Over Cat5 Systems

Yeah, I saw it, too. This is just a simple 8 channel audio receiver that is expensive and without any support for earphones. The idea is to stream 8 channels of audio to a 2-channel audio receiver with individual volume controls. Did you see the diagram above?

My point is that shielded CAT5 is fine for audio differential signals, no need for the expensive cabling
as you get 4 signals per CAT5 run, and presumably the performance w.r.t. noise/interference is
OK or soundtools wouldn't use it...

Doing the rest in analog is a case of breaking out the differential signals to headphone amps? A small
amount of opamp circuitry?

My point is that shielded CAT5 is fine for audio differential signals, no need for the expensive cabling
as you get 4 signals per CAT5 run, and presumably the performance w.r.t. noise/interference is
OK or soundtools wouldn't use it...

Ah, yeah. now I understand.

Doing the rest in analog is a case of breaking out the differential signals to headphone amps? A small amount of opamp circuitry?

Yeah, it is.

If your goal is to keep cost low, a design needing many ADCs, DACs (or CODECs) and powerful processors (or ASICs or whatever you might call them) and ethernet hardware is certainly going to be much more expensive than an analog circuit involving mostly opamps. There are many great & inexpensive opamps for audio, like NE5532.

And some more modern rail-to-rail one's too, not quite as cheap but can run from a single 5V supply if that
matters. Some opamps can even drive headphones directly, checkout the AD8656 dual opamp for instance, low
distortion, low noise, 5V supply, true rail-to-rail, +/- 220mA output current.

Hi,
I'm looking for the same solution. Transport audio...
I need to record audio in my computer, 24h/day, from long distance mic.

So explain your requirements...