Skip to content
View in the app

A better way to browse. Learn more.

Ham Radio Base

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Ham Radio Base — Education, Resources, Projects and Community
☀ Solar
SFI 90
SN 33
A 3
K 1 Quiet
X-Ray B1.3
Wind 318.7 km/s
Aurora 2
Updated 11:30 UTC HamQSL · N0NBH
Day 80/40m Fair 30/20m Good 17/15m Fair 12/10m Poor
Night 80/40m Good 30/20m Good 17/15m Fair 12/10m Poor

Callsign Lookup
_
Vanity Call Signs Available
Enter filters above and click Search.
ⓘ Callsign lookups are in real time via the FCC database. Vanity callsign availability is refreshed daily at 6:00 AM CST. The vanity search may be unavailable for a few minutes during this update.
Live DX spots
Live DX Spots — 70cm via PSKReporter · scroll or pinch to zoom
Band
Mode
Time
Loading map data…
MHz DX Spotter Info
Recent spots —
Select a band above to load spots
Ready — select a band to fetch live spots

Arduino or Raspberry Pi for shack automation? Where to draw the line between microcontroller and Linux

ci_cover.jpg

A lot of ham projects start with the same question: should this be an Arduino-style microcontroller or a Raspberry Pi? Antenna switch, rotator interface, PTT control, band-decoder, SWR/power logging, remote station monitoring, digital-mode node. They can all be done on either platform, but the two are good at different things, and the wrong choice usually shows up later as RF noise, flaky timing or an SD card that gets corrupted after a power loss.

Here is the split I would start from for discussion. A microcontroller (Arduino, Pico, ESP32) is a good fit when the job is deterministic and close to the hardware: switching relays, reading an ADC for forward and reflected power, generating stepper pulses, decoding band data from a rig, or enforcing a PTT timeout. It boots instantly, has no filesystem to damage, and behaves the same every time. A Pi is a good fit when the job needs an operating system: running Hamlib's rigctld, WSJT-X or Direwolf, hosting a web interface, logging to a database, or bridging USB sound cards and serial ports over a network.

The practical hybrid is a Pi for the network, logging and software layer, and a microcontroller for anything that must fail safe. The Pi talks to the microcontroller over USB serial or I2C with a simple command protocol, and the microcontroller owns the relays and PTT line.

A few things worth getting right regardless of platform:

Logic levels. Pi GPIO is 3.3 V and is not 5 V tolerant. Many classic Arduino boards run at 5 V. Connecting them directly can damage the Pi, so use a level shifter or a 3.3 V board. The same applies to CI-V, TTL CAT and other rig interfaces, which often need proper level conversion rather than a direct pin connection.

PTT and relay drive. Do not key a radio or drive a relay straight from a GPIO pin. Use a transistor or MOSFET stage, or an optocoupler if you want isolation from the radio, and put a flyback diode across relay coils. Add a hardware or firmware PTT timeout so a software hang does not leave the transmitter keyed.

RF in the shack. Switching supplies, USB cables and long sensor leads can both radiate noise and pick up RF. Ferrites on USB and power leads, a metal enclosure, bypass capacitors on analog inputs, and short wiring all help. Test it on receive across the bands you use, then again while transmitting, since a project that is quiet on the bench can misbehave near an antenna.

Power and recovery. A Pi running from an SD card needs a clean shutdown or a read-only root filesystem if it is going to be left unattended. Decide what state each relay and output should be in when power is lost or the software crashes, and design the hardware so that default is safe.

What are you using each platform for, and where have you found the dividing line between them? Rotator control, remote antenna switching and digital-mode nodes are probably the areas with the most interesting trade-offs.

  • Replies 2
  • Views 50
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

I would add that the dividing line is usually about timing and consequences of failure. If a missed deadline or a frozen process could cause a problem, such as stuck PTT, an antenna switch changing position under power, or a rotator driving past its limit, keep that logic on a microcontroller. Linux is not a real-time operating system, and a busy Pi can delay a GPIO response by more than you would expect, especially if it is also decoding audio or running a web server.

For an antenna switch in particular, it is worth building in interlocks that do not depend on software at all. For example, inhibit switching while PTT is active, either in firmware or with simple logic. Hot-switching relays can shorten their life and, depending on the setup, can stress the transmitter's output stage.

On the Pi side, rigctld from Hamlib is a good way to let several programs share one rig connection. It avoids the situation where a logger, a digital-mode program and a custom script all fight for the same serial port.

One angle that gets overlooked is noise on the receive side. Pi supplies, cheap USB chargers and HDMI or Ethernet cabling can all show up as birdies or a raised noise floor on HF. If the project sits in the shack, try the build with the radio on a quiet band and an antenna connected before you commit to a layout. Common fixes are clamp ferrites on every cable that leaves the enclosure, a better-filtered or linear supply, shielded enclosures, and keeping the computer away from the receive antenna feedline. A shielded cable for ADC signals and a small RC filter at the analog input also help if your SWR or power readings jump around when you transmit.

For digital modes, a USB sound interface with galvanic isolation is often worth it, because it reduces ground loops and hum between the computer and the radio. For remote use, it is also worth thinking about security: if rigctld or a web control page is reachable over a network, put it behind a VPN or authentication rather than exposing it directly to the internet, since it can key your transmitter.

Finally, log the actual state of the hardware, not only the command that was sent. Reading back relay position, PTT status, or band-decoder output makes troubleshooting much easier than guessing which layer failed.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Affiliate Disclosure: As an Amazon Associate, Ham Radio Base earns from qualifying purchases. Some links throughout this website may be affiliate links. If you purchase a product through one of these links, we may earn a commission at no additional cost to you. Your support helps us continue creating free articles, tutorials, reviews, and resources for the amateur radio community. N0TLB © Ham Radio Base - Powered by the Ham CQ DX Community. All rights reserved.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.