Audio Mixer - Two Devices Into One Headphones

by JT_Makes_It in Circuits > Audio

16865 Views, 184 Favorites, 0 Comments

Audio Mixer - Two Devices Into One Headphones

headphone mixer instructables thumbnail (2).png

This story began when I wanted to buy a simple mixer for mixing two devices into one headphones. But I couldn't find anything that would be small and simple to use. Simple headphone splitter cables didn't appeal me.

So, as I often do, I made my own. :)

I made a simple audio mixer, in which you can plug in headphone output of two devices and mix them into one headset. For example connecting a phone and a digital piano if you want to practice instrument with headphones and you want some background music from phone to play along with.

Here is a cool video showing the whole design process:

Consider subscribing and leave a like on the video, these videos take forever to film and produce :)

In this Instructable I will explain the whole design process, explaining all the circuits and provide you with all data needed for you to make your own mixer!

Skills and Tools

IMG_20201106_173238_2.jpg

This is an low-intermediate skill level instructable.

The required skills:

- Reading schematics and ordering components online from a bill of materials

- ordering PCBs at PCB manufacturers

- Soldering of SMD components

Tools:

- soldering iron for soldering SMD components (components are 0805 size)

- Drill for making holes in the enclosure (if you decide to have metal enclosure as I have)

- (not necessary) CNC router for inscribing the labels on the enclosure.I bet you can find an easier way of making box labels :)

Everything Audio Should Start With Simulation

tinati simul.PNG
simul results.PNG

By spending a few hours on a simulation program, you can save yourself a few headaches and board revisions.

By simulation, especially AC transfer characteristics you can see the frequency response of your circuit.

With this simulation I tested my preamplifier circuit to confirm that I have a flat gain curve from 20Hz to 20kHz, so the sound coming through will not loose on bass or high tones.

I simulated this at multiple volume levels, just to be sure. This is why you see four identical circuits. Each has a different potentiometer value set.


I am using a Tina-TI simulation program from Texas Instruments. It is a bit simpler to use as LT spice. I use both programs, but I decided to use this one since I used Op-amps from Texas Instruments and their software already has models for them included. This sped up the process a bit.

But the whole circuit is not affected a lot by selecting different operational amplifier.

The Full Schematic

sch.PNG

This is the full schematic.

In the following steps I will explain each subpart, so you will know what each thing does and why it is there.

The Power Supply

Sch power1.PNG

Everything starts with power supply.

I decided to power this circuit with 5V USB cable, since it does not consume much power, and USB chargers are everywhere.

I decided to use micro USB connector, since everyone has a lot of micro USB cables laying around.

I route the 5V from USB cable through a small ferrite bead. The ferrite bead does not allow high frequencies to pass through. We are talking MHz here. I put it there so no high frequency noise could be passed into the circuit. In reality, this ferrite bead could be omitted with probably no side effects.

Then the signal goes into an isolating DCDC converter. This converts the USB input 5V into an isolated 5V. This way this box is isolated from the power supply.

In the first revision I didn't have the isolation and ground loops were introduced connecting PCs and other devices together with audio cables and this way a lot of unwanted noise was introduced in the audio output. With isolation, these problems are omitted.

I also included a small LED to indicate the presence of 5V at secondary.

Symmetrical Voltage Generator

sch power 2.PNG

The audio mixer is made with operational amplifiers (you will see in the following steps).

For mixing audio, they should be powered from a symmetrical power supply. I chose +-5V power supply which is enough for this project.

I used LM2664, which is a switched capacitor voltage inverter, which inverts the input voltage. So from 5V from USB, it generates -5V.

This allows the operational amplifiers to have the effective voltage supply of 10V with the ground in the middle.

Input Stage

sch input 1.PNG

The input stage (two identical circuits for two channels) first loads the signal lines with 1k resistance. This is a standard for Line Inputs. Ideally You could put 33 ohms here to better simulate the headphone impedance, but I think it is not necessary. By loading the input device you supposedly get a little bit better sound quality, but that really depends on the driver type in the device itself. It also eliminates the unwanted noise if nothing is plugged into input jack.

Then, the signal is decoupled with two polyester capacitors. This removed and unwanted DC bias from being amplified.

The operational amplifier in the first stage is configured into a simple adder with a gain of 1, mixing both left and right channel into one. That 100pF capacitor in parallel with the feedback resistor is there to limit the upper frequency limit, so the amplifier does not need to amplify very high frequency noise.

The operational amplifiers on the schematic are OPA4316. if you want to have almost zero noise, you should use OPA4134 which is double the price but it has a bit less noise. You can try different ones aswell.

Initially I want4ed to make a stereo version, but stereo version gets significantly more complicated(twice as much op amps), and especially with volume potentiometers, which need to be dual gang.

Mono is good enough for this application.

The potentiometer after the first stage regulates the volume of that channel. A capacitor is on its output. This capacitor helps by reducing a potentiometer scratching noise a little bit.

Second Stage

sch input 2.PNG

Second stage is very similar.

It is a simple adder with a gain of 1.

This stage mixes together the audio of both device inputs together.

Again, the capacitor is there to limit the upper frequency range to 30kHz+

The second stage has a master volume potentiometer which controls the total output volume going out of the box into the headphones (but first it needs to go into a headphone amplifier).

Third Stage - Headphone Amplifier

sch headphone amp.PNG
headphone amp.PNG

The signal is again decoupled with two polyester capacitors.

The TPA6111A2 is a 150mW stereo headphone amplifier, wired to have a gain of 1.

It is basically very similar to the regular operational amplifier, the difference is that its output is capable of driving bigger load - headphones.

At the outputs there are two 470uF electrolytic capacitors which decouple the audio signal from a DC component present in the amplifier.

470uF capacitance is big enough to cover all the necessary audio frequency range.

Separate Grounds

gnds.PNG
sch pow 3.PNG

You probably noticed that I used three ground symbols - DGND and AGND and USB_GND.


The USB_GND is the input ground (PC, or USB charger) and it is galvanicaly separated from the rest of the circuit by an isolated DCDC converted (described in the power supply section).

The DGND is the "noisier" ground. On this ground is the switched capacitance voltage inverter which is constantly switching at 160kHz. You don't want some of that noise coupled into your audio signal.

The whole audio signal path is on AGND - the analog ground. In audio, you want to have the "quiet" parts of the circuit on a separate ground where there is no noise present. This ground is coupled to the DGND with a ferrite bead. The ferrite bead is a high impedance for high frequencies and low impedance for low frequencies. So it does not let the high frequency noise to pass through.

You also want to have these grounds nicely separated on the boards as on the image above.

The PCB

PCB.PNG
IMG_0173.JPG

I designed a compact 2 layer PCB sized 80x55mm, which fits into a an extruded aluminium enclosure MC002216 or MCREAS80 (or any other one you can find).

You can get the gerber files here:

https://drive.google.com/file/d/1pOyMH4n4XfcteWe7_...

You can send these files to a PCB manufacturer to have your board made.

I used JLCPCB which was kind enough to even sponsor my youtube video by providing me with free PCBs. The cost of this board is only 2$ for 5pcs (plus shipping) which is a bargain!

Sign up to get $18 new user coupons: https://jlcpcb.com/IAT

You can use coupon code "JLCPCBcom" at checkout for a small discount.

I have been using JLCPCB for over two years now and the boards were always top notch. So I am not just promoting their service because they sponsored me, I promote them because they have really good service which I was using before for over two years without any sponsorship.

I would never take sponsorship just for money, for products I would never use without sponsorship.

Soldering the PCB

Here I have attached the full schematic, assembly plans and bill of materials used on the PCB, so you are able to replicate this board without problem.

The components are 0805 size which are not too difficult to solder.

The Enclosure

Ohisje.PNG

The part number for enclosure is MC002216 or MCREAS80 depending on a color you want. But you can search for other types as well. The board is 80mm long and 55mm wide.


I also attached the 3D model of the circuit, if you decide to design the 3D printed enclosure.

The Finished Box

IMG_0178.JPG
IMG_0133.JPG
IMG_0175.JPG

You can best see the process of making the enclosure in the YouTube video.

I also engraved the labels on the plates with my CNC. Its a nice touch, making the box feel complete. But you can also put on a sticker which works just as good.

Despite having CNC, I drilled the holes for the potentiometers and jacks by hand. You need to keep the old craft alive :)

I made two versions, by flipping the board upside down in one, to see which one I like best. But I am still not decided :)


The knobs are a little tight around the screws, I had to trim them off a little bit so they don't hit the screws.

Other option would be to use recessed screws for the plate.

Project Complete!"

IMG_0193.JPG

I hope you liked this Instructable!

Thank you!
If you want to stay in touch on what I am working on:

You can subscribe to my YouTube channel(click the bell icon to get notified, since I post only approximately once a month):

http://www.youtube.com/c/JTMakesIt

You can also follow me on Facebook and Instagram

https://www.facebook.com/JTMakesIt

https://www.instagram.com/jt_makes_it

for spoilers on what I am currently working on, behind the scenes and other extras!

PS:., if you REALLY, REALLY liked it, you can also buy me a coffee here, so I will have more energy for future projects (this one took me 4 months and 3 board revisions :) )

https://www.buymeacoffee.com/JTMakesIt

And don't forget to vote for this Instructable in "PCB Challenge" contest :)