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 99
SN 26
A 6
K 0 Quiet
X-Ray B2.3
Wind 412.9 km/s
Aurora 1
Updated 14: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

Pi, Pico or ESP32 for shack automation? Where to split the work between CAT, PTT, relays and Direwolf

ci_cover.jpg

I'd like to compare notes on architecture before committing to a design. The goal is one coherent shack-automation setup rather than five unrelated gadgets. The wish list is CAT rig control, a Direwolf TNC for APRS, an antenna switch, a rotator controller, and maybe a Si5351-based signal source or a small CW keyer. All of it needs to behave when a few hundred watts are running nearby.

There are two obvious approaches. One is a single Raspberry Pi doing everything: Direwolf, rigctld (Hamlib), logging, a web UI, and GPIO for relays and PTT. The other is a Pi for the heavy software (Direwolf, logging, network access) plus one or more microcontrollers (Pico, Pico W or ESP32) that own the hardware-facing jobs: relay drivers, ADC readings for rotator position or forward and reflected power, and keyer timing.

The split makes sense to me because Linux is not a real-time system. A CW keyer or a PTT sequencer that has to open a relay before RF appears should not depend on a Pi's scheduler, an SD card, or a USB audio device re-enumerating. A microcontroller can enforce hard rules in firmware, such as never switching the antenna relay while PTT is asserted, and it keeps working if the Pi hangs.

Here are the specific points I'd like opinions on:

1. Voltage levels on CAT. The Pico and ESP32 are 3.3 V devices and their GPIOs are not meant to see 5 V. Rig CAT ports vary: some are TTL-level serial, some are true RS-232, and Icom's CI-V is a single-wire open-collector bus. Each needs a different interface. What do people use for level shifting and isolation so they don't have to guess per rig?

2. PTT and keying. Between optocouplers, small transistors and relays, what is the best way to key a rig without creating a ground loop? Direwolf can use GPIO, serial RTS/DTR, or CM108-style USB audio GPIO for PTT, so there are several clean options on the Pi side.

3. Analog measurements. The ESP32's built-in ADC is known for its non-linearity, and the Pico's ADC is only as quiet as its supply and layout. For a rotator potentiometer or an SWR bridge detector, is an external ADC like the ADS1115 worth it?

4. RF immunity. Sooner or later a transmitter will make a microcontroller reset, corrupt an LCD, or turn an I2C bus into an antenna. What actually helps: ferrites, bypass caps, shielded boxes, shorter I2C runs, watchdogs?

  • Replies 2
  • Views 60
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

The split architecture is the sensible one, and the dividing line is basically "what must be safe if the Pi crashes?" Anything that can damage equipment, such as relay sequencing, PTT timeout, and not hot-switching an antenna relay, should live in microcontroller firmware with a simple serial or network command interface. The Pi just asks for a state and the microcontroller decides whether it is allowed. A hardware PTT timeout is cheap insurance against a stuck transmitter.

On CAT levels, don't generalize between rigs. Check the manual's pinout and signal description for each radio. A TTL-level port can usually go to a 3.3 V device through a resistor divider or a proper level shifter, but an RS-232-level port needs a MAX3232-type converter, and connecting it straight to a Pico can destroy the pin. For CI-V, the bus is shared and open-collector, so a transistor or a purpose-designed interface is the safer approach. If it's feasible, using the rig's USB CAT port directly with Hamlib avoids most of this, though you then have to deal with USB noise and ground paths.

For relay drivers, use a ULN2003 or a logic-level MOSFET with a flyback diode, and power the coils from a separate supply from the logic rail. Relay coil kickback is a classic cause of random resets that get blamed on RF. For an antenna switch, break-before-make behavior, a sensible relay rating for the band and power, and some interlock against switching under power matter more than which brand of board you use.

  • Administrators

On the RFI question, think about paths before parts. Interference gets into a project over the cables: USB, audio, the CAT line, the relay control wires, and the power lead. A microcontroller in a metal box with unfiltered 3-meter cables hanging out of it will still misbehave. Common-mode chokes (ferrite clamps or a few turns through a mix suited to the band) on each cable, small bypass caps near the connectors, and a proper bond between the enclosure and shield are the usual first steps. Keep I2C runs short. If the Si5351 board or LCD is remote, consider lower bus speed, proper pull-ups, and a buffer or differential extender.

For audio between the rig and the Pi sound interface for Direwolf, a 1:1 audio isolation transformer, or a USB interface with isolated audio, removes the common ground loop hum and often some RF pickup. Set levels carefully too. Direwolf needs a sensible audio input level (it prints levels while running) and transmit audio should be set so you aren't overdeviating FM.

On the ADC question, an external converter is cheap and eliminates a lot of head scratching. The ESP32's internal ADC can be calibrated and averaged, but for a rotator position pot, an ADS1115 over I2C plus a small RC filter and some averaging is easier to trust. Also remember that Wi-Fi on an ESP32 is itself a radio sitting beside your rig. It works fine for many people, but if you are running a lot of power or have a tight enclosure, test with the transmitter on and consider wired Ethernet or a Pi gateway for the critical stuff.

One more Pi-specific item: if the Pi will run unattended or in a portable APRS setup, a read-only root filesystem or a log-to-RAM setup reduces SD card corruption on power loss. Combine that with a clean shutdown path if there's a battery.

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.