External Frequency Control For A PRO-59 Scanner

While browsing through some old text files on my hard drive I ran across an article that described how to add computer control to a VHF/UHF scanner.  The basic idea was to locate the programming pins on the receiver’s phase-locked loop (PLL) and bring them (along with any other signals of interest) out to an external connector, then control the radio via a computer’s printer port.  Putting the radio under computer control allowed for all sorts of custom features, including more channels and the ability to log signal activity.

As I was reading this I remembered I had a PRO-59 scanner I had bought years ago intending to convert it to a tunable VHF receiver, but the project had been placed on the back burner when job, kids, and life in general intervened.  At least, until now….

Modification Description

While my original intention when I bought the PRO-59 was to convert it to a tunable multi-mode VHF receiver, I decided to limit the modifications to adding external frequency control for now.  To understand how the mod was done consider the block diagram shown below.

PRO59_Block_Diagram

The PRO-59 is a double-conversion design with intermediate frequencies (IFs) of 10.85 MHz and 450 kHz.  The received frequency is controlled by the PLL unit, which tunes from 126.15 – 163.15 MHz for VHF-HI and 131.72 – 167.05 MHz for UHF.  Band switching is done via the VHF/UHF line and the audio can be muted when a signal is not present by monitoring the squelch line and setting the mute signal.  All of this is controlled by a central processor.

External frequency control is accomplished by removing the original processor and replacing it with one running your own software.  In the PRO-59 the controller is a custom chip (UC1410) designated as IC5 and located at the bottom left of the circuit board near the PLL daughterboard.  I removed it and brought the signals I was interested in out to a DB-25 connector.  This was made easier by the fact that the chip was a through-hole package so I could solder wires in the holes that remained after removing the chip.  You can see the wires and where the controller was located in the photo.  The signals of interest and their pin locations are listed in the table below.

IMG_0320

Processor Pin Name Signal Direction1 Description
1 BANDSWUHF OUT VHF/UHF Bandswitch (L = VHF, H = UHF)
2 5V IN
3 PLL EL OUT PLL Latch Enable
4 PLL CL OUT PLL Clock
5 PLL DT OUT PLL Data
6 HLT IN Processor HALT (L = scanner powered off)
18 GND IN
19 RESET IN Processor RESET (L = scanner reset pressed)
29 MUTE OUT Audio Mute (H = mute audio)
30 SC IN Audio Squelch (H = signal detected)
1Direction is with respect to the controller.

The most basic operation to be performed is to tune the receiver to a specific frequency.  This is accomplished by setting the band select signal as appropriate and setting the frequency select registers in the PLL.  The PLL used in the PRO-59 is a PLL2002A, which has two registers (R and N) to be set.  Their values for VHF-HI frequencies can be calculated as:

N=\frac{(f_{kHz} - 10850)}{5}

R=2080

For UHF frequencies, they are calculated as:

N=\frac{2(f_{kHz} - 10850)}{25}

R=2496

The values are written to the PLL via a 3-wire interface as described here or in the PLL2001 data sheet.

Demonstration Code

For an initial demonstration I coded all this up in the Arduino script based upon the scan.cpp program and listed below.  The only problem I ran into was not remembering ints on an Arduino are 16 bits.  Once I started doing the calculations using longs it all came together.

/* Define Arduino pin numbers.
*/
#ifndef FALSE
#define FALSE           0
#endif
#ifndef TRUE
#define TRUE            ~FALSE
#endif

#define int32           long
#define int16           int

#define BANDSWITCH      0
#define PLL_LATCH       1
#define PLL_CLOCK       2
#define PLL_DATA        3
#define MUTE            4

#define VHF_HI          LOW
#define UHF             HIGH

#define MUTE_ON         HIGH
#define MUTE_OFF        LOW

#define VHF_R_VALUE     0x820
#define UHF_R_VALUE     0x9C0

