The personal website of Scott W Harden
⚠️ Warning: This article is obsolete.
Articles typically receive this designation when the technology they describe is no longer relevant, code provided is later deemed to be of poor quality, or the topics discussed are better presented in future articles. Articles like this are retained for the sake of preservation, but their content should be critically assessed.

Pushing and Pulling

I found a way to quadruple the output power of my QRSS transmitter without changing its input parameters. Thanks to a bunch of people (most of whom are on the Knights QRSS mailing list) I decided to go with a push-pull configuration using 2 pairs of 4 gates (8 total) of a 74HC240. I'll post circuit diagrams when I perfect it, but for now check out these waveforms!

First of all, this is the waveform before and after amplification with the 74HC240. I artificially weakened the input signal (top) with a resistor and fed it to the 74HC240. For the rest of the images, the input is 5v p-p and the output is similar, so amplification won't be observed. The wave I'm starting with is the output of a microcontroller which is non-sinusoidal, but this can be fixed later with lowpass filtering.

Here you can see the test circuit I'm using. It should be self-explanatory.

Here's the output of the microcontroller compared to the in-phase output of the 74HC240

Here are the two outputs of the 74HC240. 4 of the gates are used to create output in-phase with the input, and the other four are used to create out-of-phase wave. Here are the two side by side. The top is 0 to 5v, the bottom is 0 to -5v, so we have a push-pull thing going on... woo hoo!

The waves, when overlapped, look similar (which I guess is a good thing) with a slight (and I mean VERY slight) offset of the out-of-phase signal. I wonder if this is caused by the delay in the time it takes to trigger the 74HC240 to make the out-of-phase signal? The signal I'm working with is 1MHz.

Okay, that's it for now. I'm just documenting my progress. 73

Solar Powered QRSS Transmitter

Haray! I'm making awesome progress with my QRSS transmitter design. Because my current transmitter (previous few posts) was randomly freezing-up (likely due to the oscillator stopping its oscillating due to being overloaded) so I moved the oscillator from in-chip to an external oscillator. It's been made small enough to fit in an Altoids tin, and I already tested it with the solar panel and it works! Awesome! Here are some photos. Again, when I perfect the design I'll post final schematics.

Sticking out are wires for power and an antenna on each side. The goal is to hang the device between two trees by its own antenna. That's my new chip development board. I made it with what I needed on it. It's so convenient! It uses 5v of power from the USB port too! Altogether I've tested the device and confirmed it transmits radio when the solar panel is illuminated. I'm thinking of making it more effective by adding more panels... but that's it for now!

First QRSS Spot!

I'm so excited! This little transmitter I made and programmed to transmit my call sign (AJ4VD) and a picture of a gator got its first spotting tonight! I'm so excited. It was reported by W4HBK in Pensacola, FL. It's only 300 miles away, but it's a start! I'm keeping my fingers crossed and maybe someday soon I'll hear from Europe.

⚠️ Warning: This article is obsolete.
Articles typically receive this designation when the technology they describe is no longer relevant, code provided is later deemed to be of poor quality, or the topics discussed are better presented in future articles. Articles like this are retained for the sake of preservation, but their content should be critically assessed.

Debut of the AJ4VD QRSS Gator

I re-wrote the code from the previous entry to do several things. Once of which was to make a gator rather than a fish. It's more appropriate since I'm planning on housing the transmitter at the University of Florida. To do it, I drew a gator in paint and wrote a python script to convert the image into a series of points. I'll post it later. One thing to note was that size was a SERIOUS issue. I only have two thousand bytes of code, and every point of that gator was a byte, so it was a memory hog. I helped it dramatically by using repeating segments wherever possible, and some creative math to help out the best I could (i.e., the spines on the back) Here's what it looks like, and the code below it...

#include <avr/io.h>
#include <util/delay.h>

// front top LED - PA0
// inside top LED - PA1
// inside bot LED - PA2
// front bot LED - PA3

unsigned long int t_unit; // units of time
const int tDit = 100;     //units for a dit
const int tDah = 255;     //units for a dah
char fsk;                 // degree of frequency shift to use for CW
char fsk2;                // degree of frequency shift to use for HELL

