Pi, Pico or ESP32 for shack automation? Where to split rig control, SWR sensing, rotator and antenna switching
- Replies 2
- Views 25
- Created
- Last Reply
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
This thread is for sorting out which jobs belong on which board when you build shack automation. The usual wish list is CAT rig control, an SWR/power meter, a rotator controller, a remote antenna switch, an APRS tracker or Direwolf TNC, a CW keyer and a small LCD status panel. Many people put all of it on one Raspberry Pi. Others give each function its own microcontroller. Neither is wrong, but the trade-offs are different.
Here is a rough split to argue with. A Raspberry Pi running Linux suits things that need a network stack, logging, a sound card and long-running services: Direwolf, Hamlib's rigctld, a web dashboard, and logging software. A Pi Pico or Arduino-class board suits anything with hard timing or a need to survive a crash on its own: CW keyer timing, relay sequencing for the antenna switch, PTT lines and rotator motor control. An ESP32 sits between them. It gives you Wi-Fi and Bluetooth and plenty of GPIO, but a noisy RF environment can be hard on Wi-Fi, and the 3.3 V pins have no tolerance for sloppy interfacing.
Some constraints are worth settling before you pick hardware:
1. Logic levels. The Pico and ESP32 are 3.3 V devices and their GPIO is not 5 V tolerant. Many rigs use TTL-level serial on a data port, Icom's CI-V is a single-wire open-collector bus, and older Kenwood and similar radios may use RS-232 voltage levels. Check what your radio actually presents, then use a proper level shifter, transistor stage or MAX3232-type chip rather than hoping it works.
2. Failure behavior. If the controller hangs mid-transmit, what happens? A rotator should stop driving when a heartbeat or command stops, and an antenna switch should not move while RF is present. A PTT line should default to receive. Put a hardware watchdog or a timeout on anything that keys or moves things.
3. Where the measurement happens. For an SWR meter, the microcontroller ADC only reads what the front end gives it. A directional coupler with diode detectors is simple but non-linear at low power. A log detector such as an AD8307 handles a wide dynamic range better. In both cases you calibrate against known power levels and a known load, and you compute SWR from forward and reflected readings rather than trusting a straight voltage ratio.
4. Software for the radio link. Hamlib's rigctld lets several programs share one CAT connection over TCP, with port 4532 as its usual default. Putting a single Pi in front of the radio as the only CAT master avoids two programs fighting over one serial port.
Which parts of your station would you keep on a microcontroller, and which would you hand to a Pi? What has bitten you when mixing the two?
Link to comment
https://www.hamradiobase.com/forums/topic/11561-pi-pico-or-esp32-for-shack-automation-where-to-split-rig-control-swr-sensing-rotator-and-antenna-switching/Share on other sites