Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Karaoke Circuits

Purpose:

This tutorial uses the myDAQ or ELVIS II series and components to build a karaoke circuit. A karaoke software application is also created with LabVIEW.  You can remove the vocals from your favorite iPod songs and sing along.


Background:

Most popular and rock music recordings use multiple microphones and mixers to generate the left and right signals. Listening in stereo gives a broad presence to the music. Adding these signals together affects the volume but not the musical content. On the other hand, subtracting the signals removes the vocals. The vocals are considered most important, and these are often recorded identically on both left and right channels. The background music due to the stereo mixing has no phase (time) relationship between the channels. If you subtract the channels (which can be accomplished by inverting one signal and then adding them together), the vocal signals are cancelled.  This procedure often has the most profound effect on the lead singer and not the background vocals or instruments.

Equpiment:


  • NI myDAQ or ELVIS II series
  • 3.5 mm sub-miniature stereo cable (comes with NI myDAQ)
  • iPod or other music source
  • Stereo computer speaker set

Op Amp Circuit Components:

  • Three TL2071 low noise JFETs or 741 operational amplifiers
  • Resistors: Six 10 kΩ, two 100 kΩ, and one 1 kΩ
  • Resistance trim pot 20 kΩ
  • Capacitors: Three 10 mF (electrolytic)
  • 3.5 mm sub-miniature stereo jack cable
  • 3.5 mm sub-miniature stereo socket (x2 if using ELVIS)
  • Breadboard


Prerequisite Reference Material:


Simple Karaoke Circuit:

http://electronics.rory.co.nz/projects/audio/karaoke.php

Set Up Hardware:

Building the Right Channel Preamplifier

Assemble the circuit components. Measure and record all the resistors using the DMM. Build the circuit in Figure 1 for the right-channel preamplifier.

a.jpga.jpg

Figure 1: Right-channel preamplifier circuit using an op amp inverting circuit


The circuit gain is (Rf/R1), where Rf is the feedback resistor (100 kΩ), and R1 is the input resistor (10 kΩ).  The op amp requires a +15 V and –15 V power source. The myDAQ and ELVIS II series have both sources available on sockets (+15 V, –15 V, and AGND).  Connect the FGEN output (AO 0 on myDAQ) to the point R.  Set the FGEN to a frequency of 1000 Hz and an amplitude of 0.5 VppUse the Scope to verify the circuit operation with the following settings:          

     Channel 0 Source AI 0, 100 mV/div connected to Op Amp input          

     Channel 1 Source AI 1, 1 V/div connected to Op Amp output              

     AI 0- and AI 1- connected to AGND          

     Timebase 1 ms          

     Triggering Edge Channel 0

[Run] continuously both the FGEN and Scope.  Use the vertical position dials to verify that the input and the output signals are out of phase (180 degrees) and the gain is close to the resistance ratio (10).

Building the Left Channel Preamplifier

Assemble the components and build the non-inverting Op Amp circuit shown in Figure 2.      

a.jpga.jpg

Figure 2: Left-channel preamplifier circuit using an op amp non-inverting circuit

The circuit has a gain of (1+Rf/R1). Here Rf equals 100 kΩ, and R1 is set near the center of the 20 kΩ pot, i.e. 10 kΩ. The nominal gain for this circuit is eleven.  Connect the FGEN output (AO 0 for the myDAQ) to the point S. Connect the Scope sockets AI 0 and AI 1 to the circuit input and output points.  Use the FGEN and the Scope in the same manner as for the right-channel measurements to verify that the op amp output is in phase with the input signal and that the gain is approximately eleven.

Note: The gain is strongly affected by the pot resistance.

Matching the Input Preamplifiers

Karaoke circuits that remove the vocal component require the left and right signals be matched in amplitude. A simple method to check the signal levels is to connect the Scope input AI 0 to the output of the right-channel op amp (pin 6) and input AI 1 to the output of the left-channel op amp, (pin 6).  Ensure the FGEN signal goes to both inputs.  [Run] the FGEN and Scope with the same settings.  Use the vertical position dials to offset the two signals.  Now use a small screwdriver to adjust the amplitude of the left channel to match the amplitude of the right channel. You can read the amplitudes off the scope traces or just read the RMS or Vppindicators.  The left and right signals are now ready for voice removal.

Note: Be sure to click on the [Display Measurement] boxes.

Adding the Left and Right Components