char light = 0; // which lights are on/off

void delay()
{
    _delay_loop_2(t_unit);
}

void blink()
{
    return;
    if (light == 0)
    {
        PORTA |= (1 << PA0);  //on
        PORTA |= (1 << PA1);  //on
        PORTA &= ~(1 << PA2); //off
        PORTA &= ~(1 << PA3); //off
        light = 1;
    }
    else
    {
        PORTA |= (1 << PA2);  //on
        PORTA |= (1 << PA3);  //on
        PORTA &= ~(1 << PA0); //off
        PORTA &= ~(1 << PA1); //off
        light = 0;
    }
}

void tick(unsigned long ticks)
{
    while (ticks > 0)
    {
        delay();
        delay();
        ticks--;
    }
}

void pwm_init()
{
    //Output on PA6, OC1A pin (ATTiny44a)
    OCR1A = 0x00;  //enter the pulse width. We will use 0x00 for now, which is 0 power.
    TCCR1A = 0x81; //8-bit, non inverted PWM
    TCCR1B = 1;    //start PWM
}

void set(int freq, int dly)
{
    OCR1A = freq;
    tick(dly);
}

void fish()
{
    char mult = 3;

    char f2[] = {2, 3, 4, 5, 6, 7, 4, 3, 7, 4, 7, 7, 6, 5, 4, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 4, 5, 6, 7, 8, 4, 9, 5, 9, 6, 9, 6, 9, 6, 9, 8, 8, 7, 7, 6, 5, 4, 3, 3, 3, 4, 5, 5};

    for (int i = 0; i < sizeof(f2); i++)
    {
        OCR1A = f2[i] * mult;
        blink();
        tick(20);
        OCR1A = 1 * mult;
        blink();
        tick(20);
    }

    char f3[] = {1, 2, 3, 4, 3, 2};

    char offset = 0;
    while (offset < 9)
    {
        for (char j = 0; j < 3; j++)
        {
            for (char i = 0; i < sizeof(f3); i++)
            {
                char val = (f3[i] + 5 - offset) * mult;
                if (val < mult || val > 10 * mult)
                {
                    val = mult;
                }
                OCR1A = val;
                blink();
                tick(20);
                OCR1A = 1 * mult;
                blink();
                tick(20);
            }
        }
        offset++;
    }
}

void id()
{
    char f[] = {0, 0, 1, 2, 0, 1, 2, 2, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 2, 1, 1, 0, 0};
    char i = 0;
    while (i < sizeof(f))
    {
        blink();
        if (f[i] == 0)
        {
            OCR1A = 0;
            tick(tDah);
        }
        if (f[i] == 1)
        {
            OCR1A = fsk;
            tick(tDit);
        }
        if (f[i] == 2)
        {
            OCR1A = fsk;
            tick(tDah);
        }
        blink();
        OCR1A = 0;
        tick(tDit);
        i++;
    }
}

void slope()
{
    char i = 0;
    while (i < 25)
    {
        OCR1A = 255 - i;
        i++;
    }
    while (i > 0)
    {
        i--;
        OCR1A = 255 - i;
    }
}

int main(void)
{
    DDRA = 255;
    blink();
    pwm_init();
    t_unit = 1000;
    fsk = 10;
    id(); // set to fast and ID once
          //fsk=50;//t_unit = 65536; // set to slow for QRSS
    t_unit = 60000;

    while (1)
    {
        ;
        fish();
        id();
    }

    return 1;
}
⚠️ Warning: This article is obsolete.
Articles typically receive this designation when the technology they describe is no longer relevant, code provided is later deemed to be of poor quality, or the topics discussed are better presented in future articles. Articles like this are retained for the sake of preservation, but their content should be critically assessed.

Debut of the AJ4VD QRSS Fish

Finally! After a few years tumbling around in my head, a few months of reading-up on the subject, a few weeks of coding, a few days of bread-boarding, a few hours of building, a few minutes of soldering, and a few seconds of testing I've finally done it - I've created my first QRSS transmitter! I'll describe it in more detail once I finalize the design, but for now an awesome working model. It's all digital, consisting of 2 ICs (an ATTiny44a for the PWM-controlled frequency modulation, and an octal buffer for the pre-amplifier) followed by a simple pi low-pass filter.

