In the previous tutorial, we learned how to design an audio equalizer. Here we will cover how to design an audio mixer. An audio mixer is an electronic device that processes, combines and modifies audio signals in digital or analog format. Typically, it has a separate volume knob for each source, including input and output.
Analog and digital signals can be combined by different types of audio mixers. In digital form, analog audio signals are encoded so that the information contained in the signal becomes independent of the signal amplitude. D Digital signal processing techniques are used to combine the analog audio signals, and typically an operational amplifier (operational amplifier) is used.
For this project, we will design a two-channel audio mixer, which combines two signals into one. One of the audio sources will be taken from a smartphone and the other will be from a microphone. Microphone audio will be amplified to line level by a preamplifier before being combined with smartphone audio using an operational amplifier circuit.
The combined audio will then play through a speaker. So, for example, it will be possible to mix vocals with an audio track when using this mixer. This can be used for audio recording, concerts, DJ related work and for public announcements.
A preamplifier and a power amplifier are the main building blocks of the circuit. We will use some common terms associated with audio amplifiers and filters, which are covered here.
Required components
Circuit Connections
The audio mixer combines two or more audio signals using a mixer, which mixes multiple input signals together. These mixed signals are then amplified through a power amplifier at the output for a combined sound.
This audio mixer circuit is built by assembling the following components:
Power Source – The microphone preamp requires 5V DC and the power amplifier is powered by 9V DC in the circuit.
Smartphone – To receive audio from your smartphone, a 3.5mm audio jack must be connected to it. The outlet must have three wires: one for ground, one for the left channel, and a third for the right channel. In this circuit, only one of the channels is used as an audio source. The connector's ground wire is connected to the circuit's common ground.
Volume control – To control the volume input via the smartphone, a variable resistor (“RV1” in the circuit diagram) is connected between the audio jack and the power amplifier. By adjusting this resistor it is possible to adjust the volume of the smartphone.
Microphone – An electret microphone, a type of electrostatic capacitor-based microphone, is used as the input source for the second audio signal (since there are two). It requires a bias voltage between 1 to 5 V to power the built-in FET buffer, which has an extremely high input resistance and low output resistance.
Typically, this microphone is powered by 1 V to 5 V DC through a resistor with a value between 1K and 10K ohms. Therefore, there must be enough voltage on the microphone's bias pin so that it can obtain the audio signal.
In the circuit diagram, a resistive divider network (“R1” and “R2” in the circuit diagram) is used to ensure that the microphone has a fixed voltage. A 10 uF capacitor (“C1”) is connected at the junction point of the resistor, which helps maintain voltage to one of the microphone pins (the other is connected to common ground). You can learn more about microphones here.
For this project, the IC is used as an inverting amplifier, which has negative feedback. This makes it a better choice than a non-inverting amplifier. This is because the inverting amplifier changes the phase of the output (signal amplitude) by 180 degrees with the input (signal amplitude).
However, this phase reversal does not affect the audio signal, as humans will only respond to the intensity of the sound. Intensity is the energy that flows through an area in a given time, expressed in joule/s/m2. The energy of the wave is proportional to the square of its amplitude.
Thus, for a unit area, the intensity is also proportional to the square of the amplitude.
I A2
You will notice that changing the sign of the wave has no effect on I.
How it works:
- To provide DC bias to the non-inverting pin of the amplifier, a 0.01 uF capacitor (“C3”) is connected along with a divider network of resistors at pin 3 of the IC.
- A 0.1 uF capacitor (“C2”) is connected to the inverting input pin of the IC to provide decoupling of the AC signal from the DC.
- A 47 pF capacitor (“C4”) changes the frequency response of the amplifier and, at high frequency, acts as a short circuit, allowing the signal to pass through resistor R2. This means that the amplifier gain is reduced when at high frequency. And, when at low frequency, this capacitor acts as an open circuit, therefore it does not affect the gain. Essentially, it serves as a high-pass filter in the circuit.
The typical application circuit (as per MAX4468 datasheet) is used to design the preamplifier.
The line output is taken from pin 8 of the IC.
Volume control – To control the volume input through the microphone, a variable resistor (“RV2”) must be connected between the preamplifier output pin and the power amplifier. By adjusting this resistor, the microphone volume can be adjusted.
Summer and the LM386 power amplifier – Both audio sources (the microphone and the audio track) require a summer for mixing. The IC LM386 will serve as a summer and power amplifier.
The LM386 is a low voltage audio power amplifier IC, which operates at a voltage ranging from 4 to 12 V. In this circuit, the IC receives a bias voltage of 9 V. The IC can drive a load with varying impedance from 4 to 32 ohms, which is suitable for the output speaker as it has 8 ohms of impedance.
Internally, the voltage gain of the IC is set to 20 (26 dB), but can be set between 20 (26 dB) and 200 (46 dB) by connecting a suitable resistor and capacitor combination between pins 1 and 8.
The IC has 8 pins in a PDIP package with the following configurations:
This IC is an operational amplifier with voltage gain that can be adjusted using a suitable RC circuit between its gain setting pins. With the gain setting pins open, the amplifier voltage gain can be internally adjusted to 20 (26 dB) and the amplifier gain will be 20.
Here's what you need to know about pin configuration:
- Pin 2 is the inverting input pin, which is grounded.
- Pin 3 is the non-inverting input pin that feeds the audio signal from both sources.
- A 100 uF filter capacitor (“C7”) is used to remove any high frequency ripples at the input.
- Pin 4 is the ground pin, which is connected to common ground.
- Pin 5 is the output pin of the IC and is connected to a 1000 uF capacitor (“C11”) to block any DC components. DC components (as they appear in the case of clipping effect) can damage the speaker connected to the output of the circuit.
- Pin 6 is the power supply pin of the IC and is connected to 9V of DC.
- An RC filter circuit consisting of a 10 ohm resistor (“R7”) and a 0.05 uF capacitor (“C10”) is used at the output pin. This is called the Zobel network, which guarantees the speaker impedance by stabilizing the frequency and oscillations in the output. If capacitor C10 and resistor R7 were swapped, it would no longer be a Zobel network, but the output impedance would still remain constant.
- Pin 7, the bypass terminal pin, is grounded using a capacitor to improve the stability of the amplifier output.
The amplifier circuit should look like this:
The LM386 is also used to choose the output power of the mixer circuit. For this project it will provide a power of approximately 700 mW for a load of 8 E with a supply voltage of 9V.
speakers – A speaker with a power of 10 watts and 8 ohms of impedance is used as a load at the amplifier output. The speaker is connected to pin 5 of the IC, which is also the output pin of the LM386. The speaker ground wire is connected to common ground.
Since the output power of the circuit is about 1 watt, a speaker with at least 1 watt or more should be used. Here we use a 10-watt 8E speaker. A variable resistor (“RV3”) is connected before the speaker to adjust the output volume.
You can learn more about speakers here.
Safety first
When assembling this circuit, follow these precautions…
1. Always use the filtering capacitor on the power supply input terminal to avoid unwanted ripple.
2. Select an equal or high power speaker as the amplifier output power.
3. Use a capacitor in series across the amplifier output to block any DC components.
4. Employ Zobel network for frequency stability.
5. Calculate the maximum power of the amplifier before connecting it to the speaker. The practical value may differ from the theoretical value.
6. Double-check the power rating of the IC LM386 by referring to its datasheet as different companies have different ratings.
7. Avoid clipping the output signal as this may damage the speaker.
8. Place components as close to each other as possible to reduce noise in the circuit.
How the circuit works
This mixer circuit receives audio from two different sources: a smartphone and a microphone. A MAX4468 preamp is used to amplify the microphone's audio input to line level before routing it to the power amplifier.
Audio from both sources is fed to the non-inverting pin of the power amplifier IC. The amplifier also works like summer and combines the two audio signals. The audio waveforms of the microphone, audio jack, and power amplifier output pin can be observed by connecting CRO probes.
The microphone audio waveform is:
The smartphone audio waveform is:
The mixed waveform of the power amplifier is: