Author Options:

is it possible to transmit audio via micro controllers? (preferably arduino) Answered

hello, i want to connect all the stereo systems in my house (between the different rooms) so that music playing from one room can also be played in several others, maybe even more than one room to be transmitting at a time (room1>room2,room3. room4>room5 etc) i would like to have the same type of controller in each room (a box with maybe 4 inputs switchable using a 4 pos switch (like the input selection for amps), an output for the amp in that room and then some kind of digital system that selects witch room to receive audio from and then sends it to the amp via the red and white audio leads (forgot their name)) i would also like there to be maybe an lcd on the box to show where it is receiving the music from and also who is listing to the music coming from that room) originally i was just going to run speaker wire everywhere but that would have been extremely expensive.i guess the question im trying to ask is: is it possible to send reasonably high quality sound from one arduino or other type of micro controller to the other?any info at all would be great and i would be so grateful.thanks in advance - luke?is i



Best Answer 7 years ago

You'd want a networked computer in each room and audio-streaming software to share over the LAN maybe.
But I can't see that being worth the hassle and expense.
You might try local radio, but whichever way I don't see why - listen to what you want where you are(?)


i see what you mean about where you are but in my house we have a lodger and my dad and brother and have partys on special occasions.
i think i will just make several small boxes with a pic micro controller wich aswell as having inputs and outputs for the amp it will have one xlr cable able to be used as in or output wich will all link to a central hub full of relays.

You're thinking about networked-computers in a very stripped-down sense. OK, that's going to make for an interesting project, digital or analogue audio?


analogue (i think, the red and white stereo connectors) i am not going to be using computers though

Well there you'll have 4 lines for each room and a big switching exchange in the middle. And the data lines too, it is sounding interesting...


well i was thinking of only one line for each room, i would use a 5 pin dmx cable (3 pins for audio and 2 for data) each room is only ever going to be receiving or sending so there is no need for two separate audio lines for in and out, i would simply use a relay to switch between whether its going to be used as an input or output. the box will have four inputs but that is just to connect different devices (cd player, tv, computer etc) but if say room one is listening to input one which they have connected to a cd player and room two wants to listen to room one then room two would only be able to listen to the cd player

You'd have switching at both ends, yes it sounds sensible, but use silicon instead of relays (noiseless)


okay, i was wondering if it would be possible to use a micro controller (preferably arduino) or some kind of other device to switch the audio instead of relays, it would make things so much simpler and easier. also what do yo mean by "silicon"?
one more thing: how do i find and reply to other peoples forum posts? i feel like i should give something back but dont know how to

okay cheres, although ive been working with electronics and micro controllers for many years i have never fully understood transistors, how would i use it as a switch? and would the current from my micro prossesor be enough to activate it or would i need another transistor to amplify the voltage?
(when this is finished and i make an instructable abut it is it okay to credit you?)

Think of transistors as functioning like relays, it's switching.


i know that part but they only have 3 pins which surely means they are not isolated from the switching circuit, and i have just never gotten my head round them, im also yet to find any good help online.
i know that on an npn(i think) transistor when voltage is applied to one leg it mixes with the other leg to create a big output. i am not sure how this would be used as a switch though

Great question:

Is it possible? Yes, will it be quality? Not so much. To over-generalize, the arduino is an 8-bit microcontroller. There's a reason audio is encoded in 16, 24bit, or 48bit -- to get more audio quality. Long story short, you don't want to be encoding or decoding audio with many entry-level micros. They will just make you sad.

However; Would the arduino make a good 'brain' to actively switch on and off an analog wired audio source in each room? Yes. Signal level audio can travel over twisted or coax wires quite a fair distance before you get bad degredation. A small amplifier/speaker set in each room can be controlled via uC with 2-wire interface from the central audio server.

What would I recommend? There are plenty of solutions to get audio to multiple rooms, and many affordable quality commercial ones. They generally involve just sending the audio to the room where it is amplified by a volume knob/active amplifier in the room. Some are mechanical volume knobs, others are software based, which you can interface from the central location. X10 makes home automation solutions and I think they have just that. My old condo had some levitron brand amplifier/volume knobs in each room and one central audio source. You couldn't change the volume at the source for each room, but from each room you could enable and attenuate the volume.

okay, so i was thinking and i came up with a design. each box will have 4 local audio inputs, two out (one for amp, one for server) and then one in from the server.
it will have a 4 pos switch with a 2 os switch above. the above 2 pos switch will select between local and other rooms, so the 4 pos switch can select the local audio inputs or ones from other rooms.
i was wondering. i will need to transmit audio over quite long distance (longest being from the cellar to the 2nd floor) so should i put the main switcher (server) in the middle of the house, or maybe have two that connect?
also i was thinking of using dmx or xlr cable to run the audio through long distances, would this work?
if i used xlr i would have to connect the ground from both channels together, is this okay?
if i used dmx i would have the audio and controll signals running through the same lead, is this okay?
thanks so mutch for all your help.