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

Splitting shack automation between a Pi, a Pico and an ESP32: where should CAT, relays and rotator control live?

ci_cover.jpg

I'm sketching a modular shack automation setup and want to sanity-check the architecture before I solder anything. The goal is a small set of nodes rather than one big box:

1) A Raspberry Pi running Hamlib (rigctld and rotctld), logging software and possibly Direwolf for APRS or packet. 2) A Pi Pico or similar for hard real-time and safety-critical jobs: antenna switch relays, PTT interlocks and CW keying. 3) An ESP32 for remote sensing and a web or MQTT interface, such as SWR and power readings, temperature and rotator position.

The questions I'd like opinions on:

CAT interface. USB CAT is easy, but some rigs only have a TTL-level or RS-232 CAT port, and Icom's CI-V is a single-wire bus. The Pico and ESP32 are 3.3 V devices and the Pico's GPIO is not 5 V tolerant. Is it sensible to always use a proper level shifter or a MAX3232-type chip, or to let the Pi talk to the rig and keep the microcontrollers off the CAT line?

Antenna switch. Should relay control be dumb and local (Pico with a ULN2003 or MOSFET drivers and a default-safe state at power-up), with the network side only sending band or antenna commands? I'd also like the Pico to refuse a switch while PTT is active so nothing gets hot-switched.

RF in the shack. The ESP32's Wi-Fi is convenient, but I'm wary of what a few hundred watts on 80 m or a nearby vertical will do to a bare board on a breadboard-style layout. Where do you start: ferrites, shielded enclosures, bypassing every line, or separating the digital side physically?

Rotator. If the rotator controller reads azimuth from a potentiometer through an ADC, is it better to use an external ADC such as an ADS1115 than the ESP32's internal one? Or should the Pico do the loop and the ESP32 only pass setpoints along?

Tell me where this design is over-engineered, or where it will bite me in the field.

  • Replies 2
  • Views 40
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

The split makes sense, and the main thing is that anything that can cause damage should keep working when Wi-Fi, the Pi or MQTT is down. That puts relays, PTT interlock and rotator end-stops on the Pico, and the network nodes only make requests.

On CAT: if the rig has USB, use it and keep it on the Pi. Hamlib is mature and rigctld lets several programs share one rig connection, so logging, digital modes and your own scripts don't fight over the serial port. If you must reach a TTL or CI-V port from a Pico, level-shift it properly. CI-V is an open-collector style bus with pull-up, so the transmit side usually needs a diode or transistor arrangement, and you can't just wire TX and RX together. An RS-232 port needs a real line driver, because RS-232 voltage swings will destroy a 3.3 V pin.

For the antenna switch, boot state matters. Some ESP32 pins are strapping pins or float during reset, so a relay can click briefly at power-up. Use pull-down resistors on driver inputs and pick GPIOs with known boot behaviour. Flyback diodes on every relay coil are mandatory, and a separate relay supply with common ground is cleaner than powering coils from the logic regulator. Also decide what 'no power' means: for most setups it should be a defined antenna, or a grounded one if lightning protection is the aim.

For the ESP32's ADC, I wouldn't trust it for anything that needs good accuracy. It is nonlinear near the ends of its range, and ADC2 pins conflict with Wi-Fi use on many boards. An ADS1115 over I²C is an easy improvement, although I²C wiring that runs far from the board needs care.

  • Moderators

I'd add that RF immunity is mostly layout and cabling, not which microcontroller you picked. Common failure patterns are: RF on the USB cable, RF on the sensor wiring, or RF on a long relay-control line, any of which can end up as a detected signal inside a chip. So treat every cable leaving an enclosure as an antenna.

Practical measures: a metal or at least shielded enclosure; a ferrite choke or a few turns through a suitable core on USB and power leads; a small capacitor to ground (for example 100 pF to 10 nF depending on band and signal speed) plus a series resistor on analog and slow digital lines; and a good common-mode choke on the feedline, so you aren't pushing RF current onto the shack wiring in the first place. For low-speed sensor lines, a series resistor and a bypass cap are cheap, but on I²C they limit speed and rise time, so check the bus still works.

For the rotator, putting the control loop on the Pico is reasonable. With a pot-based feedback, filter the voltage, take several samples and median or average them, and add a deadband so the motor isn't hunting around the target. If your rotator controller speaks the common Yaesu GS-232-style serial commands, you can expose that interface and let rotctld or logging software drive it without custom software.

If you later add an Si5351 or an SWR meter, keep the Si5351's square-wave outputs well away from the receive chain and filter them, since a square wave has lots of harmonics. For an SWR meter with a log detector like an AD8307, calibrate against a known dummy load and watch that your ADC sampling catches peaks under SSB or CW keying, otherwise the displayed reading can lag or jump.

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.