huff&puffstepcalculator

Huff & Puff Tuning Step Calculator

Program to calculate step size based on Ron PA2RF Fast-Mode H&P Stabilizer

This Linux/UNIX shell script program calculates the tuning step size for a Huff & Puff oscillator stabilizer. It is based on a web page by Ron Brink PA2RF.

The program calls the "dc" Desktop Calculator to do the math, so you will need that installed on your UNIX/Linux system in order to run this code.

Program screens look like this:

The PA2RF Fast-Mode stabilizer circuit looks like this:

Schematic by: Ron Brink PA2RF

Here is my program to calculate tuning step size for this circuit:

=============== START ===============

#!/bin/sh

#

# This program calculates the step size of a Fast-Method Huff & Puff Stabilizer.# The method is based on work by Ron Brink PA2RF, located at:

# http://home.hetnet.nl/~brink120/huf2.htm

#

# This program implements Ron's mathematics in an interactive menu method.

# You just populate the fields in the menu, then tell it to caclulate the

# step size onee all the fields are correct.

#

# As with my other Shell Script programs...This is FreeWare.

# If you use it, it is yours. If you break it, you fix it.

#

# Arv Evans K7HKL

# 15 February 2008

#

# You must have the program "dc" installed in order to run this program.

# I use the Desktop Calculator (dc) for math because it is clean, fast,

# and efficient, but mostly because it allows me to set the level of

# precision in the output.

#

# If you want to use this program via a window manager menu, you can configure

# your menue editor for calling this software in a terminal session. Give it

# a menu icon and it will look and act much like the rest of your window based

# applications.

#

# ====================================

#

# Initialization (we need some usable values or the start screen looks funny).

vfo=7000000

shifts=7

divider=4096

xtal=60000000

stepsize=`echo "2 k $vfo $vfo * $shifts $divider $xtal * * / p" | dc`

# Initialization complete

#

clear

while true

do

echo "#======================================================#"

echo "# STEP-SIZE CALCULATOR FOR FAST-MODE H&P STABILIZER #"

echo "#========================= K7HKL =========================#"

echo "# #"

echo "# 0) Exit Program #"

echo "# 1) VFO Frequency = $vfo Hz"

echo "# 2) Shift Register Stages = $shifts"

echo "# 3) Division Factor = $divider"

echo "# 4) Crystal Frequency = $xtal Hz"

echo "# 5) STEP SIZE = $stepsize Hz"

echo "#=========================================================#"

echo -n "# Selection: "

read selection

case $selection in

0|q|Q) exit

;;

1|V|v) echo; echo; echo

echo -n "Enter your VFO Frequency in Hz: "

read vfo

;;

2|r|R) echo; echo; echo

echo -n "Enter the number of shift register stages: "

read shifts

;;

3|b|B) echo; echo; echo

echo -n "enter the division factor: "

read divider

;;

4|c|C) echo; echo; echo

echo -n "enter the crystal frequency in Hz: "

read xtal

;;

5|s|S) echo; echo; echo

echo " The step interval is $stepsize Hz."

echo -n "Hit ENTER to continue: "

read junk

;;

*) echo; echo; echo

echo "ILLEGAL COMMAND in $selection. "

echo -n "Hit ENTER to continue: "

read junk

;;

esac

clear

stepsize=`echo "2 k $vfo $vfo * $shifts $divider $xtal * * / p" | dc`

done

=============== END ==============