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 22
A 3
K 1 Quiet
X-Ray B1.3
Wind 338.5 km/s
Aurora 2
Updated 06: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 box

ci_cover.jpg

A design question that comes up in a lot of station automation projects: which jobs belong on an Arduino-class microcontroller, and which belong on a Raspberry Pi? Typical targets are antenna switching, band-decoder logic, rotator control, amplifier sequencing, remote power control, and logging or rig control over CAT.

Here is one way to split it, to get the discussion started. The Pi is good at anything that looks like a computer job: running Hamlib's rigctld, hosting a small web interface, handling digital-mode software, talking to a network, or storing logs. The Arduino (or a similar board like an ESP32 or Pico) is better when the job is simple, timing-sensitive, and must keep working even if the operating system hangs: relay drivers, PTT sequencing, reading a band-data line, or watching SWR or temperature and cutting drive.

The mixed approach is common: a Pi as the front end and an Arduino as the hardware interface, connected over USB serial or RS-485. That keeps 3.3 V Pi GPIO away from anything messy, and gives you a device that boots in a fraction of a second and has no filesystem to corrupt.

Where do you draw the line? Specifically, is it worth putting the PTT and relay sequencing path on a dedicated microcontroller even if the Pi could technically do it with GPIO? And what do you do about RF getting into the control wiring once you're running real power?

  • Replies 1
  • Views 89
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

For anything in the transmit path, a dedicated microcontroller is usually the safer choice. Linux isn't real-time, and a busy or crashed Pi can leave a GPIO pin in whatever state it was last in. With an Arduino you can build in a hardware watchdog and a timeout so PTT drops if the host stops sending keep-alive messages. For amplifier or coax relay sequencing the order matters: relays should switch before RF is applied and release only after RF is gone, so you avoid hot-switching contacts. That is easy to write as a small state machine with explicit delays.

Also remember the electrical side. Pi GPIO is 3.3 V and not 5 V tolerant, while many classic Arduino boards run at 5 V. Don't connect them directly without level shifting or a series resistor and a known-safe arrangement. For driving relays, use a transistor or driver such as a ULN2003 with flyback diodes, or an opto-isolated relay board, and keep relay coil supply current off the logic supply. For the rig's PTT line, check what it expects. Many radios want an open-collector style pull to ground, so a small transistor or optocoupler is better than connecting a GPIO to the jack.

On RF in the wiring: assume it will happen and design for it, rather than hoping the layout is fine. The usual symptoms are an Arduino resetting on transmit, relays chattering, serial data corrupting, or a Pi USB device dropping off the bus. The fixes tend to be boring but effective: a metal enclosure bonded to station ground, ferrite chokes on USB and control cables (several turns through a suitable mix), small bypass capacitors at the I/O pins, and keeping the control cables away from feedlines and the antenna tuner. Long runs to antenna switches or rotators are often better done with RS-485 or a differential link than with raw logic-level wires.

For USB-connected rigs and interfaces, ground loops and common-mode noise are a common cause of hash on receive. A USB isolator or isolated serial adapter can help, though it won't replace good choke placement. On the Pi side, a few practical points: use a decent power supply because undervoltage causes odd behavior, consider a read-only root filesystem or SSD instead of a plain SD card for an always-on station box, and set up a clean way to shut down if the shack loses mains power.

One workable pattern is a Pi running rigctld and a web UI, while a small microcontroller handles relays, sensors, and interlocks. The Pi can request "select antenna 3" and the microcontroller decides whether that is safe, for example by refusing to switch while PTT is active.

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.