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 35
A 3
K 1 Quiet
X-Ray B1.4
Wind 331.2 km/s
Aurora 1
Updated 15: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? Splitting antenna switching, PTT and logging between the two

ci_cover.jpg

I'm planning a small automation project for the shack and want to sanity-check the architecture before building anything. The wish list: an antenna switch controller for four or five antennas, band-data following from the rig, PTT handling for digital modes, and a rotator controller. I'd also like some remote status, such as SWR, supply voltage and which antenna is selected, shown on a web page.

My question is whether to put everything on a Raspberry Pi, use an Arduino-class board for the hardware and a Pi for the software, or just use microcontrollers throughout. I know the Pi can run Hamlib, WSJT-X, fldigi or Direwolf, but I'm wary of hanging relay drivers and RF-adjacent wiring directly off a Linux board. The Arduino side seems simpler and more predictable, but a web UI and logging there look like more work.

What split would you use? And what are the usual traps with RF getting into the control wiring when the transmitter is a few metres from the boards?

  • Replies 2
  • Views 72
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

A split design is a common choice, and it matches how the two platforms behave. A Raspberry Pi is a good fit for anything that benefits from an operating system: running rigctld from Hamlib, digital-mode software, logging, a web dashboard, time sync with chrony or NTP, and remote access. A microcontroller like an Arduino, or an ESP32 or RP2040 board if you want something newer, is better for the parts that need to behave the same way every time: relay sequencing, reading an ADC, driving a stepper or motor driver, and holding a safe state on power-up.

Keep the interface between them narrow. For example, the Pi could send a short serial command over USB such as "select antenna 3" and the microcontroller replies with the confirmed state. The microcontroller then owns the relay sequencing and any interlocks. If the Pi crashes or reboots, the antenna switch shouldn't do anything strange, and PTT should drop.

Voltage levels matter here. A classic Arduino Uno uses 5 V logic, while Raspberry Pi GPIO is 3.3 V and is not 5 V tolerant. Connecting a 5 V output straight to a Pi pin is an easy way to damage it. If you use serial over USB, you avoid this entirely, and you can also drive relay boards from the microcontroller's side with a proper transistor or optocoupler stage rather than from Pi GPIO.

For PTT, a microcontroller-controlled transistor or optocoupler into the rig's PTT line is more robust than toggling a Pi GPIO directly. Check the rig's manual for what the PTT input expects. It is often a line pulled up internally that you short to ground, but the voltage and current vary by radio. A hardware timeout, implemented as a watchdog on the microcontroller, is a cheap protection against stuck-transmit if software hangs on the Pi.

On the RF side, the most common problems are common-mode current on cables and unfiltered long wires acting as antennas. A few things tend to help. Put the electronics in a metal enclosure bonded to the shack ground or station RF ground, and bring cables in through bypass capacitors or feedthrough filters where practical. Use ferrite clamp-ons or wound chokes on USB, power and control cables near the board. Consider a USB isolator between the Pi and any microcontroller or rig interface, since it can break ground loops that otherwise inject hum or digital noise into audio paths.

Relay coils need flyback protection. A bare transistor driving a coil without a diode across it will generate voltage spikes when switching off, and those spikes can reset the microcontroller or produce clicks that look like RFI. Most ready-made relay modules include the diode and transistor, but it's worth checking before relying on them. Keep relay supply wiring separate from sensor wiring, and add decoupling capacitors close to the microcontroller's power pins.

Sequencing matters as much as shielding. Antenna relays should not be switched while transmitting. Besides potentially damaging contacts, hot switching can produce a high SWR event on the PA. A safe order is: PTT off, change antenna, wait a short settling delay, then allow PTT again. If you have a band decoder reading the rig's band data or CAT frequency, add a lockout so a band change during transmit does nothing until the rig is back in receive.

Also think about what each relay does when unpowered. For a multi-antenna switch, decide whether the default should be a grounded antenna port, a particular antenna, or a dummy load, and wire the normally-closed contacts to match. That decides what happens during a power failure or a reboot, and lightning protection is easier to reason about if the idle state is deliberate.

For a rotator, check the controller's own interface before replacing it. Many have a documented serial or analog control interface, and reading position through an ADC with a bit of filtering is usually more stable than reading it raw. What rig and what existing antenna switch hardware do you have? That would change which interface you can use for band data.

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.