• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

KB6NU's Ham Radio Blog

KB6NU's Ham Radio Blog
  • HOME
  • Study Guides
  • Teach a One-Day Tech Class
  • W8SRC Repeater Guide
  • Advertise
  • Hire Me

Microcontrollers

Funk is German for radio

December 10, 2024 By Dan KB6NU 3 Comments

“Funk” is German for radio, and I’ve been in a funk lately. That’s why it’s been so long since I’ve posted here. This happens to me every year at this time, when the days get shorter and darker. (Here’s an interesting tidbit of information: While the shortest day of the year is December 21, the sun sets earliest on December 8.)

Even though I’m in a funk, I thought I’d put a post together from some random thoughts and links. Here goes….

Project backlog

small radio
The QMX on my bench looks nothing like this………yet.

My lack of motivation has resulted in  a backlog of projects. First of all there’s the QRPLab’s QMX kit that is sitting on my workbench. After finishing the toroids, I decided to take a break, and I’ve just never gotten back to it. My goal now is to finish it be the end of February, so I’ll be ready to take it on POTA activations.

The lack of progress on this kit is not stopping me from getting started on other projects. The next new project on my list is the Pi-Pico RX. I’ve ordered the parts for this project, and am hoping to receive them soon, so I can get breadboarding.

I also ordered parts to build up the circuit for the EMF Explorer Badge. I like this project because it’s pretty simple to build, and eminently hackable. I would love to find someone that’s good with KiCAD to design a PCB with a ham radio theme and then maybe build and sell some of them at Dayton next year. If you’re interested, please get in touch.

More Pico

I went to a ham swap a week ago Sunday, and a guy I know was selling Raspberry Pi Picos, and I bought a Pico W for $12. It’s connected to this computer right now. I followed the Getting started with your Raspberry Pi Pico W tutorial on the Raspberry Pi website, and in about an hour, I had the Pico W serving a web page.

It was a fun little exercise. Now, I’d like to figure a ham radio application for this litte microcontroller. Maybe I could make a wireless remote-control for my transceiver. If you have a cool idea, let me know.

Social(?) media

cartoon of a man sending Morse Code
This is my icon on Mastodon and BlueSky.

So, I deactivated my Twitter account last week. I was kind of sorry about that as I had quite a few followers there, but it’s turned into such a pit that I felt it was the right thing to do.

Several months ago, I joined Mastodon several months ago. I’m @[email protected]. I currently have 632 followers there, and I think that’s pretty good.

I’ve been hearing all this stuff about BlueSky, though, so I decided to sign up there. I’m @cwgeek.bsky.social there. I just signed up and haven’t really participated much there yet, so I can’t really comment on how useful it is, but please follow me there, and I’ll follow you back.

 

Filed Under: Building/Homebrew, Microcontrollers, On the Internet

Why aren’t electronic badges more of a thing in #hamradio?

August 19, 2024 By Dan KB6NU 6 Comments

Electronic circuit board with LED screen and buttons.
DEF CON 32 electronic badge.

I attended DEF CON 32 a week or so ago, and like many “hacker” conferences, attendees got an electronic badge. This year’s badge was built around the new Raspberry PI microcontroller, the RP2350. It actually works like a GameBoy, and you can add games like you would a GameBoy. Here are a couple of videos that talk about the DEF CON 32 electronic badge:

  • https://www.youtube.com/watch?v=WWxjNNbiQ5Y
  • https://www.youtube.com/watch?v=tPrIO0fhikE

Some of the “villages” or special interest groups, such as the Aerospace Village created their own badges.

At DEF CON, I attended a talk by a fellow who’s created an open-source design—both hardware and software—upon which you can build a badge for your event. He calls his badge OpenTaxus, and you can find the documentation here.

Since these things are so popular at hacker conferences, I wonder why they aren’t more popular at amateur radio events? Is it because hams are just too cheap to buy something like this? Or, maybe, it’s because hams are just not as “creative” as hackers.

At any rate, I’m thinking about coming up with some kind of electronic badge for the 2025 Dayton Hamvention. If any of you have ideas for the badge—or would perhaps be interested in working on the badge hardware or software—let me know. If we are going to do a badge, it would probably be a good idea to get started on it now.

