Raspberry Pi Based Wireless FM Microphone
A wireless microphone is a microphone without a physical cable connecting it directly to the sound recording or amplifying equipment with which it is associated. Also known as a radio microphone, it has a small, battery-powered radio transmitter in the microphone body, which transmits the audio signal from the microphone by radio waves to a nearby receiver unit, which recovers the audio. The other audio equipment is connected to the receiver unit by cable. Wireless microphones are widely used in the entertainment industry, television broadcasting, and public speaking to allow public speakers, interviewers, performers, and entertainers to move about freely while using a microphone to amplify their voices.
There are many different standards, frequencies and transmission technologies used to replace the microphone’s cable connection and make it into a wireless microphone. They can transmit, for example, in radio waves using UHF or VHF frequencies, FM, AM, or various digital modulation schemes. Some low cost (or specialist) models use infrared light. Infrared microphones require a direct line of sight between the microphone and the receiver, while costlier radio frequency models do not. (-wikipedia)
Once you have the Pi all set up, you’ll be able to amplify your voice with any all-in-one radio or boombox. This could be useful for giving lectures or presentations where it might be hard to hear you and there isn’t a professional PA system. You could also use it in a van or other large vehicle to communicate over the car’s speakers.
Here is the step-by-step instructions how raspberry pi can be used as a very good quality wireless microphone and can be used in class room, seminar, so keep reading.
Step 1: What you needs…
|1||Raspberry Pi (Any model, I used B)||1|
|4||Speaker with Amplifier||1|
|5||9 Volt Battery +
5 Volt regulator (LM7805) or Power Bank
|6||Raspberry Pi Case||1|
|7||A SD card with Raspbian on it (minimum 2 GB)||1|
|8||FM Antenna (simple jumper wire works fine)||1|
Step 2: Required Tools and Supplies…
|1||SSH or Monitor||1|
|2||Wi-Fi dongle or Ethernet Connection|
|3||Micro USB cable||1|
|4||Glue & Felt|
|6||Some Programming Experience|
Step 3: Turn you Raspberry Pi into FM Transmitter
We know wireless microphone is actually a wireless radio transmitter. Microphone convert our voice (audio signal) into electrical signal and the transmitter transmit the signal as radio wave. Pi is acting as a FM transmitter in this project. So lets make our Pi FM transmitter. For the thing I want to thank the people over at Imperial College Robotics Society have a new way to use it as FM Transmitter. They designed a program that turns the Pi into an FM radio transmitter.
Our first work is to download the program in our cool Raspberry Pi. For that you must connected to the Internet first. Don’t afraid, you only need the internet to download the software, you can use this afterwards without internet. Connect you pi to a monitor or use SSH for accessing your pi remotely (for details of remote access click here). OK, we are connected to out Raspberry Pi, now lets start downloading…
One important thing: Connect a 20-30 cm wire (jumper wire will work fine) to the GPIO PIN 4 (shown in figure above) of your Raspberry Pi to increase the range of your transmitter.
1. Open your Pi terminal and type this into the terminal
This will download the python script that helps with the radio transmission.
2. Untar (unzip) the file you downloaded. Type this into the terminal
tar xvzf pifm.tar.gz
3. Open your Radio App on your phone or if you still have a functioning radio tune to 100Mhz and then in your terminal type sudo ./pifm sound.wav 100.0
sudo ./pifm sound.wav 100.0
If everything went well you should now be hearing Star Wars sound track in your radio tuning at 100 MHz. You can transmit any frequency within FM range just typing the frequency instead of 100.0.
Step 4: Connecting USB Microphone to Raspberry Pi
The Raspberry Pi comes with a 3.5mm analogue stereo audio output, but no input. As a radio amateur I am interested in using the Raspberry Pi as microphone to do this I need an audio input. This can be achieved by connecting a USB audio device to your Raspberry Pi.
Make sure your Raspberry Pi is turned off and insert the USB audio device into one of the USB sockets on the Raspberry Pi, and then power up your Raspberry Pi. The USB audio device should be automatically installed. Go in SSH or LXTerminal window and type the following and press Enter
sudo apt-get install alsa-utils
You may already have this package on your system, but entering this command won’t do any harm even if you do. This will install a package of ALSA utilities if you don’t already have them (ALSA stands for Advances Linux Sound Architecture). If you want to know more about ALSA then follow the link: http://www.alsa-project.org/main/index.php/Main_Page.
Now, You should make sure that the USB audio device is being detected by both the hardware and software. Enter the following command and press enter. (image 6)
This will display information regarding attached USB devices. As you can see, the last device listed in the screenshot (image 6) above is the USB audio device labelled as C-Media Electronics, Inc. Audio Adapter. So far, so good.
You can adjust the volume of your microphone by by an utility called alsamixer.
To start it, simply enter the name in the command line, like so:
This presents a more graphical view (image 8,9,10) of the volume and information regarding the USB audio device. Using the arrow keys on your keyboard, select the volume column and adjust the volume higher or lower, dependent on your needs. Where possible, keep the volume level below 80–90% to avoid any distortion.
For more detail: Raspberry Pi Based Wireless FM Microphone