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.4
Wind 332.7 km/s
Aurora 2
Updated 06:00 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 the work between them

ci_cover.jpg

I'm planning a few shack automation projects and want to sort out which jobs belong on an Arduino-class microcontroller and which on a Raspberry Pi. The list so far: a remote antenna switch with band-dependent selection, rotator control with a web interface, CAT control through Hamlib for logging and digital modes, and a few environmental sensors (temperature and supply voltage) at the tower base.

My working idea is that anything time-critical or electrically close to the RF side, such as relay drivers, PTT sequencing and reading a rotator potentiometer, goes on an Arduino. The Pi would handle networking, the UI, logging and rigctld. The two would talk over USB serial or a simple text protocol.

Before I commit to that, I'd like to hear where people draw the line. I'm especially interested in these points:

1. How do you keep RF from upsetting the controller when running higher power on the lower bands?

2. What's a sensible way to interface PTT and band data with the rig without risking the rig's I/O ports?

3. Is the Pi reliable enough for unattended remote-site use, or should it only ever be a convenience layer?

  • Replies 2
  • Views 103
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

The split you describe is a common and sensible one. A microcontroller boots in milliseconds, runs one program, and has no filesystem to corrupt. A Pi runs a full operating system, which makes it great for Hamlib, a web server or a logger, but it can hang or take a while to come back after a power glitch. So keep anything that must fail safely, like relay states, PTT timeouts and motor stops, in the microcontroller firmware, and have it behave sensibly when the Pi disappears. A simple heartbeat works: if the Arduino doesn't receive a valid message for a few seconds, it drops the rotator motor and returns outputs to a known state.

On the electrical side, don't connect rig lines straight to GPIO pins. Pi GPIO is 3.3 V and not 5 V tolerant, and the current per pin is small. Most Arduino boards are 5 V logic, though some newer ones are 3.3 V, so check your specific board. For PTT, the usual approach is a small transistor or optocoupler stage driving the rig's PTT input, but check your rig's manual for the voltage and current on that line. Many rigs expect a contact closure to ground, and the line can carry more voltage than you'd like a logic pin to see. For relay coils, use a driver transistor with a flyback diode, or a relay board with that already built in, and keep the relay supply separate from the logic supply if the coils are noisy.

For the antenna switch, put an interlock in the firmware so the relays can't change while PTT is active. Hot-switching coax relays under power shortens their life and can stress the PA. A short delay between PTT assertion and RF, if your rig or amplifier supports sequencing, protects the contacts further.

For RF immunity, most of the fixes are mechanical and cost little. The usual failure modes are RF getting onto USB cables, control cables and power leads and then upsetting the microcontroller, or RF rectifying in an input pin and producing false readings. Some things that tend to help:

Put the electronics in a metal enclosure bonded to your station ground, and use shielded cable for anything long. Fit ferrite chokes or clamp-on cores on the USB, power and control leads, ideally wound as several turns through a core suited to the band. Add a small capacitor, perhaps 100 nF, plus a series resistor on analog inputs such as a rotator pot sense line, and consider a low-pass filter before the ADC. Keep the controller away from the feedline and the antenna tuner where you can. Symptoms such as random resets, a frozen serial link or relays chattering only on certain bands while transmitting point to common-mode current rather than a software bug, so try a different band and a different power level as a diagnostic.

For USB between the Pi and the rig or Arduino, an isolated USB hub or a galvanic isolator can break ground loops that show up as hum or noise in receive audio. That matters especially if you also use the Pi for digital modes through a sound interface.

On Pi reliability, it can run unattended, but plan for it. Use decent power supply hardware, because undervoltage causes odd faults. Reduce SD card writes by sending logs to RAM or using a read-only root filesystem, or boot from SSD if your model supports it. Enable the hardware watchdog so a hang leads to a reboot. For a remote tower site, I'd still make the Arduino the safety layer and treat the Pi as the part you can reboot without anything bad happening to the antennas or the rig.

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.