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 201
SN 126
A 14
K 1 Quiet
X-Ray C4.3
Wind 398.1 km/s
Aurora 1
Updated 11:30 UTC HamQSL · N0NBH
Day 80/40m Poor 30/20m Good 17/15m Good 12/10m Good
Night 80/40m Good 30/20m Good 17/15m Good 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 arduino to automate my antenna relay switching — anyone done this?

 Loading...

so ive been messing around with this for a few weeks now and its getting somewhere but im hitting a wall with the relay timing. basic setup is an arduino mega controlling a bank of 8 relays to switch between antennas depending on which band the radio is on. im pulling the band data off the CI-V bus from my IC-7300 which honestly was the easier part than i expected.

the problem is when i switch bands quickly like during a contest or just tuning around, sometimes the relay fires before the CI-V data is fully settled and i get this weird half-second where the radio is basically connected to nothing or the wrong antenna. ive tried adding a delay() but that feels hacky and if i make it too long it just makes the whole thing sluggish. wondering if anyone has done something similar and how they handled the debounce or timing on the relay side. also considered moving to a raspberry pi for this since i could run a proper python script with threading but not sure if thats overkill for what is honestly a pretty simple task

current code is just basically polling the CI-V every 100ms and comparing to the last known band, then triggering the relay bank. nothing fancy. just feels like theres a timing problem somewhere i cant quite nail down

  • Replies 1
  • Views 23
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

yeah ran into almost exactly this problem with a band decoder i built for my station last year. the CI-V polling approach works but youre right that it can get twitchy. what i ended up doing was storing the last band value and only triggering the relay change if the new value had been stable for like 3 consecutive reads — so basically a simple state machine instead of just reacting immediately to every change. its not really a delay in the bad sense, more like confirming the data before committing to the switch. knocked out all the false triggers for me.

the raspberry pi idea isnt overkill necessarily but the latency can actually be worse depending on what else is running. linux isnt realtime and if something else grabs the CPU for a second your relay timing goes out the window. for pure switching logic the arduino is honestly better suited, just needs the logic cleaned up a bit.

  • Guest unlocked, locked, pinned and unpinned this topic

dont overlook the actual relay specs too — some of the cheap SRD-05VDC relay modules have a pretty long operate time like 10-15ms and if youre stacking 8 of them on the same power rail they can droop the voltage enough to cause weird behavior. powered mine off the arduino 5v rail for way too long before i figured out that was causing half my problems lol. separate supply for the relay board made a big difference. anyway thats probably not your exact issue but worth checking if the timing fix doesnt solve it

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

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.