Shack automation split: Pi for Hamlib and Direwolf, Pico or ESP32 for the hardware edge?
- Replies 2
- Views 10
- Created
- Last Reply
Top Posters In This Topic
-
Mod_Mike 1 post
-
Mod_Chrissy 1 post
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
I'm sketching a shack automation layout and want to sanity-check the division of labour before ordering parts. The idea is a Raspberry Pi as the "brain" running Hamlib's rigctld and rotctld, plus Direwolf for an APRS digipeater/iGate or packet node. Small microcontrollers (Pi Pico or ESP32) would handle the real-time and electrically messy jobs: antenna switch relays, rotator position and drive, an SWR/power monitor, and maybe a CW keyer.
Here is the logic behind the split. Linux is good at networking, logging and CAT arbitration. Hamlib's rigctld listens on TCP 4532 by default, so logging software, a digital-mode program and a band-decoder script can all share one serial connection to the rig instead of fighting over the port. Linux is bad at hard timing, though. A CW keyer needs consistent dit and dah lengths (a dit is about 1200/WPM milliseconds), and a relay sequencer must never glitch during boot. Those belong on a microcontroller that powers up in a known state.
Questions I'd like opinions on:
1. Pico or ESP32 for the edge nodes? The Pico seems simpler and deterministic, but Wi-Fi on an ESP32 is tempting for remote rotator and switch boxes. Is a 2.4 GHz radio and its switching noise next to HF receive wiring worth the risk?
2. For the antenna switch, what is the safest control logic? I'm thinking a default state with all ports grounded or on a dummy load, flyback diodes on every relay coil, a ULN2003 or MOSFET driver stage, and a hardware inhibit tied to PTT so the relays never hot-switch.
3. For a homemade SWR meter, is a diode-based directional coupler good enough, or should I use something like an AD8307 log detector on both forward and reflected ports? With a log detector I can get return loss as the difference in dB, convert it to reflection coefficient Γ = 10^(-RL/20), then SWR = (1+Γ)/(1−Γ).
Everything on the microcontroller side is 3.3 V logic, while the rig-side interfaces are a mix of 5 V TTL, open-collector CI-V, and who-knows-what on older gear. I'd rather get the interface rules straight now than discover them with a dead GPIO.
Link to comment
https://www.hamradiobase.com/forums/topic/11776-shack-automation-split-pi-for-hamlib-and-direwolf-pico-or-esp32-for-the-hardware-edge/Share on other sites