To add two analog signals, another Op Amp circuit called an adder (Figure 3) is useful.

a.jpga.jpg

Figure 3: Op amp adder circuit removes vocals from a stereo recording

Kirchoff’s second law states that all currents at a nodal point add up to zero. The left and right signals are applied to the two input resistors R1 and R2. These are tied together along with the op amp input (pin3) at nodal point Z.  Solving the circuit equations yields

                                    Vout = -(Rf/R1)(Vleft + Vright)

If one of these circuits is out of phase with the other, then the adder circuit becomes a subtraction circuit--just what we need to complete our Karaoke circuit.  Build the op amp adder using three 10 kresistors and another TL021IC.  To check out its operation, wire up the left and right op amp signals to the two adder inputs. Use the Scope to monitor the input signal (AO 0) on channel 0 and the adder output on Channel 1.  When the two input signals are balanced, you should see no AC signal (Figure 4). Adjust the gain on the left channel to see an unbalanced signal.

a.png

a.png

Figure 4: Balanced signals (top) and unbalanced signals (bottom) from adder circuit.

Great! Now balance the signal. We are almost ready for the iPod.

Completing the Karaoke Circuit


Although our test signals have been AC, they have been directly coupled to our circuit.  Now we will remove any DC signals from the input signal sources by adding a 10 µF capacitor and a 10 kΩ resistor to each channel (Figure 5). A similar circuit is added to the adder output.

a.jpg

Figure 5: Decoupling circuit additions for left (Vl) and right (Vr) inputs (Vin) and output (Vout)

Now with the stereo plug and sockets, we are ready to fly. Connect up the iPod music source and speakers. The music source (Mic input) is connected through the stereo cable to the stereo socket, which is then divided into left and right wires. Power up your circuit. Amazing!

Note: How well the karaoke circuit works depends in large part on the recording method in the production of the CD tracks. Some songs will work better than others.

Software Instructions:

LabVIEW can perform the same functions that the preamplifiers and adders do, and can do it more efficiently and with added functionality.  The hardware solution requires three chips, numerous components, two power supplies, lots of wires, and considerable time to build, test, and debug. The software solution requires a simple virtual circuit built within a LabVIEW program. You might say this is a great example of the power of the microprocessor, until you recall that a microprocessor is just another digital IC: a universal gate with a great ability to program or morph itself into any function. Take a look at the LabVIEW program Karaoke myDAQ.vi or Karaokie ELVIS.vi, depending on which instrument you are using.  On the front panel, there has been added a master volume control and a switch that allows the song to be played normally or with the vocals removed.

a.png

Figure 6: Karaoki myDAQ.vi and Karaoke ELVIS.vi front panels display real-time signals and frequency levels

MyDAQ Instructions

Connect your iPod to the myDAQ input [AUDIO IN] and speakers or headphones to [AUDIO OUT]. The music signal goes from your iPod to the myDAQ, to the computer to be processed by LabVIEW, and back to the myDAQ out through the speakers or headphones. Turn on the iPod music and [Run] the program.

ELVIS II Series Instructions


The ELVIS instructions are a bit more complex, since there are no [AUDIO IN] and [AUDIO OUT] ports.  Connect your iPod to a 3.5 mm sub-miniature stereo socket with the 3.5 mm sub-miniature stereo jack cable.  Connect the right and left components of the stereo socket to AI0+ and AI1+, and connect AI0- and AI1- to AGND. Connect the two terminals of another 3.5 mm sub-miniature stereo socket to AO0 and AGND.  Plug in your headphones to the stereo socket, turn on the iPod music and [Run] the program.

How It Works:

In the karaoke processing block, the left and right signals are subtracted  (– sign is equivalent to out-of-phase by 180 degrees). A data selector controlled by the [Voice?] switch allows either the original signal or the voice-removed signal to pass to the merge function, which places the same signal on both the left and right channels. A master volume control component (multiply by a constant) allows the signal on the frequency graph to be enhanced. Recall that removing the vocals required that the left and right channels be balanced. Return to the front panel and observe that the channel balance can be controlled by changing the left or right signal levels.  It does not matter what the signal level is, as long as it is in balance.

a.png

Figure 7: Karaoke myDAQ.vi and Karaoke ELVIS.vi block diagram

Andy G
Applications Engineering
National Instruments
Download All
Comments
Maksio
Member
Member
on

Can you please add the files in LabVIEW 2009 version?

Contributors