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 split the work between them

ci_cover.jpg

I'm planning a round of shack automation and trying to decide what should run on a microcontroller and what belongs on a Raspberry Pi. The wish list is an antenna switch with band-based selection, PTT sequencing for an amplifier and preamp, a rotator controller, and some logging and status over the network. Digital modes with Direwolf or similar might come later.

My current thinking is that anything with hard timing or direct hardware contact (relay drivers, PTT lines, reading a rotator potentiometer) goes on an Arduino-class board. The Pi would handle the network side: a web interface, MQTT, logging, and talking to the radio through Hamlib's rigctld. That keeps a Linux boot and SD card out of the TX/RX switching path.

Before wiring anything, I'd like to hear where people draw that line, and which traps matter most in a real RF environment. The ones on my list are the Pi's 3.3 V GPIO versus 5 V Arduino logic, relay flyback protection, isolating PTT from the radio, and RFI getting into USB cables and switching supplies. What else should be on that list?

  • Replies 2
  • Views 55
  • 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, has no filesystem to corrupt, and does the same thing every time it powers up. For a PTT sequencer that matters. If power blips during a transmit, you want the amplifier and antenna relays to drop to a known safe state, not wait for an OS.

A few specifics to add to your list:

Raspberry Pi GPIO pins are 3.3 V and are not 5 V tolerant. If an Arduino Uno or Nano is sending serial to the Pi, use a level shifter or at least a resistor divider on the Arduino TX line. Or skip the problem by connecting them over USB. A 3.3 V board such as an ESP32 or Pi Pico avoids the mismatch entirely.

Don't drive relay coils from a GPIO pin. Use a transistor or MOSFET driver, or a driver array, with a flyback diode across each coil unless the relay module already includes one. For PTT into a radio, an optocoupler or a small reed relay keeps the control board electrically separate from the rig's PTT line, which helps avoid ground loops and accidental voltage on the wrong pin.

Also check what the radio's PTT input actually expects. Many rigs just want a contact closure to ground at low current, but check the manual for your model rather than assuming. Wiring a 12 V signal into a line meant for a few milliamps at 5 V or less is an expensive mistake.

On the RF side, the problems tend to show up as odd behavior, not obvious failure: a USB serial port that drops when you key up, an ADC reading that jumps during transmit, a relay that chatters. The usual fixes are cheap, so plan for them from the start.

Put the electronics in a metal enclosure if you can, and bring cables in through ferrite chokes. Clamp-on ferrites on USB and power leads are a start, but several turns through a suitable core do much more than a single pass. Bypass capacitors at the connectors help too, typically a small ceramic in parallel with a larger value, kept close to where the wire enters. For HF the common-mode current on the cable is often the real culprit, so treat the cable as part of the antenna system.

Be careful with cheap buck converters. Their switching noise can show up as birdies or a raised noise floor on HF. If you use one, filter the input and output and keep it away from the receive path. A linear regulator after a noisy supply costs some efficiency but is often quieter for low-current logic.

For a rotator potentiometer, the ADC reading will wander a little. Average several samples, and add a small RC filter at the input. Add a deadband in software so the controller doesn't hunt around the target heading.

On the Pi side, if it will run unattended, consider a read-only root filesystem or at least a decent power supply and a clean shutdown path, since abrupt power loss is the classic cause of SD card corruption. Keeping the safety-critical switching on the microcontroller means a Pi crash can't leave a relay stuck in the wrong state.

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.