Filed Under: Hamfests, Microcontrollers Tagged With: badges, DEFCON, Hamvention

Debouncing switches can be a challenge

March 29, 2024 By Dan KB6NU Leave a Comment

A photo of the PicoMite Keyer board.
The PicoMite Keyer hardware has five pushbuttons and uses two I/O pins for the dit and dah paddle contacts.

One of the challenges that I faced when I started my Micropython keyer project was debouncing the switch closures. There are seven in all: five pushbuttons and the dit and dah inputs.

So, I did what everybody does nowadays—perform an internet search. I searched for “switch debouncing with Micropython” and got about a zillion references.

One of the first references is actually part of the Micropython documentation. The documentation suggests that one read the current value of a given pin, wait for the value to change, and then verify that the new value is stable for at least 20 ms. They give the following example code:

import pyb
def wait_pin_change(pin):
    # wait for pin to change value
    # it needs to be stable for a continuous 20ms
    cur_value = pin.value()
    active = 0
    while active < 20:
        if pin.value() != cur_value:
            active += 1
        else:
            active = 0
        pyb.delay(1)

And, here’s how you would use this function:

import pyb
pin_x1 = pyb.Pin('X1', pyb.Pin.IN, pyb.Pin.PULL_DOWN)
while True:
    wait_pin_change(pin_x1)
    pyb.LED(4).toggle()

pyb, by the way, is a library of functions that support the PyBoard, a small microcontroller board that was designed specifically to run MicroPython. Pin is one of the classes in the pyb library that provides I/O pin functions.

More stuff from the internet

This is a simple solution, and really too simple for my project. So, I kept looking and found a bunch more solutions:

  • Jack Ganssle, a long time embedded systems consultant, has published a couple of pages on debouncing on his blog, A Guide to Debouncing, or, How to Debounce a Contact in Two Easy Pages. Being a hardware guy, Ganssle gives a nice explanation of the problem before he goes on to show us his solution.
  • Hack-a-Day has also tackled this issue with two posts, Embed with Elliot: Debounce Your Noisy Buttons, Part I and Part II.

What I ended up using is the asyncio library that was developed for MicroPython. This allows a programmer to implement a form of multi-tasking called “cooperative multi-tasking,” which is widely used in embedded systems. It’s more complicated programming this way—you have to keep in mind all the various things that can be running at the same time—but there are definite advantages as well.

For example, I think when I get to the point of implementing accepting commands via the USB port, it will be easier to do this. Commands will be arriving asynchronously, after all.

Another advantage to using this library is that it has drivers for switches, pushbuttons, ADCs, and incremental encoders. The switch drivers, for example, include functions that detect both short and long presses. This is a feature that I’m using in this project.

Hardware solution

There is also hardware solutions to debouncing switches. These range from simply soldering a capacitor across the switch to connecting the switch to a Schmitt trigger.  For more information on these solutions, and how to make the tradeoff between hardware and software solutions, see Ultimate Guide to Switch Debounce by Max Maxfield.

Filed Under: Building/Homebrew, Microcontrollers Tagged With: PicoKeyer, Raspberry Pi Pico, switch debounce

From my reading list: The inner beauty of electronics

January 23, 2023 By Dan KB6NU 1 Comment

Safari, the web browser that I use most often, has a feature called the “reading list.” It’s like a bookmark, but much more temporary. The list is meant to be a parking lot for sites that you want to read, but not read over and over. Once you’ve read it, you’re supposed to delete the site from the list.

Of course, a lot of sites get stuck on the list, so periodically I actually go through it and read some of the sites on the list. Here are three that I think hams will be as interested in as I am.

The Inner Beauty of Basic Electronics

Many components are not only marvels of electronics engineering, but mechanical engineering as well. Open Circuits: The Inner Beauty of Basic Electronics shows us how beautiful electronic components can be. The authors, Windell Oskay and Eric Schlaepfer, have painstaking opened many electronic components and taken some really amazing cross-section photographs. Here’s an example of a 15-turn potentiometer.

