Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Raspberry Pi 

[TUTORIAL] Ras FM, (V)HF Transmitter [GO HAM!]

Ras FM

  • what is a FM?
  • Security on FM
  • FM vs AM
  • FM Usage
  • FM on the rasp.
  • You're voice on the rasp
  • Make you're own audio files:
  • Enjoy


what is a FM?
FM stands for Frequency modulation it's the encoding of information in a carrier wave

FM radio was developed in the United States by Edwin Armstrong
the first commercial FM broadcast was on March 1, 1941 by W47NV in Nashville, Tennessee

commercial FM broadcasting uses part of the VHF band (the FM broadcast band) this band goes only from 87.7 to 108.0 MHz

the pi can use 1Mhz up to 250Mhz so.... you can send on the whole HF 3-30MHz) a part of the VHF (30-300MHz) and a part of the MF band (300 kHz to 3 MHz)

Security on FM
it's not really security but worth mentioning ^^
if you're sending on a FM band
Quote:Wikipedia:
Broadcast signal intrusion is a term given to the act of hijacking broadcast signals of radio and television stations. Hijacking incidents have involved local TV and radio stations as well as cable and national networks.

Punishments:
United States
According to the Federal Communications Commission, [...] when Congress passed a bill that would penalize violators with fines peaking to $250,000 and/or a maximum of 10 years in prison if convicted.[...] Hijacking a signal of any kind is a felony in the United States.

How it's done?
well simply said you're sending a stronger signal then the radio station so.... you can take over an area (10cm to 100m) depending on the antenna and the strength of your signal

use a empty frequency and don't use big antennas this will not only give you a longer range but also better audio quality

so it can be cracked but i go to jail better then nothing right?
FM vs AM

[img]http://illumin.usc.edu/assets/media/481/Image%201.gif[/img]

as you can see in the picture above AM modify the AMplitude the band isn't as width as FM and AM circuits are often less comlex but they are much much more vulnerable to natural interference,.... AM signals travels also further then FM and AM can travel easier to objects then FM

FM modify's the Frequency the AMplitude stays the same, FM has better audio quality, has a wider band,...

Quote:http://www.youtube.com/watch?v=D65KXwfDs3s
http://www.youtube.com/watch?v=jqGAneO79lY

the video above give's a nice explanation on FM and AM
the second video give's an explanation about AM

FM Usage
euh audio duh..
exept for audio you cna also send data trough it but at really really slow rates so just audio here 👍

FM on the rasp.
Step 1
download the PiFM files and put them on your raspberry pi
Code
http://www.icrobotics.co.uk/wiki/images/c/c3/Pifm.tar.gz

Step 2
Wire it!
you need to use 1 alligator clip, you're finger, or a 20cm wire, female jumper wire,.... this will be you're antenna wire it to GPIOpin 4

Pins on the rasp.:
Spoiler (Click to View)
!!!GPIO 4 NOT PIN4!!!

Step 3
Code
sudo ./pifm sound.wav 95.5
sudo ./pifm for running the FM sound.wav is your soundfile 95.5 is the MHz you're transmitting on


Make a backup file before you alter stuff
save your changes!


Trouble shouting:
if the comands won't work try putting sudo before it


You're voice on the rasp


the raspberry hasn't any mic jacks i tested this with a ROG Spitfire usb soundcard and it worked great ^^

Code
sudo arecord -fS16_LE -r 22050 -Dplughw:1,0 - | sudo ./pifm - 98.0 22050

Code explained

Code
arecord
Program we are using to record audio.

-
Code
fS16_LE
Output 16-bit data. Needed this way for PiFM to read it.

Code
-r 22050
This specifies sampling rate to output recording. 22,050 is a good balance for speed and quality.

Code
-Dplughw:1,0

This is where you may need to modify. The '1' specifies card number and '0' is the device number I think. To find this out for your device, use
Code
arecord -l
to see all of the audio devices connected.

Code
-
Here it means to print output to standard out.

Code
|
Pipe the standard out from previous command to next command's standard input.

Code
sudo ./pifm - 98 22050
the pifm code

thank these guys ^^
Spoiler (Click to View)
Make you're own audio files:


Step1:
download FormatFactory / Audacity or another nice audio program :)
i will use FormatFactory

Step 2
Download you're MP4,MP3,... file with the audio you want to use
start format factory and select WAV browse the file and go to the convert settings all the audio files needs to be 16 bit mono wav format. sampled at 22050 Hz

Quote:all the audio files need to be 16 bit mono wav format. sampled at 22050 Hz

Step3:
upload it to your raspberry pi and get sending :)

Enjoy
so enjoy it 👍 you now have you're ow raspberry FM transmitter

Sources used:
Spoiler (Click to View)

