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 128
SN 73
A 6
K 1 Quiet
X-Ray C2.2
Wind 403.6 km/s
Aurora 2
Updated 23:00 UTC HamQSL · N0NBH
Day 80/40m Fair 30/20m Good 17/15m Good 12/10m Fair
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 switch - anyone done this?

so ive been messing around with an arduino mega for the past few weeks trying to get it to control my 4-port coax switch automatically based on what band the radio is on. the idea is to pull the band data off the CI-V bus from my IC-7300 and then have the arduino decode that and fire the right relay. in theory its pretty simple but im running into some weirdness with the serial parsing and im not sure if its a timing issue or if im just reading the CI-V packets wrong.

the relay board im using is one of those cheap 8-channel ones from amazon, 5v coils, and it seems to work fine when i just hardcode which relay to trigger. the issue is specifically with the CI-V reading part. ive got it pulling data over a MAX3232 level shifter but every so often it seems to drop bytes and then the band decode goes completely wrong and it tries to switch to the wrong antenna.

anyone done something similar? or honestly any CI-V over arduino project would be helpful to look at. ive been at this for like 3 weekends and its starting to get frustrating. also wondering if a raspberry pi would have been a better choice for this kind of thing but i feel like the arduino should be able to handle it, its not that complicated

  • Replies 1
  • Views 4
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

yeah i did almost exactly this for my shack like two years ago, except i was using a TS-590 so kenwood CAT instead of CI-V, but same basic idea. the byte dropping thing is almost certainly a buffer overflow on the arduino's hardware serial - if youre using Software Serial for CI-V that thing is notoriously flaky especially if anything else in the loop is blocking. even a small delay() call in the wrong place will cause you to miss bytes.

what i ended up doing was switching to one of the hardware serial ports on the mega (you have 4 on that board which is great) and then just making the main loop as non-blocking as possible. no delay() anywhere, just state machines and millis() for timing. its a bit more code to write but once you do it that way it just works. also double check your baud rate matches exactly what the 7300 is putting out, CI-V is usually 19200 but some people have theirs set different and its easy to miss.

raspberry pi would work too and you'd have more headroom for sure but honestly the arduino is fine for this, you just gotta be careful about blocking code

i built something similar but went the pi route and kinda regret it in some ways. the latency on gpio from a pi running linux is not great if you need really deterministic timing, though for antenna switching it probably doesnt matter that much honestly. for pure relay control an arduino or even a bare attiny is way more predictable.

that said if your problem is the CI-V parsing the pi does make that easier cause you can just write python and use pyserial and theres already libraries floating around for CI-V. there was a project called hamlib that has CI-V support built in and you could probably hook into that instead of rolling your own parser. might save you a lot of headache. either way good luck, this kind of shack automation stuff is super satisfying once it actually works

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.