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 a pi zero to automate my antenna switching — anyone done this?

so ive been messing around with a raspberry pi zero w for a few weeks now trying to get it to handle my antenna switching automatically based on band selection from my radio. the idea is pretty straightforward — the radio sends band data out over a serial port (its a kenwood so it uses the AI command to broadcast frequency) and i want the pi to read that, figure out what band im on, and then trigger the right relay to switch between my yagi and my wire antennas.

i got the serial reading part working fine, python script runs on boot no problem. the issue im running into is the relay board. i have one of those 8 channel relay modules from amazon and i cant figure out why two of the channels seem to be triggering inverted — like they energize when i send a LOW instead of HIGH to the gpio pin. the other 6 work exactly how i expected. already checked my code like three times and the wiring looks right to me but im probably missing something dumb.

also wondering if anyone has done something similar and whether the pi zero is fast enough for this or if i should have just used an arduino. latency probably doesnt matter much here but curious what others think.

  • Replies 1
  • Views 52
  • Created
  • Last Reply

Top Posters In This Topic

Featured Replies

the relay thing is almost definitely an active low module. a lot of those cheap 8 channel boards mix up which optocoupler orientation they use across the channels and two of them end up being active low while the rest are active high. its annoying but fairly common with the no-name boards. you can either flip the logic in your code for those two channels or if you dig into the board you might find the IN pin is wired differently on those relays. honestly just easier to flip it in software and move on.

as for pi zero vs arduino — for something like band switching where you just need to read serial and toggle gpios the pi zero is probably overkill but it gives you way more flexibility later if you want to add a web interface or logging or whatever. i use a pi 3 for my shack automation stuff and having the ability to just ssh in and tweak things is really nice. arduino is great if you want low power and fast deterministic response but for antenna switching the few milliseconds difference really doesnt matter.

yeah what he said about the active low thing, ran into exact same problem with a relay board i bought last year. took me way too long to figure that out lol. just handle it in the script.

one thing id add — make sure you have some kind of interlock logic so it cant switch the antenna while youre transmitting. had a friend fry a relay doing exactly that during a contest. might be worth reading the PTT line or ALC or something to make sure the relay only moves when youre in receive. just a thought

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.