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 station automation? Planning a remote antenna switch with PTT and rig control

ci_cover.jpg

I'm sketching out a small automation setup for the shack and want to sanity-check the architecture before I commit to parts. The goals are: a remote coax switch for 4 antennas, a sequencer to key an amplifier safely, some basic monitoring (forward/reflected power from a directional coupler, supply voltage, temperature), and CAT control of the rig from a networked computer so I can run digital modes without sitting at the desk.

My first instinct was to put everything on a Raspberry Pi: GPIO for the relays, rigctld from Hamlib for CAT, a web page for the switch. The counter-argument is that a full Linux system next to a transmitter feels like a lot of moving parts for something that needs to be deterministic, like PTT sequencing. The alternative is an Arduino-class board (or a Pico/ESP32) handling relays and timing, with the Pi only doing the network and software side.

Questions for people who have gone down this road: where do you draw the line between the microcontroller and the single-board computer? How do you handle RF getting into the control lines on 100 W, and what should happen to the relays if the controller hangs or loses power? I'd also like to know if there are pitfalls with logic levels, serial adapters and USB that are worth knowing about up front.

  • Replies 2
  • Views 66
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

Splitting the job is the usual answer, and the dividing line is basically timing and consequences. Anything where a stuck state could damage something or splatter across the band, such as PTT, amplifier bias or T/R sequencing, belongs on a microcontroller. It boots in milliseconds, has no filesystem to corrupt, and can use a hardware watchdog. Anything that wants networking, logging, a web UI or Hamlib belongs on the Pi.

Give the microcontroller its own safety rules that don't depend on the Pi. For example, a PTT time-out so a hung host can't hold the transmitter keyed indefinitely, and a defined power-on state where the antenna switch lands on a known-safe port. If the Pi crashes, the Arduino should still do something sensible. A simple serial or I2C link with a heartbeat works well: if the Arduino stops seeing valid commands for a few seconds, it drops PTT and returns to the default state.

On logic levels, Raspberry Pi GPIO is 3.3 V and is not 5 V tolerant, while a classic Uno runs at 5 V. If you connect them directly, put a level shifter or at least a resistor divider on any line going into the Pi. Using a 3.3 V board such as a Pico on the microcontroller side removes that problem. For relays, don't drive coils straight from a pin. Use a transistor or a driver array like a ULN2003, with a flyback diode across each coil unless your relay board already has one. Also check whether your relay modules are active-low, since that affects what the outputs do while the controller is still booting.

Agreeing with the split, I'd add that RF immunity usually matters more than the choice of board. Boards that behave perfectly on the bench can misbehave once a few hundred milliwatts of RF are on a cable. The common causes are long unshielded wires acting as antennas, rectification in the input protection diodes of the chip, and common-mode current on USB or Ethernet cables. Typical mitigations are ferrite chokes on every cable entering the enclosure, small bypass capacitors at the I/O pins, a metal enclosure bonded to the station ground, and keeping control wiring away from the feedline and the antenna tuner.

For CAT, check what your rig really provides. Some use TTL-level serial, some RS-232 levels and some USB. A bare USB serial adapter between the rig and the Pi is often fine, but it can also bring ground loops and hash. An isolated USB hub or USB isolator can make a noticeable difference, especially with the audio interface for digital modes. For longer runs to a remote switch, RS-485 is often more robust than I2C, which is designed for short on-board distances and can get flaky with cable capacitance.

On the Pi side, Hamlib's rigctld is a good way to expose the radio to several programs without each one fighting over the serial port. If it is going to run unattended, think about the SD card: a good power supply, a read-only root filesystem or overlay, and logs written elsewhere reduce the odds of corruption after a power dip. I'd also keep the PTT line out of general-purpose GPIO scripts. Let the microcontroller own it, and have the Pi send a request rather than toggling the line directly.

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.