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 100
SN 82
A 8
K 2 Quiet
X-Ray B3.6
Wind 398.5 km/s
Aurora 1
Updated 09:30 UTC HamQSL · N0NBH
Day 80/40m Fair 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 antenna switching — anyone done something similar?

so ive been messing around with this idea for a while now and finally started putting something together. basically i want the pi zero to handle antenna switching based on what band i select on the radio, reading the band data output from my ic-7300 via the acc port. the idea is that it talks to a relay board over gpio and just... switches the antenna automatically without me having to reach over and flip anything manually.

ive got the ci-v stuff mostly figured out, im using a little python script to poll the rig and parse the band data, that part actually works pretty well. the problem is the relay board im using has some weird timing issues where it'll sometimes latch in a bad state if the script crashes or reboots unexpectedly. trying to figure out if i should be using a watchdog timer or if there's a smarter way to handle the fail-safe situation. ideally i want the default state to go back to my dipole if anything goes sideways.

anyone done anything like this? even just partial setups would be helpful. im running raspbian lite, nothing fancy, and using a sainsmart 8 channel relay board that i had laying around from a different project.

  • Replies 1
  • Views 24
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

yeah I did almost exactly this a couple years back with a pi 3b and my 7600, same general concept with the ci-v. the relay latch issue is pretty common with those sainsmart boards actually. what fixed it for me was adding a simple RC circuit on the coil side and also making sure i had a proper pull-down on the gpio pins so on boot they dont go high momentarily and fire the relays in a random state — that one bit me pretty hard the first time lol.

for the fail-safe thing i ended up just wiring the normally-closed contacts to the dipole feed, so if the relay loses power or the pi dies the antenna defaults back to the dipole without any intervention. the pi watchdog built into the kernel works fine as long as you configure /etc/systemd/system.conf properly, theres a few guides out there for that. also worth considering adding a small UPS or at least a good capacitor on the 5v rail cause power glitches will absolutely cause relay chatter which is not great when youre transmitting.

not to derail but have you looked at using an arduino mega instead of the pi for this kind of thing? i know pi is more flexible but for something that just needs to react to serial data and flip relays an arduino is way more reliable in my experience, boots instantly, no OS to worry about, and you can write a dead simple state machine that defaults everything to a known state on power up. i use one to control a 6-position antenna selector and it just works, never had a weird crash or anything like that in like 3 years of use.

not saying pi is wrong for it, just that ive had way fewer headaches going the microcontroller route for anything that needs to be reliable. if you do stick with the pi though the watchdog suggestion is solid.

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.