TI E2E Community
Launch Your Design
MSP430™ Microcontroller Projects
Audio Input / Output Switchbox
Launch Your Design with TI Looking to create ‘the next big thing’? Look no further than TI's Maker and DIY community! Launch your design with TI's low-cost, community-supported development platforms. Begin rapid prototyping applications in minutes with our microcontroller-based LaunchPad kits, Sitara™-processor-powered BeagleBoards and SimpleLink™ wireless connectivity SensorTags.
Audio Input / Output Switchbox
Evan Cornell (firstname.lastname@example.org)
This project utilizes the MSP430 to switch between several
audio input and output options. The purpose of this project is to be able to
choose an audio source, such as an iPod, computer, or CD player, and then also
be able to choose the audio playback device, such as a headphone amplifier,
speaker, or other audio output device.
The reason I chose this project is because I have been an
audio aficionado since high school, and I have several different audio
amplifiers that I have built and like to use. I also have several different
audio sources, including a USB DAC for my computer, my iPhone, and a radio. I
like to switch between these devices, but it is a hassle to be continually
swapping my RCA cables. The Audio Input
/ Output Switchbox provides a compact, simple system to manage this need.
The method of switching the audio I chose was to use analog
multiplexers. The device that went into this project is Analog Device’s (gasp!)
ADG1604. I chose this mux because I couldn’t find a comparable part in the TI
catalog. TI’ers out there, I would welcome alternative suggestions! The
design calls for a 4:1 analog mux with very low ON-resistance, preferably below
5-10 ohms. This is to minimize the distortion on the audio signal. The mux also
has to be able to run on a +-5V power supply, so the complete audio signal can
be passed through the device.
An MSP430 controls the digital selection of the mux, as well
as providing user input via two pushbuttons, one for the input and one for the
output. I have seen several other
microcontroller based switchboxes for audio use online on various hobbyist
forums, and the vast majority of them utilize latching relays for the switching
mechanism. I chose to use analog multiplexers precisely because I haven’t seen
a design with them before. I wanted to see if it would work well, especially
because then there would be no physical movement in the system.
*4 audio inputs (RCA jacks)
*4 audio outputs (RCA jacks)
*+-5V signal swing (all pre-amplified audio)
*Low on resistance (~2 ohms)
*16 combinations of input and output audio devices
Source code, schematic, and BOM are included in AIOS_Documents.zip
The left pushbutton controls the input selection. Pressing
the button once advances the input by one. On system power-up, the default
input is input #1. Pressing the button twice changes the input to #3.
The right pushbutton controls the output selection. Pressing
the button once advances the output by one. On system power-up, the default
output is output #1. Pressing the button twice changes the output to #3.
In the above photo of the system, the input RCA jacks are
located in the bottom row of the breadboard, while the output jacks are the
upper row. There is only one output wired up, since I only had one extra set of
RCA cables. The inputs currently hooked up are an iPhone (#2) and an iMac
Currently, only the input selection has any sort of
indicator. This is done with two LEDs to represent the binary numbers 0-3,
corresponding to inputs 1-4. In the photo above, input number 4 is selected,
since both LEDs are lit.
*While prototyping this
system, one unanticipated problem that I ran into was the phenomenon of
channel-to-channel crosstalk. The effect of this is that if a music source
is playing on input #1, but input #2 is the currently selected input, a
faint version of input #1 is audible, if nothing is playing on input #2.
*Another issue I ran into
was a limited number of IO pins. This is why there are only indicator LEDs
for the input jacks.
*The linear regulators used
to produce the +-5V rails do not give those precise voltages.
*Even with delay-based
software pushbutton debouncing, there is still the occasional error when
pressing the selection buttons
CONCLUSION AND NEXT STEPS
I welcome any
design suggestions you may have. This contest is about testing out an idea I had
and seeing if I could improve it. The TI
community is the most valuable resource I have at my disposal, and I’d welcome
any advice. One area in which this project could use some advice is testing of
the finished system. I am not all that familiar with the performance
measurements I could make to ensure that the system is not adversely affecting
the audio signal. I would appreciate suggestions for testing techniques.
The next steps in this project are listed below:
*Add an LCD display to show
the current device input and output selections, with appropriate labels
for what type of device is connected
*Utilize variable linear
regulators to tweak power supply to exactly +-5V
*Implement hardware based
*Learn about and implement
a method to reduce channel-to-channel crosstalk
*Design a simple PCB that
would board mount all the components in the system
MSP430 to gain additional IO pins
*Design and build a case
for the system that would fit into an audio stack
If anyone has any suggestions for further improvements, I
would welcome an email or comment (and your vote)!
I used to use CD4066 to switch low level analog signal straight out from a cassette tape player. I didn't notice any cross talk back then. It could be that the input signal was too low to bleed to any other channel.
I mean the signal that straight out from the coil that reads the magnetic data from the tape.
Thanh, the audio inputs going into this switchbox are coming out of iPod, CD player line out, or DAC line-out. I'd say those are typically around 2V peak. I'm not sure how that compares to the audio from your tape player.
I have been searching the internet for suggestions on how to reduce the crosstalk effect on this system. It seems that if there is an active signal coming in that is not selected, it causes crosstalk. So I have seen an article that uses MOSFETS to ground any unused inputs. Does this seem like a simple and elegant solution?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.