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 87
SN 33
A 10
K 1 Quiet
X-Ray B1.5
Wind 363.6 km/s
Aurora 1
Updated 00:00 UTC HamQSL · N0NBH
Day 80/40m Fair 30/20m Fair 17/15m Poor 12/10m Poor
Night 80/40m Good 30/20m Fair 17/15m Poor 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

Which controller for shack automation: ESP32, Pi Pico or a Raspberry Pi running Hamlib? Sorting out RF noise, CAT and relay switching

ci_cover.jpg

I'd like to compare notes on how people divide up the jobs in a small shack automation setup. The usual list is CAT rig control, an antenna switch, a rotator controller, an SWR/power readout, maybe a Direwolf APRS node and a CW keyer. It's tempting to put it all on one board, but the three common choices have quite different strengths.

Raspberry Pi (Linux). This is the natural home for Hamlib's rigctld, which exposes the radio over TCP (port 4532 by default) so logging software, digital mode programs and a web UI can share one serial connection. It's also the obvious platform for Direwolf with a USB sound interface. The downsides are an SD card that doesn't like hard power cuts, a switching supply that can be noisy, and the fact that nothing about it is real-time. Don't use it for paddle timing or relay interlocks that must act within milliseconds.

Pi Pico (RP2040). This is good for deterministic jobs such as a CW keyer, a Si5351 VFO or a tone/PTT sequencer. It has no radio of its own to radiate into your receiver, and the PIO blocks are handy for odd protocols. Its GPIOs are 3.3 V and not 5 V tolerant, which matters when you connect to older gear or to the 5 V outputs of a relay board.

ESP32. It's cheap and has Wi-Fi and Bluetooth built in, which makes it convenient for a web-controlled antenna switch or rotator. The same Wi-Fi makes it a potential noise source and a target for RF. It is also easy to brownout during a transmit burst if the supply is marginal.

Some specific points I'd like opinions on:

  • CAT levels. Icom CI-V is a single-wire, open-collector style bus, so you need a proper level shifter or transistor interface. Many Yaesu and Kenwood radios use TTL or RS-232 levels, depending on the model. A MAX3232 is not the same thing as a plain USB-serial adapter, so check the radio's manual for the actual levels before wiring anything.
  • Antenna switch. Relay coils need flyback diodes or a driver such as a ULN2003. A switch should never change position while transmitting, so decide whether the interlock is in software (reading PTT) or in hardware (the PTT line gates the relay supply).
  • Rotator position. The ESP32's internal ADC is non-linear and noisy. An external ADC such as an ADS1115, plus averaging, gives much steadier azimuth readings from the rotator's potentiometer.
  • SWR/power meter. A directional coupler feeding a log detector such as the AD8307 is a common route. The calibration table matters more than the display, so how do you handle it across bands?

Where do you draw the line between what lives on the Pi and what gets its own microcontroller? And what do you do to keep the whole thing running when the PA is keyed?

  • Replies 2
  • Views 14
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Administrators

My rule of thumb is that anything that can hurt equipment if it hangs gets its own small microcontroller, and the Pi only sends it requests. The antenna switch and PA band-select are good examples. A Pico or similar running a simple state machine with a watchdog can refuse to switch while PTT is active, and it keeps working if the Pi crashes or reboots. The Pi then provides the web page, logging and rigctld, and talks to the controller over USB serial or I2C with simple commands.

For RF immunity, the usual order of attack is: put the board in a metal enclosure, feed every cable through a ferrite or a few turns on a ferrite core, put a small capacitor (a few nF) at each I/O pin where the cable enters, and keep the control wiring away from the feedline. If a board resets only when you transmit on a particular band, suspect common-mode current on a USB or sensor cable before you suspect the code. Enabling the hardware watchdog is cheap insurance in any case.

On Si5351 work: its outputs are square waves, so the harmonics need a proper low-pass filter before they go anywhere near an antenna or a receiver mixer. A 3.3 V I2C bus with decent pull-ups is normally fine, but keep the clock lines short.

  • Administrators

One point to add on APRS and Direwolf. The Pi is a sensible platform, but the PTT and audio path need thought. Direwolf can drive PTT through a GPIO pin, a serial control line or the GPIO on a CM108/CM119-type USB sound adapter. Which one is best depends on the radio and the interface. Isolating audio with a 1:1 transformer and keeping the radio's mic and data lines away from USB cabling often cures hum and ground-loop problems. Set the transmit audio level so the radio isn't overdriven, because Direwolf's logs and a second receiver will tell you more than guessing at the deviation will.

For a standalone tracker, an ESP32 or Pico with a GPS module is lighter on power than a Pi, but you give up the ready-made TNC software. You'd need to handle AX.25 framing and AFSK generation yourself or use a library, and then verify the modulation on a receiver. Checking your beacon rate and path against local APRS etiquette is worth doing too.

For the SWR meter, I'd suggest logging forward and reflected voltages at a few known power levels into a dummy load and building a lookup table per band, rather than relying on one formula. Diodes and log detectors both vary with frequency, so a single calibration curve won't hold across HF and VHF.

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.