Saturday, March 11th, 2017

///// SDR CAR /////
Version 0

Bill of Materials:
Raspberry Pi(A/B/B+/2/3) Associated Monitor or Network Access to preform install
Antenna Adapter or Standalone Antenna
12v to 5v 2Amp DC converter
Micro USB Cord
1x Push Button Switch
2x Raspberry Pi Header attachment clip things
Box to put it all in
3.5mm(Male) to 3.5mm(Male) connector(Car AUX) or headphones(make sure to see step 5 if using headphones)
An initial version of a Software defined radio scanner for mobile use of an automobiles 12v system or be Portable in a battery operated box.

At some point I will put together an automated system to do all of these things. Once I find a setup that I like.

Currently the scanner needs to be programmed before departure and the Pi will run headless. And can be run off a 5v 3000ma battery for quite some time.

An under clock is recommended if possible. 700 MHz to save battery life. In addition Bluetooth and WiFi are also recommended to be disabled to improve boot time.
Software Steps:
Step 1.

Install RTL_FM

here is the install guide I used:

Alternatively, “sudo apt-get install rtl_sdr” will also work but is not recommended as it is an older version and will not work for standalone operation for some unknown reason

In addition, once the binaries are compiled in the src directory, copy it to your home folder

cp rtl_fm /home/pi/rtl_fm

*the reason for doing this is that, wherever cmake installs the binary, rc.local can’t find it. By putting it into the Home directory, the program becomes accessible at startup. If anyone has another way please let me know*

Step 2.

Install Sox

on the Raspberry Pi, type:
“sudo apt-get install sox”

Step 3.

In the Scripts directory locate the two files:
copy to the User Directory.

cp /home/pi/
cp /home/pi/

add Universal read write execute to scripts *security risk todo find better*

cd /home/pi/
chmod 755
chmod 755
chmod 755 rtl_fm

in the rc.local file, add two lines just after “fi” and before “exit 0”

sudo python /home/pi/

Step 5.
Editing Scanner Area:
Using your favorite text editor, open
Guide of Arguments:
Under RTL-FM:
-m FM = Narrow band FM (12 KHz)
-p 51 = Dongle Error Rate, cheap ones are around 50. Use RTL-Test to find.
-g 40 = Gain. When using different bands (UHF/VHF-Hi/VHF-low) its recommended to use a fixed gain constant, found using RTL-Test. I recommend 70% to 80% of the maximum

-l 50 = Squelch Relative to Gain(*) Important(!) for scanning to work properly a proper squelch value needs to be set. Usually Above the Gain value. Some testing is needed to find a proper value and it changes from dongle to dongle.

-t 0 = Delay before moving to next frequency. By default the RTL-FM software will wait a few ms before hopping to the next frequency. For Type II trunked NFM systems, by setting this to 0 I’ve found it is much better at following a conversation.

-f 146.52M = Frequency in MHz. Add as many as you’d like(Limit 1000 Frequencies)

-s 24k = Sample rate at 24K/2 = 12 KHz wide channel.

-F 0 = High Quality Decoding. Makes Type II systems more understandable, and other frequencies sound better.

Under Play(Sox):
While you can also use FFMPEG to playback the audio, Sox uses far less resources and has far better control of the output.

-r 24k = Must match the output of RTL-FM

highpass 300 = Blocks PL tones and audio frequencies under 300Hz

lowpass 3000 = Blocks any audio over 3000 Hz

the above range of audio used in telephones, and results in clearer decodes and less noise than the full 5KHz allowed.

gain +18 = Audio Gain, Ive set it higher in the raspberry pi, as the Pi’s built in headphone jack is not the greatest in output, this value will and should be adjusted if headphone operation is desired. Or a variable resistor in series with the headphone lead.
The Hardware part will be updated as time goes on, and as I get closer to the final revision of hardware

This is currently a work in progress. The current hardware revision is for handheld operation.
Credits : Power On/Off Script : RTLSDR Library : Frequency Database

Automated Install
Automated Setup
Car Power Control


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: