While teaching students about how radio signals are used to send information using FM I decided to make a raspberry pi radio transmitter using the instructions from Makezine and Instructables, so that we could explore the range of transmission, and the effects that different aerials would have on the radio signal.
The PiFM python module was created by Oliver Mattos and Oskar Weigl from the Imperial College Robotics society, and can broadcast 16 bit mono WAV format sound files that can be played on any FM receiving radio.
Makezine made a pre-compiled install image that autoruns the transmitting software on boot, and will shuffle audio files that have been placed in the root directory. I’ll be honest, their video was a bit Hipsterrific for my liking, but it got me interested enough to tinker.
The basis behind the generation of the signals sounds simple enough: GPIO4 is modulated via PWM fast enough to produce a signal in the FM (megahertz) range. However, I quickly realised that it produces a lot of interference in nearby devices, and there are clear side bands of interference in neighbouring frequencies. (Just tune the radio through the frequency range and you’ll find many sidebands) Although the power output of the device is so low, it might interfere with Emergency Service radio, and as we are located very close to a Fire Station, we decided to exercise caution!
With an FM radio right next to the Pi, it picked up the signal very clearly, but dropped off within 3-5m. With a 15cm crocodile clip wire attachedto GPIO4 the range jumped to 20-30m radius, and was very clear.
Some builds have used Duck antennae in order to boost the signal broadcast radius, but presumably this would also boost the strength of the side bands, and would drown out commercial stations at short range.
Extremely easy, and very quick to get results.
Minimal materials needed, and little expertise required for students. Easily replicable.
School radio station?
Using the piFM RDS code on github to send track information, and station Identification info. Code:https://github.com/ChristopheJacquet/PiFmRds