Skip to content
View in the app

A better way to browse. Learn more.

Ham Radio Base -Powered By Ham CQ DX

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.
Solar
SFI 101
SN 82
A 6
K 0 Quiet
X-Ray B3.6
Wind 323.7 km/s
Aurora 1
Updated 12: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

using a pi zero to automate my shack logging and rig control - anyone else gone down this rabbit hole

so i've been slowly turning my shack into something that would probably look insane to anyone who walked in cold. started about 8 months ago with just wanting the pi to pull spotting data from the cluster and display it on a little screen near the rig, simple enough right. well now i've got a pi zero W running hamlib over a USB serial adapter to control my 7300, a second pi 4 running a full logging setup with cloudlog, and an arduino mega in the middle of all of it handling antenna switching based on band changes from the radio.

the arduino part is where it gets interesting and also where i keep running into weird timing issues. basically i'm reading the band data output from the 7300 via hamlib, sending that over to the arduino on a serial connection, and then the arduino is driving a set of relays for my homebrew antenna switch. works great probably 90% of the time but sometimes on rapid QSY it'll just... not switch. or it'll switch to the wrong antenna and then correct itself a second later. i dont think its a hamlib polling speed thing because ive bumped up the poll rate and it didnt really help. wondering if its something in my arduino code where im not debouncing or waiting long enough before acting on the new band data.

anyone doing something similar or have thoughts on the timing side of this? im not a software guy by trade so my code is probably embarrassingly bad but it works mostly

  • Replies 1
  • Views 20
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

yeah the timing thing is almost definitely your issue, hamlib polling is kind of inherently laggy depending on the rig and the baud rate your talking to it over. what i did when i built something similar for a different rig was add a short confirmation delay on the arduino side - basically dont act on a new band value until you've seen the same value come in like 3 or 4 times in a row. adds maybe 300-400ms of total latency before the switch fires but you stop getting those phantom switches from transient data. its a poor mans debounce but it works fine for antenna switching where a fraction of a second doesnt really matter.

also worth checking if your serial buffer is getting overrun on the arduino side, especially if you're sending data continuously from the pi. ive had cases where the buffer fills up and you start reading partial packets and the arduino just does whatever it wants with the garbage data.

i went down basically the exact same hole last winter. ended up ripping out the arduino middleman entirely and just driving the relay board straight from the pi GPIO pins with a simple python script. one less thing to go wrong honestly. the only reason i kept the arduino originally was because i thought i needed the real-time reliability but for antenna switching the pi is plenty fast enough and you get way more flexibility with the logic on the python side. just something to consider if you keep fighting the serial comms between the two boards, sometimes simplifying the architecture is easier than debugging the bridge

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.