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 384.8 km/s
Aurora 1
Updated 13:30 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

Pi, Pico or ESP32 for shack automation? Where to split rig control, SWR sensing, rotator and antenna switching

ci_cover.jpg

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?

  • Replies 2
  • Views 25
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

RF immunity should probably be the first design criterion, ahead of which board is faster. A microcontroller that works on the bench can misbehave with a few hundred watts on HF a few meters from it. The usual suspects are common-mode current on USB, serial and sensor cables, and RF getting into ADC inputs and I2C lines.

Some habits help regardless of platform. Put the board in a metal enclosure where practical, and bond it to the station ground. Put ferrite chokes on every cable that leaves the box. Add small bypass capacitors at ADC pins, and keep sensor leads short or twisted. Run I2C at a modest speed and keep the wiring short, since long I2C runs to a display or an Si5351 board pick up junk easily. Relays and motors need flyback diodes or snubbers, and they should have their own supply path rather than sharing a rail with the ADC reference.

For the CAT cable, a USB-serial adapter is convenient, but the USB cable is also an antenna. Galvanic isolation (an isolated USB hub or an optoisolated serial stage) is worth considering if you see decode errors or dropouts only while transmitting. Dropouts that correlate with transmit are almost always RF, not software.

  • Administrators

On the Pi-versus-microcontroller split, I'd keep the Pi out of the time-critical path and use it as the supervisor. Direwolf is a good example. It runs well on a Pi with a USB sound interface, but PTT needs to be dependable. You can drive it from a GPIO line through a transistor, or through rigctld when the radio supports CAT PTT. Either way, add a hardware timeout so a stuck process cannot hold the transmitter keyed.

For an APRS tracker, an ESP32 or Pico plus a GPS module and a small radio module can do the job without Linux. If you want an I-gate or digipeater, that is where the Pi and Direwolf earn their place.

The Si5351 comes up a lot for VFOs and beacon sources. It is an I2C clock generator with square-wave outputs, so expect harmonics. Anything that feeds a receiver mixer or a transmit chain needs filtering, and its output level and drive settings should be matched to the stage after it. Also check library behavior for frequency changes, because some libraries recalculate PLL settings in ways that cause glitches or phase jumps.

For soldering, small SMD modules like the Si5351 breakout and level shifters tolerate a fine tip, flux and moderate heat better than a hot iron held on the pad. Put a drag of fresh flux on joints when rework gets messy, and inspect for bridges under magnification before applying power.

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.