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 33
A 3
K 1 Quiet
X-Ray B1.3
Wind 318.7 km/s
Aurora 2
Updated 11: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 the two

ci_cover.jpg

A lot of ham automation projects seem to land on the same question: should this job go on an Arduino-type microcontroller or on a Raspberry Pi? The answer depends on what the device has to do when RF is present, and on how badly it can fail. I'd like to compare notes on where people split the work.

A rough division that holds up for many builds: use a microcontroller for anything that must be predictable, simple and close to the hardware. Examples are antenna switch control, band-decoder outputs, PTT sequencing, reading an SWR or power detector voltage, and reading a rotator potentiometer. Use a Pi for anything that benefits from a full operating system, such as logging, a web interface, MQTT, running Hamlib's rigctld, a digital-mode TNC like Direwolf, or scheduling and remote access.

The combination is often better than either alone. The Pi talks to the radio and the network. A small microcontroller on a serial or I2C link drives relays and reads analog values, so a Linux crash or an SD card problem doesn't leave a relay stuck in the wrong state.

A few practical points worth discussing:

Logic levels. Pi GPIO pins are 3.3 V and are not 5 V tolerant. Many Arduino boards run at 5 V. Connecting the two directly can damage the Pi, so use a level shifter or a resistor divider on lines going into the Pi, or choose a 3.3 V microcontroller board.

Relay drivers. A GPIO pin shouldn't drive a relay coil directly. Use a transistor or driver IC, and put a flyback diode across a bare coil. Ready-made relay boards usually include these parts, but check the board's input requirements, because some are active-low and some need more current than a Pi pin should supply.

PTT safety. If software controls PTT, add a hardware timeout so a hung program can't leave the transmitter keyed. This can be a small timer circuit or a microcontroller that drops PTT after a set period unless it keeps being refreshed.

RF in the shack. Cheap boards and long unshielded wires can pick up RF, so behavior sometimes changes only when you transmit. Common fixes include a metal enclosure, ferrites or common-mode chokes on USB and power leads, small bypass capacitors on sensor lines, and keeping control wiring away from feedlines.

Where do you put the boundary between the two? Does your station logic live on the Pi, in a microcontroller, or both?

  • Replies 1
  • Views 91
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

The split between a Pi and a microcontroller makes sense, and the "what happens when the computer hangs" test is a useful way to decide it. For each output, ask what state it should fall back to. An antenna selector might reasonably hold its last position. PTT, an amplifier bias line or a power-supply enable should drop to a safe state, ideally from a hardware watchdog or timer that doesn't depend on Linux.

For the radio link, rigctld from Hamlib is a handy bridge when several programs need CAT access. It's usually better to let one process own the serial port and have everything else talk to it over the network than to have logging software, a digital-mode program and a script all competing for the port. Check which rig model and settings your radio needs, since serial speed and CAT behavior differ between rigs.

On isolation, optocouplers or relay contacts are worth the extra parts where the controller connects to station wiring such as amplifier keying lines, rotator supplies or anything with a different ground reference. They also give some protection if something upstream goes wrong.

One thing I'd add is analog measurement. The Pi has no built-in analog inputs, so reading a rotator potentiometer, a battery voltage or an SWR detector means adding an external ADC. A standard Arduino-style board has analog inputs built in, but the resolution is limited (10 bits on common ATmega328-based boards), and it's only as good as the reference voltage and the noise on the line. For a rotator position that is usually plenty. For power or SWR you'd likely want to calibrate against a known meter rather than trust the raw numbers.

Noise is the usual trouble with analog inputs next to a transmitter. Averaging several readings in software, adding an RC filter at the input, and using twisted or shielded pairs for the sensor cable all help. If readings jump only while keyed, suspect RF getting onto the sensor wiring or the board's supply rather than a software fault.

For the Pi side, an SD card can become a weak point in an always-on station. Options include a good power supply, a clean shutdown procedure, minimizing log writes, and booting from SSD or using a read-only root filesystem for appliance-style builds.

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.