Close

Audio Circuit Design

A project log for First Year Honors Project

My completed first year honors project at the University of Arizona

noah-thurstonNoah Thurston 03/29/2017 at 06:480 Comments

Since most of the work needed for the radio and microcontroller side of this project is done, I've been working mostly on audio side. This includes designing the circuits that allow audio to be input from a mic and output from a speaker. This seems pretty easy, but has proven to be quite difficult because each audio stream must be amplified before being sent to the arduino for transmission or to the speaker for output.

I've already been able to use a LM386 audio amplifier to amplify audio, but now I want it to be able to handle audio from two separate sources (microphone and arduino) and send it to two separate places (speaker or arduino). I considered just closing these two circuits together so that both the microphone and the arduino audio were always being amplified and the output was always going to both the speaker and the arduino, but this was proven to be a terrible idea. When the circuit is built like this what is picked up by the mic gets amplified and put out by the speaker, which then gets picked up by the mic again, creating terrible back feed. And when the audio that was received by a user gets amplified, it ends up going to the arduino to be transmitted back to the source as well as being output to the intended user.

To stop this from happening I decided a needed some sort of switch in series with each of the four audio connections; mic to amp, arduino to amp, amp to to arduino and amp to speaker. At first I tried some NPN transistors, with the the emitter and collector in series with the each path, and the base being controlled by the arduino, but this didn't work at all. The base had to be powered by an arduino IO pin to close the circuit, which I think added voltage to the audio voltage, distorting it. Plus the arduino voltage was also probably oscillating slightly due to power hum, so this probably further distorted the audio quality.

After some research, I found this stack exchange thread (http://electronics.stackexchange.com/questions/66332/mosfets-or-bjts-for-using-as-switch-for-audio-signals) which mentions using analog switches for switching audio signals. And with a search of online of Elliot's Electronics inventory I was able to find the NTE7110, a 3 channel analog switch in a 16 pin DIP package. This chip looked especially good since the datasheet said it was "designed to be used as an electronic switch in VCR and audio signal processing applications." I got my roommate to drive me down to Elliot's so I could pick up a few (thanks Mike) and after some trial and error these seemed to work as I liked. The chip's data sheet can be found here (http://www.nteinc.com/specs/7100to7199/pdf/nte7110.pdf), but as you can see it isn't much help in describing how to use the chip. Luckily I was able to figure out how to use it with just some tests with LEDs. Basically there are three channels, and each channel has two inputs, A and B, an output, and a control pin. By having the control pin pulled low to ground, current can flow from input A to output. By having the control pin pulled high to 5V, current can flow from input B to output. Using this chip I was able to control the four channels with just one pin. Below is the schematic I made in Eagle Cad to show how I'm going to wire it in the audio circuit.

For audio transmission, audio needs to be taken from the mic, amplified, and then sent to the arduino, so the control pin should be should be low, which allows all A inputs to go to their respective outputs while blocking all B inputs. For audio reception, audio needs to be taken from the arduino, amplified, and then sent to the speaker, so the control pin should be should be high, which allows all B inputs to go to their respective outputs while blocking all A inputs.

Next I plan on wiring together the full audio circuit with this chip, the mic, and the amp, and then making a schematic for it.

Discussions