Pi vs ESP32 vs Pico for shack automation: where do you draw the line, and how do you keep RF out of it?
- Replies 2
- Views 29
- Created
- Last Reply
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
A lot of shack automation projects start with the question of which board to use, but a better question is which jobs belong on which board. Antenna switches, rotator control, CAT bridges, SWR/power metering, APRS and CW keying all end up on a bench next to a transmitter, and that environment is harder on cheap microcontroller boards than most tutorials admit.
Here is a rough split worth arguing about. A Raspberry Pi running Linux suits jobs that need a real OS: Direwolf as a software TNC, a logging server, a rigctld instance, or a web dashboard. Direwolf wants a sound interface (a USB sound card or a CM108-type adapter), and it can handle PTT through a GPIO line, a serial RTS/DTR line, or a CM108 GPIO pin. It exposes KISS over TCP (port 8001 by default) and AGW (port 8000), so other software can talk to it over the network instead of needing direct hardware access.
A Pico or an ESP32 suits the deterministic, close-to-the-metal jobs: relay drivers, a CW keyer with proper timing, reading a rotator potentiometer, generating a clock with an Si5351, or polling a temperature sensor. The ESP32 adds Wi-Fi and Bluetooth, which is useful for a remote switch box but also means periodic RF bursts at 2.4 GHz, plus a noisy switching supply, sitting near your receive antenna lines.
The first practical trap is logic levels. The Pico and ESP32 are 3.3 V devices and their GPIO is not 5 V tolerant. Rig CAT ports vary: some are TTL-level serial, some are RS-232 levels, and Icom CI-V is a single-wire open-collector bus. Check the manual for your rig before wiring anything directly. A proper level shifter, or an RS-232 transceiver such as a MAX3232 where the rig needs one, costs very little compared with a dead rig port.
The second trap is RF getting into everything. Common-mode current on USB cables, I2C runs, and relay control leads is the usual culprit, rather than RF coupling into the board itself. Ferrite chokes on cables, short I2C runs with bypass capacitors close to each device, a metal enclosure bonded to station ground, and a decent power supply all help. Spurious resets or phantom button presses during transmit usually point to common-mode problems rather than software bugs.
A few specific items to compare notes on:
Si5351: the outputs are square waves with strong harmonics, so a low-pass filter is needed before using it as a transmit source. Frequency accuracy depends on the reference crystal, so calibration in software matters. Keep the I2C wires short and the supply clean.
SWR meters: a directional coupler with diode detectors works, but the response is non-linear at low power. A log detector such as the AD8307 gives a much wider dynamic range, though either approach needs calibration against a known load and power level.
Rotator controllers: the ESP32's built-in ADC is noticeably non-linear and noisy, so an external ADC (an ADS1115, for example) with some averaging usually gives steadier azimuth readings from a feedback potentiometer. Drive the motor through relays or a driver stage rather than from a GPIO line.
Antenna switches: put flyback diodes across relay coils, use a driver such as a ULN2003 or MOSFETs instead of GPIO pins, and think about whether you ever want the switch to change state while transmitting. Port isolation also falls off with frequency, so check how a relay is rated for the band you care about.
Where do you draw the line between the Linux box and the microcontroller? And what has actually worked for keeping RF out of the control electronics?
Link to comment
https://www.hamradiobase.com/forums/topic/11246-pi-vs-esp32-vs-pico-for-shack-automation-where-do-you-draw-the-line-and-how-do-you-keep-rf-out-of-it/Share on other sites