Also included in the book are photographs of transistors, integrated circuits, printed circuit boards, and more. Even if you don’t buy the book, taking a look at some of the photograph’s on the book’s web site is well worth it.


RFZero

I found out about this board via a Tweet by one of the designers. The RFzero is a multi-purpose, GPS-controlled Arduino shield that uses a Si5351A clock generator to generate all kinds of RF signals. Designed by designed by Johan, 5Q7J; Bo, OZ2M; Hans, OZ2XH; and Steen, OZ5N, the web page says that it can be used for all kinds of things, such as a beacon (IBP, SPB, CW, FST4, FST4W, FT4, FT8, JS8, JT9, ModeX (JT65, Q65, …), PI4, WSPR, …), stand alone WSPR/FST4W transmitter, signal generator, VFO, QO-100 dual LO, low cost GPSDO, e.g. for 10 MHz, IC-9700 LO, 90 MHz frequency counter, and more. Being Arduino-based, you can, of course, write or modify the software yourself.

It looks like a very cool board. I might even get one myself. The price is 500 DKK, or about $73.


SIGpi: A signal-intelligence-focuese Linux “go kit”

I came across this via a tweet from RTL-SDR.Com. RTL-SDR.Com is one of those websites that you really want to read if you’re doing anything with software-defined radio (SDR).

Joe, NE2Z,  has developed this Linux distribution called SIGpi. SIGpi is an installable Linux distribution for Ubuntu and Raspberry Pi 3/4 that focuses on providing multiple open source SDR programs that can be used for signal intelligence. with emphasis on capabilities in the VHF, UHF, and SHF spectrum. Optionally, you can install HF SDR software, too. For a complete list, see the SIGpi wiki.

SIGpi runs on the following platforms:

  • Raspberry Pi4 4GB RAM or Raspberry Pi 400 with 32GB microSD card running Raspberry Pi OS Full (64-bit)
  • Ubuntu 22.04 LTS on arm64 and amd64

This sounds like something fun to try on my under-utilized RPi4. Now, I just have to find the time for it.

Filed Under: Electronic Components, Microcontrollers, Software-Defined Radio (SDR) Tagged With: Arduino, Raspberry Pi, RFZero, SIGpi

How do we make hamfests more fun?

September 20, 2022 By Dan KB6NU 6 Comments

Hamfest
You can certainly find a lot of junk at a hamfest.

On the amateur radio subreddit, someone complained about the amount of junk that one finds at a hamfest. I can’t seem to find the exact post right now, but the gist of it was that if you expect people to show up at hamfests, then there has to be something more than just junk for them to buy.  The fellow opined that it wasn’t any fun going to hamfests and coming back empty-handed because all he could find for sale was junk.

I can’t say that I don’t sympathize with that argument. I realize that one ham’s junk is another man’s treasure, but the volume of junk at hamfests does seem to be increasing, and I’ve gone to many hamfests and returned disappointed that I didn’t find anything worth buying.

I’ve thought for quite a while that it might be possible to make a few bucks by selling microcontrollers, like Arduinos and Raspberry Pi Picos. Of course, I’d also have to sell related boards, such as audio boards, relay boards, etc.

I may just give this a go. Even if I don’t make much money doing this, perhaps it will spur others to start playing around with these things, and ultimately, have more fun with amateur radio.

What do you think? Is there a market for microcontroller stuff at hamfests? What would I need to do to be successful? What could other vendors sell that would make hamfests more fun?

Filed Under: Hamfests, Microcontrollers Tagged With: Arduino, Raspberry Pi Pico

Trade magazine articles: Op amps, microcontroller measures frequency and period, antenna basics

January 22, 2022 By Dan KB6NU Leave a Comment

All three articles in this post are from Electronic Design….Dan

Op Amps for Linear Designs: Back to the Basics

Op amps are the basic building blocks for much of linear circuit design. You probably learned about them in college and even designed some products containing an op amp.  As an electronic engineer, you will at some point in your career probably need to design a linear circuit.

If you’re not an advanced linear or analog circuit designer, perhaps the best way to fulfill your linear design needs is to use an op amp. These ICs are widely available, inexpensive, and can be configured in hundreds if not thousands of ways to satisfy most linear requirements. Here’s a summary and update on these versatile devices…..more


Microcontroller Efficiently Measures Frequency and Period

When you need to take accurate timing measurements in hardware without overloading a microcontroller, the signal measurement timer module (SMT) in the Microchip16F1619 PIC microcontrolleris perfectly suitable for this application. The SMT module captures features of a signal such as Period and Frequency, among others. This design measures input frequency signals within the range of 8 Hz to 10 MHz, and Period signals within the range of 0.1 µs to 125 ms…..more


Welcome To Antennas 101

Antennas are much more than simple devices connected to every radio. They’re the transducers that convert the voltage from a transmitter into a radio signal. And they pick radio signals out of the air and convert them into a voltage for recovery in a receiver.

Typically taken for granted and left for the last minute in a design, antennas are nonetheless critical for establishing and maintaining a reliable radio connection. They may look complex and enigmatic to most engineers, especially EEs working with wireless applications for the first time—not to mention that they come in a seemingly infinite variety of sizes and shapes. However, a brief review of the essentials can help allay any design worries….more

Filed Under: Antennas, Building/Homebrew, Electronic Components, Electronics Theory, Microcontrollers Tagged With: op amps, PIC

Random stuff: Circuits for kids, replace a 555 with a PIC microcontroller, HF sports net

September 28, 2021 By Dan KB6NU 1 Comment

Circuits for kids

A reader writes:

I wanted to thank you for putting together your links page. My daughter MaryAnne’s Girl Scout troop is currently working on their ‘Think Like an Engineer’ Badge as part of the STEM series, and the radio schematics resources on your page helped us a bunch!

MaryAnne’s troop leader encouraged the parents to work with our girls at home to ensure we stay on track! The girls will be building a working radio, so the troop leader wanted the girls to learn the basics about simple electronics, circuits and electricity. She asked the girls to do some research online and to share their findings with the troop. Your page led us to some great websites to check out, so MaryAnne and I wanted to make sure we thanked you :)

And if it’s not too much trouble, I was hoping you could include a contribution from MaryAnne on your website. She found this circuits guide that I was very impressed with…

All About Electronic Circuits
https://www.speedwaymotors.com/Info/All-About-Electronic-Circuits-for-Kids

I’d love to show MaryAnne and her troop leader! Encouraging girls in the field of science and engineering is so important! And MaryAnne would be thrilled to know she could help! (She really got into tinkering during COVID, so she was very excited to work on this project!)

There you go, MaryAnne. Thanks for the tip and good luck to your troop.

Use a PIC microcontroller to replace a 555

Speaking of circuits, Nuts and Volts has been running a series of articles on how to use a PIC microcontroller in place of a 555 timer chip. Here’s how the first article in the series compares the two:

Some of the advantages of this implementation as compared to a 555 or 556 are:

  • No capacitors
  • Very linear response for pulse width
  • Delayed pulse capability independent of the pulse width
  • Independent control of pulse width and off-time in astable operation
  • Very wide range of pulse width and off-time/delay
  • Output pulse width is independent of the triggering pulse width

Some disadvantages:

  • Shortest trigger to output delay is about 1 µs
  • Shortest pulse is about 3.3 µs
  • Longer minimum time between triggers due to reading the ADC (analog-to-digital converter) and other processing
  • Pulse width and delay use the same range

Some advantages of the 555:

  • Lower cost
  • Very low delay time between the trigger and the output pulse
  • Narrower pulses possible: <500 ns

As of this writing, these are the approximate prices for single pieces:

  • PIC12F1572 (DIP and SOIC) = $0.60
  • NE555PSR (SOIC) = $0.37
  • NE556DR (DIP) = $0.45
  • CSS555 (SOIC) = $1.55

HF sports net?

On the subreddit /r/amateurradio, someone asked if there were any HF sports nets. I don’t know of any, but I think something like that might be fun. If you known of any, please leave a comment.

Filed Under: Electronic Components, Everything Else, Kids, Microcontrollers, Operating

Breakout board aids Pico development

June 5, 2021 By Dan KB6NU Leave a Comment

