The personal website of Scott W Harden
May 28th, 2010

Measure QRP Radio Output Power with an Oscilloscope

I added a backlight to my oscilloscope! My o-scope's backlight hasn't worked since I got it (for $10), so I soldered-up a row of 9 orange LEDs (I had them in a big bag) and hooked them directly up to a 3v wall wart. In retrospect I wish I had a bunch of blue LEDs... but for now I can't get over how well this worked! Compare it to the images a few posts back - you can really see the grid lines now!

I know this is super-basic stuff for a lot of you all, but I haven't found a place online which CLEARLY documents this process, so I figured I'd toss-up a no-nonsense post which documents how I calculate the power output (in watts) of my QRP devices (i.e., QRSS MEPT) using an oscilloscope.

I think I have increased power output because I'm now powering my 74HC240 from this power supply (5v, 200A) rather than USB power (which still powers the microcontroller). Let's see!

There's the signal, and I haven't calibrated the grid squares (this thing shifts wildly) so I have to measure PPV (peak-to-peak voltage) in "squares". The PPV of this is about 5.3 squares.

I now use a function generator to create square waves at a convenient height. Using the same oscilloscope settings, I noticed that 10v square waves are about 7 squares high. My function generator isn't extremely accurate as you can see (very fuzzy) but this is a good approximation. I now know that my signal is 5.3/7*10 volts. The rest of the math is pictured here:

140mW - cool! It's not huge... but it's pretty good for what it is (a 2-chip transmitter). I'd like to take it up to a full watt... we'll see how it goes. My 74HC240 is totally mutilated. I accidentally broke off one of the legs, couldn't solder to it anymore, and thought I destroyed the chip. After getting distraught about a $0.51 component, I ripped ALL the legs off. Later I realized I was running out of these chips, and decided to try to revive it. I used a Dremel with an extremely small bit (similar to a quarter-round burr in dentistry) and drilled into the black casing of the microchip just above the metal contacts, allowing me enough surface area for solder to adhere to. I'm amazed it works! Now, to get more milliwatts and perhaps even watts...

Markdown source code last modified on January 18th, 2021
---
title: Measuring QRP Radio Output Power with an Oscilloscope
date: 2010-05-28 19:54:39
tags: amateur radio, circuit, old
---

# Measure QRP Radio Output Power with an Oscilloscope

__I added a backlight to my oscilloscope!__ My o-scope's backlight hasn't worked since I got it (for $10), so I soldered-up a row of 9 orange LEDs (I had them in a big bag) and hooked them directly up to a 3v wall wart. In retrospect I wish I had a bunch of blue LEDs... but for now I can't get over how well this worked! Compare it to the images a few posts back - you can really see the grid lines now!

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

[![](oscilliscope_leds_thumb.jpg)](oscilliscope_leds.jpg)
[![](qrss_qrp_circuit_scope_thumb.jpg)](qrss_qrp_circuit_scope.jpg)

</div>

__I know this is super-basic stuff__ for a lot of you all, but I haven't found a place online which CLEARLY documents this process, so I figured I'd toss-up a no-nonsense post which documents how I calculate the power output (in watts) of my QRP devices (i.e., QRSS MEPT) using an oscilloscope.

__I think I have increased power output__ because I'm now powering my 74HC240 from this power supply (5v, 200A) rather than USB power (which still powers the microcontroller). Let's see!

__There's the signal, and I haven't calibrated__ the grid squares (this thing shifts wildly) so I have to measure PPV (peak-to-peak voltage) in "squares". The PPV of this is about 5.3 squares.

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

[![](qrss_qrp_signal_thumb.jpg)](qrss_qrp_signal.jpg)
[![](10vSquare_thumb.jpg)](10vSquare.jpg)

</div>

__I now use a function generator__ to create square waves at a convenient height. Using the same oscilloscope settings, I noticed that 10v square waves are about 7 squares high. My function generator isn't extremely accurate as you can see (very fuzzy) but this is a good approximation. I now know that my signal is 5.3/7\*10 volts. The rest of the math is pictured here:

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

