Skip to content

frohdbek/GreenWire-FM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

📡 Raspberry Pi FM-RDS Transmitter Setup

This project turns a Raspberry Pi Zero 2W into an FM radio transmitter capable of broadcasting audio and RDS data without any additional SDR hardware. The transmission is handled by the Pi's internal

PWM and DMA engines, outputting through GPIO Pin 4 (Physical Pin 7).

rpietc2

⚠️ Hardware Safety & Setup

To protect the SoC from high-voltage spikes and stabilize the signal:

Resistor: A 470 Ohm resistor is connected in series to GPIO 4.

Antenna: A 2-meter insulated copper wire (USB cable core) is attached to the resistor.

Insulation: Critical voltage headers (3.3V and 5V) are taped off to prevent accidental shorts.

rpietc

🚀 Software Installation

  1. Update System & Install Dependencies

The system requires build tools and audio libraries to handle the transmission:

sudo apt update && sudo apt upgrade -y sudo apt install git libsndfile1-dev ffmpeg -y

  1. Clone the Repository

git clone https://github.com/ChristopheJacquet/PiFmRds.git cd PiFmRds/src

  1. Compile the Source Code

Translate the C source files into an executable binary:

make clean make

  1. Prepare the Audio File

The software requires specific WAV formatting. If your file is MP3, convert it using ffmpeg:

ffmpeg -i your_song.mp3 -ar 22050 -ac 1 -b:a 16 sound.wav

  1. Start Broadcasting

Execute the transmitter on a clear frequency (e.g., 104.0 MHz):

sudo ./pi_fm_rds -freq 104.0 -audio sound.wav

📊 Technical Specifications

Frequency: Adjustable FM band (87.5 - 108.0 MHz).

Modulation: FM Stereo + RDS (Radio Data System).

Output Pin: GPIO 4 (Pin 7).

Backend: Uses the Raspberry Pi's PWM clock generator to modulate the carrier.

🛠 Hardware & Antenna Setup

You can build the antenna using two different methods. Both require a 470 Ohm resistor to be connected to GPIO 4 (Physical Pin 7) for impedance matching and SoC protection.

Option A: The "Recycled Green Wire" Method (Advanced)

Material: A 2-meter long insulated copper wire salvaged from old electronics (e.g., a green USB data core).

Process: Strip 1cm of insulation from one end, solder it to the 470 Ohm resistor, and connect the other end of the resistor to Pin 7.

Pros: Better signal reach due to length; zero cost (upcycled).

green1 green2

Option B: The "Jumper Wire" Method (Easiest)

Material: 1x Male-to-Female Jumper Wire.

Process:

Connect the Female end directly to GPIO 4 (Pin 7).

Cut the Male end off or simply use it as a plug-in point for the resistor.

If you want more range, daisy-chain multiple jumper wires together to increase the total length.

Pros: No soldering required; plug-and-play; much easier for quick prototyping.

jumper

⚠️ Critical Insulation

Regardless of the antenna choice, ensure that the neighboring high-voltage pins (3.3V Pin 1 and 5V Pins 2 & 4) are covered with electrical tape. This prevents the antenna wire from accidentally touching a power rail and frying your Raspberry Pi.

🛠 Troubleshooting

fatal error: sndfile.h: This means the libsndfile1-dev package is missing. Run the install command in step 1.

command not found: Always use the ./ prefix when running the binary in the local directory.

Connection reset by peer: This occurs after running sudo poweroff. It confirms the Pi has shut down safely.

Note: This project is for educational purposes. Ensure you comply with local radio transmission regulations.

About

Low-cost Raspberry Pi FM transmitter using a salvaged scrap wire antenna and a single resistor for protection.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages