Updated script for DFM offset

I have updated the script to calculate the offset for a reciever or transmitter, taking the frequency directly from the local oscillator results in a mix of the tuned frequency and the offset frequency that gives us the Intermidiate frequency. we need to add this off set to a frequency that we want to tune to.

So for instance if you want to tune to 531khz a broadcast frequency in the AM band you would need to add the offset (in my case 455khz) to the required frequency, now you tune the radio watching the DFM until it reaches in my case 986khz (531+455).

If you have tuned in to a station and dont know the frequency you take the displayed frequency on the DFM and subtract the offset to give you the actual tuned frequency.

The script takes your entered values and displays both the minus and plus offsets and then starts again, use ctrl c to exit the script as it just runs in an infinate loop.


# Filename:- dfm.sh Ver:- 
# Copyleft 2010 Mark (Hiddensoul) Clohesy
# shed.twistedsouls.com
# Linux Bash Script to add and subtract a given offset (OFFST) 
# from an entered number, it is used to calculate the frequency
# of a radio reciever or transmitter by adding or subtracting
# the offset of the local oscillator. ctrl c to exit       
for ((;;))
        echo -n “Please enter Valus to offset in Khz:-“
        read -e KHZ
        MKHZ=$(($KHZ – OFFST))
        AKHZ=$(($KHZ + OFFST))
        echo;echo -n “Minus Offset Frequency:-” $MKHZ “-Khz”
        echo;echo -n ”     Entered Frequency:-” $KHZ “-Khz”
        echo;echo -n ” Plus Offset Frequency:-” $AKHZ “-Khz”

Scipts for Digital Frequency Meter conversions

Here are a couple of little BASH scripts one to convert the displayed value of a DFM connected to a reciever, it subtracts 455 from the displayed value to give you the frequency you are tuned to. It is called dfm, you can change the offset to suit your reciever

hiddensoul@hiddenslap:~$ dfm 986

Entered Frequency:- 986  khz
Tuned Frequency:- 531 -Khz

Second is dfm-tune that lets you input the required frequency and it will give you the displayed frequency to tune to on the DFM by adding 455 to it,

hiddensoul@hiddenslap:~$ dfm-tune 531

Required Frequency:- 531  khz
DFM Displayed Frequency:- 986 -Khz

The 455 is the generated frequency to bring the RF up to IF, most radios use 455khz but it may vary as I said you can always change the offset to match your reciever/transciever If you dont know the off set tune to a known station, eg a local AM broadcast station if your rig covers the broadcast band, then subtract the stations frequency from the displayed value on the DFM, this will give you the offset you need for the scripts.

Not much and anyone could knock them up in a few minutes, but it makes my life easier, copyleft do what you want with them..

First dfm

#Enter walue in khz on command line following the command dfm eg dfm 986
#Calculate tuned frequency of reciever by subtracting 455khz from
#Displayed Value on Digital Frequency Meter
AKHZ=$(($1 – 455));echo;echo -n “Entered Frequency:-” $1 ” khz”;echo;echo -n “Tuned Frequency:-” $AKHZ “-Khz”;echo;echo

second dfm-tune

#Enter value in khz on command line following the command dfm-tune eg dfm-tune 531
#Calculate displayed frequency of DFM by adding 455khz to required
# tuned frequency of reciever
AKHZ=$(($1 + 455));echo;echo -n “Required Frequency:-” $1 ” khz”;echo;echo -n “DFM Displayed Frequency:-” $AKHZ “-Khz”;echo;echo

Oscillator Output on DX-200

I finally got off my butt and went over the circuit diagrams for the DX-200 SW reciever I have, I wanted to add a BNC ouput for an external frequency counter. I took the cover off and probed around Q104 Q105 the local oscillator and buffer amp, I found a frequency of 986 khz which after subtracting 455 khz gives me 531 khz a local AM station it was tuned to. The 455 subtraction is due to the addition of 455 khz to get the IF.

The counter I have is a 500 mhz unit and will cover all my needs including UHF, I am going to make an haceduino controlled counter that automatically subtracts the offset

Some Photos of the shack

Here is a photo of my little 8 foot by 8 foot shack that I use as a listening post and as my workshop mainly electronics, bigger projects are done in the carport or yard. I have big plans this year for the shack, I am going to be builiding all new desks and a new floor for it, just need to save up the money for the job.

On the drawing board is also a vertical antenna using one of my antenna masts and a folded loaded dipole from three fishing rods, one cut down to 1.2 mt and 2 at just over 3 mt arranged in a delta for the fold, it will be rotatable and is designed for my small lot
. My backyard is 2.9mt wide by 12 meters long, I have a 10mt mast near the shack and a 12 meter mast at the the top that is on the house roof, the higher mast is for TV antennas and UHF CB and Scanner.
So far I have the masts up, the two TV aerials (One for Melbourne one for Gippsland) and a 10 meter long wire for Shortwave reception on 40 meters 1/4 wave length. I also have a UHF aerial for UHF CB (Australia) Tx/Rx on my motor bike, I have a mast/aerial made from aluminum pipe that goes flat packed on the trailer behind my motorbike, this extends to just over 8 meters as a mast for an inverted V antenna or sloped long wire. As a vertical reception aerial I extend it with a steel whip tip to get 1/4 wavelength on 40mt tuned with a bottom loaded coil, once I am finshed I will get some pictures of them up on the blog.

CW and Linux

I have recently gotten in to Shortwave radio, my aim is to get my amateur licence and get on the air to work the bands myself. At the moment I have two receivers, a realistic DX-200 my main receiver and a Boat anchor valve (tube) receiver for a bit of fun. The antenna is a 10m unbalanced long wire about 4-5 meters up.

I use Linux to do digital signal processing and also display the audio in waterfalls and spectrum displays. Here is a video of a CW session, note the bright spots on the PC that correspond to the CW, in real life I can read the CW from the screen, well I cant as I am still learning but you get the idea 🙂

Eggs and Ham

I have been spending most of my evenings listening to Amateur radio operators (Hams) on my shortwave recievers. It gives me someone to listen to now that Mick has gone.

Currently I have three shortwave receivers, the first one I brought is a realistic DX 150-B from the 1970’s. It is a great radio. The second is also a realistic model the DX200 from the 1980’s, this is my main listening set. Finally I have a boat anchor an old valve (tube) receiver that covers 11, 10, 15, 20, 40, 80 and 160 meters, it is a little deaf at the moment and needs a service.
I am working to get my amateur radio licence and have started to design an antenna for my shack. It is sort of a folded dipole loaded at the center, I have done the math and worked out all the values, it will be designed for 40mt but should also tune up via an antenna tuner on power of twos so I am hoping it will work on 10,20,40 and 80 meters. I was reading a site that said early antennas had SWR of 3:1 and a high SWR breeds character. Anyway with an ATU you can make nearly anything resonate at the desired frequency :p