[![](powerCalcs_thumb.jpg)](powerCalcs.jpg)

</div>

__140mW - cool!__ It's not huge... but it's pretty good for what it is (a 2-chip transmitter). I'd like to take it up to a full watt... we'll see how it goes. My 74HC240 is totally mutilated. I accidentally broke off one of the legs, couldn't solder to it anymore, and thought I destroyed the chip. After getting distraught about a $0.51 component, I ripped ALL the legs off. Later I realized I was running out of these chips, and decided to try to revive it. I used a Dremel with an extremely small bit (similar to a quarter-round burr in dentistry) and drilled into the black casing of the microchip just above the metal contacts, allowing me enough surface area for solder to adhere to. I'm amazed it works! Now, to get more milliwatts and perhaps even watts...

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

[![](testcircuit_thumb.jpg)](testcircuit.jpg)

</div>

May 26th, 2010

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

Markdown source code last modified on January 18th, 2021
---
title: Pushing and Pulling
date: 2010-05-26 07:42:39
tags: circuit, amateur radio, old
---

# 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!

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

[![](qrss_amplified1_thumb.jpg)](qrss_amplified1.jpg)

</div>

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.

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

[![](qrss_74hc2401_thumb.jpg)](qrss_74hc2401.jpg)

</div>

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

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

[![](qrss_inPhase1_thumb.jpg)](qrss_inPhase1.jpg)

</div>

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

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

[![](qrss_out_of_phase1_thumb.jpg)](qrss_out_of_phase1.jpg)

</div>

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!

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

[![](qrss_out_of_phase_overlap1_thumb.jpg)](qrss_out_of_phase_overlap1.jpg)

</div>

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
March 10th, 2010

How to Destroy a Radio Operator

After priding myself on my ingenuity a few weeks ago for documenting my homemade stealth indoor apartment antenna for 40m and 20m, it seems that the green movement has contrived a plan to cripple my successes. So far I've made a few dozen contacts in Morse code with my humble little setup (~20 watts of power, direct conversion receiver, indoor homemade antenna). The photo shows some QSL cards I've gotten. Anyhow, my apartment manager decided that my apartment needed to have solar panels added to it. It's too early to tell for sure, but spinning the dial a few times and hearing *nothing* makes me think that it dramatically impacted my reception (and likely transmission) in a dramatic way.

There are the QSL cards I got so far:

I think the AJ4VD station has been effectively shut down!

Markdown source code last modified on January 18th, 2021
---
title: How to Destroy a Radio Operator
date: 2010-03-10 12:09:35
tags: amateur radio
---

# How to Destroy a Radio Operator