EDIT 29/10/2013
Extra explanation about using format factory
Spoiler (Click to View)
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
While I guess it "works" don't expect to be getting any good range from this. Your power output must be ridiculously small from a GPIO (3.3V and current in the mA) to a jumper lol.
(Oct 28, 2013 06:57 AM)mexy Wrote:  While I guess it "works" don't expect to be getting any good range from this. Your power output must be ridiculously small from a GPIO (3.3V and current in the mA) to a jumper lol.

i get 20m range on 95.2 with just a jumper wire (this is in my house with walls etc....)
the range isn't great just like you said it's only a 3.3V signal but the pi isn't exactly meant to do FM transmitting this could be a fun way trolling people in the car when you're in a traffic jam,....

the maximum with Clear line of sight is about 100m
also this is a really really simple setup so if you have a rpi you could just try it yourself ^-^
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
This was a really fun project, thanks for this. I am sure I will be able to find some 'fun' uses for this 🎉

Actually I need help with the converting thing, I cant get it right. Whenever I change the sample rate it sounds way to slow.
(Oct 29, 2013 09:42 AM)whyitell Wrote:  This was a really fun project, thanks for this. I am sure I will be able to find some 'fun' uses for this 🎉

Actually I need help with the converting thing, I cant get it right. Whenever I change the sample rate it sounds way to slow.

it should be sampled at 16 bit mono wav format. sampled at 22050 Hz

it's really important you sample it at 22050 a lower sample rate give much faster (higher pitch) audio a higher sample rate a heavier deeper audio

i'm using format factory here are a few screenshots:
Spoiler (Click to View)

EDIT 29/10/2013 21:25 GMT +1
Also added mic support ^^ to the tutorial now you can transmit real time voice over the HF VHF band
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Oct 29, 2013 12:37 PM)slober Wrote:  it should be sampled at 16 bit mono wav format. sampled at 22050 Hz

it's really important you sample it at 22050 a lower sample rate give much faster (higher pitch) audio a higher sample rate a heavier deeper audio

i'm using format factory here are a few screenshots:
Spoiler (Click to View)

EDIT 29/10/2013 21:25 GMT +1
Also added mic support ^^ to the tutorial now you can transmit real time voice over the HF VHF band

I had it like that, exactly the same setting but it had loads of static. It worked perfectly with sound.wav but not with any of my drum and bass.
just send a pm to you i would love to help you further with this problem =)

i really hope i can help you solving this do you have the same problem with other mp3's?
Spoiler (Click to View)
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Oct 29, 2013 01:37 PM)slober Wrote:  just send a pm to you i would love to help you further with this problem =)

i really hope i can help you solving this do you have the same problem with other mp3's?
Spoiler (Click to View)

I tryed with 3 different songs and all of them were extremley stacticly, so I sent you all of them.
don't expect hi quality you're sending through a wire and using a credit card size computer ^^
i replied you're pm and send you the audio files i really hoped it helped
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
(Oct 29, 2013 01:58 PM)slober Wrote:  don't expect hi quality you're sending through a wire and using a credit card size computer ^^
i replied you're pm and send you the audio files i really hoped it helped

If only there was a way of playing files without all the converting fuss, I was looking at this but I dont really understand it.
Spoiler (Click to View)
Basicly you're making a FIFO First in First out file (buffer file)
then you're running vlc and put your audio file through a converter and spit it out into the FIFO after that it goes finally to your Pifm

i'm trying this method now haven't used it before if this works i will definitely add this to the tutorial

Spoiler (Click to View)
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
Did you manage to get it working, and if you use that way do you not have to convert it?
(Oct 30, 2013 10:27 AM)whyitell Wrote:  Did you manage to get it working, and if you use that way do you not have to convert it?

I didn't get it to work, had some network problems so i can't really download the needed packages, my modem/router i got from my isp a week back hate raspberry pi's

if you follow the steps you don't need to convert the audio files like said on
Public Honeypot Project: https://github.com/Slober3/PotHead
Honeypot Twitter: https://twitter.com/HoneyHive9
BTC: 1Anime1QrjwsEmz8bC2FwVcNXDLxP3SWAJ

Erin Wrote:It’s fine. There’s nothing to be afraid of. Calm down, Lilan
I don't have a RaspPi but I adore your Tutorial!

Straight to the point and easy explained! AWESOME! Really good :)

Regards
DaBootO
How do you send to a range for example 106.1 - 106.5? Great tut thanks


Possibly Related Threads...
Thread / Author Replies Views Last Post
by BigtitsissMar 21, 2025 09:48 PM 3 279 Mar 21, 2025 09:48 PM
Last Post: Bigtitsiss
[Arduino] by john ronaldsadNov 15, 2023 03:54 AM 1 188 Nov 15, 2023 03:54 AM
Last Post: nossy1996
[DIY] by Papa CudaDec 3, 2016 02:42 AM 5 320 Dec 3, 2016 02:42 AM
Last Post: Shadow Reign