Raspberry Pi as FM transmitter


36 posts   Page 1 of 2   1, 2
by hojnikb » Tue Dec 11, 2012 7:02 pm
Nice little hack that transmits FM @ 100mhz using gpio and a piece of wire ;)

http://www.icrobotics.co.uk/wiki/index. ... ransmitter
+°´°+,¸¸,+°´°~ Everyone should have a taste of UK Raspberry Pie =D ~°´°+,¸¸,+°´°+
Rasberry Pi, SoC @ 1225Mhz :o, 256MB Ram @ 550Mhz, 16GB SD-Card, Raspbian
User avatar
Posts: 110
Joined: Mon Jun 04, 2012 3:59 pm
Location: @Home
by pluggy » Tue Dec 11, 2012 7:12 pm
It probably wipes out the entire FM broadcast band for several blocks in any direction but don't let that stand in your way ;)
Don't judge Linux by the Pi.......
User avatar
Posts: 2081
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by mahjongg » Tue Dec 11, 2012 7:12 pm
This is just crazy! 8-)
User avatar
Moderator
Moderator
Posts: 4505
Joined: Sun Mar 11, 2012 12:19 am
by hojnikb » Tue Dec 11, 2012 7:33 pm
I know right :D

With some extra hacking and a kernel driver this could actually have a very good quality afaik..
+°´°+,¸¸,+°´°~ Everyone should have a taste of UK Raspberry Pie =D ~°´°+,¸¸,+°´°+
Rasberry Pi, SoC @ 1225Mhz :o, 256MB Ram @ 550Mhz, 16GB SD-Card, Raspbian
User avatar
Posts: 110
Joined: Mon Jun 04, 2012 3:59 pm
Location: @Home
by haxr3 » Mon Dec 17, 2012 9:29 pm
Except for the harmonics sitting in many other licensed bands, make sure you get a decent low pass filter on it!
Posts: 17
Joined: Wed Jul 11, 2012 6:42 pm
by pygmy_giant » Mon Dec 17, 2012 9:40 pm
It is insane - in a good way!

I wonder if there is also a clever way to hack somthing like this I2C receiver: http://www.ebay.co.uk/itm/Rda5807-FM-Stereo-LOW-IF-Digital-Radio-Module-DIY-For-MP3-MP4-Player-I2C-SPI-NEW-/290632315565?pt=UK_Sound_Vision_Other&hash=item43ab0932ad so that the audio out is converted into serial data readable by the Pi - that would allow 2 pi's could talk to each other.

Or maybe there is an even simpler way of doing that?
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by liz » Mon Dec 17, 2012 10:13 pm
This would have been something I'd have written on the front page about or tweeted about - but unfortunately, in the UK at least, it's horribly illegal; and elsewhere it's likely to raise the ire of ham radio types and the like, who are not going to appreciate us spewing all over their spectrum.

It's still damned cool. I'd like to see someone turn their Pi into a RC remote, as is, without having to add any extra hardware (aside from perhaps an antenna): but I still won't be writing about it, 'cos we'll get into trouble.
User avatar
Foundation
Foundation
Posts: 3898
Joined: Thu Jul 28, 2011 7:22 pm
by pygmy_giant » Mon Dec 17, 2012 11:42 pm
How illegal exactly I wonder..?

Some gadgets freely and commonly available in the UK use the FM band to wirelessly send the music from the ipod in your pocket to your car's radio a few feet away using a weak radio signal.

e.g. http://www.amazon.co.uk/Battery--World-Wireless-Radio-Transmitter-Charger/dp/B0064VLWP6/ref=sr_1_1?ie=UTF8&qid=1355788343&sr=8-1

Is the illegality proportional to the range of the radio signal?

If that signal is contained within your own home is it legal?

Is there a frequency range / antenna length that isn't naughty?

Calling all radio hams... calling all radio hams...
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by pygmy_giant » Mon Dec 17, 2012 11:56 pm
The range of that transmitter from Amazon is 'Transmission distance: >=5m'
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by liz » Mon Dec 17, 2012 11:58 pm
It's signal strength - it has to be under 50 nanowatts to be UK legal. Which this application isn't! Also, any device used for transmitting has to be CE marked (our old friend) for the purpose.

So don't do it. ;)
User avatar
Foundation
Foundation
Posts: 3898
Joined: Thu Jul 28, 2011 7:22 pm
by mahjongg » Tue Dec 18, 2012 12:06 am
Well, perhaps you live somewhere like burkina faso, and you want to broadcast music from your PI for the whole village! I doubt they will have strict laws against it over there, and music from burkina faso is very nice! especially the wooden balafon (xylophone) music.