__After priding myself on my ingenuity__ a few weeks ago for documenting my [homemade stealth indoor apartment antenna for 40m and 20m](http://www.swharden.com/blog/2010-02-07-simple-diy-stealth-apartment-antenna-for-20m-and-40m/), it seems that the green movement has contrived a plan to cripple my successes. So far I've made a few dozen contacts in Morse code with my humble little setup (~20 watts of power, direct conversion receiver, indoor homemade antenna). The photo shows some QSL cards I've gotten. Anyhow, my apartment manager decided that my apartment needed to have solar panels added to it. It's too early to tell for sure, but spinning the dial a few times and hearing \*nothing\* makes me think that it dramatically impacted my reception (and likely transmission) in a dramatic way.

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

[![](before_thumb.jpg)](before.jpg)
[![](workers_thumb.jpg)](workers.jpg)
[![](after_thumb.jpg)](after.jpg)

</div>

There are the QSL cards I got so far:


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

[![](cwQsls_thumb.jpg)](cwQsls.jpg)

</div>

I think the AJ4VD station has been effectively shut down!

February 7th, 2010

Simple DIY Stealth Apartment Antenna for HF

I don't want to spend lots of money for a HF antenna, and even if I did my apartment complex wouldn't allow it! This is my story, and while I'm no expert I hope that sharing my experience will help encourage others to try crazy things in the spirit of invention. A friend loaned me a Century 21 HF CW-only transceiver which puts out ~20W. As far as an antenna, I was limited to what I could build. I tried a bunch of different designs, including a trash-brew 40m base-loaded vertical, but it didn't work that well. I found that a "contorted dipole" (I heard it's officially called a zig-zag design) strung up on my ceiling works surprisingly well. I've only had it up a few days, but from Florida I've communicated with New York on 40m at 20W and Maine on 20m using 20W. Keep in mind that I'm brand new to CW, and that 90% of the conversations out there are way too fast for me to copy, so my greatest limitation is finding a CQ slow enough that I can respond to it.

The beauty of this antenna is four-fold. First, it's cheap (a few bucks worth of parts). Second, it's off the floor and out of the way (unlike my vertical antenna designs). Third, it doesn't require a tuner to operate once it's set up. Forth, it's virtually invisible! Seriously, if you walk in my apartment you'd have no idea it's there unless someone points it out.

So, will this fly for you? That's between you and your XYL. Measurements are similar to regular dipoles (approx. quarter wavelength per leg), but I cut these long and used an antenna tuner to shorten them until I reached a 1:1 SWR. Once the SWR was set, I returned my borrowed antenna analyzer and the resulting antenna network seems pretty stable!

The physical assembly involved a package of ceiling-mount (screw-type) plant hooks and a couple packages of 50' of picture hanging wire from Target (a few bucks total). The coax to the radio is pretty straightforward. Just a short patch of cable running up to the ceiling, then the shield goes one direction (to the 3 ground wires) and the center wire goes in the other direction (to the antenna elements). Both antennas are permanently soldered together, which is fine because SWR stays low and I don't have to jumper things around when I want to change bands.

Don't get confused by those coils! They're not used for the antenna!!! They're just there to help weigh down the wire to prevent it from wobbling due to the AC. Seriously, they do nothing, you don't need them. They're not even touching the antenna! Which reminds me, the two 20m radials were made from actual wire (because I had it lying around), so they're coated in yellow. No biggie! No reason other than convenience that I didn't use the picture hanging wire. Okay, that sums it up.

I hope this information helps! If you build a similar setup, let me know - I'd love to see it. If you have questions, feel free to email me. Remember, I didn't put much math into this - I just went with approximately quarter wavelength legs and started cutting them until the SWR was down to 1:1, then I didn't adjust it any more. It's been several days and SWR seems stable, so no antenna analyzer is needed anymore. Good luck with your project, and with any luck I'll work ya' on the band. 73!

Markdown source code last modified on January 18th, 2021
---
title: Simple DIY Stealth Apartment Antenna for HF
date: 2010-02-07 17:49:49
tags: amateur radio, old
---

# Simple DIY Stealth Apartment Antenna for HF

__I don't want to spend lots of money for a HF antenna, and even if I did my apartment complex wouldn't allow it!__ This is my story, and while I'm no expert I hope that sharing my experience will help encourage others to try crazy things in the spirit of invention. A friend loaned me a Century 21 HF CW-only transceiver which puts out ~20W. As far as an antenna, I was limited to what I could build. I tried a bunch of different designs, including a [trash-brew 40m base-loaded vertical](http://www.swharden.com/blog/2010-01-30-rainy-mornings-and-boring-bicuspids/), but it didn't work that well. I found that a "contorted dipole" (I heard it's officially called a zig-zag design) strung up on my ceiling works surprisingly well. I've only had it up a few days, but from Florida I've communicated with New York on 40m at 20W and Maine on 20m using 20W. Keep in mind that I'm brand new to CW, and that 90% of the conversations out there are way too fast for me to copy, so my greatest limitation is finding a CQ slow enough that I can respond to it.

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

[![](dipole_apartment_1_thumb.jpg)](dipole_apartment_1.jpg)
[![](dipole_apartment_2_thumb.jpg)](dipole_apartment_2.png)

</div>

__The beauty of this antenna is four-fold.__ First, it's cheap (a few bucks worth of parts). Second, it's off the floor and out of the way (unlike my vertical antenna designs). Third, it doesn't require a tuner to operate _once it's set up_. Forth, it's virtually invisible! Seriously, if you walk in my apartment you'd have no idea it's there unless someone points it out.

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

[![](IMG_3084_thumb.jpg)](IMG_3084.jpg)
[![](IMG_3091_thumb.jpg)](IMG_3091.jpg)
[![](IMG_3075_thumb.jpg)](IMG_3075.jpg)
[![](IMG_3074_thumb.jpg)](IMG_3074.jpg)

</div>

__So, will this fly for you?__ That's between you and your XYL. Measurements are similar to regular dipoles (approx. quarter wavelength per leg), but I cut these long and used an antenna tuner to shorten them until I reached a 1:1 SWR. Once the SWR was set, I returned my borrowed antenna analyzer and the resulting antenna network seems pretty stable!

__The physical assembly involved__ a package of ceiling-mount (screw-type) plant hooks and a couple packages of 50' of picture hanging wire from Target (a few bucks total). The coax to the radio is pretty straightforward. Just a short patch of cable running up to the ceiling, then the shield goes one direction (to the 3 ground wires) and the center wire goes in the other direction (to the antenna elements). Both antennas are permanently soldered together, which is fine because SWR stays low and I don't have to jumper things around when I want to change bands.

__Don't get confused by those coils!__ They're not used for the antenna!!! They're just there to help weigh down the wire to prevent it from wobbling due to the AC. Seriously, they do nothing, you don't need them. They're not even touching the antenna! Which reminds me, the two 20m radials were made from actual wire (because I had it lying around), so they're coated in yellow. No biggie! No reason other than convenience that I didn't use the picture hanging wire. Okay, that sums it up.

__I hope this information helps!__ If you build a similar setup, let me know - I'd love to see it. If you have questions, feel free to email me. Remember, I didn't put much math into this - I just went with approximately quarter wavelength legs and started cutting them until the SWR was down to 1:1, then I didn't adjust it any more. It's been several days and SWR seems stable, so no antenna analyzer is needed anymore. Good luck with your project, and with any luck I'll work ya' on the band. 73!

February 2nd, 2010

Convert Text to CW Morse Code with Linux

I wanted a way to have a bunch of Morse code mp3s on my mp3 player (with a WPM/speed that I decide and I found an easy way to do it with Linux. Rather than downloading existing mp3s of boring text, I wanted to be able to turn ANY text into Morse code, so I could copy something interesting (perhaps the news? hackaday? bash.org?). It's a little devious, but my plan is to practice copying Morse code during class when lectures become monotonous. [The guy who teaches about infectious diseases is the most boring person I ever met, I learn nothing from class, and on top of that he doesn't allow laptops to be out!] So, here's what I did in case it helps anyone else out there...

Step 1: Get the Required Programs

Make sure you have installed Python, cwtext, and lame. Now you're ready to roll!

Step 2: Prepare the Text to Encode

I went to Wikipedia and copy/pasted an ENTIRE article into a text file called in.txt. Don't worry about special characters (such as " and * and #), we'll fix them with the following python script.

import os
import time
f = open("out.txt")
raw = f.read()
f.close()

cmd = """echo "TEST" | cwpcm -w 7 | """
cmd += """lame -r -m m -b 8 --resample 8 -q9 - - > text.mp3"""

i = 0
for chunk in raw.split("n")[5:]:
    if chunk.count(" ") > 50:
        i += 1
        print "nnfile", i, chunk.count(" "), "wordsn"
        do = cmd.replace("TEST", chunk).replace("text", "%02d" % i)
        print "running:", do,
        time.sleep(1)
        print "nnSTART ...",
        os.system(do)
        print "DONE"

Step 3: Generate Morse Code Audio

There should be a new file, out.txt, which is cleaned-up nicely. Run the following script to turn every paragraph of text with more than 50 words into an mp3 file...

import os
f = open("out.txt")
raw = f.read()
f.close()
cmd = """echo "TEST" | cwpcm -w 13 | sox -r 44k -u -b 8 -t raw - text.wav"""
cmd += """; lame --preset phone text.wav text.mp3; rm text.wav"""
i = 0
for chunk in raw.split("n")[5:]:
    if chunk.count(" ") > 50:
        i += 1
        print i, chunk.count(" "), "words"
        os.system(cmd.replace("TEST", chunk).replace("text", "%02d" % i))

Now you should have a directory filled with mp3 files which you can skip through (or shuffle!) using your handy dandy mp3 player. Note that "-w 13" means 13 WPM (words per minute). Simply change that number to change the speed.

Good luck with your CW practice!

Markdown source code last modified on January 18th, 2021
---
title: Convert Text to CW Morse Code with Linux
date: 2010-02-02 10:58:54
tags: amateur radio, python, old
---

# Convert Text to CW Morse Code with Linux

__I wanted a way to have a bunch of Morse code mp3s on my mp3 player (with a WPM/speed that I decide__ and I found an easy way to do it with Linux. Rather than downloading existing mp3s of boring text, I wanted to be able to turn ANY text into Morse code, so I could copy something interesting (perhaps the news? hackaday? bash.org?). It's a little devious, but my plan is to practice copying Morse code during class when lectures become monotonous. \[The guy who teaches about infectious diseases is the most boring person I ever met, I learn nothing from class, and on top of that he doesn't allow laptops to be out!\] So, here's what I did in case it helps anyone else out there...

### Step 1: Get the Required Programs

Make sure you have installed [Python](http://www.Python.org), [cwtext](http://cwtext.sourceforge.net/), and [lame](http://lame.sourceforge.net/). Now you're ready to roll!

### Step 2: Prepare the Text to Encode

I went to Wikipedia and copy/pasted an ENTIRE article into a text file called in.txt. Don't worry about special characters (such as " and \* and \#), we'll fix them with the following python script.

```python
import os
import time
f = open("out.txt")
raw = f.read()
f.close()

cmd = """echo "TEST" | cwpcm -w 7 | """
cmd += """lame -r -m m -b 8 --resample 8 -q9 - - > text.mp3"""

i = 0
for chunk in raw.split("n")[5:]:
    if chunk.count(" ") > 50:
        i += 1
        print "nnfile", i, chunk.count(" "), "wordsn"
        do = cmd.replace("TEST", chunk).replace("text", "%02d" % i)
        print "running:", do,
        time.sleep(1)
        print "nnSTART ...",
        os.system(do)
        print "DONE"
```

### Step 3: Generate Morse Code Audio

There should be a new file, out.txt, which is cleaned-up nicely. Run the following script to turn every paragraph of text with more than 50 words into an mp3 file...

```python
import os
f = open("out.txt")
raw = f.read()
f.close()
cmd = """echo "TEST" | cwpcm -w 13 | sox -r 44k -u -b 8 -t raw - text.wav"""
cmd += """; lame --preset phone text.wav text.mp3; rm text.wav"""
i = 0
for chunk in raw.split("n")[5:]:
    if chunk.count(" ") > 50:
        i += 1
        print i, chunk.count(" "), "words"
        os.system(cmd.replace("TEST", chunk).replace("text", "%02d" % i))
```

Now you should have a directory filled with mp3 files which you can skip through (or shuffle!) using your handy dandy mp3 player. Note that "-w 13" means 13 WPM (words per minute). Simply change that number to change the speed.

Good luck with your CW practice!

Pages