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 0 Quiet
X-Ray B1.3
Wind 336.5 km/s
Aurora 2
Updated 07:00 UTC HamQSL · N0NBH
Day 80/40m Good 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 job between them (PTT, antenna switching, CAT, rotator)

ci_cover.jpg

I'm planning some shack automation and can't decide where each piece of hardware belongs. The wish list is an antenna switch controlled from a web page, a band decoder that follows the rig's frequency, PTT sequencing for a transverter and amplifier, and eventually rotator control. I also want to run WSJT-X and a logging program on the same system.

My current thinking is that a Raspberry Pi is the right place for anything that needs Linux, such as Hamlib's rigctld, digital mode software, networking and a web UI. An Arduino-class board (or an ESP32) seems better for the hard I/O: relays, PTT timing, reading potentiometers and monitoring voltages. The question is whether it's worth splitting the work or whether I should let the Pi do everything through its GPIO.

A few specific points I'd like opinions on:

1. Is it safe to drive relays and PTT lines straight from Pi GPIO pins if I add a transistor or driver stage? Or is it better to keep that off the Pi entirely?

2. How do you handle CAT? Some rigs use TTL-level serial, some use RS-232 levels, and Icom's CI-V is a single-wire bus. I don't want to guess at voltage levels and damage a port.

3. What's the best way to deal with RF getting into the control electronics? I expect trouble once I'm running power on HF with the controller a few feet from the feedline.

  • Replies 1
  • Views 79
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

Splitting the job is a common and sensible pattern. The Pi is a general-purpose Linux computer, so it can be delayed by other processes. That is fine for a UI or a logger, but sloppy for anything where timing matters, like releasing an amplifier relay only after the antenna relay has finished switching. A microcontroller runs one program with predictable timing, so sequencing belongs there. The usual link is a USB serial connection with a simple text protocol, for example a command like ANT 3 or PTT ON and a status line back. The Pi never needs to know how the relays are sequenced.

On your GPIO question: Pi pins are 3.3 V logic, are not 5 V tolerant, and have modest current limits, so they should only ever drive the input of a transistor, MOSFET or driver such as a ULN2003. Never drive a relay coil directly from a pin. Put a flyback diode across any relay coil that isn't already protected inside a driver IC. Beyond that, an Arduino Uno is a 5 V board and an ESP32 is 3.3 V, so check the logic levels of whatever sits between them. Mixed levels are a very common way to kill an input.

For CAT, read the rig's manual or service documentation for the exact port. Don't assume a 'serial' jack is RS-232 or TTL. A USB cable from the rig, if it has one, avoids the level question entirely, and Hamlib can talk to it as a serial device. For CI-V, the bus is open-collector and shared, so people typically build a small transistor interface rather than wiring a Pi UART straight to it.

On RF in the shack, the symptoms usually show up as random resets, garbled serial data, relays chattering or a USB device dropping off, and they appear only when you transmit. The fixes are mostly boring and cumulative. Use clip-on ferrites or a few turns through a suitable ferrite core on USB, power and control cables, and put the choke close to where the cable enters the enclosure. Keep leads short and add bypass capacitors at the inputs. A metal enclosure bonded to the station ground helps more than a plastic box. Above all, reduce common-mode current on the feedline itself with a good choke at the antenna feedpoint, because otherwise the whole shack becomes part of the antenna system.

For PTT, an optocoupler or a small relay gives you galvanic isolation between your controller and the rig's PTT line, which are often on different grounds. For audio between a Pi and a rig, ground loops cause hum and can inject noise into digital modes. A 1:1 audio isolation transformer on both the transmit and receive paths is a cheap fix. Many commercial digital-mode interfaces already include these isolation parts.

One more caution about relay hardware. Control relays are rated for switching contacts at certain voltages and currents, not for passing RF power. Check that an antenna relay is suitable for the frequency and power you'll use, and sequence it so it never switches while RF is present (hot switching). That's the reason for letting the Arduino delay PTT until the relay has settled. If you add a rotator later, it can reuse the same pattern, with the Pi running rotctld and the microcontroller reading the position potentiometer and driving the motor stage.

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.