Thursday, April 16, 2026

Common Mode Current Choke

Common mode current (CMC) is current that flows along the outer shield (braid) of coaxial cable used as a feedline for driving certain types of antennas.  It is undesirable because it can introduce EMI inside the home environment affecting not only your transmitter/transceiver but other nearby electronics as well.

By increasing the impedance along the outer shield, the current is effectively "choked", and the problem is reduced or eliminated.  This can be accomplished by placing ferrite beads around the outside of the coax or wrapping the coax itself around a toroid to increase the inductive reactance.  Note that the inner conductor and inner shield current paths of the coax are not affected.

I decided to go the toroid route for my project.  I used a 4' length of RG58 and wrapped it around an FT240-43 toroid twelve times.  This particular toroid is a type commonly used for the HF amateur bands (3-30MHz).

Next, I measured the attenuation by connecting it to my vector network analyzer.  From 3 to 20MHz the attenuation was at least 30dB (ie a 1/1000th reduction). The minimum attenuation occurred at 30MHz but was still greater than 25dB.  Objective achieved.

Attenuation achieved with RG58 coax w/ toroid (12 turns)


As a baseline for comparison I then took a short piece of the same type of coax (without using a toroid) and measured its attenuation.  The maximum value was under 7dB.  Obviously, quite useless as a choke.

Attenuation achieved with RG58 coax only (no toroid)

Finally, the completed choke was installed inside a water resistant case and inserted in-line with my feedline.

Completed CMC choke in water resistant case




 

Thursday, February 12, 2026

WSPR Transmitter

WSPR (Weak Signal Propagation Reporter), is a digital radio protocol designed for probing potential propagation paths using very low-power transmissions. Developed in 2008 by Nobel Prize-winning physicist Joe Taylor, K1JT, it is a useful tool for amateur radio operators to test antennas and global band conditions.

After reading about this and finding out how little it would cost to take the plunge, I started looking into setting up a basic station and eventually came across a series of kits from QRP-LABS.  Unfortunately, once it arrived it sat on my workbench for quite some time while I moved on to other things. Well, I have finally completed the assembly and wrapped up my initial tests.

My particular kit consists of the control unit (which provides a user interface for entering and customizing various parameters such as operating modes, transmit frequencies, etc.), a clock generator for square wave synthesis, a GPS receiver for precise timing of the transmissions and several filters for the various amateur bands of interest (I chose 10m, 15m, 20m, 30m, 40m and 80m).

After winding the toroids for each filter, I made a final check of their inductance values before soldering them into place.  I made these measurements with a NanoVNA-H4 that I purchased as a gift to myself for Christmas. This amazing device can be used for numerous tasks around the workshop (measuring antenna characteristics such as resonance, SWR and return loss, measuring unknown L/C values and evaluating filters, to name just a few) and all for under $100.

The output power for each band is summarized below (measured with a scope and terminated with a 50-ohm dummy load):

80m - 160mW
40m - 170
30m - 180
20m - 140
15m - 125
10m - 080

Below are images of three of the six filters (10m, 15m and 30m) showing the passband characteristic of each along with the corresponding sinusoidal output.  The vertical gray bar in each passband image shows the actual transmit frequency range.

10m LPF

28.126MHz carrier


15m LPF











30m LPF


Sunday, February 16, 2025

Kitchen Timer

I built this handy little kitchen gadget after my wife mentioned she wanted a regular timer that also gave the current time. The result is a combination analog clock and timer with built-in preset values of 1, 2, 3, 5, 10, 15, 20 and 30 minutes.  When the clock screen is touched it displays the preset choices.  One more touch starts the appropriate timer.  The hardware platform consists of a Seeed Studios  1.28" round display with touchscreen capability for the user interface and a XIAO ESP32C3 controller board with Wi-Fi capability for driving the display.  The clock is synchronized to an NTP server thus giving it extreme accuracy.  To finish up the hardware I just needed to add a buzzer to indicate the end of a timing event.  

