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 between them

ci_cover.jpg

Many shack automation projects start as "I'll just use a Pi for everything," or "an Arduino is enough." After a while they tend to settle into a split. This is a starting point for comparing notes on where to draw that line.

The Arduino-class side (Uno, Nano, Pro Micro, or a 3.3 V board like a Pico) is good at the things that must happen on time and keep working: switching antenna relays, sequencing a transmit/receive changeover, reading a rotator potentiometer through an ADC, measuring forward and reflected power from a detector, and driving a band-decoder output. It boots in milliseconds, has no filesystem to corrupt, and fails in ways that are easier to predict. A hardware watchdog and a sensible default relay state matter more than most people expect.

The Raspberry Pi side is better for the "computer" jobs: running Hamlib's rigctld or rotctld, logging, a small web dashboard, a soundcard TNC such as Direwolf, digital-mode software, or a remote-control gateway. It can talk to the microcontroller over USB serial, and a simple line-based protocol is usually enough. Some people make the Arduino emulate a protocol Hamlib already understands, such as a GS-232-style rotator interface, so existing software works without custom code.

A few things are worth settling early, because they cause the most trouble in a real shack:

Voltage levels. Pi GPIO is 3.3 V and is not 5 V tolerant. An Uno-style board is 5 V. Before connecting anything to a rig's CAT or data port, check what that port expects. Some interfaces are TTL-level, some are RS-232, and Icom's CI-V is a single-wire open-collector bus. A USB-serial adapter or level shifter is often the safer choice over direct GPIO.

PTT. A microcontroller pin should not be wired straight to a rig's PTT line. Use a small transistor or optocoupler that pulls the line to ground, and confirm the open-circuit voltage and the current the radio expects. Add a hard timeout in firmware so a software hang can't leave the transmitter keyed. The rig's own time-out timer is a backstop, not the main plan.

RF in the wrong places. USB cables, relay control leads and sensor wires can all pick up common-mode RF and cause random resets or false readings. Shielded cable, ferrite chokes on both ends of the USB run, bypass capacitors near the inputs, and a metal enclosure with the feedline grounded at the entry point go a long way. Test at full power on each band, not only on the bench.

Power. A cheap buck converter that drops 13.8 V to 5 V can produce birdies on HF. If you hear them, add filtering, move the converter away from the receive antenna's feedline, or use a linear regulator where the heat is acceptable. Also use quality storage on the Pi and set up clean shutdown or a read-only root filesystem if the power can be cut without warning.

Where do you put the boundary? Does the Pi ever touch relays, or is it only a front end to a microcontroller that owns all the switching and interlocks?

  • Replies 2
  • Views 78
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

A strict boundary has worked well as a design rule: the microcontroller owns anything that can damage equipment, and the Pi can only request actions. For example, the Pi sends "select antenna 3" and the Arduino decides whether that's allowed. It can refuse if the transmitter is keyed, wait for the relay to settle, then confirm the new state. That keeps hot-switching protection out of a general-purpose Linux system that could be rebooting or running a script that hung.

The same applies to the amplifier. A sequencer should be dumb and hardware-driven, with the amp's keying line closed only after the antenna relay and T/R relay have had time to switch. Keep the delays in firmware, and make the safe state the unpowered state, so a dead board leaves the amp unkeyed and the antenna on a known port.

One practical point on protocols: keep messages short and human-readable at first, something like a command, a newline and an acknowledgement. You can debug it with a serial terminal, and you can add a checksum or heartbeat later. A heartbeat from the Pi is useful: if it stops arriving, the microcontroller can drop to a defined idle state.

I'd add that the USB-versus-GPIO decision affects RF behaviour as much as software. Running a USB cable from a Pi at the operating position to a controller near the antenna switch is a common route for common-mode current. If the controller is out at the tower or the antenna switch box, a serial link such as RS-485 or an isolated link may be sturdier than a long USB run, and it makes the lightning and grounding questions easier to think about. A fibre or Ethernet-based option avoids a lot of problems but costs more and needs more parts.

For the rotator, an Arduino reading the position potentiometer through a stable reference and averaging a few ADC samples is usually enough. Think about the endpoints, though. Many rotators have a stop that is not at the same place as the compass mark, and a south-centred or north-centred model changes the wrap-around logic. Put that mapping in the controller and let Hamlib or the logger just send the requested azimuth.

For SDR or digital-mode setups, also check the audio path. A Pi plus a USB sound interface is simple, but ground loops between the radio audio, the interface and the computer can show up as hum or noise. An isolation transformer on the audio lines is often a cheaper fix than changing the software.

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.