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

Station controller design: Pi vs Pico/ESP32 for CAT, rotator, antenna switch and SWR, and keeping RF out of it

ci_cover.jpg

Planning a small station automation setup and trying to decide how to split the work between a Raspberry Pi and microcontrollers. The wish list is CAT control for a rig, a rotator controller with position feedback, a remote antenna switch, a forward/reflected power readout for SWR, and eventually a Direwolf APRS node on the same network.

The obvious approach is a Pi running Hamlib (rigctld and rotctld) plus logging and Direwolf, with a Pico or ESP32 handling anything that needs hard real-time behavior or direct I/O: relay drivers, ADC readings and display updates. The open questions are where that boundary should sit and what causes trouble once real RF is in the room.

Specific points to discuss:

1. CAT interfaces differ a lot. Icom CI-V is a single-wire bus, many Yaesu radios use TTL-level serial or USB, and some Kenwoods use true RS-232 levels. What is a sane way to interface these to 3.3 V logic without frying a GPIO?

2. ADC accuracy for rotator potentiometer feedback and SWR detector voltages. Is the internal ADC on the ESP32 or Pico good enough, or is an external ADC the better choice?

3. Relay and antenna switch drivers: how much isolation is worth adding, and where should the switching hardware live relative to the feedline and the controller?

4. What are the realistic failure modes when the controller sits a few meters from an antenna on 100 W of HF, and how do you design against them from the start?

  • Replies 2
  • Views 52
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

  • Moderators

A common split is to put anything that must keep working when the network or OS misbehaves on the microcontroller, and everything that benefits from a full OS on the Pi. Relay sequencing, rotator stop limits and watchdog timeouts belong on the Pico or ESP32. Logging, Hamlib, Direwolf and web dashboards belong on the Pi. The microcontroller can expose a simple serial or TCP command set, and the Pi talks to it through a small daemon. If the Pi crashes mid-rotation, the microcontroller can still stop the motor after a timeout or at a limit.

On CAT: check the radio's manual for the actual electrical levels before wiring anything. CI-V is an open-collector style single-wire bus, so the usual approach is a transistor or small buffer circuit with a pull-up to the logic supply, rather than connecting TX and RX straight to a GPIO. For RS-232 levels, use a MAX3232-type converter or a ready-made USB serial adapter. For radios with built-in USB, plugging that into the Pi is usually the simplest and most robust option. Hamlib's rigctld gives you a TCP interface (default port 4532), so other software doesn't need to fight over the serial port.

On ADCs: the ESP32's internal ADC is nonlinear, noisy and not good near the rails. ADC2 also can't be used while Wi-Fi is active. For rotator position or detector voltages, an external 16-bit ADC such as an ADS1115 over I2C is usually the less painful route. The Pico's 12-bit ADC is better behaved, but its reference is the 3.3 V supply, so add filtering and averaging, and keep analog traces away from the switching regulator.

For a SWR meter, remember that SWR is computed from forward and reflected voltages, so detector linearity and calibration matter more than the display. A simple diode detector is nonlinear at low power. A log detector like the AD8307 gives a wide dynamic range, but you still need to calibrate against known power levels and a dummy load. Treat the displayed SWR with suspicion at very low power.

  • Administrators

On RF problems, assume they will show up and design for it. Typical symptoms are a display that garbles on transmit, an ESP32 that resets, serial data that corrupts only on certain bands, or relays that chatter. The usual causes are common-mode current on cables, a poor ground arrangement, or a long unshielded lead acting as a pickup antenna.

Practical measures: put the controller in a metal enclosure with bypassed feedthrough lines, and add ferrite chokes on USB, DC and control cables. Decouple the supply at the board with ceramic and bulk capacitors. Keep cable runs to the antenna switch or rotator short or filtered, and use small RC or ferrite filtering at each connector. Avoid running DC and control lines alongside coax for any length. Many problems that look like software bugs go away when common-mode current is fixed with a choke at the right place.

For relays, always include a flyback diode (or snubber) across the coil and drive it from a transistor or driver IC rather than a GPIO. Opto-isolation or a separate relay supply helps when the switching hardware is far from the controller. For an antenna switch, remember that the relay's RF rating at your highest frequency and power is a separate question from its coil rating, and that switching under transmit can damage contacts. Interlock the switch with PTT, or at least with a short mute delay.

If a Pi will run Direwolf, the audio path and PTT matter most. Direwolf can key PTT through a GPIO, a serial RTS/DTR line, or a CM108-style USB sound adapter's GPIO. USB audio dongles are common, but ground loops between the radio and the Pi can add hum and noise, so an audio isolation transformer on the lines is cheap insurance.

For Si5351 projects, note that its outputs are square waves, so you need a low-pass filter appropriate for the band before using it as an RF source. Keep I2C wiring short, and don't expect clean output at higher frequencies without checking harmonics on a spectrum analyzer or at least a receiver.

On soldering, use enough heat and flux for the ground plane connections on RF boards. Cold joints on a shield or ground lead show up later as intermittent behavior, which is the hardest kind to diagnose.

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.