Sorry too much gin, I'm starting to ramble again... :roll:
User avatar
Moderator
Moderator
Posts: 4505
Joined: Sun Mar 11, 2012 12:19 am
by pygmy_giant » Tue Dec 18, 2012 12:07 am
Bet they brew good gin(type spirit) over there too - now there's a party.

Seriously though, affordable community radio is a noble endeavour.

Over here I wouldn't dream of it

Image Image

Joking - of course.

Pi RC sounds like a better application anyhow 27Mhz isn't it?
Posts: 1566
Joined: Sun Mar 04, 2012 12:49 am
by liz » Tue Dec 18, 2012 12:12 am
mahjongg wrote:Well, perhaps you live somewhere like burkina faso, and you want to broadcast music from your PI for the whole village! I doubt they will have strict laws against it over there, and music from burkina faso is very nice! especially the wooden balafon (xylophone) music.

Sorry too much gin, I'm starting to ramble again... :roll:


Do they play the Kora in BF? My little bro (English, works for the Académie française, lives in Berlin; he is the most cosmopolitan of us by far) is a Kora player; takes lessons and everything. It's an African harp made from a gourd and bits of a goat, and for all that, really sounds rather lovely.

Personally, I'm rambling because of sake. I'm off to bed while the rest of you wrestle this thread back on topic again.
User avatar
Foundation
Foundation
Posts: 3898
Joined: Thu Jul 28, 2011 7:22 pm
by Benedict White » Tue Dec 18, 2012 12:20 am
Just to clarify a couple of points.

This has been done before in the days of the Spectrum and BBC Micro, so I'm told.

There are loads of available FM transmitters and kits to build them. at 5V (well 3.3) delivering into a well balanced aerial of 75 ohms you would be consuming 6.6 mA. I^2 R (power) gives a power of 14 mW. No one anywhere is going to actually care. At 3.3v we get 9mW.
Posts: 225
Joined: Sat Dec 24, 2011 12:24 am
by redhawk » Tue Dec 18, 2012 12:26 am
The PI transmitter software is a neat trick but it has no serious applications except for short distance audio transmissions.
If you want to stream music around your house in perfect stereo then I would recommend something like this - http://www.ebay.co.uk/itm/230669438036? it's just an audio dongle with software to change the transmission frequency from 76 - 108MHz
If you have an old analogue radio then you can set the frequency just outside 87.5MHz enough to dodge most FM digital tuners.
Transmission power is pretty average unless you reveal the hidden wire underneath one of the metal
strips. :lol:

Richard S.
User avatar
Posts: 2925
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by sim_tcr » Tue Dec 18, 2012 6:13 am
I downloaded http://www.icrobotics.co.uk/wiki/images ... ifm.tar.gz
Extracted it to Pifm folder.
Cd Pifm
chmod +x pifm
Conected a 20 cm wire to GPIO 4 pin (as per Broadcom numbering)
sudo ./pifm sound.wav

in my FM radio, I set frequency to 103.30 MHz. what I hear is a long humming sound. If I end ./pifm that sound ends too. So it does transmit something. But not actual contents of sound.wav.

Any one can help?
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Transcend 16GB Class 10, Transcend 8GB Class 4, Nokia Travel Charger ACP-12E 5.7V 800mA, Netgear WNA1000M Wifi Dongle/Ethernet
Posts: 311
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
by NathanBookham » Tue Dec 18, 2012 9:13 am
sim_tcr wrote:I downloaded http://www.icrobotics.co.uk/wiki/images ... ifm.tar.gz
Extracted it to Pifm folder.
Cd Pifm
chmod +x pifm
Conected a 20 cm wire to GPIO 4 pin (as per Broadcom numbering)
sudo ./pifm sound.wav

in my FM radio, I set frequency to 103.30 MHz. what I hear is a long humming sound. If I end ./pifm that sound ends too. So it does transmit something. But not actual contents of sound.wav.

Any one can help?

Make sure the WAV is encoded in 16 bit 44.1kHz Mono. Shouldn't you also tune to 100.0Mhz
This account is now inactive.
I am now known as 'InverseSandwich'
Posts: 65
Joined: Sat Dec 15, 2012 9:18 am
by rgh » Tue Dec 18, 2012 1:36 pm
In case not everyone on this thread has noticed, there is now a DMA based version available over here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=25301&start=25#p236231

I agree it is pretty pointless, possibly illegal depending what you do with it, far inferior to USB dongles that you can buy for a few pounds, etc, but pretty neat all the same!
Posts: 219
Joined: Fri Nov 25, 2011 3:53 pm
by kitwn » Fri Dec 21, 2012 1:29 am
Some years ago I had the pleasure of reading a large, leather bound volume of 'The Boys Own Paper', better known just as 'The Boys Own', which was from the early 20th century, just possibly 1912.

