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

Shack automation layout: what should live on the Pi and what belongs on an ESP32 or Pico?

ci_cover.jpg

I'm sketching a shack control setup and want to sanity-check how the work is divided before any boards get ordered. The goal is one small network of devices that handles rig control over CAT, antenna switching, a rotator, an SWR/power readout and an APRS/packet node, without turning the desk into an RFI generator.

The split I'm leaning toward looks like this:

Raspberry Pi (Linux side): runs Hamlib's rigctld (default TCP port 4532) and rotctld (default 4533) so logging and digital-mode software can share the rig and rotator over the network instead of fighting over a serial port. It also runs Direwolf as a soft TNC, exposing KISS over TCP (8001 by default) and AGW (8000) to whatever APRS or packet client is in use. Anything that needs a sound card, a filesystem or a network stack goes here.

Pi Pico or ESP32 (real-time side): anything that has to act predictably within milliseconds or has to be safe if the Pi crashes. That means relay drivers for the antenna switch, PTT interlocks, ADC reading for rotator position, a CW keyer, and the detector for the SWR meter. The Pi sends high-level commands such as "select antenna 3" or "rotate to 270", and the microcontroller enforces the rules.

A few specific questions where I'd like opinions:

1. Antenna switch safety. Should the microcontroller refuse to change relays while PTT is asserted? I'd want that check in hardware or firmware close to the relays, not only in a Python script on the Pi. Latching relays versus normal relays with a holding current is also open. Latching saves power and heat, but you need to know the state after a power loss.

2. Rotator position sensing. The ESP32's built-in ADC is known for non-linearity and noise, especially near the rails. Is an external ADC like an ADS1115 over I2C worth it for reading a rotator's feedback potentiometer, or is averaging on a Pico's 12-bit ADC good enough? And is emulating the Yaesu GS-232 protocol the easiest way to make the controller look like a standard rotator to rotctld?

3. CAT levels. Different rigs use different electrical interfaces: TTL-level serial, RS-232 levels, or Icom's single-wire CI-V bus. The 3.3 V logic on a Pico or ESP32 is not 5 V tolerant, so level shifting and isolation need thought. USB-serial adapters with proper isolation are tempting, but ground loops between the PC, rig and station ground are a real concern.

4. RFI discipline. Wi-Fi on an ESP32 sitting a few feet from an HF antenna feed line is one more thing that can go wrong, and so are the cheap switching supplies powering all of this. What do you do with every cable that leaves an enclosure (ferrites, bypass capacitors, shielded cable, a metal box)?

I'm also trying to decide whether a Si5351 (as a VFO, a test source or a beacon driver) belongs in the same project at all, since its square-wave output needs low-pass filtering before it gets near an antenna. Tell me where this architecture is overcomplicated or fragile.

  • Replies 2
  • Views 30
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

The split makes sense, and the rule I'd keep is that anything that can damage hardware must be safe when the Pi is dead. A Pi hangs, an SD card gets corrupted, a script throws an exception halfway through a sequence. The microcontroller should boot into a known state, ideally with all relays in a default position that grounds or parks the antennas. It should also have a watchdog, so if the Pi stops sending heartbeats for a few seconds it goes back to that state.

For the PTT interlock, it's best to bring a PTT sense line into the controller (an opto-isolated input from the rig's PTT or from the keying line) and refuse to switch while it's active. Doing this in firmware gives you a real guarantee that software on the Pi can't violate. Hot switching is hard on relay contacts, and with an amplifier in the chain it can also destroy things downstream. A short delay (a few tens of milliseconds, chosen from the relay's datasheet) between dropping TX and switching is cheap insurance.

For relay drive, put a flyback diode across every coil, use a driver such as a ULN2003 or discrete MOSFETs, and keep the relay supply and its return routed separately from the logic supply. With latching relays, store the last state in non-volatile memory, but also treat the stored state as a hint and re-drive the relays on boot rather than trusting it.

  • Moderators

On the analog side, I'd treat the SWR meter and the rotator as two separate measurement problems. For SWR, a directional coupler feeding a log detector such as an AD8307 gives you a wide dynamic range, and you can compute SWR from forward and reflected voltages after calibrating against known loads. The part people skip is calibration across bands: coupler directivity and detector response change with frequency, so a single calibration constant will only be roughly right. Also remember the reading is meaningful only at the point where you measure it, and loss in the coax makes the SWR at the radio look better than it is at the antenna.

For the rotator pot, an external ADC is a reasonable choice if you want repeatable readings. Add an RC filter at the input, average multiple samples, and consider a small dead band so the controller doesn't hunt back and forth. If you implement GS-232 commands, such as the position query and the azimuth set command, rotctld can treat the controller as a standard Yaesu-style rotator. That saves writing a custom Hamlib backend.

On the Si5351: it's fine for a VFO or a low-power signal source, but use a low-pass filter appropriate for the band, because the square-wave output is full of harmonics. Keep it in a shielded box and don't power it from the same noisy rail as the relays. I'd keep that board separate from the automation project at first, so you can tune the RFI behavior of each module on its own.

One more practical point: if you can, run the ESP32 with Wi-Fi disabled in the shack and use wired Ethernet or USB serial to the Pi. A Pico on USB with a ferrite on the cable is quieter, and it removes a variable when you're chasing noise on the receiver.

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.