5 ms·
My problem is that I know enough to be dangerous, and not enough to do much practically. I keep fantasizing about going back and getting an EE degree or someth
by coreyp_1 3y ago
My problem is that I know enough to be dangerous, and not enough to do much practically. I keep fantasizing about going back and getting an EE degree or something, but after 15 years of taking university classes, I don't want to start that grind again.
I've built small arduino projects, such as PIR sensor controlled under-cabinet lighting and a foot-controlled "prev/next" buttons for a slideshow display, but I'm now lost in working with audio.
I'm wanting to build an audio mixer next, but audio is proving to be difficult for me to reason about. The rest of this post will talk about my idea, so skip it if you're not interested, or read it if you want to give me any ideas! :)
Here's the full idea (for which I have not been able to find a commercial alternative): I want my home automation (RPi and Home Assistant) to integrate with my house's current speaker system and be able to mix audio on demand. For example, if an audible alert needs to be played, then the volume of whatever is currently being played will be reduced so that the alert can be heard, and then restored when the alert is finished. So if I'm watching a movie and my garage door opens, I want to know about it! Additionally, music should be able to follow me from room to room, and I should be able to send audio to one specific room if I desire. Finally, my digital organ has multiple audio channel outputs in order to replicate the pipe placement in different parts of an auditorium, and I would like for this system to support that as well (make the far-away pipes play from the next room, for example).
In order to accomplish this, I want to build a zigbee-controlled audio mixer (with on-device fallback controls) for making use of my house's audio system (pre-wired when I bought the house, but the seller took the audio system with them and left the speakers!!) in conjunction with Home Assistant. Personally speaking, I don't like any solution that relies on a 3rd party to still be in business and be supporting my product a decade later, so self-hosted it is!
I assume that I need a lot of ADCs for the inputs (14 channels in... yes, I have a reason for that many... and 18 channels out). I would want the mixing to be "any input channel can go to any output channel", so using a CPU for the mixing would undoubtedly be better than trying to do it all with discrete components. The thought of building an 18-channel amp is a bit daunting! 7 stereo inputs (3 of which are really the 5.1 audio input) and 9 zones (3 of which are really a 5.1 speaker setup that is currently not being used at all) is a tall order for any commercial solution. Generic mixers do exist, of course, but they usually don't support that many outputs (and they definitely don't integrate with HA!).
- an-unknown 3y agoIf you want to just buy a thing that exists, you could look for one of the "high end" networked audio interfaces out there with on-board DSP mixing + network control, e.g. MOTU AVB interfaces support that (e.g. MOTU 16A + some TOSlink to analog stereo out for the 17th/18th channel would be completely sufficient for your project). You would only have to develop the automation to remote control the volumes / routing and integrate it into your home automation, or if you want to get fancy, you could connect that to a PC and do literally anything you could imagine. Keep in mind that this will cost quite some money and I have no idea how much you want to spend on this project, but it will also give you high quality and low latency audio. If you want to build it yourself and if you want to keep it cheap and simple: integrating an ADC or DAC on a custom board isn't that hard, at least if you don't need "perfect" "audiophile" audio quality; usually the datasheets of the ADC / DAC chips already tell you exactly how you're supposed to use them + external components you need and so on. In your case, you'll probably want to use a cheap FPGA for mixing (think of Spartan-6 or newer), since that can easily handle dozens of channels, unlike cheap MCUs which usually don't support the number of channels you'd need. With MCUs the limit isn't necessarily how much you could mix in software, but how many ADC/DAC channels you can physically attach to the chip. For zigbee (or whatever network protocol you prefer) you can find dozens of small chips which can interact with that. Since it sounds like your system is wired anyway, you could also think about Ethernet for the network. When you start playing around with this, I'd recommend building a simple and minimal prototype first with e.g. a stereo in/out + network, to keep the manufacturing costs low in case you mess up the design, and once this works as intended, build the "full" 14x18ch module. Don't forget to add some simple debug port like e.g. RS232, it's cheap to add and it makes your life during development much easier.
- coreyp_1 3y agoThank you for the reply! I'll look into the MOTU devices... I had not heard of them before! I was hoping to keep the cost at sub-$1k (although that is by no means a hard limit), but you are correct in that I already have the speakers wired in. Basically all cables come to a single location, which is where the amps need to go (speakers are not powered). It seems that the previous owner just ran the same 2 channels to all rooms in an on/off configuration. I didn't think about the RS232 for debugging, but that's a good idea. I know that the datasheets give external components, but when I was looking at this ~6 months ago, it seemed that most of the options were surface mount, and I've only done breadboard designs, so I didn't know how to work with that for prototyping purposes. This may be my biggest sticking point. Also, I didn't know if FPGA or something more familiar (such as a RPi) would be better for mixing. I have a PhD in CS, but I've never worked with FPGAs!!! lol I only know what they are in theory! I'm not against rolling up my sleeves and working, I just didn't know where to start. Even the smallest MVP (stereo in, mixer, stereo out) has too many parts with which I am unfamiliar.