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 split the work and how to keep RF out of it

ci_cover.jpg

I'd like to compare approaches for shack automation: antenna switching, a rotator controller, band-decoded filter switching, PTT sequencing, and some logging of voltage, temperature and SWR. Most of the build guides I find pick either an Arduino or a Raspberry Pi without explaining why. I suspect the better answer is to use both, each for what it does well.

Here is the split I would start from. The Raspberry Pi runs a full Linux system, so it suits software that already exists: Hamlib's rigctld for CAT control, fldigi, WSJT-X, Direwolf for packet and APRS, a small web dashboard, and remote access over the network. An Arduino-class microcontroller runs one simple program with predictable timing. That suits relay sequencing, reading a potentiometer on a rotator, counting pulses, reading analog forward and reflected power, and enforcing a PTT timeout. If the Linux side crashes or an SD card gets corrupted, the microcontroller can still put everything into a safe state.

A few details seem to matter more than the choice of board:

1. Logic levels and current. Raspberry Pi GPIO is 3.3 V and not 5 V tolerant, and each pin can only supply a few milliamps safely. Many classic Arduino boards run at 5 V. Never drive relay coils directly from either one. Use a transistor, MOSFET or ULN2003-style driver, with a flyback diode if the driver does not include one.

2. Fail-safe defaults. On power-up or reset, pins can float or briefly change state. Pull-down or pull-up resistors should hold PTT lines, amplifier keying and antenna relays in a known safe state until the controller is running properly.

3. RF immunity. A microcontroller and a 100 W signal on a nearby antenna can get along badly. Typical countermeasures are a metal enclosure, ferrite chokes on USB and control cables, small bypass capacitors at the I/O entry points, short wiring, and keeping control wiring away from feedlines.

4. Noise from the other direction. Cheap switching supplies, including the Pi's power adapter and the DC-DC converters on some Arduino boards, can put birdies on HF. It is worth checking with the receiver before you commit to a layout.

Where would you put the line between the Pi and the microcontroller? Do you let Linux make any hard real-time decisions, or keep those in the microcontroller?

  • Replies 2
  • Views 104
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

A useful rule is that anything that can damage equipment or cause an illegal or unwanted transmission should not depend on a general-purpose OS. For example, a PTT timeout, an amplifier bias-switch sequence, or a lockout that stops antenna relays switching while RF is present should live in the microcontroller or, better, in plain hardware logic. The Pi can request actions, such as "select antenna 3" or "key transmitter", but the microcontroller decides whether the request is allowed.

The link between them also matters. USB serial is easy, but it is also a path for common-mode RF. A ferrite on the cable helps. If the Pi and the I/O board sit in the same enclosure, a short UART link with level shifting is an option. A simple heartbeat is a good design pattern: the Pi sends a message every second or so, and if the microcontroller misses a few of them, it drops PTT and returns the relays to a defined state.

For PTT lines to the rig, an optocoupler or a small transistor stage keeps the interface clean. Check what your radio expects, though. Some want a contact closure to ground, some use a specific voltage, and the interface is not always standardized. Check the manual for the actual circuit and current rating before wiring anything.

The Pi has a lot going for it as the "brain" because of the existing ham software, but a few points are easy to overlook. Run it headless with a good power supply and consider a read-only root filesystem for any always-on unit. SD cards can corrupt after unclean power loss, and shack power does get switched around. An undervoltage warning on the Pi is a hint that your 5 V rail is sagging, which can also cause odd behavior in connected hardware.

For CAT, check the rig's electrical interface first. Some radios expose a USB serial port, some use TTL-level serial, some use RS-232 levels, and Icom's CI-V uses a single-wire bus. Plugging 12 V RS-232 levels into a 3.3 V Pi pin is a good way to destroy it, so use the proper level converter. Once the physical layer is right, rigctld lets several programs share the radio instead of fighting over the serial port.

For audio, a USB sound interface is usually easier than trying to use the Pi's onboard audio. If you hear hum or hash, look at ground loops first: an isolation transformer on the audio lines, separate grounds where appropriate, and ferrites on all the cables. For a rotator, an Arduino's 10-bit ADC reading the position potentiometer is usually fine for azimuth. You will get cleaner readings if you add a small RC filter and average several samples, and calibrate the stops by hand rather than trusting the nominal values.

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.