I used a free and open-sourced graphics library called LVGL ("light and versatile graphics library") for my user interface.  Its incredibly easy to use (after getting through a rather steep learning curve) and really makes the display interface a snap.  All display activities including screen changes, touchscreen support, screen updates, etc. are processed in the background via an event handler which runs every few milliseconds.  Once a timer value has been selected and it times out, another touch of the screen will turn off the buzzer and a new screen pops up to display a random haiku along with some lovely Japanese artwork.  After fifteen seconds the display returns back to the clock screen.

Finally, instead of building my own enclosure, I was very fortunate to find a nifty 3-D printer plan on the web and had that made by an Asian fab house to complete the project.  Below are pictures of the various display screens:

Screen 1 - Analog Clock
Screen 2 - Presets #1

Screen 3 - Presets #2
Screen 4 - Haiku







Wednesday, April 12, 2023

Haiku Display Console

My next project started out as a standalone unit (ie. battery powered) for displaying haikus.  These are poetic forms of Japanese origin that consist of three lines that follow a five-seven-five format (five syllables in the first line, seven in the second and five in the third).  Since I wanted it to be battery driven, I chose an e-Paper display. These displays are ultra-thin, low power units that will hold an image or text for long periods of time without power.  Perfect for my needs. I chose an ESP32 board for my controller because of its Wi-Fi capability and its large memory capacity for holding potentially dozens of haikus.

Initially I planned to incorporate the sleep functionality of the ESP32 to minimize battery drain.  The controller would select a haiku at random and display it, go to sleep for two hours, wake up, display another haiku, go to sleep again,  and so on.  Also, since this type of display needs ambient light to work, it didn't make much sense to keep it running 24hrs a day since the room it was going to be placed in would be dark in the evenings.  Therefore, I planned to put the unit to sleep during the evening and early morning hours (again, to save the battery). 

After writing the code and using a public domain library to interface with the display, I ran some tests to see how long it would work on a fully charged battery.  After about four months it finally stopped running.  I didn't count on the fact that periodically checking the time online would drain the battery so quickly.  Ultimately, I made the decision to scrap the battery idea and use a wall mounted unit for my power source.  This had the added benefit of eliminating the hassle involved in having to keep recharging the battery 3-4 times a year.

To complete the project, I made a custom enclosure out of maple and wormy chestnut to hold the display upright while keeping the electronics hidden underneath.  A few weeks after finishing up, my wife and I both got inspired to write a few of our own haikus while hiking around the Blue Ridge Parkway.  I uploaded these into the controller chip and we now look forward to seeing one of our poems randomly "popup" on the screen from time to time.

A "traditional" Japanese haiku

A haiku written by my wife











Side view showing display thickness

Sunday, August 29, 2021

Programmable Timer Using an ATtiny45

I've been wanting to be build a simple timer ever since I got my amateur radio license a few years back.  FCC regulations state that your call sign must be transmitted at the start and end of each transmission and at least once every ten minutes during a call.  My original idea was to use a simple 555 timer to drive a binary counter which would activate an LED upon timeout.  I toyed around with it for a couple of years and had a circuit sketched out but never followed through with it for various reasons.  Fast forward to 2021 when I came across a project someone had created using an ATtiny85 microcontroller.  I'd never heard about these devices before but immediately thought it would be a perfect solution for my timer.

The ATtiny series of chips are 8-bit microcontrollers that fit within an 8-pin DIP footprint.  The ATtiny45 is the one I decided upon using. It has 4096 bytes of flash memory for holding a small program, 256 bytes of EEPROM, 5 useable I/O pins, interrupt capability, etc., etc.  In other words, a very powerful little device contained in a very small package. Another nice feature is its ability to work down to 2.7v.  This allowed me to use a single, 3v coin cell battery as my power source.

Because of its capabilities I decided to expand on my original idea of having a fixed timing function.  The result is a timer that can be programmed from 1 to 255 minutes while driving 2 LEDS.  The countdown function begins when the "timer" button is momentarily pressed.  A green LED then comes on briefly at the top of every minute to indicate countdown activity.  When the elapsed time gets down to 30 seconds the green LED starts flashing on and off.  If, during the countdown period the "timer" button is pushed again, the countdown event starts over.  Otherwise, upon timeout, the red LED comes on.