My desk is a little messy. I'm hard at work! Actually, I'm thinking of building another desk. I love the glass because I don't have to worry (as much) about fires. That sounds scary, I know.

This is the transmitter. The box is mostly empty space, but it consists of the circuit, an antenna connection, a variable capacitor for center frequency tuning, and a potentiometer for setting the degree of frequency shift modulation.

Yeah, that's a fishy. Specifically a goldfish (the cracker). It's made with a single tone, shifting rapidly (0.5 sec) between tones. So cool. Anyway, I'm outta here for now - getting back to the code! I think I'll try to make a gator next...

Here's the code that makes the fish. It sends my ID quickly, some fish, then my ID in QRSS speed using PWM.

#include <avr/io.h>
#include <util/delay.h>

const int tDit = 270 / 3;
const int tDah = 270;

char fsk;
unsigned long int t_unit;

void delay()
{
    _delay_loop_2(t_unit);
}

void blink()
{
    PORTA ^= (1 << 0);
    PORTA ^= (1 << 1);
    PORTA ^= (1 << 2);
    PORTA ^= (1 << 3);
}

void tick(unsigned long ticks)
{
    while (ticks > 0)
    {
        delay();
        delay();
        ticks--;
    }
}

void pwm_init()
{
    //Output on PA6, OC1A pin (ATTiny44a)
    OCR1A = 0x00;  //enter the pulse width. We will use 0x00 for now, which is 0 power.
    TCCR1A = 0x81; //8-bit, non inverted PWM
    TCCR1B = 1;    //start PWM
}

void set(int freq, int dly)
{
    OCR1A = freq;
    tick(dly);
}

void fish()
{
    char f[] = {0, 0, 0, 4, 5, 3, 6, 2, 7, 1, 5, 6, 8, 1, 8, 1, 8, 1, 8, 1, 8, 2, 7, 3, 6, 2, 7, 1, 8, 1, 8, 4, 5, 2, 3, 6, 7, 0, 0, 0};
    char i = 0;
    while (i < sizeof(f))
    {
        i++;
        OCR1A = 255 - f[i] * 15;
        blink();
        tick(20);
    }
}

void id()
{
    char f[] = {0, 0, 1, 2, 0, 1, 2, 2, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 2, 1, 1, 0, 0};
    char i = 0;
    while (i < sizeof(f))
    {
        blink();
        if (f[i] == 0)
        {
            OCR1A = 255;
            tick(tDah);
        }
        if (f[i] == 1)
        {
            OCR1A = 255 - fsk;
            tick(tDit);
        }
        if (f[i] == 2)
        {
            OCR1A = 255 - fsk;
            tick(tDah);
        }
        blink();
        OCR1A = 255;
        tick(tDit);
        i++;
    }
}

void slope()
{
    char i = 0;
    while (i < 25)
    {
        OCR1A = 255 - i;
        i++;
    }
    while (i > 0)
    {
        i--;
        OCR1A = 255 - i;
    }
}

int main(void)
{
    DDRA = 255;
    PORTA ^= (1 << 0);
    PORTA ^= (1 << 1);
    pwm_init();

    t_unit = 2300;
    fsk = 50;
    id(); // set to fast and ID once

    fsk = 50;
    t_unit = 65536; // set to slow for QRSS

    while (1)
    {
        id();
        for (char i = 0; i < 3; i++)
        {
            fish();
        }
    }

    return 1;
}
page 1, page 2, page 3, page 4, page 5, page 6, page 7, page 8, page 9, page 10, page 11, page 12, page 13, page 14, page 15, page 16, page 17, page 18, page 19, page 20, page 21, page 22, page 23, page 24, page 25, page 26, page 27, page 28, page 29, page 30, page 31, page 32, page 33, page 34, page 35, page 36, page 37, page 38, page 39, page 40, page 41, page 42, page 43, page 44, page 45, page 46, page 47, page 48, page 49
All Blog Posts