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.3
Wind 338.7 km/s
Aurora 1
Updated 16: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 do you draw the line between them?

blogs_cover.webp

I'm interested in how people split work between microcontrollers and single-board computers in a ham shack. The usual advice is "Arduino for hardware, Pi for software," but that doesn't help much once you're designing something real, like an antenna switch controller, a rotator interface, a band decoder, or a remote PTT setup.

Here is how I'd frame the question. An Arduino-class board (Uno, Nano, or an ESP32 if you want Wi-Fi) is good at tight timing and simple, predictable I/O. It boots almost instantly, has no filesystem to corrupt, and runs one job forever. That suits a CW keyer, a relay sequencer, a band-data decoder reading the radio's output, or an ADC reading forward and reflected power from a directional coupler.

A Raspberry Pi is a full Linux computer. That makes it a good fit for Hamlib's rigctld, Direwolf for packet/APRS, logging software, a web dashboard, or a bridge between the radio and a network. The downsides are a slower boot, an SD card that doesn't like sudden power loss, and GPIO pins that are 3.3 V only and not 5 V tolerant. Wiring a Pi pin directly to a 5 V Arduino output or a relay board is an easy way to damage it.

The part I most want to discuss is the interface between the computer and the RF environment. Even at moderate power, a badly routed USB cable or a long unshielded relay lead can act as an antenna. Symptoms include random resets, garbled CAT control, and relays chattering when you key up on 20 m or 40 m. Ferrite chokes on USB and control cables, bypass capacitors at the I/O, shielded enclosures, and keeping control wiring away from the feedline all help. Optoisolators or relay isolation between the logic and anything that touches PTT or amplifier keying line help too.

Where do you put the safety logic? If a Pi script crashes while PTT is asserted, you could be transmitting into a dead key-down condition. A hardware timeout on the PTT line, such as a simple 555 timer or a watchdog on a microcontroller, seems more trustworthy than a software timeout on the same computer that might hang.

So my questions are: which jobs do you give to a microcontroller, which to a Pi, and which do you connect over serial, I2C, MQTT, or something else? What's your approach to keeping RF out of the controller?

  • Replies 1
  • Views 95
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

A split that tends to work is to put anything that must fail safe on the microcontroller and anything that needs a network or a rich UI on the Pi. So the Pi might run a web page where you pick "Antenna 3," but it only sends a short command like ANT3 over USB serial. The Arduino validates it, checks that the transmitter isn't keyed, and then drives the relays. If the Pi locks up, the switch stays in its last valid state instead of floating through random positions.

Relay drivers deserve some care. Use a transistor or driver IC rather than an I/O pin, and put a flyback diode across every coil. If you use relay modules, check whether the input is active-low and what the pin does during reset. Some boards briefly pulse outputs at boot, which you don't want when a relay is switching a feedline. A pull-up or pull-down on the control pin to set a safe default is worth a few cents.

Also avoid switching RF with the relay under power if you can. Sequence it so PTT is only released after the switch has settled, and add a short delay for relay contact bounce. It protects the relay contacts and the front end of the radio, and it matters even more if an amplifier is in the chain.

On the RF side, I'd treat the controller like any other piece of shack equipment that needs a decent RF ground and a common-mode choke strategy. For USB, a cable with a ferrite on both ends is a reasonable start, but a ferrite is not a cure-all. If the problem is common-mode current on the coax, fix that at the feedline with a choke balun near the antenna and in the shack. Otherwise the stray RF will keep finding its way into whatever cables are nearby.

For rig control, check the interface levels before you wire anything. Some radios use TTL-level serial, some use RS-232 levels, and Icom's CI-V is a single-wire open-collector style bus. Connecting a Pi or Arduino directly without a level shifter or the right adapter can cause garbage data or hardware damage. Hamlib's supported-radios list and your rig's manual will usually tell you what the port expects.

For audio, a USB sound interface plus an isolation transformer on the audio lines can reduce ground-loop hum and RF pickup, which matters for digital modes and for Direwolf. I'd also run the Pi with a decent power supply and consider a read-only root filesystem or at least a clean shutdown button, because an SD card on a station that loses power now and then is a common point of failure.

As for coordination between devices, MQTT is a nice lightweight option if you have several nodes, such as an ESP32 at the tower base and a Pi in the shack. Keep the safety-critical PTT path on a direct wire, not the network.

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.