/* Setup routine.
*/
void setup()
{
    /* Initialize the pins.
    */
    pinMode(BANDSWITCH, OUTPUT);
    pinMode(PLL_LATCH, OUTPUT);
    pinMode(PLL_CLOCK, OUTPUT);
    pinMode(PLL_DATA, OUTPUT);
    pinMode(MUTE, OUTPUT);

    set_band(VHF_HI);
    digitalWrite(PLL_LATCH, LOW);
    digitalWrite(PLL_CLOCK, LOW);
    digitalWrite(PLL_DATA, LOW);
    mute_audio(FALSE);

    int32 R_data = 0;
    int32 N_data = 0;
    int32 freq_khz = 162400;
    int32 band = VHF_HI;

    /* Calculate the band, N, and R register values.
    */
    if (freq_khz >= 406000)
    {
        band = UHF;
        N_data = ((freq_khz - 10850) * 2) / 25;
        R_data = UHF_R_VALUE;
    }
    else
    {
        band = VHF_HI;
        N_data = (freq_khz - 10850) / 5;
        R_data = VHF_R_VALUE;
    }

    /* Write the data to the radio.
    */
    Serial.print("Band:  "); Serial.print(band);   Serial.print("\n");
    Serial.print("R:     "); Serial.print(R_data); Serial.print("\n");
    Serial.print("N:     "); Serial.print(N_data); Serial.print("\n");
    write_rn_data(band, R_data, N_data);
    Serial.print("Programming done.\n");
}

/* Loop routine.
*/
void loop()
{
}

/* Methods.
*/
void write_rn_data(int32 band, int32 R_data, int32 N_data)
{
    Serial.print("Muting audio.\n");
    mute_audio(TRUE);
    Serial.print("Setting band.\n");
    set_band(band);
    Serial.print("Writing R data.\n");
    write_r_data(R_data);
    Serial.print("Writing N data.\n");
    write_n_data(N_data);
    Serial.print("Unmuting audio.\n");
    mute_audio(FALSE);
}

void write_r_data(int32 R_data)
{
    /* Load out the 16 bits of the R register value.
    */
    for (int i = 0, j = 15; i < 16; i++, j--)
    {
        int32 mask = (1 << j);
        if ((R_data & mask) == 0)
            digitalWrite(PLL_DATA, LOW);
        else
            digitalWrite(PLL_DATA, HIGH);
        delay(1);
        digitalWrite(PLL_CLOCK, HIGH);
        delay(1);
        digitalWrite(PLL_CLOCK, LOW);
        delay(1);
    }

    /* Write out the control bit.
    */
    digitalWrite(PLL_DATA, HIGH);
    delay(1);
    digitalWrite(PLL_CLOCK, HIGH);
    delay(1);
    digitalWrite(PLL_CLOCK, LOW);
    delay(1);

    /* Latch the data.
    */
    digitalWrite(PLL_LATCH, HIGH);
    delay(1);
    digitalWrite(PLL_LATCH, LOW);
    delay(1);
}

void write_n_data(int32 N_data)
{
    /* Load out the 16 bits of the N register value.
    */
    for (int i = 0, j = 23; i < 24; i++, j--)
    {
        int32 mask = (1 << j);
        if (i < 8)
            digitalWrite(PLL_DATA, LOW);
        else if ((N_data & mask) == 0)
            digitalWrite(PLL_DATA, LOW);
        else
            digitalWrite(PLL_DATA, HIGH);
        delay(1);
        digitalWrite(PLL_CLOCK, HIGH);
        delay(1);
        digitalWrite(PLL_CLOCK, LOW);
        delay(1);
    }

    /* Write out the control bit.
    */
    digitalWrite(PLL_DATA, LOW);
    delay(1);
    digitalWrite(PLL_CLOCK, HIGH);
    delay(1);
    digitalWrite(PLL_CLOCK, LOW);
    delay(1);

    /* Latch the data.
    */
    digitalWrite(PLL_LATCH, HIGH);
    delay(1);
    digitalWrite(PLL_LATCH, LOW);
    delay(1);
}

void mute_audio(int mute_on)
{
    if (mute_on == FALSE)
        digitalWrite(MUTE, MUTE_OFF);
    else
        digitalWrite(MUTE, MUTE_ON);
    delay(1);
}

void set_band(int band)
{
    if (band == VHF_HI)
        digitalWrite(BANDSWITCH, LOW);
    else
        digitalWrite(BANDSWITCH, HIGH);
    delay(1);
}

So what’s next?  Well, the PRO-59 is limited to FM only so I think the next thing to do is feed the output from one of the IF filters to an external receiver to give all-mode reception.  After all, that was the original intention of this whole thing.

Advertisements

Comments are closed.

Tabula Candida

Doodles of a distracted historian

rtl-sdr.com

A blog about RTL-SDR (RTL2832) and cheap software defined radio

DuWayne's Place

Computers, Electronics, and Amateur Radio from KC3XM

QRP HomeBuilder - QRPHB -

Computers, Electronics, and Amateur Radio from KC3XM

Open Emitter

Computers, Electronics, and Amateur Radio from KC3XM

Ripples in the Ether

Emanations from Amateur Radio Station NT7S

m0xpd's 'Shack Nasties'

Computers, Electronics, and Amateur Radio from KC3XM

%d bloggers like this: