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 116
SN 115
A 4
K 1 Quiet
X-Ray B8.0
Wind 426.6 km/s
Aurora 1
Updated 01: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, rotator control and CAT duties

ci_cover.jpg

A design question that comes up in most shack automation projects: which jobs belong on an Arduino-class microcontroller, and which on a Raspberry Pi? Both can read a switch, drive a relay and talk serial to a transceiver, so the choice is not obvious until you list the failure modes.

One way to split it is by timing and consequences. An Arduino, ESP32 or similar board starts in milliseconds, runs one program, and has no filesystem to corrupt. That suits an antenna selector, a PTT or sequencer interlock, or the analog side of a rotator controller (potentiometer feedback, motor relays, limit switches). A Pi is better at network and software work: running Hamlib's rigctld, logging, a web interface, MQTT, decoding digital modes, or acting as a remote-control gateway.

The hybrid layout many builders end up with is a Pi as the network brain, connected over USB serial to a microcontroller that owns the hardware outputs. If the Pi crashes, the microcontroller can still hold a safe state, drop PTT after a timeout, and refuse to switch an antenna relay while PTT is active.

Some points worth debating for this kind of build:

1. Boot-state behavior. Pi GPIO pins are not guaranteed to be in your preferred state during boot, so a relay driver or PTT transistor needs a pull-down on its base or gate. Where do you want every output to land at power-up and on a watchdog reset?

2. Logic levels. Pi GPIO is 3.3 V and not 5 V tolerant. Many Arduino boards are 5 V, and rig CAT ports vary: some use RS-232 levels, some TTL, and Icom CI-V is a single-wire open-collector bus. Check the radio's manual before wiring anything directly.

3. RF in the shack. Switching regulators, USB cables and long GPIO leads can radiate hash or pick up RF. Ferrites, bypassing, shielded enclosures, and keeping the controller away from the feedline all matter, especially at higher power.

4. Isolation. For PTT lines and audio paths, an optocoupler, relay or transformer is often safer than a shared ground, and it can help with ground-loop hum on digital-mode audio.

How would you divide the work for a shack with a multi-position antenna switch, a rotator and a CAT-controlled HF rig?

  • Replies 2
  • Views 21
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

I'd put anything that can damage equipment on the microcontroller and make the Pi a client of it. For an antenna switch, the controller should enforce rules locally: reject a band change while PTT is asserted, add a short delay between releasing PTT and switching, and drive relays through a transistor or driver array with flyback diodes. The Pi sends something like "select antenna 3", and the controller decides whether that's allowed.

Also decide whether you want latching relays. They keep position through a power loss, which is convenient, but then your boot logic must read or restore a known state instead of assuming everything is off. Non-latching relays fail back to a default antenna, which is often the safer choice, such as a grounded or dummy-load position for a station with lightning protection concerns.

For the Pi-to-controller link, a simple line-based serial protocol with acknowledgements and a heartbeat is enough. If the heartbeat stops, the controller can drop PTT-related outputs after a timeout.

On the CAT side, I wouldn't try to bit-bang rig control from GPIO unless there's a reason. Most modern rigs expose a USB serial interface, and Hamlib's rigctld or flrig on the Pi gives you a network-accessible rig interface that logging and digital-mode software can share. For older radios, check the actual signal levels first: a TTL-level port, RS-232 and Icom's CI-V bus need different interfaces, and connecting the wrong one can damage the port.

For the rotator, an Arduino reading the position potentiometer needs some care. Average several ADC samples, add an RC filter, and keep the sense wiring away from the motor supply. RF getting onto a long pot cable can make the azimuth reading jump, so a ferrite and a small capacitor at the controller input often help. Add software limits and a motor-run timeout, because a failed pot or stuck relay shouldn't be able to drive the rotator into its stops.

For power, if your 12 V shack supply feeds a buck converter for the Pi, listen on HF for birdies from it. Some cheap converters are noisy, and a linear stage, better filtering or a shielded module can be worth the effort.

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.