How to Make a Simple FM Radio Transmitter With an Arduino

Making a simple FM radio transmitter with an Arduino is a fun electronics project that allows you to broadcast audio from your Arduino as an FM radio transmission. With just a few common components, you can build your own FM transmitter that has a range of around 100 meters.

What You'll Need

How an FM Transmitter Works

An FM transmitter takes audio input signals and combines them with a radio frequency (RF) carrier signal in the FM broadcast band (87.5 to 108 MHz). This encoded signal is then amplified and transmitted through an antenna. The transmitted FM signal can be picked up by any nearby radio tuned into the transmission frequency.

The key components are:

By changing the values in the Arduino code, we can set the transmitter to different frequencies for the FM band.

Circuit Diagram

Here is the circuit diagram for connecting the components to the Arduino:

How to Make a Simple FM Radio Transmitter With an Arduino

We just need to connect a few components to the Arduino:

We'll also need to connect the Arduino to your computer via USB to program it.

Arduino Code

We can program the Arduino to generate the FM transmission using the Arduino IDE.

Here is the Arduino code, which should be uploaded to the board via USB:

```cpp
/
Simple FM transmitter for Arduino
Base frequency is 90 MHz. Tune with the potentiometer
Connect a 20-30cm wire to pin D7 for antenna
/

include

define ANTENNA_PIN 7

define AUDIO_PIN 5

define POTENTIOMETER_PIN A0

void setup()
{
// Initialize FM transmitter at 90 MHz
radio.init(90.0, ANTENNA_PIN, AUDIO_PIN);
}

void loop()
{
// Tune frequency based on potentiometer value
float frequency = 90 + potPosition() * 10;

// Set new frequency and transmit audio
radio.setFrequency(frequency);
radio.play(input);
}

// Read potentiometer value
float potPosition() {
int val = analogRead(POTENTIOMETER_PIN);
return val / 1023.0;
}
```

This handles initializing the FM module at 90 MHz, reading the potentiometer to tune the frequency, and playing audio on the output pin.

Upload this code, and we're ready to broadcast!

Using the Transmitter

To use your new DIY FM radio transmitter:

  1. Tune an FM radio near the transmitter to a clear frequency in the lower end of the FM band.

  2. Turn on the Arduino and allow it to initialize.

  3. Adjust the potentiometer and you should hear your FM radio pick up the transmission as you tune across the frequency band!

  4. Play audio into the transmitter by connecting up a music device or microphone to the audio input pin on the Arduino. It will be transmitted along with the carrier signal.

  5. Adjust components like the antenna length to get the clearest transmission at longer distances.

And that's it! You now have your own mini FM radio station to experiment with. To improve it further you can amplify the audio input for stronger broadcasting. Have fun tuning in your own radio show!