This kit provides a screw terminal for each pin on the Raspberry Pi Pico. I hope you do a better job soldering the headers than they did before taking this picture, though. :)

So, I’ve started playing around with a Raspberry Pi Pico. All I’ve been able to do so far is to blink the LED with a little Python program, but it’s going to be a lot of fun.

To make it even more fun, I just purchased and built the Raspberry Pi Pico Breakout Board (see right). One thing that I like about it is the terminal strips. The terminal strips will allow me to make secure connections to sensors and other I/O. Another nice feature is that the kit includes the headers that you need to solder to the Pico.

There’s a lot of soldering. 120 solder joints in all. But, it didn’t take too long, once I got into the rhythm. And, once you get all the soldering done, you have an effective development aid.

Filed Under: Kits, Microcontrollers Tagged With: Raspberry Pi Pico

Arduinos and Picos and keyers, oh my!

May 31, 2021 By Dan KB6NU 5 Comments

The Arduino Nano.

This post is going to be a bit of a ramble. Forewarned is forearmed.

Six years ago, I did my first project with an Arduino and built a K3NG Keyer. More specifically, I built the DJ0MY Nano Keyer, which is a keyer that uses an Arduino Nano and the K3NG software. It’s a nice design, and it has been working reliably here since I  built it, but there are a couple of drawbacks.

The biggest drawback is that because it uses a Nano, the entire feature set won’t fit in memory. I had wanted to be able to connect a keyboard sometimes and send with a keyboard. The K3NG software has that feature, but there isn’t enough program memory to do that and accept WinKeyer commands. Since supporting WinKeyer commands is more important, I had to forego the keyboard input.

I could have used an Arduino Mega. With its larger program memory, I would have been able to get all of the features that the K3NG software has to offer, but the DJ0MY board was designed to have the Nano plug directly into it.

Fast forward

Fast forward a few years, and I run into a guy who’s looking for someone to design a simple, microcontroller-based product for him. Armed with my extensive (hah!) knowledge of Arduinos, I enter into an agreement with him to do this.

Needless to say, this project turned out to be a lot more difficult than I had anticipated. In the course of building several different prototypes, I used a Nano, then a Pro Micro, and then finally just a plain, old Arduino Uno. One good thing to come out of all this bumbling is that I now have at least some knowledge of the many different versions of Arduinos on the market.

Enter the Raspberry Pi Pico

Raspberry Pi Pico

Of course, there are a bunch of other microcontrollers on the market. Way too many for me to keep up with. One of the latest entries that would be of interest to amateur radio operators is the Raspberry Pi Pico. This baby was introduced in January, and  it’s getting a lot of publicity. It costs only $4, and it has a lot of advantages over the Arduino.

One thing that I really like about it is that it has way more memory than Arduinos. It has 2 Mbytes of flash memory and 264 kbytes of RAM. Compare this 32 kbytes of flash and 2 kbytes of RAM for the Nano.

I also like the fact that you can program the Pico using  MicroPython (or CircuitPython) instead of the C++ language used by the Arduino. Instead of using the Arduino IDE, to program the Pico you used the Thonny IDE. Thonny is an open-source Python development environment available for Windows, Mac, and Linux (including Raspberrry Pi) computers. I already have it on the Raspberry Pi 4 computer that I’ve been using for microcontroller software development.

I have a couple of Picos on order and will probably start messing around with building a keyer on top of it. That should be something fun to do. If you’ve played around with the Pico and have some words of wisdom for me, I’d love to hear them.

 

Filed Under: Microcontrollers Tagged With: Raspberry Pi, Raspberry Pi Pico

From the trade magazines: Op-amp basics, microcontroller measure frequency and period, PCB design accessible for students

April 26, 2021 By Dan KB6NU Leave a Comment

Op Amps for Linear Designs: Back to the Basics

Op amps are the basic building blocks for much of linear circuit design. You probably learned about them in college and even designed some products containing an op amp.As an electronic engineer, you will at some point in your career probably need to design a linear circuit.

