A Karaoke mixer and amplifier for the iPhone.
I've recently published an article showing how to mix the sound from a Karaoke microphone with the sound from a YouTube streaming box like a Roku or Apple Tv. If your streaming box can stream YouTube (note the most recent Roku's don't) this allows you to access the many thousands of Karaoke titles available for free online. This works quite well for a fixed setup, and assuming you own the required devices, but what if you want to do this from an Iphone? That was the motivation for this project. The result is a portable iPhone-based "Karaoke Machine". Let's see how to build one!
UPDATE, NOV 2013: If you prefer to buy an already made unit, I found this item in Amazon.com that does something very similar. You would also need is to add an iphone audio/video cable. Note that this won't work with the new iphone models (5 an up) because, as I understand it, the new "lightning" interface is a digital format and doesn't provide direct access to audio + composite video without an expensive converter box.
The following figure shows the circuit schematic (excluding the power supply; more on that later). The top portion of the schematic is a transistor based, high-gain, low-noise, microphone pre-amplifier. The system was targeted for low-impedance dynamic microphones (typical voice microphones like this one from Amazon.com). The potentiometer RV1 allows the user to adjust the voice volume; an important adjustment since the music level for the YouTube karaoke videos varies widely. The preamplifier is based on the BC547C transistor and consists of two stages. Noise was a primary concern in my design, so I optimized the first stage for low-noise by keeping the input resistance low (thus the 560 Ohm potentiometer choice) and by setting the bias current in the first stage fairly low (less than 1 mA). I also deliberately designed most of the gain into the first stage so that the second stage would not "amplify" the noise much. In-fact, the second stage was designed for low output impedance and moderate gain. The second stage gain is limited by the inclusion of emitter resistor R5. Since total noise is also a function of bandwidth, capacitors C9 and C5 limit the total bandwidth to about 18 KHz which more than enough for voice reproduction, while minimizing noise content. The output impedance of the second stage is mostly determined by the 820 Ohm collector resistor and is adequate for driving the subsequent "line-level" circuits. Both transistor stages are biased so that the collector sits at about half of the supply voltage (2.5V). This is important in reducing harmonic distortion, especially in the second stage where the signal swing is the greatest. For more information on transistor biasing and noise considerations, please see my Excel-based transistor amplifier calculator article.
The output from the preamplifier is mixed with the input from an iPhone composite video cable (like this one from Amazon.com) through 4.7 KOhm resistors.
I paid special attention to power supply decoupling and noise filtering. Not only are the decoupling capacitors relatively large, they are also spread-out through the board to reduce inductance (see PCB photo later in this article). The power for this circuit is provided by an AC to USB charger which has a nominal +5V output voltage. These devices are small and besides providing current for the pre-amplifier, they can also charge the iPhone while you sing Karaoke! I felt this was a nice addition to this project and prevents party "early termination" from an iPhone drained battery. While the output from these regulators is already filtered, it can contain some switching noise down to the audio frequencies. Therefore, I added a simple LC filter at the input by including the (optional) power filtering inductor L1. One must be careful when choosing an inductor for this application though. The LC circuit can actually offer some gain peaking at the corner frequency. To avoid this, I chose an inductor with relatively high series resistance (about 3 Ohm) which avoids this phenomenon (I'll elaborate more on this in a future article). Low resistance inductors are actually worst for this application and are not recommended. Since the circuit draws only about 3.5 mA, the voltage drop across the 3 Ohm inductor resistance is negligible.
Figure 1 - The Circuit Schematic
The pcb with components already mounted is depicted in Figure 2. I decided to try my hand at a new (to me) pcb building technique. Instead of using a perf-board, I decided to start with a bare copper-clad board and "draw" copper "islands" using a dremel rotary tool. By keeping the power planes wide, I was able to reduce inductance effects, improve noise shielding, and avoid oscillation. The circuit is simple enough that the pcb "dremel-design" was quite straightforward. Notice the placement of the surface mount decoupling capacitors at different points in the board to improve noise rejection and minimize inductance. The power-filtering inductor is the small radial component in the upper left corner, where the +5V supply enters the circuit. The whole pcb may not be very pretty, but performed quite well. I measured less than 1 mV rms total noise at the output of the circuit. The real value may be even less as I was faced with some measurement accuracy limitations; mostly due to my oscilloscope noise floor. The simulations I performed in LTSPice show about 0.1 mV rms in the 20KHz audio band.
Figure 2 - PCB
As previously noted, I used an off-the shelf AC to USB power adapter to supply 5V to the circuit and also to (optionally) charge the iPhone while in operation. (Here's an example adapter). Unfortunately the adapter I used, while capable to supplying the 500 mA required by the iPhone, wasn't "recognized" by the phone, so initially it would not charge. Fortunately, the solution to this "predicament" was quite simple. As it turns-out, the iPhone 4G I was using wants to see about 2V at the D+/D- data lines. This voltage signals to the iPhone that it is connecting to a charger capable of up to 500 mA charge current. (Note: Ipads require more current so you would need a different voltage for those). The solution is to simply mount two resistors across the D+/D- lines forming a 5V to 2 V resistive divider. Figures 3 and 4 tell the story. I used 1206 SMD resistors as they were easy to fit in the existing pcb (see Figure 4). Note that some chargers already include these resistors, especially if they were designed specifically for iPhone charging. This modification is not required for those devices, so test before you hack:)
Figure 3 - USB Charger Hack
Figure 4 - 68K/47K resistor divider
I'm not particularly "mechanically inclined", so take the following advice at your own risk:) For this project, I re-used an old "Radio-Shack" RF modulator case (similar to this one from Amazon.com). This is clearly an obsolete technology, so I had no much use for the box. One advantage it offered was that it already include front panel mounted RCA female connectors which I used to connect to the Amazon iPhone cable (note: this cable will *not* work with the new 5th generation iPhone). It also had an AC cable already feeding in which I later connected to the AC to USB adapter (not shown in Figure 5).
The output to the TV or Receiver consisted of a long composite video + audio cable with one end directly soldered to the pcb.
Figure 5 - Assembling the components
Figure 6 shows the final assembly. This side includes the USB charger and the TV cable outputs:
Figure 6 - USB and TV outputs
The back panel in Figure 7 contains the RCA connectors (to the iPhone cable), the microphone audio jack, the volume adjustment knob and the AC input:
Figure 7 - Back Panel
Here's a typical setup (Figure 8). It looks complex but in reality is quite simple. Starting on the right, the iPhone connects to the RCA inputs. A dynamic microphone plugs into the audio jack. The Red/Yellow/White RCA male connectors on the left go to the TV or receiver. That's it!
Figure 8 - A typical setup
So far I've been quite pleased with the results. The amplifier provides plenty of gain allowing me to adjust the voice level as needed. The noise level is very low for a microphone amplifier and, provides very low distortion. Those karaoke parties will never be the same:)
Comments, questions, suggestions? You can reach me at: contact (at sign) paulorenato (dot) com