To set the time, the "timer" button is pushed and held in.  The green LED will then flash on and off representing the number of minutes to countdown for future timing events.  When the button is released, the minute value is then stored in nonvolatile memory (EEPROM) for future reference.

The entire program only occupies 802 bytes of memory.  One other nice feature I included was a clever power on/delayed off circuit I discovered on a YouTube video (Power On Off Shutdown).  It uses a momentary pushbutton, and two MOSFET transistors (along with the ATtiny45).  Push the button once and power is immediately applied to the chip.  Push it again and power is removed after a short delay to allow for processing of any internal housekeeping tasks.  In my case, when I detect a power down request, I flash the red LED twice as an acknowledgement then shut down.

I used EasyEDA software for laying out the circuit board and had the board manufactured by JLCPCB. The board arrived in about a week.  I built the enclosure from pine which I hollowed out to hold and secure the battery.


The "brains" of the timer




Friday, May 21, 2021

Nixie Tube Clock (or Revisiting the 70s)

I built my first digital clock back in the mid 70s.  It was a Heathkit of course (one of many I built as a teen) and it had a cool looking Nixie-like display.  Fast forward to today when I recently came across a YouTube video featuring a clock with real Nixie tubes.  Most of the tubes available today were manufactured back in the 70s and 80s for instrumentation, test equipment, etc. but apparently there has been a revival of these devices for digital clocks in particular so I thought why not go for it.  The first challenge was locating the tubes but that actually proved easier than I thought thanks to eBay.  I found four tubes from a Russian seller (type IN-8) which were labeled as NOS (new old stock) for $75.00.  These are high voltage devices (upwards of 170VDC or more needed for activating the internals).   To avoid having to scratch build a supply, I decided to purchase one (again from eBay).  A detailed description of the boost converter kit I bought can be found at Threeneuron's Pile o'Poo.  Below is the finished board:

Pretty nifty little device and it only takes up a bit more than one square inch of space.

Next came the components needed to control the clock functions and drive the displays.  I chose an ESP8266 based WiFi module for the controller (ESP8266DevKitC-02D).  The controller periodically retrieves the time from an NTP server, then converts it into four bytes (32 bits) and outputs it via an SPI interface to a serial to parallel logic converter (HV5530).  This particular converter has 32 channels, each capable of handling up to 300V, so it worked perfectly for my application.  

To the right is the controller and voltage regulator along with the various wiring harnesses needed to connect with the display circuit board.  The blue section to the right of the controller is the WiFi antenna.

One minor issue cropped up when using this particular controller and driver and that involved their respective supply voltages.  The ESP8266 is a 3.3v device while the HV5530 uses 12v.  Therefore, to connect the two a level shifter is required.  This was easily solved by using an N-channel MOSFET and two pullup resistors for each control line (shown below):

Level shifter

One issue that all Nixie tubes have in common is something called "cathode poisoning".  As the individual digits (cathodes) are turned on, they emit microscopic particles which can coat the unlit elements.  Over time, enough material can coat the other cathodes to the point that they start to go dim.  To reduce this effect, an anti-poisoning routine is needed in software.  By turning on each digit in rapid succession over a given period of time, the poisoning process can be minimized.  So, prior to turning the tubes off for good each night, I run my routine for sixty seconds, then shut down (I decided to turn off the tubes at 11:00p to help lengthen their useful life which is stated to be in the neighborhood of 10,000 hours.  I have read, however, that the posted numbers for these tubes is very much on the conservative side but why take any chances?).

A circuit with this many components required a custom printed circuit board so instead of rolling my own,  I used EasyEDA software to create the schematic and then layout the components.  The gerber/drill files generated by the software were then emailed to JLCPCB, a PCB fab house in HongKong.  I received my board in less than 2 weeks (actually, the minimum number of boards that can be ordered is five but total cost including shipping was only $15.00 so no complaints from me).  Here is an image of an early board created by the PCB software after I made an initial component placement:

Early PC board prototype

For comparison, here is the actual board I received from the fab house along with a few components I soldered on:

Bottom view - partially populated PC board

