science club |
Building active bookshelf loudspeakers with microphone input
I am part of the a local historical society known as (Bout de l'Ile Historical Society) and we meet every month for a lecture.
It has always been difficult for people sitting a little further back in the audience to hear the speaker
well. Surprisingly it's not easy to find a sound system that can be installed quickly without much
cabling. This summer I decided to build a pair of active loudspeakers to improve the situation.
I wanted to have following features:
- wireless microphones
- one of the active speakers should have a built-in mixer stage to handle multiple inputs
- there should be a wireless audio link between the speakers to minimize cabling in the room
Microphone amplifiers are big challenge due to the huge difference in voltage levels across different
As you can see there is a factor 20 difference between different microphone types. On top of this the
values can vary by a factor 100 dependent on how far the microphone is from the mouth of the speaker. Some people almost eat the microphone and others hold it near the belly button.
- A dynamic microphone produces about 2mV nominal output voltage
- An electret microphone produces about 20mV nominal output voltage
- A wireless microphone set produces about 40mV nominal output voltage
Line level is a commonly used audio interconnection between devices. Line input/output uses about 400mV nominal voltage. This is the signal level one needs to feed e.g to a pre-made power amplifier stage. To get from a microphone to the power amp stage we need to either amplify by a factor 10, 20 or 200.
Initial testing of different pre-amp circuits
I experimented for a couple of weeks with different microphone pre-amp circuits using transistors, operational amplifiers and a combination of those. I came finally up
with the design shown further down using several NE5532 op-amps. In theory
fewer amplification stages should produce less noise. In practise it's surprisingly almost the opposite.
The reason is that a cascade of multiple amplifier stages is less sensitive to interference and recovers
much faster when used outside of the specifications. That is, if you tap with your finger onto the microphone then you will certainly send the amplifier into saturation. Multiple stages with each having a lower amplification recover much faster. Noise is managed by reducing the bandwidth with low and high-pass filters
to the normal frequency range of the human voice.
I have experimented with several amplifier designs and setteled with the NE5532 op-amp used as a non
inverting amplifier. The basic circuit looks like this:
Non inverting amplifier, gain = 1 + R1/R2
To use this in real world applications you can't just use any resistor combination. In theory an amplifier with R1=R2=10M Ohm should work the same way as R1=R2=5K Ohm. Both should amplify by a factor of two. It does
not work this way in practice because the inner circuitry of any operational amplifier has also some resistors. Reasonable practical values for R1 and R2 are to be chosen in the range from 1K to 100K.
Another important practical consideration is something known as bias current. If you put the same
input voltage as the inverting and non-inverting inputs then you don't get zero as output. You get nearly
zero. This offset problem becomes worse the more you amplify. The best way to deal with this in an audio
pre-amp is to amplify DC by a factor of one and the audio signal (AC) by whatever factor is required.
This can be achieved by adding a capacitor as follows:
Avoiding the bias current problem by amplifying only the audio signal
The problem is however that R2 and C1 make a first order high-pass filter. You have to choose C1 and
R2 such that the cut-off is well below your audio signal. R2=2K and C1=10uF results e.g in a cut-off frequency of
8Hz. That's good enough. Later in the project I realized that there is a smarter way of doing this.
The problem is that a 10uF capacitor is an electrolytic capacitor. Those capacitors are big and they age. After a few
decades they might have only half of their original capacity. It's possible to achieve the same amplification effect by adding a small MLCC capacitor and a larger resistor. Like this:
Amplifying only the audio signal, improved circuit
A 0.47uF MLCC capacitor and a 220K resistor are smaller in size than a 10uF electrolytic capacitor, MLCC capacitors don't age as much and we get a lower cut-off frequency of just 1.5Hz. In my final pre-amp design you will find both circuits. If you see this improved design then you know that this was built in the later stage of the project.
To use an op-amp as an audio amplifier we need to either have a positive and negative supply voltage for the op-amp or we need to supply a dc-offset. A single power supply voltage of 20V DC and an offset is technically easier:
Pure DC offset voltage at 1/2 the supply voltage
It's important that the offset voltage is really true DC. Not the slightest power-supply "hum" must be in it because the op-amp would amplify it. The combination of 2 x 10K + a 10uF capacitor results in a cut-off
frequency of 3 Hz which is well below the 60Hz hum coming out of a power supply. Switched power supplies
have even higher frequency noises in the DC part. In other words we get "pure DC" with this simple resistor and capacitor combination if we don't put any load onto this voltage diver and capacitor combination. To feed the DC to the op-amp we use a 100K resistor which is 10 times bigger than the 10K resistor in the voltage divider. It presents a negligible load.
Ground loops and humming audio amplifiers
A lot of people who design electric circuits are unaware of the problems ground loops can cause
for audio amplifiers. Ground loops are not something you can see in a circuit diagram.
They are created when you build the circuit board or when you assemble the system inside a case.
Many people don't even know what a ground loop is. So let's start with the basics. A ground loop
is any place where the ground plane is closed such that it can act as a coil to pick up magnetic fields. The hum comes typically from a nearby transformer but it can pick up any magnetic field. An obvious example is
a circuit board designer who uses the outer area of the board all around the rim for a ground plane.
A less obvious example is a metal case and 3.5mm audio connectors, or cinch, whatever metal connectors are screwed into the case such that
each connectors outer ground is in contact with the metal. When those are then individually connected
the amplifier using a ground wire per connector then you get many ground loops:
Ground loops via connectors in the metal chassis.
The above drawing shows some kind of circuit that has an input and an output. It's own ground is connected via the power supply to the chassis (gnd point at the bottom) but when you use non insulated metal connectors then you connect input and output also to the chassis ground and this creates loops to pick up magnetic fields.
The solution is to ground the chassis only once and use insulated connectors on a metal chassis. It's also important to think about the ground wiring inside your system especially if you have multiple stages
such as mic-amp stage, pre-amp stage, power-amp stage all uses a common power supply. To avoid ground loops you connect them like shown below. This means that some stages get their power supply ground not via
a cable to the power supply but via a ground cable to the next stage input line.
Avoiding ground loops when using multiple boards and stages with a common power supply.
Circuit diagrams and photos
I made a pair of active speakers to be put on each side of the room during the lectures. The circuit diagrams show basically mixer and pre-amp stages. For the power-amp part I used pre-made modules that I bought on ebay. More on those modules further down.
As a power source I used 20V DC laptop power supplies from IBM/Lenovo.
The wood for building one speaker
The first speaker, it has a mic-input and a mixer stage
The first speaker, front view
Both speakers, back view
I builts also a stand for the second speaker, the first one will be places on a table
Pre-made power-amp modules and fake TPA3118 chips
For the first speaker I used a small TDA2050 power-amp stage. It's a small module not very powerful but good enough for voice. It is a class A/B amp and provides max 15W to an 8 Ohm speaker with a 20V DC power supply. It worked well but for the second speaker I wanted something more powerful.
I discovered a modules with a TPA3118 chip. This is a digital amplifier, also known as Class-D amplifier. It's essentially doing pulse width modulation and has a coil filter on the output to convert the chain of digital pulses into an analog signal of the right shape. It's a small module and has a very high efficiency which means very little heat loss. That was appealing to me because I wanted small portable speakers.
I bought some TPA3118 modules on ebay and they worked OK when I used with with a 12V power supply.
I noticed immediately that the data sheet specified the chip to be of
a size of 11mm X 6mm. The modules that I received out of china had a much smaller chip (9mm x 5mm) on them but they
worked during the initial test with a 12V power supply. As soon as I increased the power supply voltage to 20V I noticed that the chip became
rather noisy and a few minutes later smoke came out of the chip. The sellers on ebay had specified
those modules to work with 12V to 24V DC. That was obviously not the case. After searching a bit around
I found one seller selling a module with a slightly bigger chip that might correspond to the one specified in the TI data sheet. This module with the bigger chip had much better sound quality, lower idle nose and it worked with any voltage between 12V and 24V DC. My conclusion is that there
is a competing chip on the market. A kind of a fake chip. This fake chip is usable if you want to build
a car amplifier and run everything on 12V DC but it is not the original Texas Instruments TPA3118 chip.
They print TPA3118 on it with the TI logo to sell it for a better price but it is really a different chip with different specifications. The power-amp module with the original TPA3118 chip had also the neat feature that a 10uF capacitor could be soldered across the mute input to cause the module to mute
for 3-4 seconds after power on. These few seconds allow all other circuits to reach a stable state and avoid any noise during power on. This did not work with the fake modules.
Left to right and top to bottom: Fake tpa3118 module, the analog TDA2050 module, another fake tpa3118, the working tpa3118 module with the original chip (compare the size)
The system works very well but the fake tpa3118 chips were a little nerve wrecking.
References and data sheets
© 2004-2024 Guido Socher