Karaoke Machine with SPW2430 Microphone and TPA2005D1 Class D Audio Amp
Overview
A karaoke machine recreated on an mbed with a simple microphone, a couple of audio amps, and an SD card reader for the music. Go ahead and sing your heart out with this setup.
Karaoke machines are often popular in East Asian countries. Songs are loaded into the machine and someone can sing along while the music is being played.
By BumJun Park and Martin Yeh
ECE 4180 Section B
Setup
Components
- mbed LPC1768
- SD Card Reader
- Audio Speaker
- Micro SD card
- SPW2430 Microphone
- TPA2005D1 Class D Audio Amp
- LMV358 OpAmp
- 10K Trimpot
- 2 x 10k ohm resistor
- 1 x 1uF capacitor
Pin Out
SPW2430 Microphone
mbed | SPW2430 Microphone | 1uF capacitor | LMV358 OpAmp |
---|---|---|---|
Vu | Vin | + | |
Gnd | Gnd | - | |
AC | In |
A 10k ohm resistor should be put in between the voltage inputs, Vu and Vin, and between AC and Gnd. This will create a pull-up and pull-down network that will help eliminate the noise coming from the microphone. A 1 uF capacitor placed between the Vin and Gnd pins of the microphone will also minimize the amount of noise. Please double check your setup with the image above.
LMV358 OpAmp
mbed | LMV358 OpAmp | SPW2430 Microphone |
---|---|---|
Vout | VCC | |
Gnd | Gnd | |
P17 | Out | |
In | AC |
This opamp is used to increase the volume of the microphone's output. Since this is technically a cellphone microphone, the output needed a little boost so it can be heard on the speaker.
TPA2005D1 Class D Audio Amp
mbed | TPA2005D1 Class D Audio Amp | Speaker | |
---|---|---|---|
Vout | PWR + | ||
Gnd | PWR - | ||
Out + | Red Speaker Wire | ||
Out - | Black Speaker Wire | ||
P18 | In + | ||
Gnd | In - | ||
VOL | 10K Trimpot |
This audio amp will increase the volume of the analog out coming from the mbed.
As an added bonus, including the 10K Trimpot in this circuit allows the user to adjust the volume that is being outputted to the speaker. To enable volume control, unsolder the solder jumper on the lower right between the "[ = ]" marks.
SD Card Reader
mbed | SD Card Reader |
---|---|
P5 | DI |
P6 | DO |
P7 | SCK |
Vout | Vcc |
Gnd | Gnd |
P27 | CS |
Audacity was used to read in the audio MP3 clip, convert it from stereo to mono, resample it to a 8Khz sample rate and export it as a 16-bit wave file. Downsampling is recommended so that the audio coming out is not slowed down and distorted.
Demo
Code
Import programKaraoke
Karaoke Machine
Please log in to post comments.