Wednesday, December 22, 2021

Simple Guitar Amplifier

In the world of "If you know things, you can do things," I present to you a simple guitar amplifier. Use case for this project was born out of my daughter's (KK4ECV) return home from college. While she has a small amp in her barracks room, she wanted a portable version for the road. We toyed with several ideas and designs in the weeks before her return. I wanted to put everything in a small project box. But that size only accommodated a small 8 ohm project speaker. Didn't sound too impressive. Around that time I had recalled an earlier trip to Total Wine. They have a walk-in humidor...a feature of which are empty cigar boxes for take away of a handful of cigars. I grabbed several of the wood boxes for this and future projects.


The amp circuit is a simple LM386. I used film caps as they are purported to provide better audio fidelity. I don't know if that's true, but they're the only parts I bought. The rest of the bits in pieces were in my parts boxes. 




I etched the board. My daughter soldered all but the LM386. While we both wanted a smaller form factor, both of us felt that a single 32 ohm speaker I took from a garbage picked boombox sounded the best. We opted to forgo a variable pot as the only one in the parts bin was not sufficiently linear.






Monday, November 29, 2021

Not Radio: Remote Monitoring

  1. Use Case

I'm in the process of closing on a small cabin/cottage up in NH. My use case/requirement is to build inexpensive system to monitor the site/structure when I'm out of town. Of note, the system must be:

  • Inexpensive ($15-25) and make use of as many parts on hand as possible
  • Capture video and other telemetry (temp)
  • Able to push data remote, as in beyond the local network
  • Operate off cell data or WiFi (understanding that cell data will be difficult if pushing video)
  • Relatively easy to configure

Engineering Steps

After some initial tinkering and prototyping, I figured I'd adopt the following approach:

Let's Build

1. Build prototype and determine board type. 

First step is always research. I spent hours considering board types (Arduino, Particle, Raspberry Pi) since I have examples of all of these. I eliminated Arduino early in the game as that solution required additional boards for communications, namely WiFi. My Photon Particle boards came in second. They are about 5+ years old and required some work but they might make due for the telemetry portion of the project. They do not, however, have sufficient processing power to handle video. This left me with the Raspberry Pi. I have several running around the house: Build-A-Pi for Winlink, another for tracking radiosondes launched out of IAD, and another running 24/7 as a FightAware PiAware device.     

Now, I looked at potentially repurposing the radiosondes receiver since that use is periodic. [Note, I wanted to use this as a project to not only track sondes, but estimate path and retrieve the sondes that might land on terra firma. Still haven't been able to get to this.] There is a Raspberry Pi image specifically devoted to home automation. I burned the Home Assistant image several times but could not get it running.

Instead I bought two Raspberry Pi Zero 2W's. These were, by far, the easiest to configure with the most avail code examples that I could borrow. Plus, the form factor was right on the money.
Raspberry Pi Zero 2W

2. Build video capture app on one board. Test.

I reviewed and tested several applications and images. The most promising, ContaCam seemed only to work with Windows and/or full Linux images.

I then tested Motion using several platforms. Motion is installed with the latest RPi images, so the codebase is well adopted and stable. Since I like to operate my devices headless (that is, without installing a monitor and keyboard, but instead remoting into the device), I configured this capability first. Here's a quick tutorial. I then installed/configured Motion NOT as in image, but the program itself (I never could get the slimed down MotionEye OS image to install and work correctly.) 

After installing and configuring the motion.conf files, I plugged in an old USB webcam and was off to the races. 
Camera Livestream


Once everything was running to my satisfaction, I turned on port forwarding on my router so that I could see the livestream from anywhere with a connection.

3. Build telemetry (temp, humidity) using DHT22 (b/c I have several)

My next requirement was to build something that would allow remote environmental monitoring. I have built several weather stations for the backyard, but I could never solve the power problem (operate off a battery, recharge with a solar cell. Once the temps dropped below 40F, forget about it.) Those stations were based on the DHT11 and its DHT22 cousin sensor. Only three terminals used: +3v3, GND, and Data. Data terminal uses a 10k pull up resistor.
DHT11, abt $5


In the past, I've used Thingspeak as my data repository. While several IOT repositories have gone by the wayside in the 5-6 yrs since I've messed with this stuff, Thingspeak/Mathlab is still in the business. 

After some research, I settled on using the Thingspeak library

Some helpful tools:



I sifted through enormous amounts of complex code and finally settled on my adoption of an IOT Starters version
import thingspeak
import time
import Adafruit_DHT

channel_id = 1577517 # put here the ID of the channel you created before
write_key = 'LWX0MK4IX0RLBC94' # update the "WRITE KEY"

pin = 3
sensor = Adafruit_DHT.DHT22

def measure(channel):
try:
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
tempF=(temperature * 1.8) + 32
if humidity is not None and temperature is not None:
print('Temperature = {0:0.1f}*C Humidity = {1:0.1f}%'.format(tempF, humidity))
else:
print('Did not receive any reading from sensor. Please check!')
# update the value
response = channel.update({'field1': tempF, 'field2': humidity})
except:
print("connection failure")

if __name__ == "__main__":
channel = thingspeak.Channel(id=channel_id, api_key=write_key)
while True:
measure(channel)
#free account has a limitation of 10 min (60 sec * 10 min) between the updates
time.sleep(600)

4. Combine both apps on a single board

Since the telemetry development was freshest in my head, I decided to use the working Motion program and add telemetry on a single card. I then backed up the card as an image in case of crisis.

The next very important step was to add some type of auto-starting. If the power blipped or went out, I would have no way remotely to restart programs. I tried several code samples, but settled on using .desktop files.

Here are the basic instructions from https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all ):