If you’re not an advanced linear or analog circuit designer, perhaps the best way to fulfill your linear design needs is to use an op amp. These ICs are widely available, inexpensive, and can be configured in hundreds if not thousands of ways to satisfy most linear requirements. Here’s a summary and update on these versatile devices.

…read more


Microcontroller Efficiently Measures Frequency and Period

When you need to take accurate timing measurements in hardware without overloading a microcontroller, the signal measurement timer module (SMT) in the Microchip16F1619 PIC microcontroller is perfectly suitable for this application. The SMT module captures features of a signal such as Period and Frequency, among others. This design measures input frequency signals within the range of 8 Hz to 10 MHz, and Period signals within the range of 0.1 µs to 125 ms.

…read more


Engineering Startup Makes PCBs Accessible to Next-Generation Electrical Engineers

Every circuit design project starts somewhere, whether it’s breadboarded or built up bug-style. Eventually, that project will need to be prototyped. Gerber Labs, a startup based in Tustin, CA, is rolling out a platform that makes custom printed circuit boards (PCBs) accessible to electrical engineering students, hobbyists, and small businesses.

Getting your hands on a custom PCB can sometimes present hassles. If you’re a large business or manufacturer, a traditional PCB house will spin you a prototype in anticipation of a large order down the road. But that often entails working through salespeople and/or overseas reps. PCB’s traditionally have only been accessible for large businesses and manufacturers. Gerber Labs is changing this by making PCBs available in prototype quantities to the consumer and small-business markets.

…read more

Filed Under: Electronic Components, Microcontrollers, PCB design Tagged With: Gerber, op-amp, PIC

  • Page 1
  • Page 2
  • Page 3
  • Go to Next Page »

Primary Sidebar

No Nonsense Technician Class License Study Guide (for tests given between July 2026 and June 2030)

New No Nonsense Technican Class Study Guide now available!

The 2026 version of my Tech Class study guide is now available, and as always, the PDF version is FREE!. The ePub version costs $11.97, and a Kindle version and paperback version will be available on Amazon shortly.

Click here to get all of my "No Nonsense" study guides.

Also available: The CW Geek's Guide to Having Fun with Morse Code

W5SWL.Com
Retevis Ailunce H1 DMR Radio
DXpander: Cobweb antennas, Laser Cutting

You’ve got mail!

Enter your email address below and get an email every time I publish a new post.

Email


I frequently teach classes to help newcomers get their licenses. The next class will take place on Saturday, February 7, 2026 on the University of Michigan campus. Click here for more information.

If you can't make the class, subscribe to the mailing list to be notified of when the next class will be held.

You can always download my free study guide, and if you have any questions about the classes, or amateur radio in general, please feel free to email me directly.

Support KB6NU.Com

Donate $7.30 and get two of these cool stickers. Measuring 4.25-in. W by 2.75-in. H, it's perfect for your car, your shack, or wherever!

Contact me

If you have a question or comment about one of my blog posts, or a question about any of the material in my study guides, or just a question about ham radio in general, you can email me at [email protected].

Blogs You Should Also Read

  • AE5X: A CW-centric blog from Kingswood, Texas
  • K0LWC Blog
  • LA3ZA Ham Radio Blog
  • Little Radios, Big Fun – WB3GCK
  • Mr. Vacuum Tube's Blog
  • Radio Artisan – K3NG
  • The K0NR Weblog
  • VE3WDM's QRP Ham Radio Blog
  • W2LJ’s Blog

Ham Radio Websites

  • Dashtoons – The Hammin' Comedy by Jeff K1NSS

Podcasts

  • ICQ Podcast
  • Linux in the Ham Schack
  • No Nonsense Amateur Radio Podcast
  • Resonant Frequency Amateur Radio Podcast

Recent Comments

  • Dan KB6NU on Finally, a Loop for 10m.
  • Dan KB6NU on 1930s cards for my collection of QSLs from stations whose callsigns spell words
  • Sean on Finally, a Loop for 10m.
  • Bill Waslo on 1930s cards for my collection of QSLs from stations whose callsigns spell words
  • C M Wetzel KD8TNF on The Wesco BN-1

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Footer

Copyright © 2026 Daniel M. Romanchik, KB6NU · Log in