Sunday, January 6, 2013

Raspberry Pi Autofox?

I stumbled into a wiki on Turning the Raspberry Pi Into an FM Transmitter.

The code uses the hardware on the raspberry pi that is actually meant to generate spread-spectrum clock signals on the GPIO pins to output FM Radio energy.  Just add a quarter wave length of wire to GPIO 4 to act as an antenna.



root@raspberrypi:~# ./pifm
Usage:   program wavfile.wav [freq] [sample rate]




Looking at the source, it seems simple enough to narrow it a bit: 
In pifm.c look for:


float dval = sample*15.0;  // actual transmitted sample.  15 is bandwith (about 75 kHz)

Obviously this isn't a clean transmitter implementation, so don't expect much more than an autofox.

For a low power foxhunt it might amusing to wire a motion sensor to the other GPIO to adjust your transmit and announce timing cycle, when folks are getting close.


{Update 3/13}
Apparently some people think like me:
https://github.com/DanAnkers/WsprryPi

https://github.com/threeme3/WsprryPi

Plenty of folks using the basis of this for Weak Signal Propagation Reporting

And:

http://www.instructables.com/id/Raspberry-Pi-security-Slow-Scan-Television-Camera/?ALLSTEPS

It would also be interesting to use it as a Part 15 FM transmitter with modified code to allow a GPS for transmitter phase locking.

{Update 8/14}
Alessandro, IK1PLD released a binary to the Yahoo Raspberry_Pi_4-Ham_RADIO group:
Narrow Band FM transmitter derived from pifm. It is able to transmit FM from VLF to UHF with a settable deviation and pre-emphasys, frequency correction and subtones. It runs under debian distr.   In a SSH session type ./nbfm.out for help.

3 comments:

  1. I had tried this and the basic FM transmitter works. There are two versions of the file floating around. Mine had the freq input in plain text near the bottom of the code. This was nice since I didn't have to do any HEX conversions or math.

    I tried to change the bandwidth. The setting you provided seems to be the audio bandwidth (volume) not RF spectrum bandwidth. I played around wih some of the other math settings, but couldnt get it to narrow. I was only doing this with a scanner and its bandwidth settings, not an o-scope.

    Hopefully someone else who understands the code some more can narrow it down, as it seems to be hard coded in more than one place.

    Mark - KC8GRQ
    http://Mark-Rodgers.com

    ReplyDelete
    Replies
    1. I may have posted a broken link. Should be https://groups.yahoo.com/neo/groups/Raspberry_Pi_4-Ham_RADIO/files/pifox.zip

      Delete
  2. Raspberry pi easy to configure autofox project with functional narrowband based around nbfm.

    Now a github project.

    https://github.com/km4efp/pifox

    ReplyDelete