A couple of minor changes noted between the blue and green board images are due to updates I made to the schematic later on.  I decided to add a neon tube between the hour and minute Nixie tubes to act as a colon and I also realized I didn't need one of the voltage level shifters after all.  For what its worth, the 44-pin chip was a real bear to solder in.  Not my best soldering job but it works.  The finished board is seen below (I left off one tube to show the backlight LED found under each tube:

Top view - showing a backlight LED
To wrap things up I decided to make my own enclosure and chose maple and walnut because I thought  the contrasting colors would look nice.  All pieces came from 1/4" stock.

I used double sided carpet tape to attach the top piece and screws for the bottom piece.  A clear finish of linseed oil was then applied to protect and beautify the wood.

Time (designated by colon off)

Date (designated by colon on)

Display elements highlighting differences in depth

Rear view



Update (Sep 2023)
Currently, the display is only on between the hours of 8:00a and 11:00p to prolong tube life.  This is true regardless of whether the room its located in is occupied or not.  I decided to go one step further in my quest to improve tube longevity by adding a light sensor.  This was easily achieved by adding a photo detector and resistor combination connected to the controller's ADC input.  A low light condition results in a low voltage reading (ie. counts) on the analog input while a high light condition results in a high voltage reading.  Now, whenever the room light is turned off (indicating the absence of a person) the display will also turn off.  Conversely, when someone enters the room and turns on the light the display will turn on.

Tuesday, March 16, 2021

Bird Cam

One of my wife's hobbies is watching and sketching birds.  We even installed a bird feeder outside of our bedroom window so that she could periodically look for any bird activity.  I eventually realized that she could accomplish the same thing if we had a camera trained on the feeder and then watch the live stream on her iPad.  I had been reading about the ESP32-Cam modules lately and thought this might be a good opportunity (ie. excuse) to build something for her.

To power the unit I used a 6v solar panel I happened to have lying around and hooked that to a solar powered battery charger (Lipo charger).  The charger connects to two parallel configured 3.7v Lipo batteries which in turn provide the input voltage needed to drive a 3.3v LDO voltage regulator.  A simplified schematic is shown below:


I used an onboard ADC channel to continually monitor the battery voltage.  Since the maximum allowed ADC input level of an ESP32 is 3.3v and the maximum expected battery voltage is 4.2v, I had to add a simple voltage divider to scale down the voltage level.   When or if the battery voltage ever drops below a preset level (3.7v in this case), the unit will shut down to conserve power.  In shut down mode (actually called "deep sleep mode"), the module draws ~4mA whereas when fully active the current draw can exceed 250mA.  After a specified number of hours the unit will "wake up", hopefully under conditions suitable for battery charging.  The electronics along with both batteries are installed in a waterproof enclosure with a clear cover (shown on the right minus the cover).

The location of the feeder I'm using this camera with is quite a distance from our router, so I'm having some issues right now with signal strength.  Therefore, I will probably be adding an external WiFi antenna in the near future to boost signal levels.

Here is a recent visitor enjoying a snack:










Update (June 2021)
Two changes were incorporated:

1) After putting up with slow and intermittent browser response times I finally decided to add the aforementioned external antenna.  This seems to have done the trick and browser interaction is now much more robust.

2) The Lipo battery power system I was using was not able to reliably supply the camera module with enough power to operate.  We get a lot of cloudy and rainy weather during parts of the year and when that occurs the batteries never seem to reach a fully charged state.  Couple that with the high current demands of the camera and well, things just kept shutting down.  I solved this by replacing the batteries and charging system with a 5v wall unit.  This eliminated the unit's portability (unfortunately) but definitely improved its reliability. 

Sunday, September 27, 2020

Weather Station - Finale

For several months I've been exploring various ways of gathering and displaying all of my environmental data.  Well I'm now ready to wrap this project up.  The final two pieces are a wind speed sensor and a new rain gauge.  I chose an ESP32 module for processing the incoming data and hooked it up to a .96" OLED display.  The image below shows the completed unit w/o the clear top installed.  The pushbutton on the left allows me to switch between metric and English units of measure.  An external, four channel analog to digital converter sits to the right of the ESP32.