Create a .desktop File
You do not need root-level access to modify your profile's (user's) autostart and .desktop files. In fact, it is recommended that you do not use sudo, as you may affect the permissions of the file (e.g. the file would be owned by root) and make them unable to be executed by autostart (which has user-level permissions).

Open a terminal, and execute the following commands to create an autostart directory (if one does not already exist) and edit a .desktop file for our clock example:

mkdir /home/pi/.config/autostart
nano /home/pi/.config/autostart/clock.desktop
Copy in the following text into the clock.desktop ile. Feel free to change the Name and Exec variables to your particular application.

motion.desktop:
[Desktop Entry]
Type=Application
Name=Motion
Exec=sudo /bin/motion start

thingspeak.desktop:
[Desktop Entry]
Type=Application
Name=Thingspeak
Exec=/usr/bin/python3 /home/pi/DHT22_Thingspeak.py

5. Add web hooks for iot triggers

TBD


6. Harden system/prep for deployment


TBD


Monday, November 8, 2021

Have To Post This: You Can Now Order Pizza With Morse Code

The intersection of gaming, Morse code, and...pizza:  https://techround.co.uk/news/you-can-now-order-pizza-with-morse-code/

Wednesday, October 20, 2021

Learning from the N6QW Direct Conversion Receiver Build

 
Background

I started this project in August 2021 as a "next step" following the 40M Pebble Crusher and 10 Minute Transmitter. I needed to bridge the gap between building a transmitter and receiver with an ultimate goal of combining the two. As one would expect, this project, the N6QW DCR, helped me achieve "receiver" status; but more importantly, it provided me further experience in building. Such an experience consisted of building techniques, testing, and troubleshooting. Yes, I changed horses midstride several times regarding technique. This lengthened the project. But each evolution was well worth it in the end. 

Lastly, couldn't have done this without the help of several experienced builders. Credits at the end of this post.

My build of the N6 QW Direct Conversion Receiver:


Audio Amplifier

The AF amp was my first focus and first construction stage. Why? Well, Nick Tile (G8INE) and Tony Fishpool (G4WIF) recommended such in their notes. I think Pete Juliano (N6QW) did the same.

I built the AF amp first using perf board. I was very excited by the small footprint and such. But in the end, I could not get the stage to function. Most importantly, I found it very difficult to troubleshoot with the maze of connectors under the board. After seeing Paul Taylor (VK3HN) creating etched PCB boards by hand, I felt that I could definitely do the same. He takes a very simple approach that is easily duplicated. 

I found Tony Fishpool and Nick Tile's documentation of Pete Juliano's receiver around the same time that I started etching. I essentially used Tony and Nick's Sprint files for my layout. No need to recreate the wheel. I made some modifications here and there (like adding a voltage regulator to the AF amp). Ultimately, they're designs were very easy to follow.


 
AF Amplifier (Center)


Mixer

The mixer stage was next. Wiring-wise, this was the mist complicated. I'm still a little surprised that I pulled this one off as I used a SMD version of the 1496 Double Balanced Mixer chip. Tiny is an understatement. Like Paul Taylor suggested, I placed the chip on the PCB and made a little tiny dot at each leg of the IC. I then used a very fine Sharpie to hand trace the circuit: 


