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? Dividing up antenna switching, PTT, rotator control and logging

ci_cover.jpg

I'm planning a shack automation setup and want to sort out which jobs belong on an Arduino-type microcontroller and which belong on a Raspberry Pi. The wish list is: a remote antenna switch with a few coax relays, PTT and sequencing for a transceiver and amplifier, azimuth rotator control with a potentiometer for position feedback, and a Pi running Hamlib (rigctld), logging, and maybe a web page for status.

My current thinking is to let the Arduino handle anything that touches relays, PTT lines and analog feedback, and let the Pi talk to it over USB serial while it does the networking and software side. The Pi's GPIO is 3.3 V and not 5 V tolerant, and Linux isn't a real-time OS, so putting everything on the Pi feels fragile. But I may be overcomplicating it, since two boards means two things to debug.

The questions I'd like opinions on:

1. Is the split sensible, or would you put the relay and PTT work directly on the Pi's GPIO?
2. For keying a rig's PTT input, do you use an optocoupler, a transistor, or a small relay? How do you decide?
3. What do you do to keep RF out of the controller on a shack with HF and some power into the antenna? I'm thinking ferrites, shielded enclosures and bypassing, but I'd like to hear what actually matters most.

  • Replies 1
  • Views 93
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

The split makes sense, and the main reason is failure behavior. A microcontroller boots in a fraction of a second and runs one small program. If the Pi hangs, reboots after a brownout or has a corrupted SD card, you don't want a relay stuck in transmit or an amplifier left keyed. Put the safety logic on the Arduino: a PTT timeout, an interlock that refuses to key if the antenna relay isn't in a valid state, and a watchdog that drops everything to a safe state if the serial link goes quiet for a set time.

For PTT, check the rig's manual first. Many radios treat PTT as a line that is pulled to ground to transmit, with a small voltage and current on it. In that case an optocoupler or a small NPN transistor in open-collector style is usually enough, and an optocoupler gives you galvanic isolation. If the interface is something else, such as a balanced mic line or a rig that supplies a higher voltage on that pin, read the specs before connecting anything. A small signal relay is fine for switching unusual lines, but remember it adds a little mechanical delay, and that matters in a sequence.

Speaking of sequence, the order matters more than people expect. Switch the antenna relay or amplifier bypass first, wait a few milliseconds, then key the radio, and reverse the order on release. This avoids hot-switching relays under RF, which pits and wears contacts and can stress an amplifier. Putting that sequencing in Arduino code with simple timers is easy to reason about and test with a dummy load.

For the Pi side, rigctld from Hamlib is a good fit. Programs like loggers and digital mode software can share one CAT connection over TCP instead of fighting over a serial port. Just keep that network service on your LAN and not exposed to the internet unless you've put proper access control in front of it.

On the RF question, I'd rank the fixes roughly like this: cable and layout first, then filtering, then enclosure. Most RF problems with these builds arrive on cables acting as antennas, not through the plastic box. Any wire that leaves the enclosure (USB, relay drive, rotator control, the potentiometer sense line) is a candidate. Put a ferrite choke on USB cables, and run the relay and sensor wires as twisted pairs. At the entry point to the board, add a small ceramic capacitor, plus a series resistor or ferrite bead on analog lines, so the ADC isn't reading RF-rectified garbage.

The rotator feedback pot is a classic trouble spot. The Arduino's ADC is 10-bit on common ATmega boards, which is plenty for azimuth, but a long cable can make the reading jump when you transmit. Average several samples, bypass the input, and calibrate against known stops. Also provide a software limit and a stall timeout so the motor relays drop out if the position stops changing, because a noisy or broken sensor shouldn't be able to drive the rotator into its limit.

Two more things that bite people. Inductive loads need protection, so put a flyback diode across relay coils and use a driver transistor or relay board with that built in. And power: a cheap switching supply can put hash on HF, and a Pi that sees undervoltage may behave oddly. Use a decent supply, and consider a read-only root filesystem or at least a clean shutdown routine so a power blip doesn't wreck the card.

If the Pi also runs digital modes through a sound interface, an audio isolation transformer can reduce ground-loop hum and noise on the audio path. It's a separate issue from PTT isolation, but it's often part of the same build, so decide early where each ground connects.

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.