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

Shack automation with a Pi, Pico or ESP32: keeping RF out of the control side without losing your mind

ci_cover.jpg

Many shack automation projects start the same way. A Raspberry Pi runs Direwolf or logging software, a Pico or ESP32 handles the real-world I/O, and the list keeps growing: CAT control, a rotator controller, a remote antenna switch, an SWR/power readout, maybe an Si5351 for a VFO or beacon source. On the bench it all works. Then the transmitter keys up and the LCD fills with garbage, the relay board chatters, or the USB serial link to the rig drops.

I'd like to use this thread to collect practical design rules for the interface between small digital boards and real RF environments. Here are some starting questions.

1. Partitioning. Should the Pi stay on the network and logging side, with a microcontroller doing the time-critical and hardware-facing work (relays, PTT, ADC sampling, stepper or motor control)? Or is it better to keep everything on one board for simplicity?

2. Voltage levels. Pico and ESP32 GPIO are 3.3 V and not 5 V tolerant. Some rigs, interfaces and sensor boards use 5 V TTL, and some CAT ports use RS-232 levels. What is your routine for checking this before wiring anything?

3. RF ingress. Where do you put ferrites, bypass capacitors and isolation? On the USB cable, on sensor leads, on the relay lines, or in the enclosure?

4. Measurement. For an SWR meter, is a diode-detector coupler read by the ADC good enough, or is a log detector such as an AD8307-type part worth the extra effort?

Specific part numbers and failure modes are welcome. So are explanations of why a given fix works, since the reasoning transfers to other builds better than a wiring diagram does.

  • Replies 2
  • Views 57
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

On partitioning, I'd split by consequence of failure. If a crashed Linux process could leave a transmitter keyed, a rotator driving into its stop, or an antenna relay in the wrong state, put the safety logic on a microcontroller. Give it a watchdog and a PTT timeout, and make sure the outputs fall to a safe state on reset. The Pi can then send requests like "select antenna 3" or "rotate to 270" over serial or MQTT, and the microcontroller decides whether to act.

On levels, read the rig's CAT documentation before buying a cable. Some radios expose TTL-level serial, some use RS-232 voltage swings, and many modern ones present USB. Wiring 5 V TTL straight into a Pico pin is a quick way to damage the input, so use a level shifter or a resistor divider on the receive line. A MAX3232-style converter is the right part for true RS-232. The USB route avoids level problems, but it brings a long cable that can act as an antenna.

For RF ingress, treat every cable leaving the box as a possible antenna. Common-mode chokes on USB cables, short leads inside the enclosure, and a small RC or ferrite bead on each sensor and relay line all help. Use a flyback diode across any relay coil you drive from a transistor or driver array. If the radio and the Pi are on different supplies, a USB isolator on the CAT link can break ground loops that otherwise inject hum or noise. The usual cause of random resets near a transmitter is RF on the supply or I/O lines, not a bad board, so put the ferrite on the cable first and only then suspect the firmware.

  • Moderators

A few notes on the specific parts mentioned.

Si5351: its outputs are square-wave-like, so there will be harmonics. If the signal goes anywhere near an antenna or a receiver front end, add a low-pass filter sized for the band. Keep the I2C wires short, use the correct pull-ups for 3.3 V, and don't run the clock outputs in a ribbon next to the I2C lines. The drive-strength setting changes output level, so check it with a scope or a power meter into a 50 ohm load instead of assuming a number from a forum post.

ESP32 as a sensor board: the ADC is not very linear, and ADC2 can't be used while Wi-Fi is active, so plan your pins around that. Wi-Fi transmit bursts also cause current spikes, and a weak supply or a long thin power lead leads to brownouts that look like firmware bugs. Put a bulk capacitor near the module and keep the antenna end of the board clear of metal.

SWR meter: a diode detector is simple, but its response is nonlinear at low power. SSB also makes a mess of the reading because the power is constantly changing. Sampling several times and keeping the peak value works better than a single reading. A log detector gives you a much wider dynamic range, but you still have to calibrate it against a known power meter.

Direwolf: most of the pain is audio level and PTT, not software. Set the transmit and receive levels deliberately instead of turning everything up. For PTT, you can use a GPIO line, a CM108-type USB sound adapter with a GPIO pin, or rig control through Hamlib, depending on your hardware. Check the TX delay and the deviation with a second receiver before putting a tracker on the air.

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.