I purchased the anemometer from Adafruit (anemometer).  It outputs a voltage that's proportional to the wind speed and connects to one of the  analog inputs of the ESP32.  However, after several attempts I finally gave up on using the internal ADC.  I didn't know at the time but it turns out that problems with this feature were well documented on the internet so I decided to go with an external ADC (ADS1115) instead.  This seemed to solve all of my problems and I'm happy with the results.

The rain gauge came from a source off of eBay and is mechanical in operation (my previous gauge was electronic but never really performed like I wanted).  As water enters the unit it causes a collector to fill with water.  When the collector is full it tips over (tilts) and empties its contents.  Each tilt forces a reed switch to momentarily close via a magnet attached to the collector arm.  This switch closure is easily monitored by a GPIO pin on my Raspberry Pi (see "Data Logging with a Raspberry Pi").  The number of tilts are counted and converted to an equivalent depth.  The ESP32 then polls the RPi every 15 minutes to get an updated rain fall amount via an MQTT connection.

Since OLEDs are known to have a limited lifespan, I decided to shut off the entire display at midnight and then re-enable everything at 8:00am.  The ESP32 "knows" the time because it periodically retrieves the actual time via an NTP (network time protocol) server.  I also chose to leave the sensor display readings blank if there was no wind or rainfall to report, just to keep the display uncluttered.

All in all, a pretty fun little project.

Monday, December 30, 2019

Making a Magnetic Loop Antenna

I've been using my recently acquired SDR for a while now hooked to a simple wire antenna, but as you might expect the results were far from ideal.  So, I made the decision to build (not buy) my own magnetic loop antenna.  The big advantages of this type of antenna over others are their small size, portability and decent bandwidth.

The antenna consists of a large, outer resonant loop for picking up the RF signals and a smaller, magnetically coupled, inner loop that connects to the radio.  See diagram below left:

(Source: http://www.aa5tb.com/loop.html)
For the large loop I used 10' of 1/4" copper tubing inserted inside an identical length of 1/2" PEX tubing to aid in stiffness and durability.  Pigtails were soldered to either end of the copper and then connected to an air variable capacitor I had in my junk box (thanks Bob, WA1EDJ), creating a parallel resonant circuit. The measured inductance of the copper loop was ~3.25uH and the variable cap I had selected had a range of ~10-200pF.  This gave me a calculated tuneable bandwidth of ~6.2MHz to 27.9MHz.

A 2' length of copper tubing was then formed into a smaller loop with one end connected to the center conductor of a length of RG-58 coax while the other end was connected to the outer braid.  The other end of the coax was mated with a BNC connector to hook up with the receiver. This inner loop was then positioned in close proximity to the outer loop and secured in place with zip ties.

Some close ups of the various construction details:

Copper tubing inside PEX (large loop)
with a soldered pigtail on one end

Coax connected to ends of small
copper (inner) loop

Inner loop positioned closely to outer tube

Vertical support strut added
Tee connector at bottom of large loop




Completed antenna minus tuning capacitor

After assembly, I hooked it up to the radio to see if reception had improved.  Definitely!!  I also took measurements to determine the actual tuneable bandwidth.  It seemed to show signal peaks at ~6MHz on the low end and ~18.5MHz on the high end.  This corresponds roughly to the 40-17m amateur bands.  I can only attribute the difference in high end response (27.9MHz calculated vs 18.5MHz actual) to additional parasitic capacitance of ~13pF.

I'm not worried about weather proofing the variable cap since the entire antenna unit can easily be moved indoors at a moments notice in case of rain or snow.  The next task at hand will be to make additional antennas to cover different bands.

Thursday, December 19, 2019

Software Defined Radio

This Christmas I thought I'd splurge on a Software Defined Radio (SDR) from SDRPlay (SDRplay.com).  I chose the RSP1A model for ~$100.00 that includes the software to setup and run the user interface.  It covers the radio spectrum from 1kHz to 2GHz with a displayable bandwidth of  up to 10MHz.  All that's needed is a PC to run the software and an external antenna and its ready to go. I plan on making my own antenna soon (probably a magnetic loop), but for now I'll just string a wire from the unit and hope for the best.

Here is the unit showing the USB interface on the right along with a length of wire attached to the antenna port on the left.  That's it!...The PC does all the data and display processing.

RSP1A

This image is a screenshot of the SDRuno software user interface.  This can be customized by each user to meet their particular needs (filter selection, spectrum bandwidth, band/mode of interest, etc).

Here I'm listening in on a CW signal on the 40m band (7.044.5MHz).

Looking forward to hours of experimenting (aka playing) and exploring the rich feature set available.

Friday, September 6, 2019

Data Logging with a Raspberry Pi

A major limitation to the PC board I created for my ESP-WROOM-02 module described in the previous post was that it could only support one digital input (even though the ESP module itself supports many).  This was done intentionally to keep things simple.  In a real-world application, however, this would not be very useful.  Therefore, I decided to go with a different approach for round two.

I chose a Raspberry Pi 3B+ with battery backup (and charger) to monitor, control and display everything.  This small but powerful platform would allow me to gather data from multiple sensors with plenty of capacity for future expansion.  The actual task of gathering sensor information and then processing it involved installing three pieces of software onto the RPi:

1) Data manipulation - Node Red was my choice for handling all sensor data.  It is essentially a visual programming tool consisting of nodes (units of pre-developed code) that perform a specific task such as reading sensor data, writing to a database, converting raw data into a visual gauge or bar chart, filtering data, and so on.  Nodes are connected via virtual wires to create a flow.  The following image is part of a flow I created specifically for this project:

Node Red flow

In this example, the reddish-brown node in the center retrieves the hard wired sensor data (temperature and humidity) for the outside and basement sensors, the light orange nodes perform some post retrieval processing and the light brown nodes on the far right forward all processed data to the database software for storage.

2) Database storage and 3) Visualization - I decided upon InfluxDB for storing all my sensor data and Grafana for the user display.  InfluxDB is a time series database that allows for easy data logging and when coupled with additional software like Grafana provides a user friendly way to visualize data in real time.  The screenshot below shows my basement temperature and humidity over a 24hr period along with maximum, minimum and average values:

Grafana dashboard

A final touch was to create a simple web page that could display this information in real time using the browser on my smartphone, home computer, etc.  Node Red made adding this feature a snap.  Below is a screenshot of the display (I chose to show temperature only to keep things simple):

To access the page I just type in the IP Address of the Raspberry Pi (assigned by my Wi-Fi router on initial startup).  Code for the gauge templates came from "canvas-gauges.com" but everything else was written by me.  This setup works fine when I'm around the house in range of our Wi-Fi network but what about when I'm not at home?  The solution was to create a VPN (virtual private network) so that I could access this info anywhere in the world that has internet access.  I simply setup the RPi as a VPN server using a YouTube tutorial I found and it was ready to go.

Update (Spring 2022)
I decided to completely overhaul my webpage by adding a few more bells and whistles as seen in the screenshot below.  The current temperature and rainfall values still come from my onsite sensors, but the 12-hour forecast readings come from an AccuWeather API.  I also added two temperature charts: one to show the hourly values throughout the day and one to show the daily low and high values for the week.  Finally, I added a background image to provide an interesting backdrop.  This came from a picture taken on one of our hikes near the Asheville area.


Update 2 (Spring 2025)
Over the last few years my Raspberry Pi 3B+ has suffered a number of SD card failures that required reformatting and then reloading all my embedded software.  Also, making occasional changes and/or improvements to the web server code was a rather unpleasant endeavor.  Therefore,  for my "final" enhancement I decided to switch to a different hardware platform: an Adafruit Feather Huzzah ESP8266.  As with the Raspberry Pi,  this unit also has Wi-Fi capability but uses a much smaller footprint (see photo below) making it the perfect choice to power my web page.  I removed the 12-hour forecast section and added additional elements including a National Weather Service radar map,  moon phase and solar information, as well as a slide show carousel of NASA astronomy images (just because I thought they were cool looking).

ESP8266 hardware platform

Home page



















Moon and solar information

Temperature and rainfall charts



















One of many NASA images...