There was a fascinating article entitled 'The Boys Own Wireless Telegraph And How To Make It'.
This was a spark transmitter able to send Morse code over a short range to a crystal receiver which you also had to make. I think the most difficult part was finding a battery to power it!

Technology has changed a bit over the intervening century but the desire people have to make things 'just because I can' is still thriving. Good thing too!

Kit
Posts: 2
Joined: Fri Dec 21, 2012 12:22 am
by freedomotic » Sat Jan 12, 2013 4:42 pm
Hi to all,
How can I convert a mp3 file into a compatible wav format?
I tried with ffmpeg -i 111.mp3 -acodec pcm_s16le -ar 16000 out.wav but the result is a very slow and distorted sound.
Thanks
Freedomotic Open Source Building Automation
http://freedomotic.com
User avatar
Posts: 137
Joined: Sat Apr 21, 2012 3:59 pm
Location: Italy
by Jim Manley » Sat Jan 12, 2013 11:48 pm
A fellow Navy friend and engineer was the chairman of the Electrical and Computer Engineering Department at the U.S. Naval Academy in Annapolis, MD, (we're both alumni) back when the 100th anniversary was celebrated for Marconi's 1901 first trans-Atlantic transmission and reception (the first part is easy, it's the second part that's a lot harder! :) ) They built reproductions of Marconi's equipment as the originals were too fragile and priceless, and at least the condensers (capacitors) would have been non-functional after that much time anyway, to say nothing about corrosion likely taking its toll on all of the metallic components.

When they started transmitting (from Poldhu, Cornwall, England), and tried to tune the receiver (located at Signal Hill in St John's, Newfoundland, Canada), they couldn't detect the signal, and the original event was not well-documented from a technical perspective. It took the better part of a day, a lot of head-scratching, and copious oscilloscope measurements to realize that the signal was wideband (spread across lots of frequencies), not narrowband (tuned to a particular frequency as is almost universal today), and that they needed to detune the receiver to cover more of the spectrum in order to detect the signal. Everyone was so used to there being lots of other radio traffic going on that they missed the mindset of the original pioneers - there was no other intentional RF competition to worry about back in 1901 (beyond low-level, naturally-occurring energy arriving from space and various primitive terrestrial motors, generators, spark-producing circuits, etc., aka background noise).

When the FCC Enforcement Bureau (in the U.S.) comes knocking down your door, just plead that you're reproducing an historical event for "educational purposes". I would do so around Zero Dark Early (i.e., when everyone within range is asleep) ... which could be upwards of 1,000 miles if you're really bad at soldering and manage to wire in a multi-kilowatt linear RF amplifier. Whatever you do, don't transmit anything from the Qoran or that could be perceived as an image of Allah, or the FBI and/or Al Qaeda could show up to join in the take-down! :lol:

BTW, the CE mark is only required for commercial devices and, as long as the Pi isn't being sold for the express purpose of intentionally transmitting RF signals, the manufacturer doesn't have to worry about customers modifying it for that purpose (adding software that intentionally generates a signal in a protected band and any hardware that acts as an antenna is beyond the control of the manufacturer). The RF regulations are generally written such that, as long as an individual operates equipment within established power and frequency limitations, takes precautions to prevent interference, and responds immediately to satisfactorily resolve any complaints of interference, they won't be cited. The best approach to take is the ol' "if a tree falls in a forest and no one is there to hear it ... " scenario.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by nicknml » Sun Jan 13, 2013 1:52 am
Nice! I wonder how much range one could get by placing the antenna in the attic.
User avatar
Posts: 192
Joined: Thu Mar 15, 2012 8:44 pm
by nicknml » Sun Jan 13, 2013 2:27 am
Well I tried it, but so far the only thing that that happened is that it interfered with my tv signal ( does it matter if it's done on the revision 1 or 2 board?)
User avatar
Posts: 192
Joined: Thu Mar 15, 2012 8:44 pm
by nicknml » Sun Jan 13, 2013 3:54 am
I tuned around and got it to come in somewhat on 98.7.
User avatar
Posts: 192
Joined: Thu Mar 15, 2012 8:44 pm
by redhawk » Sun Jan 13, 2013 11:42 am
nicknml wrote:Well I tried it, but so far the only thing that that happened is that it interfered with my tv signal ( does it matter if it's done on the revision 1 or 2 board?)

The Pi transmitter exhibits high levels of harmonic distortion because the signal isn't pure enough, it causes transmissions to appear on other frequencies which is why your TV is suffering.
You can attenuate a lot of the harmonics by using a RF filter circuit the problem is they're extremely tedious to construct and require fine tuning (trimming capacitors).

http://www.radio-electronics.com/info/r ... design.php

Richard S.
User avatar
Posts: 2925
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1