Mixer Stage Almost Finished (checking off components using Nick & Tony's schematic)


RF Amplifier

I finished the RF amplifier next. After the first few stages, the build started quickening. But I did run into two problems: how do I manage RF and power between the stages? I moved forward while contemplating this ultimately returning the the mixer and RF amp to add SMA connectors to the board. This required a little "manual" etching of the board, but it made for a clean setup.

Regarding power, I used header pins for the +12v power; ground is provided by a really big ground plan on each PCB board and two large boards connected by solder wick. And each stage is attached to the larger PCBs using solder wick. This idea is from Charlie Morris' (ZL2CTM) presentation at the 2021 GQRP convention.
RF Amp Etching

RF Amp Finished

  

VFO

Not without some frustrations, the VFO was a satisfying build: there's just something about lights and digits showing. I attempted to press an old Arduino Uno and I2C backpack into use. I never learned why and what didn't work with that combo. Instead I bought a few Arduino Nanos and several 16x2 LCDs. Based on the pins on the Ardunio and Si5351, I installed several headers on some perf board. It was just easier for working with the pins. I also had some strange stuff going on with the encoder that I solved by both 1) mounting on a board and 2) properly soldering the connections.


VFO Construction

Band Pass Filter

Probably the most unsexy portion of the build, but arguably pretty important. (Spoiler alert: I got the entire rig going, but had this really loud squeal with limited receive. At Pete's suggestion, I found this was a misaligned BPF blocking the receive and cranking up the AF gain.)

I built the BPF using the number of windings on for the appropriate toroid. I also ganged the caps to get me as close as possible to the value Pete gives in his design. I assumed that it worked having no decent way to text it. To be sure, I have a NanoNVA, but adjusting the screen was so darn hard to use. At the suggestion of Tony Fishpool or Nick Tile (I can't remember who), I used NanoVNA Saver vs. fooling with the NanoVNA proper. Found this to be an incredible advancement. 


Here's what the old BPF looked like:

Old BPF peaking at about 6.2 MHz

I confirmed this by bypassing the BPF and finding very little performance increase on receive. 

So I rebuilt the filter. I started with an extra winding on L1/L2 (24, I think, which should give me about 2.8 uH).  I also removed a few caps and added on some variable caps of unknown range. Truth be told, I just don't trust my meter. Now, Dean Souleles (KK4DAS) suggested that I take a reading on the probes of the inductors and, since I cant tare that reading, account for it in my final read. This seemed to get a lot closer. And that might all be well and good. But I also did this which was both very satisfying and instructive:
  • I kept the BPF connected to NanoVNA Saver in a constant sweep from about 6 MHz-7.5 MHz
  • I removed windings, one at a time, and resoldered to the filter board
  • I monitored the screen and watched the peak move to the right at each change. I then adjusted the var caps to modify the skirts.
  • I end up removing about three windings (20 total which ought to give me 2.0 uH according to the chart). 
This was my final result--bam!:



Here's a summary of my adjustments:

Start



Redesign




·        Used T-50-2 (20 turns) vs. T-68-2 (20 turns, 2.28 uH)

·        Fixed caps (10pF for the 7.5pF; 22pF + 47pF + 100pF ganged in the tank circuit)

  • Changed L1 and L2 to 22 turns then test/cut until peak was in center of 40m band
  • Replaced 10pf cap with 5pf + 0-20 var cap.
  • Replaced 22 pF cap inn tank circuit with 0-20 var cap
  • Replaced the BNC connector with SMA connector


Final Version



Troubleshooting/Evolutions/Lessons

The astute reader will see that this blog's title is "Learning from the N6QW DCR." This was both my purpose of this build and my experience.

After completing the build, these were my results which were "close, but no cigar" on SSB and CW:



The #1 key to fixing this: building by stages and via an al fresco/open design. Again, I used Nick and Tony's tips on troubleshooting (see document 2, Appendix, pg 12). 

Given this noise (above), Pete Juliano suggested:

  1. Tune at 100 Hz. I spotted you tuning at 1 kHz and likely your Si5351 is not calibrated and so while you read 1 kHz – that is the command to the Si5351 – the response is OFF because of the calibration. You can tune in the stations better at 100Hz.
  2. The sound quality may be improved by doing two things. The first is get a 100nF cap and solder it across the two outer terminals of the volume pot. Next get yourself one of those powered computer speaker systems and run the output through that.
  3. The signals actually should be pounding in – what are you using for an antenna?
  4. Is the BPF actually passing the 40M band. You might have to squeeze or expand the coil turns. See Bill’s Myth Buster Volume 17
  5. Is the PNP Amp working?

First, I fully detached the pot from the board. I was getting weird stuff going on as I pressed down on the pot, as if I had a bad physical and electrical connection. Now, watch what happened when I added a cap across the outer pot terminals:

I tested the RF amp and the mixer--both were doing fine. 

Nick Tile suggested more fixes which I have yet to implement:
The audio noise level only changes in the presence of a strong signal and it sounds to me like the processor working so you may have some noise on the power rails from the Arduino. I put noise filters on the supply lines, I think I used a 1mH choke in series with the line with 100nF to ground at each end on the positive rail into the processor board.

Steve brought something up a few days ago, LM380s can oscillate if pin 6 is grounded, if that is happening, you’ll see it on the o/p if you scope it, and it could be a at a surprisingly high frequency, i decoupled the audio stages pretty heavily on mine and haven’t seen it but it might be a batch/manufacturer dependent issue.

To be sure, there's more that I can do and fiddle with to improve this via trial and error and tribal knowledge. Particularly, I'd like to see if there's a way to more tightly filter out a station that seems to be across all the frequencies within the band pass. Sounds like fun to me.

Lastly, I'd like to give credit and special mention to those who contributed to this project, either knowingly or unknowingly:
  • Pete Juliano (N6QW)
  • Bill Meara (N2CQR)
  • Nick Tile (G8INE)
  • Tony Fishpool (G4WIF)
  • Paul Taylor (VK3HN)
  • Dean Souleles (KK4DAS)
  • Charlie Morris (ZL2CTM)

Wednesday, October 6, 2021

FMH Portable Operations Challenge Win!

FMH Portable Operations Challenge 2021, result

The Portable Operations Challenge 2021 took place on September 4th and 5th and the overall winner showed what can be done from a great portable location and using very low power. With just six contacts and running at one-watt CW on twenty metres, Jack Haefner NG2E took out the top spot with a grand total of 615,924 points.

His six contacts were from all around the US plus one that went all the way from his Hogback Mountain SOTA summit W4V/SH-007 in Virginia to French SOTA chaser Christian F4WBN near the French/Spanish border. All contacts took place within 32 minutes of operating, in session two of the contest.

The most efficient contact measured in kilometres per watt used was that same Virginia - France contact with 6,340 kilometres per watt achieved.

So, this year both the overall winner and the furthest km/watt contact title go to one person - Jack Haefner NG2E. WELL DONE Jack!

The number of entrants was a little disappointing. There were only eighteen, far more had been hoped for in this, the second year, of the challenge.

Of those entering however there were a wide variety of power levels and modes both from home and portable locations.

Of the eighteen entrants, fifteen were from the US, two from Europe and one from Australia.

Full results will be posted to the website in the next week.
https://foxmikehotel.com/challenge/

Ed DD5LP
OBO the FMH POC Steering Committee

Citation: FMH Portable Operations Challenge 2021, result, 6 Oct 2021, http://www.southgatearc.org/news/2021/october/portable-operations-challenge-2021-result.htm, accessed 6 Oct 2021

Monday, October 4, 2021

Stony Man (W4V/SH-002, 4012 ft) SOTA Activation

Headed out first thing Saturday AM to catch a SOTA summit. The weather has been so nice here in Virginia--70s and clear--that I just couldn't pass up the opportunity.

I would've loved to operate from the overlook, but wires and other hikers on a rocky summit do not mix. I went back down the approach trail, hung my antenna, and was operational in 15 min. 

View from Stony Man Summit

40M was pretty nice. Nothing but 559-599 there. I moved to 20M when calls fell off and grabbed Christophe in the French Pyrenees and two stations in Spain. One of those stations in Spain, EA2IF, was 229, but I could make him out.


Fifteen contacts in about 45 min to include 2 x S2S. I did, however, have a station that I just couldn't pull out. He kept on sending PASWG as his callsign. I definitely was missing a number, but it probably was a Dutch station. Couldn't log it as I couldn't verify the contact. Darn.

QSO Map

Made my way back to the car and was home by 1:15 pm. 

One of my Summit-to-Summit (S2S) contacts was AC1Z. Not my first with QSO with Bob Daniels out of NH. What I didn't realize, however, was how many summits he's activated. Look at his log over the past month or so. Looks like he's wandering through the Blue Ridge and Skyline Drive in Virginia. Now that's my idea of what I want to do when I retire....