The personal website of Scott W Harden
November 14th, 2010

Improved MEPT Enclosure

I've been pretty busy lately, but I drip to the hardware store with the XYL produced a PVC enclosure that looked perfect for my ongoing MEPT (manned experimental propagation transmitter) projects. I didn't want to buy it (it was a little pricey by my standards, at $6 USD, which is about the total cost of the transmitter!) but the wife convinced me and I'm glad she did! I intended it to replace the styrofoam enclosure I had been using, but I wasn't thinking clearly and drilled holes in the box and mounted screws through them. While electrically this is a wonderful way to add antenna connections, thermally it was a bad idea. The main point of the enclosure was to be temperature stable! Oh well. I put the whole thing in the Styrofoam and as a test, I'm leaving it outside tonight. I can't wait to see how it goes! Here are some photos of the project.

Update: Even when being housed outdoors when temperature fluctuations vary greatly between day and night, this MEPT is surprisingly stable! When I open the box, it's very warm inside, so I am thinking that the voltage regulators and the MOSTFETs of the PA are heating the device nicely. Here's a capture spanning about 2 hours. The vertical height of each "V" is about 10Hz, so I estimate that for this span of time, drift is <1Hz. However, I do believe that long term (day to day) frequency stability is still not optimal, but only time will tell.

Signal report: briefly, this is my signal in Alaska courtesy of KL7UK. My signal is the V-shaped one near the bottom:

Markdown source code last modified on January 18th, 2021
---
title: Improved MEPT Enclosure
date: 2010-11-14 20:22:38
tags: qrss, amateur radio, circuit
---

# Improved MEPT Enclosure

__I've been pretty busy lately__, but I drip to the hardware store with the XYL produced a PVC enclosure that looked perfect for my ongoing MEPT (manned experimental propagation transmitter) projects. I didn't want to buy it (it was a little pricey by my standards, at $6 USD, which is about the total cost of the transmitter!) but the wife convinced me and I'm glad she did!  I intended it to replace the styrofoam enclosure I had been using, but I wasn't thinking clearly and drilled holes in the box and mounted screws through them.  While electrically this is a wonderful way to add antenna connections, thermally it was a bad idea.  The main point of the enclosure was to be temperature stable! Oh well. I put the whole thing in the Styrofoam and as a test, I'm leaving it outside tonight. I can't wait to see how it goes!  Here are some photos of the project.

<div class="text-center img-border">

[![](IMG_4526_thumb.jpg)](IMG_4526.jpg)
[![](IMG_4534_thumb.jpg)](IMG_4534.jpg)
[![](IMG_4547_thumb.jpg)](IMG_4547.jpg)
[![](IMG_4548_thumb.jpg)](IMG_4548.jpg)

</div>

__Update:__ Even when being housed outdoors when temperature fluctuations vary greatly between day and night, this MEPT is surprisingly stable! When I open the box, it's very warm inside, so I am thinking that the voltage regulators and the MOSTFETs of the PA are heating the device nicely.  Here's a capture spanning about 2 hours. The vertical height of each "V" is about 10Hz, so I estimate that for this span of time, drift is <1Hz.  However, I do believe that long term (day to day) frequency stability is still not optimal, but only time will tell.

<div class="text-center img-border">

[![](qrss_stable_thumb.jpg)](qrss_stable.jpg)

</div>

__Signal report__: briefly, this is my signal in Alaska courtesy of KL7UK. My signal is the V-shaped one near the bottom: 

<div class="text-center img-border">

[![](KL7UK_alaska_thumb.jpg)](KL7UK_alaska.jpg)

</div>
August 27th, 2010

Hacking Together a Crystal Oven Part 2

With the last post's promising results, I set out to finish my crystal oven prototype and affix it to my QRSS MEPT prototype. If everything works well, I'm ready to publish the final schematic and parts lists! (and make several MEPTs for people who were interested in having one). I'm not confident my approach to the heater was the best, and am already thinking of ways I could have improved on its performance, but I think this just might work! I'll test it overnight (Styrofoam-enclosed vs. open air) and see how it does. I wonder if this is good enough to be used outside?

Markdown source code last modified on January 18th, 2021
---
title: Hacking Together a Crystal Oven Part 2
date: 2010-08-27 19:21:25
tags: circuit, qrss, old, microcontroller
---

# Hacking Together a Crystal Oven Part 2

__With the last post's promising results,__ I set out to finish my crystal oven prototype and affix it to my QRSS MEPT prototype. If everything works well, I'm ready to publish the final schematic and parts lists! (and make several MEPTs for people who were interested in having one). I'm not confident my approach to the heater was the best, and am already thinking of ways I could have improved on its performance, but I think this just might work! I'll test it overnight (Styrofoam-enclosed vs. open air) and see how it does. I wonder if this is good enough to be used outside?

![](https://www.youtube.com/embed/uVluqDqQZX0)

<div class="text-center img-border">

[![](IMG_3805_thumb.jpg)](IMG_3805.jpg)
[![](IMG_3824_thumb.jpg)](IMG_3824.jpg)
[![](IMG_3829_thumb.jpg)](IMG_3829.jpg)
[![](IMG_3832_thumb.jpg)](IMG_3832.jpg)
[![](IMG_3838_thumb.jpg)](IMG_3838.jpg)
[![](IMG_3848_thumb.jpg)](IMG_3848.jpg)

</div>

</li></ul>

August 26th, 2010

Minimalist Crystal Oven

So I'm working on building a crystal oven to keep my QRSS MEPT (radio transmitter) at an extremely stable frequency. Even inside a thick Styrofoam box, slight changes in my apartment temperature caused by the AC turning on and off is enough to change the crystal temperature of the transmitter, slightly modifying its oscillation frequency. For a device that vibrates exactly 10,140,070 times a second, even 3 to many or too few vibrations per second is too much. Keeping in the spirit of hacking things together with a minimum of parts, this is what I came up with!

It uses a thermistor, potentiometer, and comparator of a microcontroller (ATTiny44a) to tightly sense and regulate temperature. The heater element is a junk MOSFET I found in an old battery backup system. I simply have pass a ton of current (turned on/off by the gate) to generate heat, transferred into a piece of steel for smooth regulation. One of the unexpected advantages is that the light flickers rapidly near equilibrium, which is great because it has the ability to turn the heater on a little or a lot based upon the averaging effect of the flicker. Here is the code I wrote on the microcontroller to handle the comparator. It couldn't be simpler!

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

int main(void)
{
    DDRA = 0;   // all inputs
    DDRB = 255; // all outputs

    while (1)
    {
        if (ACSR & _BV(ACO))
        {
            /* AIN0 is more positive than AIN1 right now */
            PORTB |= (1 << PB0);
            PORTB &= ~(1 << PB1);
        }
        else
        {
            /* AIN0 is more negative than AIN1 */
            PORTB |= (1 << PB1);
            PORTB &= ~(1 << PB0);
        }
    }
}
Markdown source code last modified on January 18th, 2021
---
title: Minimalist Crystal Oven
date: 2010-08-26 10:40:16
tags: circuit, qrss, old, microcontroller
---

# Minimalist Crystal Oven

__So I'm working on building a crystal oven__ to keep my QRSS MEPT (radio transmitter) at an extremely stable frequency. Even inside a thick Styrofoam box, slight changes in my apartment temperature caused by the AC turning on and off is enough to change the crystal temperature of the transmitter, slightly modifying its oscillation frequency. For a device that vibrates exactly 10,140,070 times a second, even 3 to many or too few vibrations per second is too much. Keeping in the spirit of hacking things together with a minimum of parts, this is what I came up with!

![](https://www.youtube.com/embed/P3tmFMWZn90)

__It uses a thermistor, potentiometer, and comparator of a microcontroller (ATTiny44a)__ to tightly sense and regulate temperature. The heater element is a junk MOSFET I found in an old battery backup system. I simply have pass a ton of current (turned on/off by the gate) to generate heat, transferred into a piece of steel for smooth regulation. One of the unexpected advantages is that the light flickers rapidly near equilibrium, which is great because it has the ability to turn the heater on a little or a lot based upon the averaging effect of the flicker. Here is the code I wrote on the microcontroller to handle the comparator. It couldn't be simpler!

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

int main(void)
{
    DDRA = 0;   // all inputs
    DDRB = 255; // all outputs

    while (1)
    {
        if (ACSR & _BV(ACO))
        {
            /* AIN0 is more positive than AIN1 right now */
            PORTB |= (1 << PB0);
            PORTB &= ~(1 << PB1);
        }
        else
        {
            /* AIN0 is more negative than AIN1 */
            PORTB |= (1 << PB1);
            PORTB &= ~(1 << PB0);
        }
    }
}
```

August 24th, 2010

Lost Project Revisited on HackADay

I somehow forgot about a cool project I made over a year ago! I guess dental school got in the way of my productivity. It's a little ironic how the last post was about something I made a year ago screwing up, and this one is about something I made a year ago turning out well! Anyhow, the world's only battery powered microcontroller based handheld prime number generator I made last year (documented here, here, and here) got some new exposure this morning when it was posted on HackADay.com!

I'm absolutely amazed by how much I learned back in the days when I was working with electronics in the weeks before I began dental school. Perhaps it's also ironic that my learning decreased dramatically once I resumed graduate school... To give you an idea of how early in my electronics exploration this project was, look at the wires... they're made from phone cord! I had no wire at my apartment, so I had to scavenge it from whatever I could find, and I ended-up buying a 50ft phone cord at Wall-Mart (super-cheap I'd imagine) and harvesting the colored wires inside.

The code is a joke. There's no reason for this thing to generate numbers rapidly, so I used the absolute-slowest method for detecting primes possible. The schematic is a joke too. There's hardly enough current to ignite those LEDs! Notice how the video had to be filmed in a dark room. Ironically enough also, the crystal isn't even being used! It's just for show! I'm confident I never changed the ATTiny2313's fuse bits to rely on th external crystal, so it's probably running on the 4MHz internal RC oscillator (perhaps with the /8 fuse set by default, so 500kHz?)

Markdown source code last modified on January 18th, 2021
---
title: Lost Project Revisited on HackADay
date: 2010-08-24 21:22:37
tags: circuit, old
---

# Lost Project Revisited on HackADay

__I somehow forgot about a cool project I made over a year ago!__ I guess dental school got in the way of my productivity. It's a little ironic how the last post was about something I made a year ago screwing up, and this one is about something I made a year ago turning out well!  Anyhow, the world's only battery powered microcontroller based handheld prime number generator I made last year (documented [here](http://www.swharden.com/blog/2009-06-10-primary-prototype-complete/), [here](http://www.swharden.com/blog/2009-06-04-prime-prototype-construction/), and [here](http://www.swharden.com/blog/2009-06-07-mcppng-nearing-completion/)) got some new exposure this morning when it was posted on [HackADay.com](http://www.HackADay.com)! 

<div class="text-center img-border img-small">

[![](hackaday_swharden_primes_thumb.jpg)](hackaday_swharden_primes.jpg)

</div>

__I'm absolutely amazed by how much I learned__ back in the days when I was working with electronics in the weeks before I began dental school.  Perhaps it's also ironic that my learning decreased dramatically once I resumed graduate school... To give you an idea of how early in my electronics exploration this project was, look at the wires... they're made from phone cord! I had no wire at my apartment, so I had to scavenge it from whatever I could find, and I ended-up buying a 50ft phone cord at Wall-Mart (super-cheap I'd imagine) and harvesting the colored wires inside.

<div class="text-center img-border">

[![](img_2098_thumb.jpg)](img_2098.jpg)
[![](img_2119_thumb.jpg)](img_2119.jpg)
[![](img_2137_thumb.jpg)](img_2137.jpg)

</div>

__The code is a joke.__ There's no reason for this thing to generate numbers rapidly, so I used the absolute-slowest method for detecting primes possible. The schematic is a joke too.  There's hardly enough current to ignite those LEDs! Notice how the video had to be filmed in a dark room.  Ironically enough also, the crystal isn't even being used! It's just for show! I'm confident I never changed the ATTiny2313's fuse bits to rely on th external crystal, so it's probably running on the 4MHz internal RC oscillator (perhaps with the /8 fuse set by default, so 500kHz?)

![](https://www.youtube.com/embed/k4Req0I7lbY)
June 6th, 2010

QRSS DNA

I'm still working on this project, and although progress is slow I'm learning a lot and the circuit is getting better with time. I'm still not yet ready to post the schematics, but you can get an idea of what's going on from the picture. It can handle 255 levels of frequency shift and has the ability to turn the tone on and off. 6 capacitors, 3 resistors, 4 transistors, a single inductor, and a micro-controller.

UPDATE I spotted myself on W4BHK's Grabber about 300 miles away...

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

char dotlen = 5;                              // ultimately the speeed of transmission
char call[] = {0, 1, 1, 1, 2, 0, 2, 1, 1, 0}; // 0 for space, 1 for dit, 2 for dah

void setfor(char freq, char ticks)
{
    OCR1A = freq;
    while (ticks > 0)
    {
        sleep();
        ticks--;
    }
}

void sleep()
{
    for (char i = 0; i < dotlen; i++)
    {
        _delay_loop_2(65000);
    }
}

void slideto(char freq, char ticks)
{
    freq = freq + 30;
    char step = 1;
    if (OCR1A > freq)
    {
        step = -1;
    }
    while (OCR1A != freq)
    {
        OCR1A += step;
        setfor(OCR1A, 1);
    }
    setfor(freq, ticks);
}

void DNA()
{
    char a[] = {4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3};
    char b[] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0};
    for (char i = 0; i < sizeof(a); i++)
    {
        //slideto(a[i]*4,2);
        //slideto(b[i]*4,2);
        setfor(a[i] * 2 + 5, 10);
        setfor(b[i] * 2 + 5, 10);
    }
}

void ID()
{
    for (char i = 0; i < sizeof(call); i++)
    {
        setfor(10, 50);
        if (call[i] == 0)
        {
            setfor(10, 100);
        }
        if (call[i] == 1)
        {
            setfor(15, 100);
        }
        if (call[i] == 2)
        {
            setfor(15, 250);
        }
        setfor(10, 50);
    }
}

void ID2()
{
    for (char i = 0; i < sizeof(call); i++)
    {
        if (call[i] == 0)
        {
            ampOFF();
            setfor(10, 50);
        }
        if (call[i] == 1)
        {
            ampON();
            setfor(10, 100);
        }
        if (call[i] == 2)
        {
            ampON();
            setfor(13, 100);
        }
        ampOFF();
        setfor(OCR1A, 30);
    }
    ampON();
}

void ampON()
{
    PORTA |= (1 << PA7);
    PORTA |= (1 << PA0);
    PORTA &= ~(1 << PA1);
    _delay_loop_2(10000);
}
void ampOFF()
{
    PORTA &= ~(1 << PA7);
    PORTA |= (1 << PA1);
    PORTA &= ~(1 << PA0);
    _delay_loop_2(10000);
}

int main(void)
{
    DDRA = 255;
    OCR1A = 75;
    TCCR1A = 0x81;
    TCCR1B = 1;
    while (1)
    {
        ID2();
        ID();
        for (char i = 0; i < 3; i++)
        {
            DNA();
        }
    }
}
Markdown source code last modified on January 18th, 2021
---
title: QRSS DNA
date: 2010-06-06 19:15:58
tags: microcontroller, circuit, qrss, old
---

# QRSS DNA

__I'm still working on this project,__ and although progress is slow I'm learning a lot and the circuit is getting better with time. I'm still not yet ready to post the schematics, but you can get an idea of what's going on from the picture. It can handle 255 levels of frequency shift and has the ability to turn the tone on and off. 6 capacitors, 3 resistors, 4 transistors, a single inductor, and a micro-controller.

<div class="text-center img-border">

[![](DSCN0776_thumb.jpg)](DSCN0776.jpg)
[![](OnOffDNA_thumb.jpg)](OnOffDNA.png)
[![](dnareport_thumb.jpg)](dnareport.jpg)

</div>

__UPDATE__ I spotted myself on [W4BHK's Grabber](http://www.qsl.net/w4hbk/W4HBKgrabber.html) about 300 miles away...

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

char dotlen = 5;                              // ultimately the speeed of transmission
char call[] = {0, 1, 1, 1, 2, 0, 2, 1, 1, 0}; // 0 for space, 1 for dit, 2 for dah

void setfor(char freq, char ticks)
{
    OCR1A = freq;
    while (ticks > 0)
    {
        sleep();
        ticks--;
    }
}

void sleep()
{
    for (char i = 0; i < dotlen; i++)
    {
        _delay_loop_2(65000);
    }
}

void slideto(char freq, char ticks)
{
    freq = freq + 30;
    char step = 1;
    if (OCR1A > freq)
    {
        step = -1;
    }
    while (OCR1A != freq)
    {
        OCR1A += step;
        setfor(OCR1A, 1);
    }
    setfor(freq, ticks);
}

void DNA()
{
    char a[] = {4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3};
    char b[] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0};
    for (char i = 0; i < sizeof(a); i++)
    {
        //slideto(a[i]*4,2);
        //slideto(b[i]*4,2);
        setfor(a[i] * 2 + 5, 10);
        setfor(b[i] * 2 + 5, 10);
    }
}

void ID()
{
    for (char i = 0; i < sizeof(call); i++)
    {
        setfor(10, 50);
        if (call[i] == 0)
        {
            setfor(10, 100);
        }
        if (call[i] == 1)
        {
            setfor(15, 100);
        }
        if (call[i] == 2)
        {
            setfor(15, 250);
        }
        setfor(10, 50);
    }
}

void ID2()
{
    for (char i = 0; i < sizeof(call); i++)
    {
        if (call[i] == 0)
        {
            ampOFF();
            setfor(10, 50);
        }
        if (call[i] == 1)
        {
            ampON();
            setfor(10, 100);
        }
        if (call[i] == 2)
        {
            ampON();
            setfor(13, 100);
        }
        ampOFF();
        setfor(OCR1A, 30);
    }
    ampON();
}

void ampON()
{
    PORTA |= (1 << PA7);
    PORTA |= (1 << PA0);
    PORTA &= ~(1 << PA1);
    _delay_loop_2(10000);
}
void ampOFF()
{
    PORTA &= ~(1 << PA7);
    PORTA |= (1 << PA1);
    PORTA &= ~(1 << PA0);
    _delay_loop_2(10000);
}

int main(void)
{
    DDRA = 255;
    OCR1A = 75;
    TCCR1A = 0x81;
    TCCR1B = 1;
    while (1)
    {
        ID2();
        ID();
        for (char i = 0; i < 3; i++)
        {
            DNA();
        }
    }
}
```

Pages